mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Block processing eip4844 (#3673)
* add eip4844 block processing * fix blob processing code * consensus logic fixes and cleanup * use safe arith
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use super::signature_sets::Error as SignatureSetError;
|
||||
use merkle_proof::MerkleTreeError;
|
||||
use safe_arith::ArithError;
|
||||
use ssz::DecodeError;
|
||||
use types::*;
|
||||
|
||||
/// The error returned from the `per_block_processing` function. Indicates that a block is either
|
||||
@@ -53,6 +54,7 @@ pub enum BlockProcessingError {
|
||||
BeaconStateError(BeaconStateError),
|
||||
SignatureSetError(SignatureSetError),
|
||||
SszTypesError(ssz_types::Error),
|
||||
SszDecodeError(DecodeError),
|
||||
MerkleTreeError(MerkleTreeError),
|
||||
ArithError(ArithError),
|
||||
InconsistentBlockFork(InconsistentFork),
|
||||
@@ -70,6 +72,18 @@ pub enum BlockProcessingError {
|
||||
found: u64,
|
||||
},
|
||||
ExecutionInvalid,
|
||||
BlobVersionHashMismatch,
|
||||
/// The number of commitments in blob transactions in the payload does not match the number
|
||||
/// of commitments in the block.
|
||||
BlobNumCommitmentsMismatch {
|
||||
commitments_processed_in_block: usize,
|
||||
/// This number depic
|
||||
commitments_processed_in_transactions: usize,
|
||||
},
|
||||
BlobVersionHashIndexOutOfBounds {
|
||||
index: usize,
|
||||
length: usize,
|
||||
},
|
||||
}
|
||||
|
||||
impl From<BeaconStateError> for BlockProcessingError {
|
||||
@@ -90,6 +104,12 @@ impl From<ssz_types::Error> for BlockProcessingError {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<DecodeError> for BlockProcessingError {
|
||||
fn from(error: DecodeError) -> Self {
|
||||
BlockProcessingError::SszDecodeError(error)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ArithError> for BlockProcessingError {
|
||||
fn from(e: ArithError) -> Self {
|
||||
BlockProcessingError::ArithError(e)
|
||||
|
||||
Reference in New Issue
Block a user