-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Bring more clarity to notify_forkchoice_updated calls #2745
Conversation
specs/merge/fork-choice.md
Outdated
@@ -66,6 +66,10 @@ def notify_forkchoice_updated(self: ExecutionEngine, | |||
*Note*: The call of the `notify_forkchoice_updated` function maps on the `POS_FORKCHOICE_UPDATED` event defined in the [EIP-3675](https://eips.ethereum.org/EIPS/eip-3675#definitions). | |||
As per EIP-3675, before a post-transition block is finalized, `notify_forkchoice_updated` must be called with `finalized_block_hash = Hash32()`. | |||
|
|||
*Note*: Client software must not call this function as long as the paylod of the head of the chain is empty, i.e. `get_head(store).body.payload == ExecutionPayload()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This statement is too strong. The validator that builds the merge transition block will call notify_forkchoice_updated
when their store has an empty payload to kick off the build process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead, it might be. "must not call this function as long as the transition conditions are not met on the PoW chain. i.e. there exists a block for which is_valid_terminal_pow_block
returns true"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw maybe use capital "MUST NOT".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed now.
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! just a minor typo that i'll patch
This PR clarifies two things:
notify_forkchoice_updated
must not be called if a block with empty payload becomes the head of the chainnotify_forkchoice_updated
must be called withhead_block_hash = terminal_pow_block.block_hash
if it attempts to initiate build process of the payload for the merge transition block; this case is also specified in thevalidator.md
in a form of python code hence isn't that obvious