When the user validates a message, it tries to re propagate it to its mesh peers. If the
message expires from the memcache before it can be validated, we count this a cache miss
and it is an indicator that the memcache size should be increased.
= rust-libp2p mcache_misses
Unbounded cache sizes
Backoff time
Total count of peers (by group) that we publish a msg to
Track duplicate message delivery time
Total count of late msg delivery total by topic
The time it takes to complete one iteration of the heartbeat.
Heartbeat run took longer than heartbeat interval so next is skipped
Total received IDONTWANT messageIDs that we don't have
Total received IDONTWANT messages
Total received IHAVE messages that we ignore for some reason
Total received IHAVE messages by topic
Total messages per topic we don't have. Not actual requests.
The number of times we have decided that an IWANT control message is required for this
topic. A very high metric might indicate an underperforming network.
= rust-libp2p topic_iwant_msgs
Histogram of delivery time of resolved IWANT promises
Total count of resolved IWANT promises
Total count of resolved IWANT promises from duplicate messages
Total count of peers we have asked IWANT promises that are resolved
Total requested messageIDs that we don't have
Total received IWANT messages by topic
Current mcache msg count
Number of times we remove peers in a topic mesh for different reasons.
= rust-libp2p mesh_peer_churn_events
Number of peers in our mesh. This metric should be updated with the count of peers for a
topic in the mesh regardless of inclusion and churn events.
= rust-libp2p mesh_peer_counts
Number of times we include peers in a topic mesh for different reasons.
= rust-libp2p mesh_peer_inclusion_events
Total count of msg forwarded by topic
Total count of peers that we forward a msg to
Total count of msg publish data.length bytes
Total count of msg published by topic
Total count of peers that we publish a msg to
Total time in seconds to publish a message
Total count of recv msgs error
Tracks specific reason of invalid
Total count of recv msgs before any validation
Current count of peers by score threshold
Gossipsub supports floodsub, gossipsub v1.0, v1.1, and v1.2. Peers are classified based on which protocol they support. This metric keeps track of the number of peers that are connected of each type.
Tracks distribution of recv msgs by duplicate, invalid, valid
Total count of RPC dropped because acceptFrom() == false
Total times score() is called
Total times score() call actually computed computeScore(), no cache
Histogram of the scores for each mesh topic.
Separate score weights Need to use 2-label metrics in this case to debug the score weights
A counter of the kind of penalties being applied to peers.
Number of peers subscribed to each topic. This allows us to analyze a topic's behaviour regardless of our subscription status.
Status of our subscription to this topic. This metric allows analyzing other topic metrics
filtered by our current subscription status.
= rust-libp2p topic_subscription_status
Register the inclusion of peers in our mesh due to some reason.
We joined a topic
We left a topic
Register the removal of peers in our mesh due to some reason
Update validation result to metrics
null means the message's mcache record was not known at the time of acceptance report
Optional
_Readonly
deliveryRecent message delivery timing/participants
Readonly
paramsReadonly
peerIP colocation tracking; maps IP => set of peers.
Readonly
peerPer-peer stats for score calculation
Readonly
scoreCache score up to decayInterval if topic stats are unchanged.
Adds a new IP to a peer, if the peer is not known the update is ignored
Apply a behavioural penalty to a peer
Periodic maintenance
Handles scoring functionality as a peer GRAFTs to a topic.
Increments the "mesh message deliveries" counter for messages we've seen before, as long the message was received within the P3 window.
Optional
validatedTime: numberIncrements the "first message deliveries" counter for all scored topics the message is published in, as well as the "mesh message deliveries" counter, if the peer is in the mesh for the topic. Messages already known (with the seenCache) are counted with markDuplicateMessageDelivery()
Increments the "invalid message deliveries" counter for all scored topics the message is published in.
Handles scoring functionality as a peer PRUNEs from a topic.
Decays scores, and purges score records for disconnected peers once their expiry has elapsed.
Similar to rejectMessage
except does not require the message id or reason for an invalid message.
Remove peer association with IP
Return the score for a peer
Start PeerScore instance
Stop PeerScore instance
Message validation results for each topic. Invalid == Reject? = rust-libp2p
invalid_messages
,accepted_messages
,ignored_messages
,rejected_messages