Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ouroboros.Network.PeerSelection.PeerSelectionActions
Contents
Synopsis
- withPeerSelectionActions :: forall peeraddr peerconn resolver exception m a. (Alternative (STM m), MonadAsync m, MonadDelay m, MonadThrow m, MonadMVar m, Ord peeraddr, Exception exception) => Tracer m (TraceLocalRootPeers peeraddr exception) -> Tracer m TracePublicRootPeers -> Tracer m TraceLedgerPeers -> (IP -> PortNumber -> peeraddr) -> DNSActions resolver exception m -> STM m PeerSelectionTargets -> STM m [(HotValency, WarmValency, Map RelayAccessPoint PeerAdvertise)] -> STM m (Map RelayAccessPoint PeerAdvertise) -> PeerSharing -> (peerconn -> PeerSharing) -> STM m (Map peeraddr (PeerSharingController peeraddr m)) -> STM m (peeraddr, PeerSharing) -> PeerStateActions peeraddr peerconn m -> StdGen -> LedgerPeersConsensusInterface m -> STM m UseLedgerAfter -> ((Async m Void, Async m Void) -> PeerSelectionActions peeraddr peerconn m -> m a) -> m a
- data PeerSelectionTargets = PeerSelectionTargets {}
- data PeerAdvertise
Documentation
withPeerSelectionActions Source #
Arguments
:: forall peeraddr peerconn resolver exception m a. (Alternative (STM m), MonadAsync m, MonadDelay m, MonadThrow m, MonadMVar m, Ord peeraddr, Exception exception) | |
=> Tracer m (TraceLocalRootPeers peeraddr exception) | |
-> Tracer m TracePublicRootPeers | |
-> Tracer m TraceLedgerPeers | |
-> (IP -> PortNumber -> peeraddr) | |
-> DNSActions resolver exception m | |
-> STM m PeerSelectionTargets | |
-> STM m [(HotValency, WarmValency, Map RelayAccessPoint PeerAdvertise)] | local root peers |
-> STM m (Map RelayAccessPoint PeerAdvertise) | public root peers |
-> PeerSharing | peer sharing configured value |
-> (peerconn -> PeerSharing) | Extract peer sharing information from peerconn |
-> STM m (Map peeraddr (PeerSharingController peeraddr m)) | peer sharing registry |
-> STM m (peeraddr, PeerSharing) | Read New Inbound Connections |
-> PeerStateActions peeraddr peerconn m | |
-> StdGen | Random generator for picking ledger peers |
-> LedgerPeersConsensusInterface m | Get Ledger Peers comes from here |
-> STM m UseLedgerAfter | Get Use Ledger After value |
-> ((Async m Void, Async m Void) -> PeerSelectionActions peeraddr peerconn m -> m a) | continuation, receives a handle to the local roots peer provider thread (only if local root peers were non-empty). |
-> m a |
Re-exports
data PeerSelectionTargets Source #
Adjustable targets for the peer selection mechanism.
These are used by the peer selection governor as targets. They are used by the peer churn governor loop as knobs to adjust, to influence the peer selection governor.
The known, established and active peer targets are targets both from below and from above: the governor will attempt to grow or shrink the sets to hit these targets.
Unlike the other targets, the root peer target is "one sided", it is only a target from below. The governor does not try to shrink the root set to hit it, it simply stops looking for more.
There is also an implicit target that enough local root peers are selected as active. This comes from the configuration for local roots, and is not an independently adjustable target.
Constructors
PeerSelectionTargets | |
Fields
|
Instances
Show PeerSelectionTargets Source # | |
Eq PeerSelectionTargets Source # | |
Defined in Ouroboros.Network.PeerSelection.Governor.Types Methods (==) :: PeerSelectionTargets -> PeerSelectionTargets -> Bool Source # (/=) :: PeerSelectionTargets -> PeerSelectionTargets -> Bool Source # |
data PeerAdvertise #
Constructors
DoNotAdvertisePeer | |
DoAdvertisePeer |