package octez-smart-rollup-node-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Protocol specific batcher. NOTE: The batcher has to be stopped and the new one restarted on protocol change.

type status =
  1. | Pending_batch
    (*

    The message is in the queue of the batcher.

    *)
  2. | Batched of Injector.Inj_operation.hash
    (*

    The message has already been batched and sent to the injector in an L1 operation whose hash is given.

    *)

The type for the status of messages in the batcher.

init config ~signer node_ctxt initializes and starts the batcher for signer. If config.simulation is true (the default), messages added to the batcher are simulated in an incremental simulation context.

new_head head create batches of L2 messages 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 Tezos node.

val shutdown : unit -> unit Lwt.t

shutdown () stops the batcher, waiting for the ongoing request to be processed.

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.

register_messages messages registers new L2 messages in the queue of the batcher for future injection on L1. If the batcher was initialized with simualte = true, the messages are evaluated the batcher's incremental simulation context. In this case, when the application fails, the messages are not queued.

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).

OCaml

Innovation. Community. Security.