-
Notifications
You must be signed in to change notification settings - Fork 780
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
Isthmus: withdrawals root in block header #383
Conversation
8d2f6ac
to
823e2d9
Compare
Rebased changes in this branch with latest changes in |
823e2d9
to
91c2f21
Compare
91c2f21
to
de78b7b
Compare
de78b7b
to
8ff4f17
Compare
02191a5
to
c5f905b
Compare
Functionality is almost good to go.
|
f5949e0
to
6579db6
Compare
@protolambda Thank you for taking a look, for the changes you pushed and the suggestions. I have done the following:
Please take a look whenever you get a chance. FYI @tynes |
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.
LGTM, but after discussing with @tynes I think we are over-thinking the json fuzz-tests:
- Even if they work, upstream geth seems to do fine without them
- The json functionality is auto-generated with a lib that is widely used in geth already.
- The fuzzing doesn't seem to run in CI or get enough fuzzing time to be meaningful, especially since it's fuzzing the raw JSON, and even with a fuzz-corpus hint it might not get far.
Let's drop the fuzz tests and get this merged.
…thdrawals storage root
…orage root * update checks for l2 withdrawal root to be gated on Isthmus * core: pass chainConfig to NewBlock for withdrawalRoot checks and fix usage this is so that we can check whether Isthmus is active within NewBlock() * genesis: read and set withdrawalsRoot to storageRoot of L2toL1MP contract * prioritize supplied withdrawalsRoot in beacon engine header check
6579db6
to
1750edc
Compare
Thanks for the feedback @protolambda @tynes I've dropped the fuzz tests from the earlier commit and rebased against the updated base branch. Should be ready for a final pass and hopefully it's good to go! |
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.
LGTM! (cannot approve my own PR, but at this point it's really @vdamle authoring the commits here)
Description
L2 withdrawals storage root is retrieve from the state upon block-sealing, and then inserted into the header as withdrawals-root.
The L1 withdrawals-root is computed as an MPT hash of withdrawals operations. The OP-Stack uses contract-storage instead. In some places this means we have to verify the block-body withdrawals-list is empty, while the header is set to the storage root.
Tests
Work in progress.
Additional context
This PR is used as feature-branch. Changes will not be merged into
optimism
until the withdrawals changes (specs, op-geth, op-node, and ideally other implementations) are complete for Holocene upgrade.Metadata
Part of ethereum-optimism/optimism#12044