Skip to main content

Module peer_score

Module peer_score 

Source
Expand description

Peer Score Tracker for GossipSub mesh management

Tracks composite peer quality scores used by GossipSub mesh management. Combines message delivery rate, topic mesh contribution, and application-level quality signals.

§Examples

use ipfrs_network::peer_score::{PeerScoreTracker, ScoreParameter, BehaviourPenalty};

let mut tracker = PeerScoreTracker::new(ScoreParameter::default());
tracker.get_or_create("peer-1");
let score = tracker.composite_score("peer-1");
println!("Peer score: {score}");

Structs§

PeerScore
Scoring state for a single peer.
PeerScoreTracker
Central tracker that maintains PeerScore entries for every known peer and exposes mesh-management queries.
ScoreParameter
Parameters controlling how peer scores are weighted and decayed.
TopicScore
Per-peer, per-topic scoring data.

Enums§

BehaviourPenalty
Application-level behaviour penalties that can be applied to a peer.