Ensure payload envelope streamer always serves canonical envelopes after the split slot (#9085)

Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>

Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
This commit is contained in:
Eitan Seri-Levi
2026-04-23 20:32:26 +09:00
committed by GitHub
parent cfc748309f
commit 82dc8b4edc
9 changed files with 533 additions and 36 deletions

View File

@@ -1053,6 +1053,24 @@ impl ProtoArrayForkChoice {
.unwrap_or(false)
}
/// Returns the canonical payload status of a block, matching the decision
/// `get_head` would make between `(root, FULL)` and `(root, EMPTY)`.
pub fn get_canonical_payload_status<E: EthSpec>(
&self,
block_root: &Hash256,
current_slot: Slot,
proposer_boost_root: Hash256,
spec: &ChainSpec,
) -> Result<PayloadStatus, Error> {
self.proto_array.get_canonical_payload_status::<E>(
*block_root,
current_slot,
proposer_boost_root,
&self.balances,
spec,
)
}
/// Returns the weight of a given block.
pub fn get_weight(&self, block_root: &Hash256) -> Option<u64> {
let block_index = self.proto_array.indices.get(block_root)?;