should_extend_payload and gossip bid verification changes

This commit is contained in:
Eitan Seri-Levi
2026-06-21 17:29:59 +03:00
parent 10568b139b
commit be705c8409
8 changed files with 42 additions and 5 deletions

View File

@@ -1564,7 +1564,12 @@ impl ProtoArray {
Ok(fc_node.payload_status as u8)
} else if fc_node.payload_status == PayloadStatus::Empty {
Ok(1)
} else if self.should_extend_payload::<E>(fc_node, proto_node, proposer_boost_root)? {
} else if self.should_extend_payload::<E>(
fc_node,
proto_node,
current_slot,
proposer_boost_root,
)? {
Ok(2)
} else {
Ok(0)
@@ -1614,8 +1619,17 @@ impl ProtoArray {
&self,
fc_node: &IndexedForkChoiceNode,
proto_node: &ProtoNode,
current_slot: Slot,
proposer_boost_root: Hash256,
) -> Result<bool, Error> {
if proto_node.slot().saturating_add(1u64) != current_slot {
return Err(Error::ShouldExtendPayloadInvalidSlot {
block_root: fc_node.root,
block_slot: proto_node.slot(),
current_slot,
});
}
let Ok(node) = proto_node.as_v29() else {
return Err(Error::InvalidNodeVariant {
block_root: fc_node.root,