Skip to main content

BlockValidationError

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.

Fields

§hash: FixedBytes<32>

The hash of the transaction.

§error: AnyError

The EVM error.

§

IncrementBalanceFailed

Error when incrementing balance in post execution.

§

TransactionGasLimitMoreThanAvailableBlockGas

Error when transaction gas limit exceeds available block gas.

Fields

§transaction_gas_limit: u64

The transaction’s gas limit.

§block_available_gas: u64

The available block gas.

§

TransactionBlobGasMoreThanAvailableBlockBlobGas

Error when transaction blob gas exceeds available block blob gas.

Fields

§transaction_blob_gas: u64

The transaction’s blob gas.

§block_available_blob_gas: u64

The available block blob gas.

§

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

§parent_beacon_block_root: Box<FixedBytes<32>>

The beacon block root.

§message: String

The error message.

§

BlockHashContractCall

EVM error during EIP-2935 blockhash contract call.

Fields

§message: String

The error message.

§

WithdrawalRequestsContractCall

EVM error during withdrawal requests contract call.

Fields

§message: String

The error message.

§

ConsolidationRequestsContractCall

EVM error during consolidation requests contract call.

Fields

§message: String

The error message.

§

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

pub fn other<E>(error: E) -> BlockValidationError
where E: Error + Send + Sync + 'static,

Create a new BlockValidationError::Other variant.

pub fn msg(msg: impl Display) -> BlockValidationError

Create a new BlockValidationError::Other variant from a message.

Trait Implementations§

§

impl Debug for BlockValidationError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for BlockValidationError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for BlockValidationError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access #99301)
Provides type-based access to context intended for error reports. Read more
§

impl From<BlockValidationError> for BlockExecutionError

§

fn from(source: BlockValidationError) -> BlockExecutionError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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 more
§

impl<T> MaybeDebug for T
where T: Debug,

§

impl<T> NonStaticAny for T
where T: ?Sized,

§

fn type_id(&self) -> TypeId

Returns the lifetime-erased type ID of self.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more

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 bytes
  • EVM: 55 bytes
  • IncrementBalanceFailed: 0 bytes
  • TransactionGasLimitMoreThanAvailableBlockGas: 23 bytes
  • TransactionBlobGasMoreThanAvailableBlockBlobGas: 23 bytes
  • MissingParentBeaconBlockRoot: 0 bytes
  • CancunGenesisParentBeaconBlockRootNotZero: 32 bytes
  • BeaconRootContractCall: 39 bytes
  • BlockHashContractCall: 31 bytes
  • WithdrawalRequestsContractCall: 31 bytes
  • ConsolidationRequestsContractCall: 31 bytes
  • DepositRequestDecode: 31 bytes
  • BlockGasExceeded: 0 bytes
  • Other: 23 bytes