Module Evm_node_lib_dev.Validate

type validation_mode =
  1. | Minimal
    (*

    Minimal validation, includes:

    • chain id is valid
    • nonce is superior to current one
    • sender is an EOA
    • transaction data is not too large
    • gas limit is valid with minimum gas price
    *)
  2. | Full
    (*

    Full validation, is minimal validation plus:

    • balance is enough
    • max_fee_per_gas is inferior to current gas price
    *)

is_tx_valid backend_rpc tx_raw validates the transaction tx_raw and returns the next allowed nonce for the sender of the transaction alongside the transaction object.

type validation_state = {
  1. config : validation_config;
  2. addr_balance : Z.t Tezos_base.TzPervasives.String.Map.t;
  3. addr_nonce : Z.t Tezos_base.TzPervasives.String.Map.t;
}