package octez-libs
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
    
    
  sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
    
    
  doc/octez-libs.base/Tezos_base/P2p_params/index.html
Module Tezos_base.P2p_paramsSource
Types of the abstract data types (ADT) which parameterize the P2p layer.
Many types used in the P2p layer are parameterized by three type parameters:
- 'msg: type of messages exchanged between peers
- 'peer_meta: type of the metadata associated with peers (score, etc.)
- 'conn_meta: type of the metadata associated with connections
These types are kept abstract from the P2p layer. It can only operate on them via a set of functions packed in a "configuration" record passed by the upper layer (see also P2p and P2p.create).
This module defines the type of these configuration records.
type 'peer_meta peer_meta_config = {- peer_meta_encoding : 'peer_meta Data_encoding.t;
- peer_meta_initial : unit -> 'peer_meta;(*- Constructor *)
- score : 'peer_meta -> float;(*- Score of a peer, used for ordering *)
}Metadata for a peer
type 'conn_meta conn_meta_config = {- conn_meta_encoding : 'conn_meta Data_encoding.t;
- conn_meta_value : unit -> 'conn_meta;(*- Constructor *)
- private_node : 'conn_meta -> bool;(*- Returns true if peer at the other end of the connection is in private mode *)
}Metadata for a connection.
type 'msg app_message_encoding = - | Encoding : {- tag : int;
- title : string;
- encoding : 'a Data_encoding.t;
- wrap : 'a -> 'msg;
- unwrap : 'msg -> 'a option;
- max_length : int option;
 - } -> 'msg app_message_encoding
type 'msg message_config = {- encoding : 'msg app_message_encoding list;(*- Encoding of the messages. *)
- chain_name : Distributed_db_version.Name.t;(*- Identifier for this P2p protocol when establishing session. *)
- distributed_db_versions : Distributed_db_version.t list;(*- List of versions supported by this P2p protocol. *)
}Application-level messages encoding, and version parameters