mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-05 13:54:36 +00:00
Gloas payload bid consensus (#8801)
- [x] Consensus changes for execution payload bids - [x] EF tests for bids (and `block_header` -- no changes required). Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -99,6 +99,9 @@ pub enum BlockProcessingError {
|
||||
IncorrectExpectedWithdrawalsVariant,
|
||||
MissingLastWithdrawal,
|
||||
PendingAttestationInElectra,
|
||||
ExecutionPayloadBidInvalid {
|
||||
reason: ExecutionPayloadBidInvalid,
|
||||
},
|
||||
/// Builder payment index out of bounds (Gloas)
|
||||
BuilderPaymentIndexOutOfBounds(usize),
|
||||
}
|
||||
@@ -157,6 +160,12 @@ impl From<milhouse::Error> for BlockProcessingError {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ExecutionPayloadBidInvalid> for BlockProcessingError {
|
||||
fn from(reason: ExecutionPayloadBidInvalid) -> Self {
|
||||
Self::ExecutionPayloadBidInvalid { reason }
|
||||
}
|
||||
}
|
||||
|
||||
impl From<BlockOperationError<HeaderInvalid>> for BlockProcessingError {
|
||||
fn from(e: BlockOperationError<HeaderInvalid>) -> BlockProcessingError {
|
||||
match e {
|
||||
@@ -452,6 +461,38 @@ pub enum ExitInvalid {
|
||||
PendingWithdrawalInQueue(u64),
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub enum ExecutionPayloadBidInvalid {
|
||||
/// The validator set a non-zero amount for a self-build.
|
||||
SelfBuildNonZeroAmount,
|
||||
/// The signature is invalid.
|
||||
BadSignature,
|
||||
/// The builder is not active.
|
||||
BuilderNotActive(u64),
|
||||
/// The builder has insufficient balance to cover the bid
|
||||
InsufficientBalance {
|
||||
builder_index: u64,
|
||||
builder_balance: u64,
|
||||
bid_value: u64,
|
||||
},
|
||||
/// Bid slot doesn't match block slot
|
||||
SlotMismatch { bid_slot: Slot, block_slot: Slot },
|
||||
/// The bid's parent block hash doesn't match the state's latest block hash
|
||||
ParentBlockHashMismatch {
|
||||
state_block_hash: ExecutionBlockHash,
|
||||
bid_parent_hash: ExecutionBlockHash,
|
||||
},
|
||||
/// The bid's parent block root doesn't match the block's parent root
|
||||
ParentBlockRootMismatch {
|
||||
block_parent_root: Hash256,
|
||||
bid_parent_root: Hash256,
|
||||
},
|
||||
/// The bid's prev randao doesn't match the state.
|
||||
PrevRandaoMismatch { expected: Hash256, bid: Hash256 },
|
||||
/// The bid contains more than the maximum number of kzg blob commitments.
|
||||
ExcessBlobCommitments { max: usize, bid: usize },
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub enum BlsExecutionChangeInvalid {
|
||||
/// The specified validator is not in the state's validator registry.
|
||||
|
||||
Reference in New Issue
Block a user