pub enum PayloadError {
Show 20 variants
ExtraData(Bytes),
BaseFee(U256),
BlobGasUsed(U256),
ExcessBlobGas(U256),
PreShanghaiBlockWithWithdrawals,
PostShanghaiBlockWithoutWithdrawals,
PreCancunBlockWithParentBeaconBlockRoot,
PreCancunBlockWithBlobTransactions,
PreCancunBlockWithBlobGasUsed,
PreCancunBlockWithExcessBlobGas,
PreCancunWithCancunFields,
PostCancunBlockWithoutParentBeaconBlockRoot,
PostCancunBlockWithoutBlobGasUsed,
PostCancunBlockWithoutExcessBlobGas,
PostCancunWithoutCancunFields,
PrePragueBlockWithEip7702Transactions,
PrePragueBlockRequests,
BlockHash {
execution: B256,
consensus: B256,
},
InvalidVersionedHashes,
Decode(Error),
}Expand description
Error that can occur when handling payloads.
Variants§
ExtraData(Bytes)
Invalid payload extra data.
BaseFee(U256)
Invalid payload base fee.
BlobGasUsed(U256)
Invalid payload blob gas used.
ExcessBlobGas(U256)
Invalid payload excess blob gas.
PreShanghaiBlockWithWithdrawals
withdrawals present in pre-shanghai payload.
PostShanghaiBlockWithoutWithdrawals
withdrawals missing in post-shanghai payload.
PreCancunBlockWithParentBeaconBlockRoot
parent beacon block root present in pre-cancun payload.
PreCancunBlockWithBlobTransactions
blob transactions present in pre-cancun payload.
PreCancunBlockWithBlobGasUsed
blob gas used present in pre-cancun payload.
PreCancunBlockWithExcessBlobGas
excess blob gas present in pre-cancun payload.
PreCancunWithCancunFields
cancun fields present in pre-cancun payload.
PostCancunBlockWithoutParentBeaconBlockRoot
parent beacon block root missing in post-cancun payload.
PostCancunBlockWithoutBlobGasUsed
blob gas used missing in post-cancun payload.
PostCancunBlockWithoutExcessBlobGas
excess blob gas missing in post-cancun payload.
PostCancunWithoutCancunFields
cancun fields missing in post-cancun payload.
PrePragueBlockWithEip7702Transactions
EIP-7702 transactions present in pre-prague payload.
PrePragueBlockRequests
requests present in pre-prague payload.
BlockHash
Invalid payload block hash.
Fields
InvalidVersionedHashes
Expected blob versioned hashes do not match the given transactions.
Decode(Error)
Encountered decoding error.
Implementations§
Source§impl PayloadError
impl PayloadError
Sourcepub const fn is_block_hash_mismatch(&self) -> bool
pub const fn is_block_hash_mismatch(&self) -> bool
Returns true if the error is caused by a block hash mismatch.
Sourcepub const fn is_invalid_versioned_hashes(&self) -> bool
pub const fn is_invalid_versioned_hashes(&self) -> bool
Returns true if the error is caused by invalid block hashes (Cancun).
Trait Implementations§
Source§impl Debug for PayloadError
impl Debug for PayloadError
Source§impl Display for PayloadError
impl Display for PayloadError
Source§impl Error for PayloadError
impl Error for PayloadError
1.30.0 · Source§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()
Source§impl From<Error> for PayloadError
impl From<Error> for PayloadError
Source§impl From<PayloadError> for PayloadStatusEnum
impl From<PayloadError> for PayloadStatusEnum
Source§fn from(error: PayloadError) -> Self
fn from(error: PayloadError) -> Self
Auto Trait Implementations§
impl !Freeze for PayloadError
impl RefUnwindSafe for PayloadError
impl Send for PayloadError
impl Sync for PayloadError
impl Unpin for PayloadError
impl UnsafeUnpin for PayloadError
impl UnwindSafe for PayloadError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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 moreSource§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§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: 72 bytes
Size for each variant:
ExtraData: 39 bytesBaseFee: 39 bytesBlobGasUsed: 39 bytesExcessBlobGas: 39 bytesPreShanghaiBlockWithWithdrawals: 0 bytesPostShanghaiBlockWithoutWithdrawals: 0 bytesPreCancunBlockWithParentBeaconBlockRoot: 0 bytesPreCancunBlockWithBlobTransactions: 0 bytesPreCancunBlockWithBlobGasUsed: 0 bytesPreCancunBlockWithExcessBlobGas: 0 bytesPreCancunWithCancunFields: 0 bytesPostCancunBlockWithoutParentBeaconBlockRoot: 0 bytesPostCancunBlockWithoutBlobGasUsed: 0 bytesPostCancunBlockWithoutExcessBlobGas: 0 bytesPostCancunWithoutCancunFields: 0 bytesPrePragueBlockWithEip7702Transactions: 0 bytesPrePragueBlockRequests: 0 bytesBlockHash: 64 bytesInvalidVersionedHashes: 0 bytesDecode: 31 bytes