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

core: support EIP-4788 Pre-deploy contract to dev environment #29655

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

0xbeny
Copy link

@0xbeny 0xbeny commented Apr 25, 2024

Dev/Private chain setup now supports EIP-4788 at Genesis block.

Took BeaconRootsCode from here and then added to Alloc.

Result on console:
> eth.call({ from: eth.accounts[0], input: '0x5f6020818181720f3df6d732807ef1319fb7b8bb8522d0beac024282525afa1460275760205ff35b5f80fd' }) "0x0000000000000000000000000000000000000000000000000000000000000000"

Fixes #29539

@0xbeny 0xbeny changed the title core: support EIP-4788 Pre-deploy contract to dev environment #29539 core: support EIP-4788 Pre-deploy contract to dev environment Apr 25, 2024
@s1na
Copy link
Contributor

s1na commented Apr 26, 2024

params/protocol_params.go:192: File is not goimports-ed (goimports)

Copy link
Contributor

@s1na s1na left a comment

Choose a reason for hiding this comment

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

LGTM.

Note that with this PR parent beacon root will always be 0x00.000. But IMO it's still better than the undefined behavior of calling a contract that doesn't exist.

For a more meaningful result we should either allow users to set a custom root via API (similar to how we have to withdrawals), or actually produce some block in simulated beacon. I'm inclined to kick this can down the road :)

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

Successfully merging this pull request may close these issues.

Beacon root contract in dev mode and private chains
2 participants