Module Evm_node_lib_dev.Tx_pool

type mode =
  1. | Proxy
  2. | Sequencer
  3. | Relay
    (*

    Relays the transactions when they are valid w.r.t. the local state.

    *)
type parameters = {
  1. backend : (module Services_backend_sig.S);
    (*

    The backend RPC module.

    *)
  2. smart_rollup_address : string;
    (*

    The address of the smart rollup.

    *)
  3. mode : mode;
  4. tx_timeout_limit : int64;
    (*

    TTL of a transaction inside the pool.

    *)
  5. tx_pool_addr_limit : int;
    (*

    Maximum allowed addresses inside the pool.

    *)
  6. tx_pool_tx_per_addr_limit : int;
    (*

    Maximum allowed transactions per address inside the pool.

    *)
  7. chain_family : Evm_node_lib_dev_encoding.L2_types.ex_chain_family;
}
val start : tx_pool_parameters:parameters -> unit Tezos_base.TzPervasives.tzresult Lwt.t

start parameters starts the tx-pool

val pop_transactions : maximum_cumulative_size:int -> (string * Evm_node_lib_dev_encoding.Ethereum_types.legacy_transaction_object) list Tezos_base.TzPervasives.tzresult Lwt.t

pop_transactions chain_family maximum_cumulative_size pops as much valid transactions as possible from the pool, until their cumulative size exceeds `maximum_cumulative_size`. If the pool is locked or node in tezlink mode, returns no transactions.

val pop_and_inject_transactions : unit -> unit Tezos_base.TzPervasives.tzresult Lwt.t

pop_and_inject_transactions () pops the valid transactions from the pool using pop_transactions and injects them using inject_raw_transactions provided by parameters.backend.

val pop_and_inject_transactions_lazy : unit -> unit Tezos_base.TzPervasives.tzresult Lwt.t

pop_and_inject_transactions_lazy () same as pop_and_inject_transactions but don't wait for the request to complete

val clear_popped_transactions : unit -> unit Tezos_base.TzPervasives.tzresult Lwt.t
val mode : unit -> mode Tezos_base.TzPervasives.tzresult Lwt.t

mode retrieves the current pool mode

wrapper of the Tx_pool to be compatible with the Tx_container signature for the services.