Skip to content
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

Tests and misc updates for L2 withdrawals root #399

Merged
merged 20 commits into from
Dec 3, 2024

Conversation

vdamle
Copy link
Contributor

@vdamle vdamle commented Oct 9, 2024

Targeted to be merged into: #383

for TODO work items in op-geth documented in: ethereum-optimism/optimism#12044

@vdamle vdamle changed the title Isthumus: Tests and miscellaneous updates for L2 withdrawals root Isthumus: Tests and misc updates for L2 withdrawals root Oct 9, 2024
@vdamle vdamle changed the title Isthumus: Tests and misc updates for L2 withdrawals root Isthmus: Tests and misc updates for L2 withdrawals root Oct 9, 2024
@vdamle vdamle force-pushed the vd/l2-withdrawals-tests branch from f790bbd to d4998b0 Compare October 22, 2024 18:06
@vdamle vdamle force-pushed the l2-withdrawals-root branch from 8d2f6ac to 823e2d9 Compare October 22, 2024 18:14
@vdamle vdamle force-pushed the vd/l2-withdrawals-tests branch from d4998b0 to f56b4ca Compare October 22, 2024 18:21
beacon/engine/types.go Outdated Show resolved Hide resolved
@vdamle
Copy link
Contributor Author

vdamle commented Oct 25, 2024

@protolambda In order to update the genesis handling when reading from superchain-registry: https://github.com/ethereum-optimism/op-geth/blob/optimism/core/superchain.go#L30-L46 , I will need to make a change to SCR to:

  • become aware of Isthmus fork.
  • read the withdrawalsRoot from the genesis data, if Isthmus is active.

Going to work on that PR, so there's a TBD in op-geth to update that portion of the genesis after the SCR code is in.

@vdamle vdamle marked this pull request as ready for review October 25, 2024 20:59
@vdamle vdamle requested a review from a team as a code owner October 25, 2024 20:59
@vdamle vdamle requested review from ajsutton and protolambda and removed request for a team October 25, 2024 20:59
core/types/block.go Outdated Show resolved Hide resolved
core/genesis.go Show resolved Hide resolved
core/types/block_test.go Outdated Show resolved Hide resolved
core/genesis.go Outdated Show resolved Hide resolved
core/genesis.go Outdated Show resolved Hide resolved
core/genesis_test.go Outdated Show resolved Hide resolved
core/types/block.go Outdated Show resolved Hide resolved
core/types/gen_header_json.go Outdated Show resolved Hide resolved
core/genesis.go Show resolved Hide resolved
@vdamle vdamle requested review from protolambda and tynes October 31, 2024 15:45
@vdamle
Copy link
Contributor Author

vdamle commented Oct 31, 2024

This comment is not relevant.

Because hashAlloc() reads the storage root of the contract, no change is needed in `superchain-registry. So the above comment can be ignored.

@vdamle vdamle requested a review from tynes November 22, 2024 11:04
@vdamle vdamle force-pushed the l2-withdrawals-root branch from de78b7b to 8ff4f17 Compare December 2, 2024 02:25
protolambda and others added 17 commits December 1, 2024 21:25
and update checks for l2 withdrawal root to be gated on Isthmus instead
of Holocene
* To check whether Isthmus is active within NewBlock(), to appropriately
  handle withdrawalRoot, we need to pass in chainConfig.
* Also added a Block RLP encode/decode test.
...of L2ToL1MessagePasser contract
ExecutableDataToBlockNoHash() needs to know whether Isthmus is active
to determine the correct treatment of withdrawalsRoot
regenerating binding with go1.22 results in different unmarshalling
code that fails existing tests
they were mainly to address vscode warnings, will move it
to a separate PR
also removed usage of a 3rd party package and custom json tags in header.
* remove extra public api
* change equality check for encode/decode roundtrip test
* remove extra test which is covered already in fuzz test
* remove earlier hardcoded test added in block_test and revert other
  helper changes in block_test
@vdamle vdamle force-pushed the vd/l2-withdrawals-tests branch from 6f1be75 to 700b1fd Compare December 2, 2024 04:32
to avoid import cycle and include all fuzz tests in a single place
Copy link
Collaborator

@protolambda protolambda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change to make, then good to merge into the base branch. Will do another review there, and then with the monorepo side ready (don't want to block updates to latest op-geth due to breaking changes in block-construction signatures) we can merge it optimism branch.

core/genesis.go Show resolved Hide resolved
beacon/engine/types.go Outdated Show resolved Hide resolved
beacon/engine/types.go Outdated Show resolved Hide resolved
@protolambda protolambda merged commit 02191a5 into l2-withdrawals-root Dec 3, 2024
6 checks passed
@protolambda protolambda deleted the vd/l2-withdrawals-tests branch December 3, 2024 15:41
@benjaminion benjaminion changed the title Isthmus: Tests and misc updates for L2 withdrawals root Tests and misc updates for L2 withdrawals root Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants