Module validate
Expand description
Transaction validation abstractions.
Structs§
- EthTransaction
Validator - Validator for Ethereum transactions.
It is a
TransactionValidator
implementation that validates ethereum transaction. - EthTransaction
Validator Builder - A builder for
EthTransactionValidator
andTransactionValidationTaskExecutor
- Fork
Tracker - Keeps track of whether certain forks are activated
- Transaction
Validation Task Executor - A
TransactionValidator
implementation that validates ethereum transaction. This validator is non-blocking, all validation work is done in a separate task. - Valid
Pool Transaction - A valid transaction in the pool.
- Validation
Task - A service that performs validation jobs.
Enums§
- Transaction
Validation Outcome - A Result type returned after checking a transaction’s validity.
- Transaction
Validator Error - Validation Errors that can occur during transaction validation.
- Valid
Transaction - 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 timesTX_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 asDoS
protection, ensuring that validating a new transaction remains a constant operation (in reality O(maxslots), where max slots are 4 currently).
Traits§
- Transaction
Validator - 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.