package octez-smart-rollup-node-lib

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

    Only follows the chain and reconstructs inboxes

    *)
  2. | Accuser
    (*

    Only publishes commitments for conflicts and play refutation games

    *)
  3. | Bailout
  4. | Batcher
    (*

    Accept transactions in its queue and batches them on the L1

    *)
  5. | Maintenance
    (*

    Follows the chain and publishes commitments

    *)
  6. | Operator
    (*

    Equivalent to maintenance + batcher

    *)
  7. | Custom
    (*

    This mode allows to tweak which operations are injected by selecting the signers

    *)

Mode for the rollup node

type operation_kind =
  1. | Publish
  2. | Add_messages
  3. | Cement
  4. | Timeout
  5. | Refute

The kind of operations that can be injected by the rollup node.

type purpose =
  1. | Operating
  2. | Batching
  3. | Cementing

Purposes for operators, indicating their role and thus the kinds of operations that they sign.

type batcher = {
  1. simulate : bool;
    (*

    If true, the batcher will simulate the messages it receives, in an incremental context, before queuing them.

    *)
  2. min_batch_elements : int;
    (*

    The minimum number elements in a batch for it to be produced when the batcher receives new messages.

    *)
  3. min_batch_size : int;
    (*

    The minimum size in bytes of a batch for it to be produced when the batcher receives new messages.

    *)
  4. max_batch_elements : int;
    (*

    The maximum number of elements that we can put in a batch.

    *)
  5. max_batch_size : int option;
    (*

    The maximum size in bytes of a batch.

    *)
}

Configuration for the batcher.

Invariants:

  • 0 < min_batch_size <= max_batch_size <= protocol_max_batch_size
  • 0 < min_batch_elements <= max_batch_elements
type injector = {
  1. retention_period : int;
    (*

    The number of blocks during which the injector will keep track of an operation (in addition to the confirmation period).

    *)
  2. attempts : int;
    (*

    The number of attempts that will be made to inject an operation.

    *)
  3. injection_ttl : int;
    (*

    The number of blocks after which an operation that is injected but never included is retried.

    *)
}
type t = {
  1. sc_rollup_address : Tezos_crypto.Hashed.Smart_rollup_address.t;
  2. boot_sector_file : string option;
  3. sc_rollup_node_operators : operators;
  4. rpc_addr : string;
  5. rpc_port : int;
  6. metrics_addr : string option;
  7. reconnection_delay : float;
  8. fee_parameters : fee_parameters;
  9. mode : mode;
  10. loser_mode : Loser_mode.t;
  11. dal_node_endpoint : Uri.t option;
  12. dac_observer_endpoint : Uri.t option;
  13. dac_timeout : Z.t option;
  14. batcher : batcher;
  15. injector : injector;
  16. l1_blocks_cache_size : int;
  17. l2_blocks_cache_size : int;
  18. prefetch_blocks : int option;
  19. log_kernel_debug : bool;
}
val make_purpose_map : default:'a option -> (purpose * 'a) Tezos_base.TzPervasives.trace -> 'a Operator_purpose_map.t

make_purpose_map ~default purposes constructs a purpose map from a list of bindings purposes, with a potential default value.

val operation_kind_of_string : string -> operation_kind option

operation_kind_of_string s parses an operation kind from the given string s.

val string_of_operation_kind : operation_kind -> string

string_of_operation_kind o returns a string representation of operation_kind o.

val purpose_of_string : string -> purpose option

purpose_of_string s parses a purpose from the given string s.

val string_of_purpose : purpose -> string

string_of_purpose p returns a string representation of purpose p.

val purposes : purpose list

List of possible purposes for operator specialization.

val operation_kinds : operation_kind list

List of possible operations kind for operator specialization.

val operation_kinds_of_purpose : purpose -> operation_kind list
val default_data_dir : string

default_data_dir is the default value for data_dir.

val default_storage_dir : string -> string

default_storage_dir returns the default value of the storage dir given a data_dir.

val default_context_dir : string -> string

default_context_dir returns the default value of the directory for persisting the context given a data_dir.

val default_rpc_addr : string

default_rpc_addr is the default value for rpc_addr.

val default_rpc_port : int

default_rpc_port is the default value for rpc_port.

val default_metrics_port : int

default_metrics_port is the default port for the metrics server.

val default_reconnection_delay : float

default_reconnection_delay is the default value for reconnection_delay.

val default_fee_parameter : ?operation_kind:operation_kind -> unit -> Octez_injector.Injector_sigs.fee_parameter

default_fee_parameter ?operation_kind () is the default fee parameter to inject operation on L1. If operation_kind is provided, it returns the default fee parameter for this kind of operation.

val default_fee_parameters : fee_parameters

default_fee_parameters is the default fee parameters configuration build with default_fee_parameter for all purposes.

val default_batcher : batcher

default_batcher is the default configuration parameters for the batcher.

val default_injector : injector

default_injector is the default configuration parameters for the injector.

val default_l1_blocks_cache_size : int

default_l1_blocks_cache_size is the default number of L1 blocks that are cached by the rollup node

val default_l2_blocks_cache_size : int

default_l2_blocks_cache_size is the default number of L2 blocks that are cached by the rollup node

val max_injector_retention_period : int

max_injector_retention_period is the maximum allowed value for injector_retention_period.

val modes : mode list

This is the list of available modes.

val string_of_mode : mode -> string

string_of_mode mode returns a string representation of the mode mode.

val mode_of_string : string -> mode Tezos_base.TzPervasives.tzresult

mode_of_string s returns the mode represented by string s if it exists.

val description_of_mode : mode -> string

description_of_mode m returns a textual description of the mode m.

val config_filename : data_dir:string -> string

config_filename data_dir returns the configration filename from the data_dir

check_mode config ensures the operators correspond to the chosen mode and removes the extra ones.

val refutation_player_buffer_levels : int

Number of levels the refutation player waits until trying to play for a game state it already played before.

val save : force:bool -> data_dir:string -> t -> unit Tezos_base.TzPervasives.tzresult Lwt.t

save ~force ~data_dir configuration writes the configuration file in data_dir. If force is true, existing configurations are overwritten.

val load : data_dir:string -> t Tezos_base.TzPervasives.tzresult Lwt.t

load ~data_dir loads a configuration stored in data_dir.

module Cli : sig ... end
OCaml

Innovation. Community. Security.