Use fork choice to ensure that the execution envelope snapshot is populated in most cases

This commit is contained in:
Eitan Seri-Levi
2026-05-25 17:11:57 +03:00
parent 309719d2c6
commit eead95f112
5 changed files with 104 additions and 6 deletions

View File

@@ -1565,6 +1565,22 @@ where
}
}
/// Returns the latest ancestor of `block_root` whose `PayloadStatus` is `Full`.
pub fn latest_parent_full_block(
&self,
block_root: Hash256,
spec: &ChainSpec,
) -> Result<Option<Hash256>, Error<T::Error>> {
if self.is_finalized_checkpoint_or_descendant(block_root) {
let proposer_boost_root = self.fc_store.proposer_boost_root();
self.proto_array
.latest_parent_full_block::<E>(block_root, proposer_boost_root, spec)
.map_err(Error::ProtoArrayError)
} else {
Err(Error::DoesNotDescendFromFinalizedCheckpoint)
}
}
/// Returns the canonical payload status of a block. See
/// `ProtoArrayForkChoice::get_canonical_payload_status`.
pub fn get_canonical_payload_status(