package octez-libs

  1. Overview
  2. Docs
A package that contains multiple base libraries used by the Octez suite

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-18.1.tar.gz
sha256=aa2f5bc99cc4ca2217c52a1af2a2cdfd3b383208cb859ca2e79ca0903396ca1d
sha512=d68bb3eb615e3dcccc845fddfc9901c95b3c6dc8e105e39522ce97637b1308a7fa7aa1d271351d5933febd7476b2819e1694f31198f1f0919681f1f9cc97cb3a

doc/octez-libs.tezos-gossipsub/Tezos_gossipsub/Make/Introspection/index.html

Module Make.IntrospectionSource

Sourcetype connection = {
  1. topics : Topic.Set.t;
  2. direct : bool;
  3. outbound : bool;
}
Sourcetype fanout_peers = {
  1. peers : Peer.Set.t;
  2. last_published_time : Time.t;
}
Sourcemodule Connections : sig ... end
Sourcemodule Message_cache : sig ... end
Sourcetype view = {
  1. limits : limits;
  2. parameters : parameters;
  3. connections : Connections.t;
  4. scores : Score.t Peer.Map.t;
  5. ihave_per_heartbeat : int Peer.Map.t;
  6. iwant_per_heartbeat : int Peer.Map.t;
  7. mesh : Peer.Set.t Topic.Map.t;
  8. fanout : fanout_peers Topic.Map.t;
  9. backoff : Time.t Peer.Map.t Topic.Map.t;
  10. message_cache : Message_cache.t;
  11. rng : Random.State.t;
  12. heartbeat_ticks : int64;
}
Sourcetype connected_peers_filter =
  1. | Direct
  2. | Subscribed_to of Topic.t
  3. | Score_above of {
    1. threshold : Score.value;
    }

When selecting a set of connected peers, one can specify some criteria to filter the result.

Sourceval view : state -> view
Sourceval get_peers_in_topic_mesh : Topic.t -> view -> Peer.t list

get_peers_in_topic_mesh topic state returns the peers in the mesh of topic.

Sourceval get_connected_peers : ?filters:connected_peers_filter list -> view -> Peer.t list

get_connected_peers ?filters view returns the list of connected peers filtered by the given criteria.

Sourceval get_our_topics : view -> Topic.t list

get_our_topics state returns the set of topics the local peer is subscribed to.

Sourceval get_subscribed_topics : Peer.t -> view -> Topic.t list

get_subscribed_topics peer state returns the set of topics that are subscribed by peer

Sourceval get_fanout_peers : Topic.t -> view -> Peer.t list

get_fanout_peers topic state returns the fanout peers of topic.

Sourceval get_peer_score : Peer.t -> view -> Score.value

get_peer_score peer view returns the score of peer.

Sourceval get_peer_ihave_per_heartbeat : Peer.t -> view -> int

get_peer_ihave_per_heartbeat peer view returns the number of IHaves received from peer since the last heartbeat.

Sourceval get_peer_iwant_per_heartbeat : Peer.t -> view -> int

get_peer_iwant_per_heartbeat peer view returns the number of IWants sent to peer since the last heartbeat.

Sourceval get_peer_backoff : Topic.t -> Peer.t -> view -> Time.t option

get_peer_backoff topic peer view returns the backoff time of peer for topic. Returns None if the peer is not backoffed for topic.

Sourceval limits : view -> limits
Sourceval has_joined : Topic.t -> view -> bool

has_joined topic view returns true if and only if the automaton is currently tracking messages for topic. That is, the local peer has joined and hasn't left the topic.

Sourceval in_mesh : Topic.t -> Peer.t -> view -> bool

in_mesh peer topic view returns true if and only if peer is in the mesh of topic.

Sourceval is_direct : Peer.t -> view -> bool

is_direct peer view returns true if and only if peer is a direct peer.

Sourceval is_outbound : Peer.t -> view -> bool

is_outbound peer view returns true if and only if peer has an outbound connection.

Sourceval pp_connection : connection Fmt.t
Sourceval pp_connections : Connections.t Fmt.t
Sourceval pp_peer_map : 'a Fmt.t -> 'a Peer.Map.t Fmt.t
Sourceval pp_message_id_map : 'a Fmt.t -> 'a Message_id.Map.t Fmt.t
Sourceval pp_topic_map : 'a Fmt.t -> 'a Topic.Map.t Fmt.t
Sourceval pp_peer_set : Peer.Set.t Fmt.t
Sourceval pp_topic_set : Topic.Set.t Fmt.t
OCaml

Innovation. Community. Security.