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

cmd/utils, core: Ensure Dev Mode Genesis TTD/Difficulty are 0 #29566

Closed
wants to merge 1 commit into from

Conversation

jwasinger
Copy link
Contributor

@jwasinger jwasinger commented Apr 18, 2024

After #29404 , dev mode will fail to start up when a custom genesis is used because of this check:

if genesis.Difficulty.Cmp(genesis.Config.TerminalTotalDifficulty) != 1 {
					Fatalf("Bad developer-mode genesis configuration: genesis block difficulty must be > terminalTotalDifficulty")
				}

We now default the dev genesis TTD to 0, which also technically makes it the last block before the merge. However, post-merge timestamp-activated forks are activated at genesis. Withdrawals also still seem to work. It's a weird situation all-around and I'm not sure what the ramifications are.

…hat developer genesis block ttd == difficulty == 0.
@jwasinger
Copy link
Contributor Author

Oops. (other than the validation I add here), this has already been done in #29469 .

@jwasinger jwasinger closed this Apr 18, 2024
@jwasinger jwasinger reopened this Apr 18, 2024
@jwasinger jwasinger changed the title cmd/utils, core: set developer default genesis block difficulty to 0. add validation that developer genesis block ttd == difficulty == 0. cmd/utils, core: Ensure Dev Mode Genesis TTD/Difficulty are 0 Apr 18, 2024
@jwasinger jwasinger closed this Apr 18, 2024
@jwasinger jwasinger deleted the dev-genesis-difficulty branch April 18, 2024 18:16
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.

1 participant