-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
op-node: batch-decoder: Support ecotone #10577
op-node: batch-decoder: Support ecotone #10577
Conversation
WalkthroughWalkthroughThe recent changes introduce significant enhancements to the Changes
Recent Review DetailsConfiguration used: .coderabbit.yml Files selected for processing (2)
Additional comments not posted (7)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Out of diff range and nitpick comments (1)
op-node/cmd/batch_decoder/fetch/fetch.go (1)
Line range hint
83-191
: Significant changes infetchBatchesPerBlock
to handle blob transactions based on the presence of thebeacon
client. The logic to handle different transaction types and errors is well-structured. However, consider handling errors without terminating the program usinglog.Fatal
to allow more graceful error handling and recovery.- log.Fatal(fmt.Errorf("failed to fetch blobs: %w", err)) + log.Printf("failed to fetch blobs: %v", err) + return 0, 0, err
7d92f41
Description
From ecotone, batches may written to blobs.
Now batch decoder can read blob transactions and parse channel frames, updating
fetch
command. Previously the batch decoder code assumed that single batch tx contained single channel frames. This PR updatesTransactionWithMetadata
struct to support multiple frames from blobs.New optional flag:
--l1.beacon
. If this flag is not provided, ignore blobs in batch transactions.Tests
Manually tested.
--l1.beacon
is set.--l1.beacon
.--l1.beacon
is not set.--l1.beacon
is incorrectly set.Example command for op-mainnet:
Partial output:
Where those five batches are from consecutive five ecotone batches: