Evm_node_lib_dev.Tx_queue
The Tx_queue is a worker allowing to batch raw transactions in a single eth_sendRawTransaction
at a regular interval. It provides a non-blocking interface based on the use of callbacks.
A callback
is called by the Tx_queue
at various stages of a submitted transaction's life.
The next tick after its insertion in the queue, a transaction is submitted to the relay node within a batch of eth_sendRawTransaction
requests.
callback
is called with either `Accepted
or `Refused
).`Confirmed
. If this does not happen before 2s, the callback
is called with `Dropped
.val tx_container :
chain_family:'f Evm_node_lib_dev_encoding.L2_types.chain_family ->
(config:Evm_node_config.Configuration.tx_queue ->
keep_alive:bool ->
unit ->
unit Tezos_base.TzPervasives.tzresult Lwt.t)
* 'f Services_backend_sig.tx_container
tx_container ~chain_family
is a pair (start, container)
where start ~config ~max_transaction_batch_length ()
starts the worker, meaning it is possible to call inject
, confirm
and beacon
and container
is a wrapper of the Tx_queue to be compatible with the Tx_container signature for the services.
/
module Internal_for_tests : sig ... end