package octez-l2-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053
doc/octez-l2-libs.smart-rollup/Octez_smart_rollup/Rollup_node_services/index.html
Module Octez_smart_rollup.Rollup_node_services
Source
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 =
| Unknown
| Pending_batch
| Pending_injection of L1_operation.t
| Injected of {
op : L1_operation.t;
oph : Tezos_base.TzPervasives.Operation_hash.t;
op_index : int;
}
| Included of {
op : L1_operation.t;
oph : Tezos_base.TzPervasives.Operation_hash.t;
op_index : int;
l1_block : Tezos_base.TzPervasives.Block_hash.t;
l1_level : int32;
finalized : bool;
cemented : bool;
}
| Committed of {
op : L1_operation.t;
oph : Tezos_base.TzPervasives.Operation_hash.t;
op_index : int;
l1_block : Tezos_base.TzPervasives.Block_hash.t;
l1_level : int32;
finalized : bool;
cemented : bool;
commitment : Commitment.t;
commitment_hash : Octez_smart_rollup.Commitment.Hash.t;
first_published_at_level : int32;
published_at_level : int32;
}