Module validate

Expand description

Transaction validation abstractions.

Structs§

EthTransactionValidator
Validator for Ethereum transactions. It is a TransactionValidator implementation that validates ethereum transaction.
EthTransactionValidatorBuilder
A builder for EthTransactionValidator and TransactionValidationTaskExecutor
ForkTracker
Keeps track of whether certain forks are activated
TransactionValidationTaskExecutor
A TransactionValidator implementation that validates ethereum transaction. This validator is non-blocking, all validation work is done in a separate task.
ValidPoolTransaction
A valid transaction in the pool.
ValidationTask
A service that performs validation jobs.

Enums§

TransactionValidationOutcome
A Result type returned after checking a transaction’s validity.
TransactionValidatorError
Validation Errors that can occur during transaction validation.
ValidTransaction
A wrapper type for a transaction that is valid and has an optional extracted EIP-4844 blob transaction sidecar.

Constants§

DEFAULT_MAX_TX_INPUT_BYTES
DEFAULT_MAX_TX_INPUT_BYTES is the default maximum size a single transaction can have. This field has non-trivial consequences: larger transactions are significantly harder and more expensive to propagate; larger transactions also take more resources to validate whether they fit into the pool or not. Default is 4 times TX_SLOT_BYTE_SIZE, which defaults to 32 KiB, so 128 KiB.
MAX_CODE_BYTE_SIZE
Maximum bytecode to permit for a contract.
MAX_INIT_CODE_BYTE_SIZE
Maximum initcode to permit in a creation transaction and create instructions.
TX_SLOT_BYTE_SIZE
TX_SLOT_BYTE_SIZE is used to calculate how many data slots a single transaction takes up based on its byte size. The slots are used as DoS protection, ensuring that validating a new transaction remains a constant operation (in reality O(maxslots), where max slots are 4 currently).

Traits§

TransactionValidator
Provides support for validating transaction at any given state of the chain

Functions§

ensure_intrinsic_gas
Ensures that gas limit of the transaction exceeds the intrinsic gas of the transaction.