Enum ConsensusError
pub enum ConsensusError {
Show 48 variants
HeaderGasUsedExceedsGasLimit {
gas_used: u64,
gas_limit: u64,
},
HeaderGasLimitExceedsMax {
gas_limit: u64,
},
BlockGasUsed {
gas: GotExpected<u64>,
gas_spent_by_tx: Vec<(u64, u64)>,
},
BodyOmmersHashDiff(GotExpectedBoxed<B256>),
BodyStateRootDiff(GotExpectedBoxed<B256>),
BodyTransactionRootDiff(GotExpectedBoxed<B256>),
BodyReceiptRootDiff(GotExpectedBoxed<B256>),
BodyBloomLogDiff(GotExpectedBoxed<Bloom>),
BodyWithdrawalsRootDiff(GotExpectedBoxed<B256>),
BodyRequestsHashDiff(GotExpectedBoxed<B256>),
BlockKnown {
hash: BlockHash,
number: BlockNumber,
},
ParentUnknown {
hash: BlockHash,
},
ParentBlockNumberMismatch {
parent_block_number: BlockNumber,
block_number: BlockNumber,
},
ParentHashMismatch(GotExpectedBoxed<B256>),
TimestampIsInFuture {
timestamp: u64,
present_timestamp: u64,
},
BaseFeeMissing,
TransactionSignerRecoveryError,
ExtraDataExceedsMax {
len: usize,
},
TheMergeDifficultyIsNotZero,
TheMergeNonceIsNotZero,
TheMergeOmmerRootIsNotEmpty,
WithdrawalsRootMissing,
RequestsHashMissing,
WithdrawalsRootUnexpected,
RequestsHashUnexpected,
BodyWithdrawalsMissing,
BodyRequestsMissing,
BlobGasUsedMissing,
BlobGasUsedUnexpected,
ExcessBlobGasMissing,
ExcessBlobGasUnexpected,
ParentBeaconBlockRootMissing,
ParentBeaconBlockRootUnexpected,
BlobGasUsedExceedsMaxBlobGasPerBlock {
blob_gas_used: u64,
max_blob_gas_per_block: u64,
},
BlobGasUsedNotMultipleOfBlobGasPerBlob {
blob_gas_used: u64,
blob_gas_per_blob: u64,
},
BlobGasUsedDiff(GotExpected<u64>),
InvalidTransaction(InvalidTransactionError),
BaseFeeDiff(GotExpected<u64>),
ExcessBlobGasDiff {
diff: GotExpected<u64>,
parent_excess_blob_gas: u64,
parent_blob_gas_used: u64,
},
GasLimitInvalidIncrease {
parent_gas_limit: u64,
child_gas_limit: u64,
},
GasLimitInvalidMinimum {
child_gas_limit: u64,
},
GasLimitInvalidBlockMaximum {
block_gas_limit: u64,
},
GasLimitInvalidDecrease {
parent_gas_limit: u64,
child_gas_limit: u64,
},
TimestampIsInPast {
parent_timestamp: u64,
timestamp: u64,
},
BlockTooLarge {
rlp_length: usize,
max_rlp_length: usize,
},
TransactionGasLimitTooHigh(Box<TxGasLimitTooHighErr>),
Other(String),
Custom(Arc<dyn Error + Send + Sync>),
}Expand description
Consensus Errors
Error when the gas used in the header exceeds the gas limit.
Error when the gas limit is more than the maximum allowed.
Error when block gas used doesn’t match expected value
Fields
Gas spent by each transaction
Error when the hash of block ommer is different from the expected hash.
Error when the state root in the block is different from the expected state root.
Error when the transaction root in the block is different from the expected transaction root.
Error when the receipt root in the block is different from the expected receipt root.
Error when header bloom filter is different from the expected bloom filter.
Error when the withdrawals root in the block is different from the expected withdrawals root.
Error when the requests hash in the block is different from the expected requests hash.
Error when a block with a specific hash and number is already known.
Fields
The hash of the known block.
The block number of the known block.
Error when the parent hash of a block is not known.
Fields
The hash of the unknown parent block.
Error when the block number does not match the parent block number.
Fields
Error when the parent hash does not match the expected parent hash.
Error when the block timestamp is in the future compared to our clock time.
Fields
Error when the base fee is missing.
Error when there is a transaction signer recovery error.
Error when the extra data length exceeds the maximum allowed.
Error when the difficulty after a merge is not zero.
Error when the nonce after a merge is not zero.
Error when the ommer root after a merge is not empty.
Error when the withdrawals root is missing.
Error when the requests hash is missing.
Error when an unexpected withdrawals root is encountered.
Error when an unexpected requests hash is encountered.
Error when withdrawals are missing.
Error when requests are missing.
Error when blob gas used is missing.
Error when unexpected blob gas used is encountered.
Error when excess blob gas is missing.
Error when unexpected excess blob gas is encountered.
Error when the parent beacon block root is missing.
Error when an unexpected parent beacon block root is encountered.
Error when blob gas used exceeds the maximum allowed.
Fields
The actual blob gas used.
The maximum allowed blob gas per block.
Error when blob gas used is not a multiple of blob gas per blob.
Fields
The actual blob gas used.
Error when the blob gas used in the header does not match the expected blob gas used.
Error for a transaction that violates consensus.
Error when the block’s base fee is different from the expected base fee.
Error when there is an invalid excess blob gas.
Fields
The excess blob gas diff.
The parent excess blob gas.
The parent blob gas used.
Error when the child gas limit exceeds the maximum allowed increase.
Fields
Error indicating that the child gas limit is below the minimum allowed limit.
This error occurs when the child gas limit is less than the specified minimum gas limit.
Fields
Error indicating that the block gas limit is above the allowed maximum.
This error occurs when the gas limit is more than the specified maximum gas limit.
Fields
Error when the child gas limit exceeds the maximum allowed decrease.
Fields
Error when the block timestamp is in the past compared to the parent timestamp.
Fields
The parent block’s timestamp.
Error when the block is too large.
EIP-7825: Transaction gas limit exceeds maximum allowed
Other, likely an injected L2 error.
Other unspecified error.
§
§
Causes self to use its Binary implementation when Debug-formatted.
§
Causes self to use its Display implementation when
Debug-formatted.
§
Causes self to use its LowerExp implementation when
Debug-formatted.
§
Causes self to use its LowerHex implementation when
Debug-formatted.
§
Causes self to use its Octal implementation when Debug-formatted.
§
Causes self to use its Pointer implementation when
Debug-formatted.
§
Causes self to use its UpperExp implementation when
Debug-formatted.
§
Causes self to use its UpperHex implementation when
Debug-formatted.
§
§
§
Calls .tap() only in debug builds, and is erased in release builds.
§
Calls .tap_mut() only in debug builds, and is erased in release
builds.
§
Calls .tap_borrow() only in debug builds, and is erased in release
builds.
§
Calls .tap_borrow_mut() only in debug builds, and is erased in release
builds.
§
Calls .tap_ref() only in debug builds, and is erased in release
builds.
§
Calls .tap_ref_mut() only in debug builds, and is erased in release
builds.
§
Calls .tap_deref() only in debug builds, and is erased in release
builds.
§
Calls .tap_deref_mut() only in debug builds, and is erased in release
builds.
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: 48 bytes
Size for each variant:
HeaderGasUsedExceedsGasLimit: 23 bytesHeaderGasLimitExceedsMax: 15 bytesBlockGasUsed: 47 bytesBodyOmmersHashDiff: 15 bytesBodyStateRootDiff: 15 bytesBodyTransactionRootDiff: 15 bytesBodyReceiptRootDiff: 15 bytesBodyBloomLogDiff: 15 bytesBodyWithdrawalsRootDiff: 15 bytesBodyRequestsHashDiff: 15 bytesBlockKnown: 47 bytesParentUnknown: 32 bytesParentBlockNumberMismatch: 23 bytesParentHashMismatch: 15 bytesTimestampIsInFuture: 23 bytesBaseFeeMissing: 0 bytesTransactionSignerRecoveryError: 0 bytesExtraDataExceedsMax: 15 bytesTheMergeDifficultyIsNotZero: 0 bytesTheMergeNonceIsNotZero: 0 bytesTheMergeOmmerRootIsNotEmpty: 0 bytesWithdrawalsRootMissing: 0 bytesRequestsHashMissing: 0 bytesWithdrawalsRootUnexpected: 0 bytesRequestsHashUnexpected: 0 bytesBodyWithdrawalsMissing: 0 bytesBodyRequestsMissing: 0 bytesBlobGasUsedMissing: 0 bytesBlobGasUsedUnexpected: 0 bytesExcessBlobGasMissing: 0 bytesExcessBlobGasUnexpected: 0 bytesParentBeaconBlockRootMissing: 0 bytesParentBeaconBlockRootUnexpected: 0 bytesBlobGasUsedExceedsMaxBlobGasPerBlock: 23 bytesBlobGasUsedNotMultipleOfBlobGasPerBlob: 23 bytesBlobGasUsedDiff: 23 bytesInvalidTransaction: 31 bytesBaseFeeDiff: 23 bytesExcessBlobGasDiff: 39 bytesGasLimitInvalidIncrease: 23 bytesGasLimitInvalidMinimum: 15 bytesGasLimitInvalidBlockMaximum: 15 bytesGasLimitInvalidDecrease: 23 bytesTimestampIsInPast: 23 bytesBlockTooLarge: 23 bytesTransactionGasLimitTooHigh: 15 bytesOther: 31 bytesCustom: 23 bytes