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

Hardcode terminal total difficulty #2605

Merged
merged 7 commits into from
Sep 21, 2021
Merged

Conversation

mkalinin
Copy link
Collaborator

@mkalinin mkalinin commented Sep 17, 2021

What's done?

  • TransitionStore with compute_terminal_total_difficulty function are replaced with TERMINAL_TOTAL_DIFFICULTY configuration parameter
  • Adjustments to different parts of the spec that are corresponding to the above change

Rationale

  • Reduce the complexity of consensus client implementation caused by computed TTD, see Terminal Total Difficulty calculation may differ between nodes #2603 for details.
  • Hardcoded TTD is a robust solution to prevent execution client from mistakenly following the contentious fork sharing the Mainnet PoW chain in the case of software misconfiguration or failure.

Dependencies

cc @ajsutton

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

a couple of small notes about config.

otherwise looks good!
will wait on #2581 to approve so the diff looks cleaner for final review

specs/merge/beacon-chain.md Outdated Show resolved Hide resolved
configs/minimal.yaml Show resolved Hide resolved
Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

excellent!

@lsankar4033
Copy link
Contributor

nice! this is definitely cleaner. re: #2599, do you think it makes sense to have a param for TERMINAL_BLOCK_HASH as well?

@mkalinin
Copy link
Collaborator Author

nice! this is definitely cleaner. re: #2599, do you think it makes sense to have a param for TERMINAL_BLOCK_HASH as well?

Yes, I think this would be the right way to implement override of a terminal block. And if transition ends up with terminal block override then consensus and execution clients will need to be released with hardcoded terminal block hash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bellatrix CL+EL Merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants