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

Ouroboros.Network.PeerSelection.PeerSelectionActions

Contents

Synopsis

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

data PeerAdvertise #

Instances

Instances details
FromJSON PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

Methods

parseJSON :: Value -> Parser PeerAdvertise

parseJSONList :: Value -> Parser [PeerAdvertise]

omittedField :: Maybe 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 PeerAdvertise :: Type -> Type Source #

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.6.1.0-5ZJryZo7Z8Q51J9KZLwxMb" 'False) (C1 ('MetaCons "DoNotAdvertisePeer" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DoAdvertisePeer" 'PrefixI 'False) (U1 :: Type -> Type))