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

sketch out genesis predeploy check #373

Closed
wants to merge 12 commits into from
Closed

Conversation

geoknee
Copy link
Collaborator

@geoknee geoknee commented Jul 10, 2024

Towards #372

To get this over the line, I think the blockers are as follows:

  • We need a good "ground truth" for what the standard predeploys actually are. I would have thought OP Mainnet, but then:
    superchain-genesis_test.go:75: 
                Error Trace:    /Users/georgeknee/code/ethereum-optimism/superchain-registry/validation/superchain-genesis_test.go:75
                                                        /Users/georgeknee/code/ethereum-optimism/superchain-registry/validation/validation_test.go:80
                Error:          Should be true
                Test:           TestValidation/OP_Mainnet_(10)/Standard_or_Standard_Candidate_Chain/Standard_Genesis_Predeploys
                Messages:       Genesis does not contain an account for 0x4200000000000000000000000000000000000019
  • We need to fill out all of the expectations into a TOML file, read in and loop over them in this test
  • Exclude (exclusions_test.go) or downgrade any chain failing the check

@geoknee
Copy link
Collaborator Author

geoknee commented Jul 15, 2024

For OP Mainnet, or in fact for any chain, if the genesis allocs are not present we have the option to go on chain (L2) and query for the information.

@geoknee geoknee force-pushed the gk/genesis-predeploy-check branch from 299884b to 5d766e0 Compare July 17, 2024 12:03
Comment on lines +129 to +132
g, err := LoadGenesis(chain.ChainID)
require.NoError(t, err)

ch := g.Alloc[MustHexToAddress(implementation)].CodeHash
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants