Expand description
Per-peer Quality-of-Service (QoS) tracking.
Every known Pouch in the network gets a PeerQos record that is updated
whenever the local node issues a Ping challenge or a Proof-of-Storage
challenge and receives (or times out on) a response.
§Stability score
The stability score s ∈ [0.0, 1.0] summarises two independent signals:
s(p) = w_lat · latency_score(rtt_ewma) + w_rel · challenge_success_ewma
latency_score(rtt_ms) = exp(−rtt_ms / RTT_REF_MS) (RTT_REF_MS = 500 ms)Default weights: w_lat = 0.6, w_rel = 0.4.
§EWMA smoothing
| Signal | Factor | Rationale |
|---|---|---|
| RTT | α=0.125 | TCP-standard (RFC 6298) |
| Challenge result | β=0.10 | Slower decay → stable reliability view |
A new peer starts with rtt_ewma_ms = None (latency component = 0) and
challenge_success_ewma = 1.0 (benefit of the doubt, falls quickly on failure).
Structs§
- PeerQos
- Live QoS data for a single remote Pouch peer.
- QosRegistry
- In-memory map of
peer_id → PeerQosfor the local node.
Constants§
- FAULT_
BLACKLISTED - Fault score at which a peer is blacklisted — evicted from routing and announced as blacklisted on gossip.
- FAULT_
DEGRADED - Fault score (0–100) at which a peer is considered degraded — no new fragments will be assigned to it.
- FAULT_
SUSPECTED - Fault score at which a peer is suspected — preventive recoding begins.