From 700ef2a71e916cd4a78f4132717cca7c09a7d584 Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Fri, 29 May 2026 17:11:27 +0100 Subject: [PATCH 1/5] Use `should_build_on_full` for bid parent block hash --- specs/gloas/validator.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/gloas/validator.md b/specs/gloas/validator.md index df98ac4ddf..aaec1da354 100644 --- a/specs/gloas/validator.md +++ b/specs/gloas/validator.md @@ -202,7 +202,7 @@ top of a `state` MUST take the following actions in order to construct the - The `bid.slot` is for the proposal block slot. - The `bid.parent_block_hash` equals `state.latest_execution_payload_bid.block_hash` if - `should_extend_payload(store, block.parent_root)` is true, otherwise + `should_build_on_full(store, get_head(store))` is true, otherwise `state.latest_execution_payload_bid.parent_block_hash`. - The `bid.parent_block_root` equals the current block's `parent_root`. - Select one bid and set From ddca02c254e6afc9fc77f5cfdcd01b96a393448e Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Fri, 29 May 2026 19:06:51 +0100 Subject: [PATCH 2/5] refactor --- specs/gloas/validator.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/specs/gloas/validator.md b/specs/gloas/validator.md index aaec1da354..adeeaabc72 100644 --- a/specs/gloas/validator.md +++ b/specs/gloas/validator.md @@ -182,6 +182,9 @@ def get_proposer_preferences_signature( #### Constructing the `BeaconBlockBody` +Let `head = get_head(store)`, the parent the proposer is building on, and +`state` the post-state derived from the block identified by `head`. + ##### Signed execution payload bid To obtain `signed_execution_payload_bid`, a block proposer building a block on @@ -202,7 +205,7 @@ top of a `state` MUST take the following actions in order to construct the - The `bid.slot` is for the proposal block slot. - The `bid.parent_block_hash` equals `state.latest_execution_payload_bid.block_hash` if - `should_build_on_full(store, get_head(store))` is true, otherwise + `should_build_on_full(store, head)` is true, otherwise `state.latest_execution_payload_bid.parent_block_hash`. - The `bid.parent_block_root` equals the current block's `parent_root`. - Select one bid and set @@ -232,8 +235,7 @@ construct the `payload_attestations` field in `BeaconBlockBody`: ##### Parent execution requests The `parent_execution_requests` field contains the execution requests from the -parent's execution payload. Let `head = get_head(store)`. The proposer -constructs this field as follows: +parent's execution payload. The proposer constructs this field as follows: - If the parent block is pre-Gloas (first Gloas block), set `parent_execution_requests` to an empty `ExecutionRequests()`. @@ -245,12 +247,9 @@ constructs this field as follows: ##### ExecutionPayload -*Note*: `prepare_execution_payload` is modified in Gloas to take `store` and -`head` as additional parameters. `head` is the return value of `get_head(store)` -and must correspond to the parent that `state` was derived from. It consults -`should_build_on_full(store, head)` to decide whether to build on the parent's -full payload or its empty variant, selecting both the withdrawals source and the -execution head for the new payload. When building on a full parent, +*Note*: `prepare_execution_payload` is modified in Gloas to select both the +withdrawals source and the execution head for the new payload based on +`should_build_on_full(store, head)`. When building on a full parent, `apply_parent_execution_payload` is called so that withdrawals are computed against the post-processing state. From c952259314a0e5cb8f3dab9088ce16a9b4a2b5f9 Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Fri, 29 May 2026 20:08:38 +0100 Subject: [PATCH 3/5] simplify --- specs/gloas/validator.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/specs/gloas/validator.md b/specs/gloas/validator.md index adeeaabc72..2dbf8eace7 100644 --- a/specs/gloas/validator.md +++ b/specs/gloas/validator.md @@ -182,8 +182,8 @@ def get_proposer_preferences_signature( #### Constructing the `BeaconBlockBody` -Let `head = get_head(store)`, the parent the proposer is building on, and -`state` the post-state derived from the block identified by `head`. +Let `head = get_head(store)` be the parent the proposer is building on, from +which `state` was derived. ##### Signed execution payload bid @@ -247,9 +247,10 @@ parent's execution payload. The proposer constructs this field as follows: ##### ExecutionPayload -*Note*: `prepare_execution_payload` is modified in Gloas to select both the -withdrawals source and the execution head for the new payload based on -`should_build_on_full(store, head)`. When building on a full parent, +*Note*: `prepare_execution_payload` is modified in Gloas to build on either the +parent's full payload or its empty variant, as decided by +`should_build_on_full(store, head)`, which determines the withdrawals source and +the execution head for the new payload. When building on a full parent, `apply_parent_execution_payload` is called so that withdrawals are computed against the post-processing state. From 9b4fef88caef4ac3ce4f795fc2f802f77c87b4ea Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Fri, 29 May 2026 20:42:12 +0100 Subject: [PATCH 4/5] review --- specs/gloas/validator.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specs/gloas/validator.md b/specs/gloas/validator.md index 2dbf8eace7..989317eb97 100644 --- a/specs/gloas/validator.md +++ b/specs/gloas/validator.md @@ -182,8 +182,8 @@ def get_proposer_preferences_signature( #### Constructing the `BeaconBlockBody` -Let `head = get_head(store)` be the parent the proposer is building on, from -which `state` was derived. +Let `head = get_head(store)` be the parent block the proposer is building on, +from which `state` was derived. ##### Signed execution payload bid @@ -247,8 +247,8 @@ parent's execution payload. The proposer constructs this field as follows: ##### ExecutionPayload -*Note*: `prepare_execution_payload` is modified in Gloas to build on either the -parent's full payload or its empty variant, as decided by +*Note*: `prepare_execution_payload` is modified to build on either the parent's +full payload or its empty variant, as decided by `should_build_on_full(store, head)`, which determines the withdrawals source and the execution head for the new payload. When building on a full parent, `apply_parent_execution_payload` is called so that withdrawals are computed From fc29f377b5ad4323707cb3e8acfa94e61b105437 Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Fri, 29 May 2026 21:09:22 +0100 Subject: [PATCH 5/5] remove "either" --- specs/gloas/validator.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/specs/gloas/validator.md b/specs/gloas/validator.md index 989317eb97..87f907618c 100644 --- a/specs/gloas/validator.md +++ b/specs/gloas/validator.md @@ -247,12 +247,11 @@ parent's execution payload. The proposer constructs this field as follows: ##### ExecutionPayload -*Note*: `prepare_execution_payload` is modified to build on either the parent's -full payload or its empty variant, as decided by -`should_build_on_full(store, head)`, which determines the withdrawals source and -the execution head for the new payload. When building on a full parent, -`apply_parent_execution_payload` is called so that withdrawals are computed -against the post-processing state. +*Note*: `prepare_execution_payload` is modified to build on the parent's full +payload or its empty variant, as decided by `should_build_on_full(store, head)`, +which determines the withdrawals source and the execution head for the new +payload. When building on a full parent, `apply_parent_execution_payload` is +called so that withdrawals are computed against the post-processing state. ```python def prepare_execution_payload(