package tezos-dal-node-lib

  1. Overview
  2. No Docs
Tezos: `tezos-dal-node` library

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-18.0.tar.gz
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a

doc/tezos-dal-node-lib.gossipsub/Tezos_dal_node_lib_gossipsub/Gs_interface/index.html

Module Tezos_dal_node_lib_gossipsub.Gs_interfaceSource

This module defines the relevant data structures to instantiate the gossipsub worker.

Sourcetype topic = {
  1. slot_index : int;
  2. pkh : Tezos_crypto.Signature.Public_key_hash.t;
}

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

  • A slot producer tracks the topic associated to a given slot index for all the public key-hashes;
  • The attestor tracks its own public key hash for all the slot indices;
  • A slot consumer tracks topics associated to a given slot index and enough public key-hashes so that the number of covered shards is enough to recover the slot data.
Sourcetype message_id = {
  1. commitment : Tezos_crypto_dal.Cryptobox.Commitment.t;
  2. level : int32;
  3. slot_index : int;
  4. shard_index : int;
  5. pkh : Tezos_crypto.Signature.Public_key_hash.t;
}

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.

Note that pkh is used to be able to directly infer a topic from a message id. It could be retrieved from L1 using the level. But, we decide to provide it directly in this first version.

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.

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

Encodings for various types above.

Sourceval topic_encoding : topic Tezos_base.TzPervasives.Data_encoding.t
Sourceval message_id_encoding : message_id Tezos_base.TzPervasives.Data_encoding.t
Sourceval message_encoding : message Tezos_base.TzPervasives.Data_encoding.t
Sourceval span_encoding : Span.t Tezos_base.TzPervasives.Data_encoding.t
Sourcemodule Monad : sig ... end
Sourcemodule Validate_message_hook : sig ... end
OCaml

Innovation. Community. Security.