Library
Module
Module type
Parameter
Class
Class type
val init :
rollup:Tezos_protocol_013_PtJakart.Protocol.Alpha_context.Tx_rollup.t ->
signer:Tezos_crypto.Signature.public_key_hash ->
batch_burn_limit:
Tezos_protocol_013_PtJakart.Protocol.Alpha_context.Tez.t option ->
Context.index ->
Tezos_protocol_013_PtJakart.Protocol.Alpha_context.Constants.t ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
Initialize the internal state of the batcher.
val find_transaction :
L2_transaction.hash ->
L2_transaction.t option Tezos_base.TzPervasives.tzresult
Retrieve an L2 transaction from the queue.
val get_queue : unit -> L2_transaction.t list Tezos_base.TzPervasives.tzresult
List all queued transactions in the order they appear in the queue, i.e. the message that were added first to the queue are at the end of list.
val register_transaction :
?eager_batch:bool ->
?apply:bool ->
L2_transaction.t ->
L2_transaction.hash Tezos_base.TzPervasives.tzresult Lwt.t
register_transaction ?apply state tx
registers a new L2 transaction tx
in the queue of the batcher for future injection on L1. If apply
is true
(defaults to true
), the transaction is applied on the batcher's incremental context. In this case, when the application fails, the transaction is not queued. A batch is injected asynchronously if a full batch can be constructed and eager_batch
is true
.
val batch : unit -> unit Tezos_base.TzPervasives.tzresult Lwt.t
Create L2 batches of operations from the queue and pack them in an L1 batch operation. The batch operation is queued in the injector for injection on the Tezos node.
val new_head : L2block.t -> unit Tezos_base.TzPervasives.tzresult Lwt.t
Notifies a new L2 head to the batcher worker.
val shutdown : unit -> unit Lwt.t
Shutdown the batcher, waiting for the ongoing request to be processed.