Module reth_transaction_pool::validate

source ·
Expand description

Transaction validation abstractions.

Structs§

Enums§

Constants§

  • Validation constants. 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.
  • Validation constants. Maximum bytecode to permit for a contract.
  • Validation constants. Maximum initcode to permit in a creation transaction and create instructions.
  • Validation constants. 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§

Functions§

  • A TransactionValidator implementation that validates ethereum transaction. Ensures that gas limit of the transaction exceeds the intrinsic gas of the transaction.
  • A TransactionValidator implementation that validates ethereum transaction. Ensure that the code size is not greater than max_init_code_size. max_init_code_size should be configurable so this will take it as an argument.