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

filler: allow genesis state root calc to modify pre-alloc #241

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

marioevz
Copy link
Member

@marioevz marioevz commented Aug 2, 2023

After Cancun fork, due to EIP-4788, t8n automatically updates the storage when calculating the genesis state root to perform the nonce increment of the beacon root stateful pre-compile:

"0x000000000000000000000000000000000000000b": {
                "nonce": "0x01",
                "balance": "0x00",
                "code": "0x",
                "storage": {}
            }

Instead of doing this manually for every test, with this PR we fetch the updated pre that is the result of calling the t8n to calculate the genesis state root, and use that as input pre for each test.

This has the added benefit that it will not matter if the client reading the genesis applies or not the pre-compile nonce update because it will be contained in the pre of the test.

Copy link
Collaborator

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

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

Very clean! :D

@spencer-tb spencer-tb merged commit cde9248 into ethereum:main Aug 3, 2023
5 checks passed
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