Mavkit_smart_rollup_node.Batcher
type status =
| Pending_batch
The message is in the queue of the batcher.
*)| Batched of Injector.Inj_operation.id
The message has already been batched and sent to the injector in an L1 operation whose id is given.
*)The type for the status of messages in the batcher.
val init :
(module Protocol_plugin_sig.S) ->
_ Node_context.t ->
unit Mavryk_base.TzPervasives.tzresult Lwt.t
init plugin node_ctxt
initializes and starts the batcher for signer
. plugin
is the protocol plugin with which the batcher is started, but it will automatically change plugins on protocol migrations. The batcher worker is launched only if the current rollup node mode supports batching L2 operations.
val produce_batches : unit -> unit Mavryk_base.TzPervasives.tzresult Lwt.t
Create L2 batches of operations from the queue and pack each batch in an L1 operation. The L1 operations (i.e. L2 batches) are queued in the injector for injection on the Mavryk node.
Shutdown the batcher, waiting for the ongoing request to be processed.
val find_message :
Mavkit_smart_rollup.L2_message.id ->
Mavkit_smart_rollup.L2_message.t option Mavryk_base.TzPervasives.tzresult
Retrieve an L2 message from the queue.
val get_queue :
unit ->
(Mavkit_smart_rollup.L2_message.id * Mavkit_smart_rollup.L2_message.t) list
Mavryk_base.TzPervasives.tzresult
List all queued messages 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_messages :
string list ->
Mavkit_smart_rollup.L2_message.id list Mavryk_base.TzPervasives.tzresult
Lwt.t
register_messages messages
registers new L2 messages
in the queue of the batcher for future injection on L1. In this case, when the application fails, the messages are not queued.
val message_status :
Mavkit_smart_rollup.L2_message.id ->
(status * string) option Mavryk_base.TzPervasives.tzresult
The status of a message in the batcher. Returns None
if the message is not known by the batcher (the batcher only keeps the batched status of the last 500000 messages).