package octez-libs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a
doc/octez-libs.tezos-gossipsub/Tezos_gossipsub/Worker/argument-1-C/GS/Introspection/index.html
Module GS.Introspection
module Connections : sig ... endmodule Message_cache : sig ... endtype view = {limits : limits;parameters : parameters;connections : Connections.t;scores : Score.t Peer.Map.t;ihave_per_heartbeat : int Peer.Map.t;iwant_per_heartbeat : int Peer.Map.t;mesh : Peer.Set.t Topic.Map.t;fanout : fanout_peers Topic.Map.t;backoff : Time.t Peer.Map.t Topic.Map.t;message_cache : Message_cache.t;rng : Random.State.t;heartbeat_ticks : int64;
}type connected_peers_filter = | Direct| Subscribed_to of Topic.t| Score_above of {threshold : Score.value;
}
When selecting a set of connected peers, one can specify some criteria to filter the result.
get_peers_in_topic_mesh topic state returns the peers in the mesh of topic.
val get_connected_peers :
?filters:connected_peers_filter list ->
view ->
Peer.t listget_connected_peers ?filters view returns the list of connected peers filtered by the given criteria.
get_our_topics state returns the set of topics the local peer is subscribed to.
get_subscribed_topics peer state returns the set of topics that are subscribed by peer
get_fanout_peers topic state returns the fanout peers of topic.
val get_peer_score : Peer.t -> view -> Score.valueget_peer_score peer view returns the score of peer.
get_peer_ihave_per_heartbeat peer view returns the number of IHaves received from peer since the last heartbeat.
get_peer_iwant_per_heartbeat peer view returns the number of IWants sent to peer since the last heartbeat.
get_peer_backoff topic peer view returns the backoff time of peer for topic. Returns None if the peer is not backoffed for topic.
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.
in_mesh peer topic view returns true if and only if peer is in the mesh of topic.
is_direct peer view returns true if and only if peer is a direct peer.
is_outbound peer view returns true if and only if peer has an outbound connection.
val pp_connection : connection Fmt.tval pp_connections : Connections.t Fmt.tval pp_scores : Score.value Peer.Map.t Fmt.tval pp_peer_map : 'a Fmt.t -> 'a Peer.Map.t Fmt.tval pp_message_id_map : 'a Fmt.t -> 'a Message_id.Map.t Fmt.tval pp_topic_map : 'a Fmt.t -> 'a Topic.Map.t Fmt.tval pp_peer_set : Peer.Set.t Fmt.tval pp_topic_set : Topic.Set.t Fmt.t