package octez-smart-rollup-node-lib

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

Protocol registration logic

type proto_plugin = (module Protocol_plugin_sig.S)
val register : proto_plugin -> unit

Register a protocol plugin for a specific protocol to be used by the rollup node.

val registered_protocols : unit -> Tezos_base.TzPervasives.Protocol_hash.t list

Returns the list of registered protocols.

val last_registered : unit -> Tezos_base.TzPervasives.Protocol_hash.t

Returns the last registered protocol.

NOTE: This is the last protocol with which the rollup node is linked against, and this is decided only by the order in manifest/main.ml.

Using the correct protocol plugin

Return the protocol plugin for a given protocol (or an error if not supported).

val proto_plugin_for_level : _ Node_context.t -> int32 -> proto_plugin Tezos_base.TzPervasives.tzresult Lwt.t

Return the protocol plugin for a given level (or an error if not supported).

val proto_plugin_for_level_with_store : _ Store.t -> int32 -> proto_plugin Tezos_base.TzPervasives.tzresult Lwt.t

Return the protocol plugin for a given level (or an error if not supported).

Return the protocol plugin for a given block (or an error if not supported).

Returns the plugin corresponding to the last protocol seen by the rollup node.

val last_proto_plugin_opt : _ Node_context.t -> proto_plugin option Tezos_base.TzPervasives.tzresult Lwt.t

Same as last_proto_plugin but returns None if the rollup node has not registered any protocol information yet

Safe protocol specific constants

These functions provide a way to retrieve constants in a safe manner, depending on the context.

Retrieve constants for a given level (values are cached).

Retrieve constants for a given block hash (values are cached).

Retrieve constants for a given protocol (values are cached). level, if provided, must be a level of the protocol.

OCaml

Innovation. Community. Security.