package octez-l2-libs

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

This file defines the services of the rollup node that do not depend on the protocol. A top-level directory is built for them in the rollup node library.

Protocol specific services are for RPCs under /global/block/ and are defined in the protocol specific libraries in src/proto_*/lib_sc_rollup_layer2/sc_rollup_services.ml.

We distinguish RPC endpoints served by the rollup node into global and local. The difference between the two lies in whether the responses given by different rollup nodes in the same state (see below for an exact definition) must be the same (in the case of global endpoints) or can differ (in the case of local endpoints).

More formally, two rollup nodes are in the same quiescent state if they are subscribed to the same rollup address, and have processed the same set of heads from the layer1. We only consider quiescent states, that is those where rollup nodes are not actively processing a head received from layer1.

Examples of global endpoints are current_tezos_head and last_stored_commitment, as the responses returned by these endpoints is expected to be consistent across rollup nodes in the same state.

An example of local endpoint is last_published_commitment, as two rollup nodes in the same state may either publish or not publish a commitment, according to whether its inbox level is below the inbox level of the last cemented commitment at the time they tried to publish the commitment. See below for a more detailed explanation.

type message_status =
  1. | Unknown
  2. | Pending_batch
  3. | Pending_injection of L1_operation.t
  4. | Injected of {
    1. op : L1_operation.t;
    2. oph : Tezos_base.TzPervasives.Operation_hash.t;
    3. op_index : int;
    }
  5. | Included of {
    1. op : L1_operation.t;
    2. oph : Tezos_base.TzPervasives.Operation_hash.t;
    3. op_index : int;
    4. l1_block : Tezos_base.TzPervasives.Block_hash.t;
    5. l1_level : int32;
    6. finalized : bool;
    7. cemented : bool;
    }
  6. | Committed of {
    1. op : L1_operation.t;
    2. oph : Tezos_base.TzPervasives.Operation_hash.t;
    3. op_index : int;
    4. l1_block : Tezos_base.TzPervasives.Block_hash.t;
    5. l1_level : int32;
    6. finalized : bool;
    7. cemented : bool;
    8. commitment : Commitment.t;
    9. commitment_hash : Octez_smart_rollup.Commitment.Hash.t;
    10. first_published_at_level : int32;
    11. published_at_level : int32;
    }
type gc_info = {
  1. last_gc_level : int32;
  2. first_available_level : int32;
}
module Encodings : sig ... end
module Arg : sig ... end
module type PREFIX = sig ... end
module Make_services (P : PREFIX) : sig ... end
module Global : sig ... end
module Local : sig ... end
OCaml

Innovation. Community. Security.