package tezos-dal-node-services

  1. Overview
  2. Docs
module Cryptobox = Tezos_crypto_dal.Cryptobox
type level = int32

A Tezos level.

type slot_index = int

An index of a DAL slot header.

type slot_id = {
  1. slot_level : level;
  2. slot_index : slot_index;
}

An ID associated to a slot or to its commitment.

module Topic : sig ... end

A topic is defined by a public key hash of an attester and a slot index.

module Message_id : sig ... end

A message id uniquely identifies a share whose commitment is included in an L1 block. It is defined by a tuple containing the commitment, the level at which the commitment is successfully included in an L1 block, the corresponding slot index, the shard index, as well as the public key hash pkh of the delegate expected to attest it.

module Message : sig ... end

A message is a portion of an encoded slot's data. It's basically a shard without the corresponding index. The proof that the corresponding shard belong to the commitment (part of the message id) is also part of the message.

module Peer : sig ... end

From the Gossipsub point of view, a peer is given by a cryptographic node identity P2p_peer.Id.t. It's up to the caller to associate the P2p_peer.Id.t to a P2p_point.Id.t if needed (to e.g. implement peers exchange, which needs addresses and ports instead of cryptographic identities).

module Span : sig ... end
module Time : sig ... end
module Score : sig ... end
type slot_set = {
  1. slots : bool list;
  2. published_level : int32;
}

A set of slots, represented by a list of booleans (false for not in the set). It is used for instance to record which slots are deemed available by an attester. The level at which the slots have been published is also given.

type attestable_slots =
  1. | Attestable_slots of slot_set
  2. | Not_in_committee

The set of attestable slots of an attester (which may not necessarily be in the committee for a given level).

type shard_index = int

An index of a DAL shard

type header_status = [
  1. | `Waiting_attestation
    (*

    The slot header was included and applied in a finalized L1 block but remains to be attested.

    *)
  2. | `Attested
    (*

    The slot header was included in an L1 block and attested.

    *)
  3. | `Unattested
    (*

    The slot header was included in an L1 block but not timely attested.

    *)
  4. | `Not_selected
    (*

    The slot header was included in an L1 block but was not selected as the slot header for that slot index.

    *)
  5. | `Unseen_or_not_finalized
    (*

    The slot header was not seen in a *final* L1 block. For instance, this could happen if the RPC `PATCH /commitments/<commitment>` was called but the corresponding slot header was never included into a block; or the slot header was included in a non-final (ie not agreed upon) block. This means that the publish operation was not sent (yet) to L1, or sent but not included (yet) in a block, or included in a not (yet) final block.

    *)
]

The status of a header a DAL node is aware of:

type operator_profile =
  1. | Attester of Tezos_crypto.Signature.public_key_hash
    (*

    Attester pkh downloads all shards assigned to pkh. Used by bakers to attest availability of their assigned shards.

    *)
  2. | Producer of {
    1. slot_index : int;
    }
    (*

    Producer {slot_index} produces/publishes slot for slot index slot_index.

    *)

Profiles that operate on shards/slots.

type operator_profiles = operator_profile list

List of operator profiles. It may contain dupicates as it represents profiles provided by the user in unprocessed form.

type profiles =
  1. | Bootstrap
    (*

    The bootstrap profile facilitates peer discovery in the DAL network. Note that bootstrap nodes are incompatible with attester/producer profiles as bootstrap nodes are expected to connect to all the meshes with degree 0.

    *)
  2. | Operator of operator_profiles

DAL node can track one or many profiles that correspond to various modes that the DAL node would operate in.

type slot_header = {
  1. slot_id : slot_id;
  2. commitment : Cryptobox.Commitment.t;
  3. status : header_status;
}

Information associated to a slot header in the RPC services of the DAL node.

type with_proof = {
  1. with_proof : bool;
}

The with_proof flag is associated to shards computation. It indicates whether we also compute shards' proofs or not.

val slot_id_query : (level option * shard_index option) Resto.Query.t
val wait_query : < wait : bool > Resto.Query.t
val connected_query : < connected : bool > Resto.Query.t
val subscribed_query : < subscribed : bool > Resto.Query.t
val opt_header_status_query : header_status option Resto.Query.t
module Store : sig ... end
module P2P : sig ... end
module Gossipsub : sig ... end
module Version : sig ... end
OCaml

Innovation. Community. Security.