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: sanity-check fork configuration in genesis init #31171

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

fjl
Copy link
Contributor

@fjl fjl commented Feb 13, 2025

This is to prevent a crash on startup with a custom genesis configuration. With this change in place, upgrading a chain created by geth v1.14.x and below will now print an error instead of crashing:

Fatal: Failed to register the Ethereum service: invalid chain configuration: missing entry for fork "cancun" in blobSchedule

Arguably this is not great, and it should just auto-upgrade the config. We'll address this in a follow-up PR for geth v1.15.2

Copy link
Member

@MariusVanDerWijden MariusVanDerWijden left a comment

Choose a reason for hiding this comment

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

SGTM

rjl493456442
rjl493456442 previously approved these changes Feb 13, 2025
Copy link
Member

@rjl493456442 rjl493456442 left a comment

Choose a reason for hiding this comment

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

sgtm.

Although it's definitely not a common case to have invalid chain config in db

@fjl fjl dismissed stale reviews from rjl493456442 and MariusVanDerWijden via 16e5fe5 February 13, 2025 11:50
@fjl fjl merged commit 8ec4a06 into ethereum:master Feb 13, 2025
1 of 4 checks passed
@fjl fjl added this to the 1.15.1 milestone Feb 13, 2025
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.

3 participants