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

Genesis execution block handling #2719

Merged
merged 2 commits into from
Nov 11, 2021
Merged

Genesis execution block handling #2719

merged 2 commits into from
Nov 11, 2021

Conversation

paulhauner
Copy link
Contributor

The current implementation of get_pow_block_at_terminal_total_difficulty will raise an exception on any chain (e.g., mainnet) if the pow_chain contains only the genesis block (e.g., unsynced node). This is because genesis_block.parent_hash == Hash32() and Hash32() is not in pow_chain.

This change also makes allowances for networks where the TERMINAL_TOTAL_DIFFICULTY is reached at the genesis block.

There's an alternative version of this fix which does not allow for a network where TTD is met at genesis: f6ed352.

Copy link
Contributor

@mkalinin mkalinin left a comment

Choose a reason for hiding this comment

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

The fix looks good to me! Allowing for genesis to reach TTD is better than not to

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.

4 participants