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

@@ -1,6 +1,6 @@
use crate::PayloadStatus;
use safe_arith::ArithError;
use types::{Epoch, ExecutionBlockHash, Hash256};
use types::{Epoch, ExecutionBlockHash, Hash256, Slot};
#[derive(Clone, PartialEq, Debug)]
pub enum Error {
@@ -63,6 +63,14 @@ pub enum Error {
block_root: Hash256,
payload_status: PayloadStatus,
},
/// `should_extend_payload` was called for a block whose slot is not the previous slot.
///
/// Spec equivalent: `assert store.blocks[root].slot + 1 == get_current_slot(store)`.
ShouldExtendPayloadInvalidSlot {
block_root: Hash256,
block_slot: Slot,
current_slot: Slot,
},
}
impl From<ArithError> for Error {