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

validate_merge_block uses correct block hash #2710

Merged
merged 3 commits into from
Nov 4, 2021

Conversation

terencechain
Copy link
Contributor

block.block_hash == TERMINAL_BLOCK_HASH still assumes block is PowBlock but was changed to BeaconBlock

@@ -115,7 +115,7 @@ def validate_merge_block(block: BeaconBlock) -> None:
if TERMINAL_BLOCK_HASH != Hash32():
# If `TERMINAL_BLOCK_HASH` is used as an override, the activation epoch must be reached.
assert compute_epoch_at_slot(block.slot) >= TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH
return block.block_hash == TERMINAL_BLOCK_HASH
return block.body.execution_payload.parent_hash == TERMINAL_BLOCK_HASH
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this should be parent_hash and not block_hash. Please correct me if im wrong

Copy link
Collaborator

@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.

Ups, that's the copy/paste I have made in the recent upgrade, right before the release. Good catch! 👍

@djrtwo djrtwo merged commit 116017d into ethereum:dev Nov 4, 2021
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.

None yet

4 participants