Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- withPeerSelectionActions :: forall peeraddr peerconn resolver exception m a. (Alternative (STM m), MonadAsync m, MonadDelay m, MonadThrow m, MonadMVar m, Ord peeraddr, Exception exception) => StrictTVar m (Config peeraddr) -> PeerActionsDNS peeraddr resolver exception m -> PeerSelectionActionsArgs peeraddr peerconn exception m -> WithLedgerPeersArgs m -> PeerSelectionActionsDiffusionMode peeraddr peerconn m -> ((Async m Void, Async m Void) -> PeerSelectionActions peeraddr peerconn m -> m a) -> m a
- data PeerSelectionTargets = PeerSelectionTargets {}
- data PeerAdvertise
- data PeerSelectionActionsArgs peeraddr peerconn exception (m :: Type -> Type) = PeerSelectionActionsArgs {
- psLocalRootPeersTracer :: Tracer m (TraceLocalRootPeers peeraddr exception)
- psPublicRootPeersTracer :: Tracer m TracePublicRootPeers
- psReadTargets :: STM m PeerSelectionTargets
- peerTargets :: ConsensusModePeerTargets
- getLedgerStateCtx :: LedgerPeersConsensusInterface m
- psReadLocalRootPeers :: STM m [(HotValency, WarmValency, Map RelayAccessPoint (PeerAdvertise, PeerTrustable))]
- psReadPublicRootPeers :: STM m (Map RelayAccessPoint PeerAdvertise)
- psReadUseBootstrapPeers :: STM m UseBootstrapPeers
- psPeerSharing :: PeerSharing
- psPeerConnToPeerSharing :: peerconn -> PeerSharing
- psReadPeerSharingController :: STM m (Map peeraddr (PeerSharingController peeraddr m))
- psUpdateOutboundConnectionsState :: OutboundConnectionsState -> STM m ()
- psReadInboundPeers :: m (Map peeraddr PeerSharing)
- readLedgerPeerSnapshot :: STM m (Maybe LedgerPeerSnapshot)
- newtype PeerSelectionActionsDiffusionMode peeraddr peerhandle (m :: Type -> Type) = PeerSelectionActionsDiffusionMode {
- psPeerStateActions :: PeerStateActions peeraddr peerhandle m
Documentation
withPeerSelectionActions Source #
:: forall peeraddr peerconn resolver exception m a. (Alternative (STM m), MonadAsync m, MonadDelay m, MonadThrow m, MonadMVar m, Ord peeraddr, Exception exception) | |
=> StrictTVar m (Config peeraddr) | |
-> PeerActionsDNS peeraddr resolver exception m | |
-> PeerSelectionActionsArgs peeraddr peerconn exception m | |
-> WithLedgerPeersArgs m | |
-> PeerSelectionActionsDiffusionMode peeraddr peerconn m | |
-> ((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.
PeerSelectionTargets | |
|
Instances
Show PeerSelectionTargets Source # | |
Defined in Ouroboros.Network.PeerSelection.Governor.Types showsPrec :: Int -> PeerSelectionTargets -> ShowS # show :: PeerSelectionTargets -> String # showList :: [PeerSelectionTargets] -> ShowS # | |
Eq PeerSelectionTargets Source # | |
Defined in Ouroboros.Network.PeerSelection.Governor.Types (==) :: PeerSelectionTargets -> PeerSelectionTargets -> Bool # (/=) :: PeerSelectionTargets -> PeerSelectionTargets -> Bool # |
data PeerAdvertise #
Should this peer be advertised to other peers asking for known peers? For certain peers specified by configuration it would be an appropriate policy to keep them private.
Instances
data PeerSelectionActionsArgs peeraddr peerconn exception (m :: Type -> Type) Source #
Record of parameters for withPeerSelectionActions independent of diffusion mode
PeerSelectionActionsArgs | |
|
newtype PeerSelectionActionsDiffusionMode peeraddr peerhandle (m :: Type -> Type) Source #
Record of remaining parameters for withPeerSelectionActions that were extracted out since the following vary based on the diffusion mode
PeerSelectionActionsDiffusionMode | |
|