package tezos-dal-node-services

  1. Overview
  2. Docs

Module Tezos_dal_node_services.TypesSource

Sourcetype level = int32

A Tezos level.

Sourcetype slot_index = int

An index of a DAL slot header.

Sourcetype page_index = int

An index of a DAL page.

Sourcemodule Slot_id : sig ... end

An ID associated to a slot or to its commitment.

Sourcetype slot_id = Slot_id.t
Sourcemodule Topic : sig ... end

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

Sourcemodule 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.

Sourcemodule 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.

Sourcemodule 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).

Sourcemodule Point : sig ... end

A point is made of an IP address and a port. Only the worker knows about the notion. The automaton only sees peers (i.e. cryptographic identities of nodes).

Sourcemodule Span : sig ... end
Sourcemodule Time : sig ... end
Sourcemodule Score : sig ... end
Sourcetype 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.

Sourcetype 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).

Sourcetype shard_index = int

An index of a DAL shard

Sourcetype 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. This could only happen if the RPC `PATCH /commitments/<commitment>` was called but the corresponding slot header was not included in a final block. In turn, 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:

Sourcetype 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.

    *)
  3. | Observer of {
    1. slot_index : int;
    }
    (*

    Observer {slot_index} observes slot for slot index slot_index: collects the shards corresponding to some slot index, reconstructs slots when enough shards are seen, and republishes missing shards.

    *)

Profiles that operate on shards/slots.

Sourcetype operator_profiles = operator_profile list

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

Sourcetype profiles =
  1. | Bootstrap
    (*

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

    *)
  2. | Operator of operator_profiles
  3. | Random_observer

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

Sourceval merge_profiles : lower_prio:profiles -> higher_prio:profiles -> profiles
Sourcetype 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.

Sourcetype 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.

Sourceval slot_id_query : (level option * shard_index option) Resto.Query.t
Sourceval slot_query : < padding : char > Resto.Query.t
Sourceval wait_query : < wait : bool > Resto.Query.t
Sourceval connected_query : < connected : bool > Resto.Query.t
Sourceval subscribed_query : < subscribed : bool > Resto.Query.t
Sourceval opt_header_status_query : header_status option Resto.Query.t
Sourceval slot_encoding : Cryptobox.slot Tezos_base.TzPervasives.Data_encoding.t
Sourceval slot_header_encoding : slot_header Tezos_base.TzPervasives.Data_encoding.t
Sourceval slot_id_encoding : slot_id Tezos_base.TzPervasives.Data_encoding.t
Sourceval header_status_encoding : header_status Tezos_base.TzPervasives.Data_encoding.t
Sourceval profiles_encoding : profiles Tezos_base.TzPervasives.Data_encoding.t
Sourceval with_proof_encoding : with_proof Tezos_base.TzPervasives.Data_encoding.t
Sourceval operator_profile_encoding : operator_profile Tezos_base.TzPervasives.Data_encoding.t
Sourceval attestable_slots_encoding : attestable_slots Tezos_base.TzPervasives.Data_encoding.t
Sourcemodule Store : sig ... end
Sourcemodule P2P : sig ... end
Sourcemodule Gossipsub : sig ... end
Sourcemodule Version : sig ... end
OCaml

Innovation. Community. Security.