From 6ece777ff51b50883ac8ad94b9ed7dba1ed28115 Mon Sep 17 00:00:00 2001 From: Mikhail Kalinin Date: Wed, 24 Nov 2021 20:32:27 +0600 Subject: [PATCH 1/4] Bring more clarity to notify_forkchoice_updated calls --- specs/merge/fork-choice.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specs/merge/fork-choice.md b/specs/merge/fork-choice.md index e14998925..422ac9dd7 100644 --- a/specs/merge/fork-choice.md +++ b/specs/merge/fork-choice.md @@ -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()`. + +*Note*: Client software must call this function to initiate payload build process to produce the merge transition block, in this case the `head_block_hash` parameter must be set to the hash of a terminal PoW block. + ## Helpers ### `PayloadAttributes` From b4377333fabb302122cd168c4654e8f81cf912f6 Mon Sep 17 00:00:00 2001 From: Mikhail Kalinin Date: Thu, 25 Nov 2021 16:27:59 +0600 Subject: [PATCH 2/4] Polish notify_forkchoice_updated description as per review Co-authored-by: Hsiao-Wei Wang --- specs/merge/fork-choice.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/merge/fork-choice.md b/specs/merge/fork-choice.md index 422ac9dd7..1b3a61fe2 100644 --- a/specs/merge/fork-choice.md +++ b/specs/merge/fork-choice.md @@ -68,7 +68,7 @@ As per EIP-3675, before a post-transition block is finalized, `notify_forkchoice *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()`. -*Note*: Client software must call this function to initiate payload build process to produce the merge transition block, in this case the `head_block_hash` parameter must be set to the hash of a terminal PoW block. +*Note*: Client software MUST call this function to initiate the payload build process to produce the merge transition block; the `head_block_hash` parameter MUST be set to the hash of a terminal PoW block in this case. ## Helpers From 7a8f23667902d16d3580fb43b31333dfbb220d56 Mon Sep 17 00:00:00 2001 From: Mikhail Kalinin Date: Thu, 25 Nov 2021 16:33:30 +0600 Subject: [PATCH 3/4] Fix notify_forkchoice_updated description as per review --- specs/merge/fork-choice.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/merge/fork-choice.md b/specs/merge/fork-choice.md index 1b3a61fe2..71b708ab4 100644 --- a/specs/merge/fork-choice.md +++ b/specs/merge/fork-choice.md @@ -64,9 +64,9 @@ 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()`. +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()`. +*Note*: Client software MUST NOT call this function until the transition conditions are met on the PoW network, i.e. there exist a block for which `is_valid_terminal_pow_block` function returns `True`. *Note*: Client software MUST call this function to initiate the payload build process to produce the merge transition block; the `head_block_hash` parameter MUST be set to the hash of a terminal PoW block in this case. From d237491dfe04ca54d7c60b0791631f15bb7f5366 Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Fri, 26 Nov 2021 06:47:05 -0700 Subject: [PATCH 4/4] minor typo --- specs/merge/fork-choice.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/merge/fork-choice.md b/specs/merge/fork-choice.md index 71b708ab4..95d613e9f 100644 --- a/specs/merge/fork-choice.md +++ b/specs/merge/fork-choice.md @@ -66,7 +66,7 @@ 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 until the transition conditions are met on the PoW network, i.e. there exist a block for which `is_valid_terminal_pow_block` function returns `True`. +*Note*: Client software MUST NOT call this function until the transition conditions are met on the PoW network, i.e. there exists a block for which `is_valid_terminal_pow_block` function returns `True`. *Note*: Client software MUST call this function to initiate the payload build process to produce the merge transition block; the `head_block_hash` parameter MUST be set to the hash of a terminal PoW block in this case.