Tezos_dal_node_lib_gossipsub.Gs_interfaceSourceThis module defines the relevant data structures to instantiate the gossipsub worker.
A topic is defined by a public key hash of an attestor and a slot index.
type message_id = {commitment : Tezos_crypto_dal.Cryptobox.Commitment.t;level : int32;slot_index : int;shard_index : int;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.
module Worker_config :
Tezos_gossipsub.Gossipsub_intf.WORKER_CONFIGURATION
with type GS.Topic.t = topic
and type GS.Message_id.t = message_id
and type GS.Message.t = message
and type GS.Peer.t = peer
and module GS.Span = Span
and module Monad = Monadmodule Worker_instance :
Tezos_gossipsub.Gossipsub_intf.WORKER
with type GS.Topic.t = topic
and type GS.Message_id.t = message_id
and type GS.Message.t = message
and type GS.Peer.t = peer
and module GS.Span = Span
and module Monad = Monad