ouroboros-network-0.16.0.0: A networking layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Network.PeerSelection.Churn

Description

This subsystem manages the discovery and selection of upstream peers.

Synopsis

Documentation

peerChurnGovernor Source #

Arguments

∷ ∀ m peeraddr. (MonadDelay m, Alternative (STM m), MonadTimer m, MonadCatch m) 
Tracer m (TracePeerSelection peeraddr) 
Tracer m ChurnCounters 
DiffTime

the base for churn interval in the deadline mode.

DiffTime

the base for churn interval in the bulk sync mode.

DiffTime

the timeout for outbound governor to find new (thus cold) peers through peer sharing mechanism.

PeerMetrics m peeraddr 
StrictTVar m ChurnMode 
StdGen 
STM m FetchMode 
PeerSelectionTargets

base targets; set in a configuration file

StrictTVar m PeerSelectionTargets 
STM m PeerSelectionCounters 
STM m UseBootstrapPeers 
→ m Void 

Churn governor.

At every churn interval decrease active peers for a short while (1s), so that we can pick new ones. Then we churn non-active peers.

On startup the churn governor gives a head start to local root peers over root peers.