package octez-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=aa2f5bc99cc4ca2217c52a1af2a2cdfd3b383208cb859ca2e79ca0903396ca1d
sha512=d68bb3eb615e3dcccc845fddfc9901c95b3c6dc8e105e39522ce97637b1308a7fa7aa1d271351d5933febd7476b2819e1694f31198f1f0919681f1f9cc97cb3a
doc/octez-libs.tezos-gossipsub/Tezos_gossipsub/Make/Introspection/index.html
Module Make.Introspection
Source
type 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
.
get_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
.
get_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.