package octez-smart-rollup-node-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type status =
  1. | Pending_batch
    (*

    The message is in the queue of the batcher.

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

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 Tezos_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 Tezos node.

val shutdown : unit -> unit Lwt.t

Shutdown the batcher, waiting for the ongoing request to be processed.

val active : unit -> bool

Return true if the batcher was started for this node.

Retrieve an L2 message from the queue.

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 -> Octez_smart_rollup.L2_message.id list Tezos_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.

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.