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: deploy EIP-4788 contract in dev mode genesis #29655

Merged
merged 7 commits into from May 14, 2024
Merged

Conversation

0xbeny
Copy link
Contributor

@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 :)

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

LGTM

@fjl fjl changed the title core: support EIP-4788 Pre-deploy contract to dev environment core: deploy EIP-4788 contract in dev mode genesis May 14, 2024
@fjl fjl merged commit 8919c5c into ethereum:master May 14, 2024
2 of 3 checks passed
@fjl fjl added this to the 1.14.4 milestone May 14, 2024
@fjl fjl removed the status:triage label May 14, 2024
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.

Beacon root contract in dev mode and private chains
4 participants