ConsensusError in reth_consensus - Rust

Enum ConsensusError 

Source

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.

Source§
Source§
Source§
Source§
Source§

Returns the lower-level source of this error, if any. Read more

1.0.0 · Source§

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

🔬This is a nightly-only experimental API. (error_generic_member_access #99301)

Provides type-based access to context intended for error reports. Read more

Source§
Source§

Converts to this type from the input type.

Source§
Source§

Converts to this type from the input type.

Source§
Source§

Converts to this type from the input type.

§
§
§
§
§
§
§

Source§
Source§
Source§
Source§
Source§

🔬This is a nightly-only experimental API. (clone_to_uninit #126799)

Performs copy-assignment from self to dest. Read more

§
Source§

Source§

§
§

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.

§

Formats each item in a sequence. Read more

Source§
Source§

Returns the argument unchanged.

§
§

Builds a [TxEnv] from a transaction and a sender address.

§
§

Builds a [TxEnv] from a transaction, its sender, and encoded transaction bytes.

§
§

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

§

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

Source§
Source§

Calls U::from(self).

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

Source§
§
§

Pipes by value. This is generally the method you want to use. Read more

§

Borrows self and passes that borrow into the pipe function. Read more

§

Mutably borrows self and passes that borrow into the pipe function. Read more

§

Borrows self, then passes self.borrow() into the pipe function. Read more

§

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

§

Borrows self, then passes self.as_ref() into the pipe function.

§

Mutably borrows self, then passes self.as_mut() into the pipe function.

§

Borrows self, then passes self.deref() into the pipe function.

§

Mutably borrows self, then passes self.deref_mut() into the pipe function.

§
§

The alignment of pointer.

§

The type for initializers.

§

Initializes a with the given initializer. Read more

§

Dereferences the given pointer. Read more

§

Mutably dereferences the given pointer. Read more

§

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

Source§
§
§

Immutable access to a value. Read more

§
§

Immutable access to the Borrow<B> of a value. Read more

§

Mutable access to the BorrowMut<B> of a value. Read more

§

Immutable access to the AsRef<R> view of a value. Read more

§

Mutable access to the AsMut<R> view of a value. Read more

§

Immutable access to the Deref::Target of a value. Read more

§

Mutable access to the Deref::Target of a value. Read more

§

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.

Source§
Source§

The resulting type after obtaining ownership.

Source§

Creates owned data from borrowed data, usually by cloning. Read more

Source§

Uses borrowed data to replace owned data, usually by cloning. Read more

Source§
§
§

Attempts to convert self into T using TryInto<T>. Read more

Source§
Source§

The type returned in the event of a conversion error.

Source§

Performs the conversion.

Source§
Source§

The type returned in the event of a conversion error.

Source§

Performs the conversion.

§

§

§
§

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 bytes
  • HeaderGasLimitExceedsMax: 15 bytes
  • BlockGasUsed: 47 bytes
  • BodyOmmersHashDiff: 15 bytes
  • BodyStateRootDiff: 15 bytes
  • BodyTransactionRootDiff: 15 bytes
  • BodyReceiptRootDiff: 15 bytes
  • BodyBloomLogDiff: 15 bytes
  • BodyWithdrawalsRootDiff: 15 bytes
  • BodyRequestsHashDiff: 15 bytes
  • BlockKnown: 47 bytes
  • ParentUnknown: 32 bytes
  • ParentBlockNumberMismatch: 23 bytes
  • ParentHashMismatch: 15 bytes
  • TimestampIsInFuture: 23 bytes
  • BaseFeeMissing: 0 bytes
  • TransactionSignerRecoveryError: 0 bytes
  • ExtraDataExceedsMax: 15 bytes
  • TheMergeDifficultyIsNotZero: 0 bytes
  • TheMergeNonceIsNotZero: 0 bytes
  • TheMergeOmmerRootIsNotEmpty: 0 bytes
  • WithdrawalsRootMissing: 0 bytes
  • RequestsHashMissing: 0 bytes
  • WithdrawalsRootUnexpected: 0 bytes
  • RequestsHashUnexpected: 0 bytes
  • BodyWithdrawalsMissing: 0 bytes
  • BodyRequestsMissing: 0 bytes
  • BlobGasUsedMissing: 0 bytes
  • BlobGasUsedUnexpected: 0 bytes
  • ExcessBlobGasMissing: 0 bytes
  • ExcessBlobGasUnexpected: 0 bytes
  • ParentBeaconBlockRootMissing: 0 bytes
  • ParentBeaconBlockRootUnexpected: 0 bytes
  • BlobGasUsedExceedsMaxBlobGasPerBlock: 23 bytes
  • BlobGasUsedNotMultipleOfBlobGasPerBlob: 23 bytes
  • BlobGasUsedDiff: 23 bytes
  • InvalidTransaction: 31 bytes
  • BaseFeeDiff: 23 bytes
  • ExcessBlobGasDiff: 39 bytes
  • GasLimitInvalidIncrease: 23 bytes
  • GasLimitInvalidMinimum: 15 bytes
  • GasLimitInvalidBlockMaximum: 15 bytes
  • GasLimitInvalidDecrease: 23 bytes
  • TimestampIsInPast: 23 bytes
  • BlockTooLarge: 23 bytes
  • TransactionGasLimitTooHigh: 15 bytes
  • Other: 31 bytes
  • Custom: 23 bytes