Module Evm_node_lib_prod.Tx_pool

type mode =
  1. | Proxy of {
    1. rollup_node_endpoint : Uri.t;
    }
  2. | Sequencer
  3. | Observer
type parameters = {
  1. rollup_node : (module Services_backend_sig.S);
    (*

    The backend RPC module.

    *)
  2. smart_rollup_address : string;
    (*

    The address of the smart rollup.

    *)
  3. mode : mode;
}

start parameters starts the tx-pool

val shutdown : unit -> unit Mavryk_base.TzPervasives.tzresult Lwt.t

shutdown () stops the tx-pool, waiting for the ongoing request to be processed.

add raw_tx adds a raw eth transaction to the tx-pool.

nonce address returns the nonce of the user Returns the first gap in the tx-pool, or the nonce stored on the rollup if no transactions are in the pool.

val pop_transactions : maximum_cumulative_size:int -> string list Mavryk_base.TzPervasives.tzresult Lwt.t

pop_transactions maximum_cumulative_size pops as much valid transactions as possible from the pool, until their cumulative size exceeds `maximum_cumulative_size`. Returns no transactions if the pool is locked.

val pop_and_inject_transactions : unit -> unit Mavryk_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.rollup_node.

val pop_and_inject_transactions_lazy : unit -> unit Mavryk_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 lock_transactions : unit -> unit Mavryk_base.TzPervasives.tzresult Lwt.t

lock_transactions locks the transactions in the pool, new transactions can be added but nothing can be retrieved with pop_transactions.

val unlock_transactions : unit -> unit Mavryk_base.TzPervasives.tzresult Lwt.t

unlock_transactions unlocks the transactions if it was locked by lock_transactions.

val is_locked : unit -> bool Mavryk_base.TzPervasives.tzresult Lwt.t

is_locked checks if the pools is locked.