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

Ouroboros.Network.PeerSelection.PeerSelectionActions

Contents

Synopsis

Documentation

withPeerSelectionActions Source #

Arguments

∷ ∀ peeraddr peerconn resolver exception m a. (Alternative (STM m), MonadAsync m, MonadDelay m, MonadThrow m, MonadMVar m, Ord peeraddr, Exception exception) 
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.

Constructors

PeerSelectionTargets 

Fields

data PeerAdvertise Source #

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

Instances details
FromJSON PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

ToJSON PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

Generic PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

Associated Types

type Rep PeerAdvertiseTypeType #

Show PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

Eq PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

Ord PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

type Rep PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

type Rep PeerAdvertise = D1 ('MetaData "PeerAdvertise" "Ouroboros.Network.PeerSelection.PeerAdvertise" "ouroboros-network-api-0.7.3.0-inplace" 'False) (C1 ('MetaCons "DoNotAdvertisePeer" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "DoAdvertisePeer" 'PrefixI 'False) (U1TypeType))

data PeerSelectionActionsArgs peeraddr peerconn exception m Source #

Record of parameters for withPeerSelectionActions independent of diffusion mode

Constructors

PeerSelectionActionsArgs 

Fields

newtype PeerSelectionActionsDiffusionMode peeraddr peerhandle m Source #

Record of remaining parameters for withPeerSelectionActions that were extracted out since the following vary based on the diffusion mode

Constructors

PeerSelectionActionsDiffusionMode 

Fields