From ca5200aab4e08d33dad6483adefc81ee9a45e79a Mon Sep 17 00:00:00 2001 From: Mikhail Date: Fri, 22 May 2026 18:28:02 +0500 Subject: [PATCH 1/8] Move safe-block.md to fast-confirmation.md --- fork_choice/.pages | 7 ----- fork_choice/safe-block.md | 41 ---------------------------- specs/bellatrix/fast-confirmation.md | 28 +++++++++++++++++++ specs/bellatrix/fork-choice.md | 2 +- specs/gloas/fast-confirmation.md | 28 +++++++++++++++++++ specs/gloas/fork-choice.md | 7 +++-- 6 files changed, 62 insertions(+), 51 deletions(-) delete mode 100644 fork_choice/.pages delete mode 100644 fork_choice/safe-block.md create mode 100644 specs/bellatrix/fast-confirmation.md create mode 100644 specs/gloas/fast-confirmation.md diff --git a/fork_choice/.pages b/fork_choice/.pages deleted file mode 100644 index a5e6ccc9046..00000000000 --- a/fork_choice/.pages +++ /dev/null @@ -1,7 +0,0 @@ -nav: - - ... - - Fork Choice -- Core: - - phase0: specs/phase0/fork-choice - - bellatrix: specs/bellatrix/fork-choice - - capella: specs/capella/fork-choice - - deneb: specs/deneb/fork-choice diff --git a/fork_choice/safe-block.md b/fork_choice/safe-block.md deleted file mode 100644 index 00f75e92ce4..00000000000 --- a/fork_choice/safe-block.md +++ /dev/null @@ -1,41 +0,0 @@ -# Fork Choice -- Safe Block - - - -- [Introduction](#introduction) -- [`get_safe_execution_block_hash`](#get_safe_execution_block_hash) - - - -## Introduction - -Under honest majority and certain network synchronicity assumptions there exists -a block that is safe from re-orgs. Normally this block is pretty close to the -head of canonical chain which makes it valuable to expose a safe block to users. - -This section describes an algorithm to find a safe block. - -## `get_safe_execution_block_hash` - -*Note*: `retrieve_fast_confirmed_root()` is an implementation dependent function -that retrieves the most recent `confirmed_root` determined by the -[Fast Confirmation](../specs/phase0/fast-confirmation.md) algorithm. - -```python -def get_safe_execution_block_hash(store: Store) -> Hash32: - safe_block_root = retrieve_fast_confirmed_root() - safe_block = store.blocks[safe_block_root] - - if compute_epoch_at_slot(safe_block.slot) >= GLOAS_FORK_EPOCH: - safe_block_bid = safe_block.body.signed_execution_payload_bid.message - return safe_block_bid.parent_block_hash - if compute_epoch_at_slot(safe_block.slot) >= BELLATRIX_FORK_EPOCH: - return safe_block.body.execution_payload.block_hash - else: - # Return Hash32() if no safe block is yet available - return Hash32() -``` - -*Note*: This helper uses beacon block container extended in -[Bellatrix](../specs/bellatrix/beacon-chain.md) and -[Gloas](../specs/gloas/beacon-chain.md). diff --git a/specs/bellatrix/fast-confirmation.md b/specs/bellatrix/fast-confirmation.md new file mode 100644 index 00000000000..95e67e8edab --- /dev/null +++ b/specs/bellatrix/fast-confirmation.md @@ -0,0 +1,28 @@ +# Bellatrix -- Fast Confirmation + + + +- [Introduction](#introduction) +- [Safe execution block](#safe-execution-block) + - [`get_safe_execution_block_hash`](#get_safe_execution_block_hash) + + + +## Introduction + +This is the modification of the fast confirmation accompanying Bellatrix. + +## Safe execution block + +With Bellatrix introducing execution payload, `get_safe_execution_block_hash` +function is introduced. This function returns the block hash of the payload +included into the most recent confirmed block. This block hash is communicated +to ExecutionEngine as a hash of a safe block. + +### `get_safe_execution_block_hash` + +```python +def get_safe_execution_block_hash(fcr_store: FastConfirmationStore) -> Hash32: + safe_block = fcr_store.store.blocks[fcr_store.confirmed_root] + return safe_block.body.execution_payload.block_hash +``` diff --git a/specs/bellatrix/fork-choice.md b/specs/bellatrix/fork-choice.md index ac7e1a55127..d2b884cdd54 100644 --- a/specs/bellatrix/fork-choice.md +++ b/specs/bellatrix/fork-choice.md @@ -92,7 +92,7 @@ MUST be set to the hash of a terminal PoW block in this case. ##### `safe_block_hash` The `safe_block_hash` parameter MUST be set to return value of -[`get_safe_execution_block_hash(store: Store)`](../../fork_choice/safe-block.md#get_safe_execution_block_hash) +[`get_safe_execution_block_hash(fcr_store)`](./fast-confirmation.md#get_safe_execution_block_hash) function. ##### `should_override_forkchoice_update` diff --git a/specs/gloas/fast-confirmation.md b/specs/gloas/fast-confirmation.md new file mode 100644 index 00000000000..2c86725e5e8 --- /dev/null +++ b/specs/gloas/fast-confirmation.md @@ -0,0 +1,28 @@ +# Gloas -- Fast Confirmation + + + +- [Introduction](#introduction) +- [Safe execution block](#safe-execution-block) + - [`get_safe_execution_block_hash`](#get_safe_execution_block_hash) + + + +## Introduction + +This is the modification of the fast confirmation accompanying Bellatrix. + +## Safe execution block + +### `get_safe_execution_block_hash` + +*Note:* Starting with Gloas only the parent payload of a confirmed beacon block +can be deemed safe. + +```python +def get_safe_execution_block_hash(fcr_store: FastConfirmationStore) -> Hash32: + safe_block = fcr_store.store.blocks[fcr_store.confirmed_root] + # [Modified in Gloas:EIP7732] + safe_block_bid = safe_block.body.signed_execution_payload_bid.message + return safe_block_bid.parent_block_hash +``` diff --git a/specs/gloas/fork-choice.md b/specs/gloas/fork-choice.md index c419abfc69b..6f18f34c28b 100644 --- a/specs/gloas/fork-choice.md +++ b/specs/gloas/fork-choice.md @@ -91,12 +91,15 @@ computed as the following. All other semantics of `notify_forkchoice_updated` and its invocation are inherited from prior forks. - `finalized_block_hash = finalized_block_bid.parent_block_hash`, -- `safe_block_hash = get_safe_execution_block_hash(store)`. +- `safe_block_hash = get_safe_execution_block_hash(fcr_store)`. Where: - `finalized_block = store.blocks[store.finalized_checkpoint.root]`, -- `finalized_block_bid = finalized_block.body.signed_execution_payload_bid.message`. +- `finalized_block_bid = finalized_block.body.signed_execution_payload_bid.message`, +- `get_safe_execution_block_hash(fcr_store: FastConfirmationStore)` is modified + in Gloas, see + [Fast Confirmation](./fast-confirmation.md#get_safe_execution_block_hash). ## Helpers From 0ee6183f0bbe52b22548840316e6a0095dc58ea4 Mon Sep 17 00:00:00 2001 From: Mikhail Kalinin Date: Fri, 22 May 2026 18:57:08 +0500 Subject: [PATCH 2/8] Update fast-confirmation.md --- specs/gloas/fast-confirmation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/gloas/fast-confirmation.md b/specs/gloas/fast-confirmation.md index 2c86725e5e8..427e5a8dbad 100644 --- a/specs/gloas/fast-confirmation.md +++ b/specs/gloas/fast-confirmation.md @@ -10,7 +10,7 @@ ## Introduction -This is the modification of the fast confirmation accompanying Bellatrix. +This is the modification of the fast confirmation accompanying Gloas. ## Safe execution block From f4635b41e1d5518b170289bdd8ff3c7814176e16 Mon Sep 17 00:00:00 2001 From: Mikhail Kalinin Date: Fri, 22 May 2026 18:58:54 +0500 Subject: [PATCH 3/8] Apply suggestions by @jtraglia Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com> --- specs/bellatrix/fast-confirmation.md | 2 +- specs/gloas/fast-confirmation.md | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/specs/bellatrix/fast-confirmation.md b/specs/bellatrix/fast-confirmation.md index 95e67e8edab..688b8cd62b8 100644 --- a/specs/bellatrix/fast-confirmation.md +++ b/specs/bellatrix/fast-confirmation.md @@ -19,7 +19,7 @@ function is introduced. This function returns the block hash of the payload included into the most recent confirmed block. This block hash is communicated to ExecutionEngine as a hash of a safe block. -### `get_safe_execution_block_hash` +### New `get_safe_execution_block_hash` ```python def get_safe_execution_block_hash(fcr_store: FastConfirmationStore) -> Hash32: diff --git a/specs/gloas/fast-confirmation.md b/specs/gloas/fast-confirmation.md index 427e5a8dbad..d2651a09e4b 100644 --- a/specs/gloas/fast-confirmation.md +++ b/specs/gloas/fast-confirmation.md @@ -14,7 +14,7 @@ This is the modification of the fast confirmation accompanying Gloas. ## Safe execution block -### `get_safe_execution_block_hash` +### Modified `get_safe_execution_block_hash` *Note:* Starting with Gloas only the parent payload of a confirmed beacon block can be deemed safe. @@ -23,6 +23,5 @@ can be deemed safe. def get_safe_execution_block_hash(fcr_store: FastConfirmationStore) -> Hash32: safe_block = fcr_store.store.blocks[fcr_store.confirmed_root] # [Modified in Gloas:EIP7732] - safe_block_bid = safe_block.body.signed_execution_payload_bid.message - return safe_block_bid.parent_block_hash + return safe_block.body.signed_execution_payload_bid.message.parent_block_hash ``` From 41e827cb769676bdc10abacf2521b5895fec879c Mon Sep 17 00:00:00 2001 From: Mikhail Kalinin Date: Fri, 22 May 2026 19:04:10 +0500 Subject: [PATCH 4/8] Apply suggestions from code review Co-authored-by: Mikhail Kalinin --- specs/bellatrix/fast-confirmation.md | 2 +- specs/gloas/fast-confirmation.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/bellatrix/fast-confirmation.md b/specs/bellatrix/fast-confirmation.md index 688b8cd62b8..92e2a34c068 100644 --- a/specs/bellatrix/fast-confirmation.md +++ b/specs/bellatrix/fast-confirmation.md @@ -10,7 +10,7 @@ ## Introduction -This is the modification of the fast confirmation accompanying Bellatrix. +This is the modification of the fast confirmation rule specification accompanying Bellatrix. ## Safe execution block diff --git a/specs/gloas/fast-confirmation.md b/specs/gloas/fast-confirmation.md index d2651a09e4b..1a9a8d77276 100644 --- a/specs/gloas/fast-confirmation.md +++ b/specs/gloas/fast-confirmation.md @@ -10,7 +10,7 @@ ## Introduction -This is the modification of the fast confirmation accompanying Gloas. +This is the modification of the fast confirmation rule specification accompanying Gloas. ## Safe execution block From 5700a2056b42b63d64d2c7bf9e14fb14ae3db617 Mon Sep 17 00:00:00 2001 From: Mikhail Kalinin Date: Fri, 22 May 2026 19:04:36 +0500 Subject: [PATCH 5/8] Apply suggestion from @jtraglia Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com> --- specs/gloas/fast-confirmation.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specs/gloas/fast-confirmation.md b/specs/gloas/fast-confirmation.md index 1a9a8d77276..bbf61577713 100644 --- a/specs/gloas/fast-confirmation.md +++ b/specs/gloas/fast-confirmation.md @@ -16,8 +16,7 @@ This is the modification of the fast confirmation rule specification accompanyin ### Modified `get_safe_execution_block_hash` -*Note:* Starting with Gloas only the parent payload of a confirmed beacon block -can be deemed safe. +*Note:* In Gloas, only the parent payload of a confirmed beacon block is safe. ```python def get_safe_execution_block_hash(fcr_store: FastConfirmationStore) -> Hash32: From 549b62aafea4f6825eda8c9fecf8eec455ea4a42 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Fri, 22 May 2026 19:05:38 +0500 Subject: [PATCH 6/8] Fix lint --- specs/bellatrix/fast-confirmation.md | 5 +++-- specs/gloas/fast-confirmation.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/specs/bellatrix/fast-confirmation.md b/specs/bellatrix/fast-confirmation.md index 92e2a34c068..4bfcb939e0c 100644 --- a/specs/bellatrix/fast-confirmation.md +++ b/specs/bellatrix/fast-confirmation.md @@ -4,13 +4,14 @@ - [Introduction](#introduction) - [Safe execution block](#safe-execution-block) - - [`get_safe_execution_block_hash`](#get_safe_execution_block_hash) + - [New `get_safe_execution_block_hash`](#new-get_safe_execution_block_hash) ## Introduction -This is the modification of the fast confirmation rule specification accompanying Bellatrix. +This is the modification of the fast confirmation rule specification +accompanying Bellatrix. ## Safe execution block diff --git a/specs/gloas/fast-confirmation.md b/specs/gloas/fast-confirmation.md index bbf61577713..09eecf933ce 100644 --- a/specs/gloas/fast-confirmation.md +++ b/specs/gloas/fast-confirmation.md @@ -4,13 +4,14 @@ - [Introduction](#introduction) - [Safe execution block](#safe-execution-block) - - [`get_safe_execution_block_hash`](#get_safe_execution_block_hash) + - [Modified `get_safe_execution_block_hash`](#modified-get_safe_execution_block_hash) ## Introduction -This is the modification of the fast confirmation rule specification accompanying Gloas. +This is the modification of the fast confirmation rule specification +accompanying Gloas. ## Safe execution block From bff735643a574a891ee9425bc7e757ddca9ac550 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Fri, 22 May 2026 19:17:26 +0500 Subject: [PATCH 7/8] Polish Gloas modification --- specs/gloas/fork-choice.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specs/gloas/fork-choice.md b/specs/gloas/fork-choice.md index 6f18f34c28b..7bb67e9f015 100644 --- a/specs/gloas/fork-choice.md +++ b/specs/gloas/fork-choice.md @@ -96,10 +96,10 @@ and its invocation are inherited from prior forks. Where: - `finalized_block = store.blocks[store.finalized_checkpoint.root]`, -- `finalized_block_bid = finalized_block.body.signed_execution_payload_bid.message`, -- `get_safe_execution_block_hash(fcr_store: FastConfirmationStore)` is modified - in Gloas, see - [Fast Confirmation](./fast-confirmation.md#get_safe_execution_block_hash). +- `finalized_block_bid = finalized_block.body.signed_execution_payload_bid.message`. + +*Note:* `get_safe_execution_block_hash` is modified in Gloas, see +[Fast Confirmation](./fast-confirmation.md#get_safe_execution_block_hash). ## Helpers From 4c09c2e7f580dfd95e59d5c6ffa87e11e69e0e15 Mon Sep 17 00:00:00 2001 From: Justin Traglia <95511699+jtraglia@users.noreply.github.com> Date: Fri, 22 May 2026 09:28:04 -0500 Subject: [PATCH 8/8] Fix notes Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com> --- specs/gloas/fast-confirmation.md | 2 +- specs/gloas/fork-choice.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/gloas/fast-confirmation.md b/specs/gloas/fast-confirmation.md index 09eecf933ce..2c50b232b7d 100644 --- a/specs/gloas/fast-confirmation.md +++ b/specs/gloas/fast-confirmation.md @@ -17,7 +17,7 @@ accompanying Gloas. ### Modified `get_safe_execution_block_hash` -*Note:* In Gloas, only the parent payload of a confirmed beacon block is safe. +*Note*: In Gloas, only the parent payload of a confirmed beacon block is safe. ```python def get_safe_execution_block_hash(fcr_store: FastConfirmationStore) -> Hash32: diff --git a/specs/gloas/fork-choice.md b/specs/gloas/fork-choice.md index 7bb67e9f015..11e1b540b6a 100644 --- a/specs/gloas/fork-choice.md +++ b/specs/gloas/fork-choice.md @@ -98,7 +98,7 @@ Where: - `finalized_block = store.blocks[store.finalized_checkpoint.root]`, - `finalized_block_bid = finalized_block.body.signed_execution_payload_bid.message`. -*Note:* `get_safe_execution_block_hash` is modified in Gloas, see +*Note*: `get_safe_execution_block_hash` is modified in Gloas, see [Fast Confirmation](./fast-confirmation.md#get_safe_execution_block_hash). ## Helpers