Skip to main content

Module churn_manager

Module churn_manager 

Source
Expand description

Peer churn tracking and stability scoring for DHT and routing decisions.

This module provides PeerChurnManager which tracks peer join/leave events, computes churn rate over sliding windows, and maintains stability scores to inform DHT and routing decisions.

Structs§

ChurnManagerConfig
Configuration for the PeerChurnManager.
ChurnStats
Aggregated statistics for the churn manager at a given tick.
ChurnWindow
A sliding time window used to compute churn rate.
PeerChurnManager
Manages peer join/leave events, computes churn rate over sliding windows, and provides stability scores for DHT and routing decisions.
PeerLifetime
Records the lifetime of a single peer in the network.

Enums§

ChurnEvent
An event representing a peer joining or leaving the network.