package octez-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a
doc/octez-libs.tezos-gossipsub/Tezos_gossipsub/Make/Score/index.html
Module Make.Score
Source
Module for peers scores
The type of peer scoring statistics.
newly_connected params
creates a fresh statistics record.
remove_peer ps ~retain_duration
will either return None
if the peer statistics can be cleared, or Some ps'
with ps'
some statistics to be retained for at least retain_duration
.
expires ps
returns None
if the score statistics has no expiration time or Some t
if it expires at time t
.
graft ps topic
allows to measure the time spent by the peer in the mesh. It is to be called upon grafting a peer to topic
.
prune ps topic
allows to measure the time spent by the peer in the mesh. It is to be called upon pruning a peer from topic
.
first_message_delivered ps topic
increments the counter related to first message deliveries and mesh message deliveries on topic
by the associated peer.
duplicate_message_delivered ps topic validated
increments the counter related to near-first mesh message deliveries on topic
by the associated peer. validated
is the time at which the message was seen by the automaton for the first time.
invalid_message_delivered ps topic
increments the counter related to invalid messages sent by the associated peer.
set_application_score ps score
sets the application-specific score. This score can be positive or negative.
refresh ps
returns Some ps'
with ps'
a refreshed score record or None
if the score expired. Refreshing a ps
allows to update time-dependent spects of the scoring statistics.
include Tezos_stdlib.Compare.S with type t := value
compare
an alias for the functor parameter's compare
function