Remove head_payload_status from ForkchoiceUpdateParameters

head_payload_status is internal fork choice state, not an EL
forkchoiceUpdated parameter. It already lives on CachedHead — source
it directly from get_head() return in recompute_head_at_slot instead
of threading through ForkchoiceUpdateParameters.

Also add TODO(gloas) for parent_head_hash in re-org path (V29 nodes
don't carry execution_status).
This commit is contained in:
dapplion
2026-03-25 21:16:06 -05:00
parent bc28e63585
commit 93f987f3cf
6 changed files with 13 additions and 22 deletions

View File

@@ -342,7 +342,6 @@ pub enum AttestationFromBlock {
pub struct ForkchoiceUpdateParameters {
/// The most recent result of running `ForkChoice::get_head`.
pub head_root: Hash256,
pub head_payload_status: PayloadStatus,
pub head_hash: Option<ExecutionBlockHash>,
pub justified_hash: Option<ExecutionBlockHash>,
pub finalized_hash: Option<ExecutionBlockHash>,
@@ -351,7 +350,6 @@ pub struct ForkchoiceUpdateParameters {
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct ForkChoiceView {
pub head_block_root: Hash256,
pub head_payload_status: PayloadStatus,
pub justified_checkpoint: Checkpoint,
pub finalized_checkpoint: Checkpoint,
}
@@ -483,7 +481,6 @@ where
finalized_hash: None,
// These will be updated during the next call to `Self::get_head`.
head_root: Hash256::zero(),
head_payload_status: PayloadStatus::Pending,
},
_phantom: PhantomData,
};
@@ -588,7 +585,6 @@ where
.and_then(|b| b.execution_status.block_hash());
self.forkchoice_update_parameters = ForkchoiceUpdateParameters {
head_root,
head_payload_status,
head_hash,
justified_hash,
finalized_hash,
@@ -684,7 +680,6 @@ where
pub fn cached_fork_choice_view(&self) -> ForkChoiceView {
ForkChoiceView {
head_block_root: self.forkchoice_update_parameters.head_root,
head_payload_status: self.forkchoice_update_parameters.head_payload_status,
justified_checkpoint: self.justified_checkpoint(),
finalized_checkpoint: self.finalized_checkpoint(),
}
@@ -1769,7 +1764,6 @@ where
finalized_hash: None,
// Will be updated in the following call to `Self::get_head`.
head_root: Hash256::zero(),
head_payload_status: PayloadStatus::Pending,
},
_phantom: PhantomData,
};