Skip to content

Add a state reconstruct section to StateDiffs docs #2617

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

Open
avilagaston9 opened this issue Apr 28, 2025 · 0 comments
Open

Add a state reconstruct section to StateDiffs docs #2617

avilagaston9 opened this issue Apr 28, 2025 · 0 comments
Labels
L2 Rollup client

Comments

@avilagaston9
Copy link
Contributor

Originally posted by @ManuelBilbao in #2397 (comment)

We should have a section explaining what a reconstructed state looks like and why.

@avilagaston9 avilagaston9 added the L2 Rollup client label Apr 28, 2025
github-merge-queue bot pushed a commit that referenced this issue Apr 29, 2025
**Motivation**

To reduce the number of times we go to the L1 to commit/verify blocks.

**Description**

- Modifies `l1_committer` to merge as many blocks as possible into a
single `StateDiff` before committing, limited by the blob size.
- Modifies `StateDiff` to now contain both the resulting
`AccountUpdates` from executing all blocks in the batch and the header
of the last block.
- Adapts contracts to use `batchNumbers` instead of `blockNumbers`.
- Adds a new RPC endpoint, `ethrex_getWithdrawalProof`, which returns
all necessary data to claim an L1 withdrawal for a given L2 withdrawal
transaction hash.
- Implements `apply_account_updates` for the `ExecutionDB` to prepare
the db for executing the next block in the batch.
- Adds a `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:
- #2563
- #2578 
- #2579 
- #2617

---------

Co-authored-by: Edgar <[email protected]>
Co-authored-by: VolodymyrBg <[email protected]>
Co-authored-by: Tomás Paradelo <[email protected]>
Co-authored-by: Javier Rodríguez Chatruc <[email protected]>
Co-authored-by: Mauro Toscano <[email protected]>
Co-authored-by: Martin Paulucci <[email protected]>
Co-authored-by: Jeremías Salomón <[email protected]>
Co-authored-by: Lucas Fiegl <[email protected]>
Co-authored-by: Cypher Pepe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L2 Rollup client
Projects
None yet
Development

No branches or pull requests

1 participant