Enum BlockValidationError
pub enum BlockValidationError {
Show 14 variants
InvalidTx {
hash: FixedBytes<32>,
error: Box<dyn InvalidTxError>,
},
EVM {
hash: FixedBytes<32>,
error: AnyError,
},
IncrementBalanceFailed,
TransactionGasLimitMoreThanAvailableBlockGas {
transaction_gas_limit: u64,
block_available_gas: u64,
},
TransactionBlobGasMoreThanAvailableBlockBlobGas {
transaction_blob_gas: u64,
block_available_blob_gas: u64,
},
MissingParentBeaconBlockRoot,
CancunGenesisParentBeaconBlockRootNotZero {
parent_beacon_block_root: FixedBytes<32>,
},
BeaconRootContractCall {
parent_beacon_block_root: Box<FixedBytes<32>>,
message: String,
},
BlockHashContractCall {
message: String,
},
WithdrawalRequestsContractCall {
message: String,
},
ConsolidationRequestsContractCall {
message: String,
},
DepositRequestDecode(String),
BlockGasExceeded,
Other(AnyError),
}Expand description
Block validation error.
Variants§
InvalidTx
EVM error with transaction hash and message.
Fields
hash: FixedBytes<32>The hash of the transaction.
error: Box<dyn InvalidTxError>The EVM error.
EVM
EVM error that is not a transaction validation error.
IncrementBalanceFailed
Error when incrementing balance in post execution.
TransactionGasLimitMoreThanAvailableBlockGas
Error when transaction gas limit exceeds available block gas.
Fields
TransactionBlobGasMoreThanAvailableBlockBlobGas
Error when transaction blob gas exceeds available block blob gas.
Fields
MissingParentBeaconBlockRoot
Error for EIP-4788 when parent beacon block root is missing.
CancunGenesisParentBeaconBlockRootNotZero
Error for Cancun genesis block when parent beacon block root is not zero.
Fields
parent_beacon_block_root: FixedBytes<32>The beacon block root.
BeaconRootContractCall
EVM error during EIP-4788 beacon root contract call.
Fields
BlockHashContractCall
EVM error during EIP-2935 blockhash contract call.
WithdrawalRequestsContractCall
EVM error during withdrawal requests contract call.
ConsolidationRequestsContractCall
EVM error during consolidation requests contract call.
DepositRequestDecode(String)
Error when decoding deposit requests from receipts.
BlockGasExceeded
Error when block’s total gas used exceeds the block gas limit.
Other(AnyError)
Arbitrary block validation error.
Implementations§
§impl BlockValidationError
impl BlockValidationError
pub fn other<E>(error: E) -> BlockValidationError
pub fn other<E>(error: E) -> BlockValidationError
Create a new BlockValidationError::Other variant.
pub fn msg(msg: impl Display) -> BlockValidationError
pub fn msg(msg: impl Display) -> BlockValidationError
Create a new BlockValidationError::Other variant from a message.
Trait Implementations§
§impl Debug for BlockValidationError
impl Debug for BlockValidationError
§impl Display for BlockValidationError
impl Display for BlockValidationError
§impl Error for BlockValidationError
impl Error for BlockValidationError
§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
§impl From<BlockValidationError> for BlockExecutionError
impl From<BlockValidationError> for BlockExecutionError
§fn from(source: BlockValidationError) -> BlockExecutionError
fn from(source: BlockValidationError) -> BlockExecutionError
Auto Trait Implementations§
impl !RefUnwindSafe for BlockValidationError
impl !UnwindSafe for BlockValidationError
impl Freeze for BlockValidationError
impl Send for BlockValidationError
impl Sync for BlockValidationError
impl Unpin for BlockValidationError
impl UnsafeUnpin for BlockValidationError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeDebug for Twhere
T: Debug,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes
Size for each variant:
InvalidTx: 55 bytesEVM: 55 bytesIncrementBalanceFailed: 0 bytesTransactionGasLimitMoreThanAvailableBlockGas: 23 bytesTransactionBlobGasMoreThanAvailableBlockBlobGas: 23 bytesMissingParentBeaconBlockRoot: 0 bytesCancunGenesisParentBeaconBlockRootNotZero: 32 bytesBeaconRootContractCall: 39 bytesBlockHashContractCall: 31 bytesWithdrawalRequestsContractCall: 31 bytesConsolidationRequestsContractCall: 31 bytesDepositRequestDecode: 31 bytesBlockGasExceeded: 0 bytesOther: 23 bytes