-
Notifications
You must be signed in to change notification settings - Fork 55
feat(l2): commit blocks in batches #2397
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lines of code reportTotal lines added: Detailed view
|
54a1e03
to
3af5fc3
Compare
Closed
5f1ff8e
to
25ec922
Compare
7a90f20
to
2facbef
Compare
fb8f0b2
to
1eeb1eb
Compare
jrchatruc
approved these changes
Apr 28, 2025
ManuelBilbao
approved these changes
Apr 29, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
To reduce the number of times we go to the L1 to commit/verify blocks.
Description
l1_committer
to merge as many blocks as possible into a singleStateDiff
before committing, limited by the blob size.StateDiff
to now contain both the resultingAccountUpdates
from executing all blocks in the batch and the header of the last block.batchNumbers
instead ofblockNumbers
.ethrex_getWithdrawalProof
, which returns all necessary data to claim an L1 withdrawal for a given L2 withdrawal transaction hash.apply_account_updates
for theExecutionDB
to prepare the db for executing the next block in the batch.L2/storage
with the following tables:block_number
=>batch_number
: Maps block numbers to batches (used by the endpoint to locate a withdrawal's batch).batch_number
=>Vec<block_number>
: Lists all block numbers included in a given batch.batch_number
=>withdrawal_hashes
: Stores withdrawal hashes per batch (used to construct merkle proofs).Closes None
Created issues: