ouroboros-network
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.PeerSelection.Governor.Types

Synopsis

P2P governor policies

data PeerSelectionPolicy peeraddr (m :: Type -> Type) Source #

Constructors

PeerSelectionPolicy 

Fields

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

type PickPolicy peeraddr (m :: Type -> Type) = (peeraddr -> PeerSource) -> (peeraddr -> Int) -> (peeraddr -> Bool) -> Set peeraddr -> Int -> m (Set peeraddr) Source #

A peer pick policy is an action that picks a subset of elements from a map of peers.

The pre-condition is that the map of available choices will be non-empty, and the requested number to pick will be strictly positive.

The post-condition is that the picked set is non-empty but must not be bigger than the requested number.

Peer selection API is using `STM m` monad, internally it is using m.

Cardano Node specific functions

pickPeers Source #

Arguments

:: (Ord peeraddr, Functor m, HasCallStack) 
=> (peeraddr -> extraPeers -> Bool)

This function comes from PublicExtraPeersAPI

It is needed to compute membership of the extraPeers data type.

-> PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn 
-> PickPolicy peeraddr m 
-> Set peeraddr 
-> Int 
-> m (Set peeraddr) 

Pick some known peers.

pickUnknownPeers Source #

Arguments

:: (Ord peeraddr, Functor m, HasCallStack) 
=> (peeraddr -> extraPeers -> Bool)

This function comes from PublicExtraPeersAPI

It is needed to compute membership of the extraPeers data type.

-> PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn 
-> PickPolicy peeraddr m 
-> Set peeraddr 
-> Int 
-> m (Set peeraddr) 

Pick some unknown peers.

P2P governor low level API

data PeerStateActions peeraddr peerconn (m :: Type -> Type) Source #

Callbacks which are performed to change peer state.

Constructors

PeerStateActions 

Fields

data PeerSelectionActions extraState extraFlags extraPeers extraAPI extraCounters peeraddr peerconn (m :: Type -> Type) Source #

Constructors

PeerSelectionActions 

Fields

data PeerSelectionInterfaces extraState extraFlags extraPeers extraCounters peeraddr peerconn (m :: Type -> Type) Source #

Interfaces required by the peer selection governor, which do not need to be shared with actions and thus are not part of PeerSelectionActions.

Constructors

PeerSelectionInterfaces 

Fields

type MonitoringAction extraState extraDebugState extraFlags extraPeers extraAPI extraCounters peeraddr peerconn (m :: Type -> Type) = PeerSelectionPolicy peeraddr m -> PeerSelectionActions extraState extraFlags extraPeers extraAPI extraCounters peeraddr peerconn m -> PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn -> Guarded (STM m) (TimedDecision m extraState extraDebugState extraFlags extraPeers peeraddr peerconn) Source #

data ExtraGuardedDecisions extraState extraDebugState extraFlags extraPeers extraAPI extraCounters peeraddr peerconn (m :: Type -> Type) Source #

Constructors

ExtraGuardedDecisions 

Fields

  • preBlocking :: MonitoringAction extraState extraDebugState extraFlags extraPeers extraAPI extraCounters peeraddr peerconn m

    This guarded decision will come before all default possibly blocking decisions. The order matters; first decisions have priority over the later ones.

    Note that this action should be blocking.

  • postBlocking :: MonitoringAction extraState extraDebugState extraFlags extraPeers extraAPI extraCounters peeraddr peerconn m

    This guarded decision will come after all possibly preBlocking and default blocking decisions. The order matters; first decisions have priority over the later ones.

    Note that these actions can be either blocking or non-blocking.

  • postNonBlocking :: MonitoringAction extraState extraDebugState extraFlags extraPeers extraAPI extraCounters peeraddr peerconn m

    This guarded decision will come before all default non-blocking decisions. The order matters; first decisions have priority over the later ones.

    Note that these actions should not be blocking.

  • customTargetsAction :: Maybe (MonitoringAction extraState extraDebugState extraFlags extraPeers extraAPI extraCounters peeraddr peerconn m)

    This action is necessary to the well functioning of the Outbound Governor. In particular this action should monitor PeerSelectionTargets, if they change, update PeerSelectionState accordingly.

    Customization of this monitoring action is allowed since a 3rd party user might require more granular control over the targets of its Outbound Governor.

    If no custom action is required (i.e. Nothing) a default will be provided by targetPeers

  • customLocalRootsAction :: Maybe (MonitoringAction extraState extraDebugState extraFlags extraPeers extraAPI extraCounters peeraddr peerconn m)

    This action is necessary to the well functioning of the Outbound Governor. In particular this action should monitor Monitor local roots using readLocalRootPeers STM action.

    Customization of this monitoring action is allowed since a 3rd party user might require more granular control over the local roots of its Outbound Governor, according to extraFlags for example.

    If no custom action is required (i.e. Nothing) a default provided by localRoots

  • enableProgressMakingActions :: extraState -> Bool

    This enables third party users to add extra guards to the following monitoring actions that make progress towards targets:

    • BigLedgerPeers.belowTarget
    • KnownPeers.belowTarget
    • EstablishedPeers.belowTargetBigLedgerPeers
    • ActivePeers.belowTargetBigLedgerPeers

    This might be useful if the user requires its diffusion layer to stop making progress during a sensitive/vulnerable situation and quarantine it and make sure it is only connected to trusted peers.

  • ledgerPeerSnapshotExtraStateChange :: extraState -> extraState

    This can safely be left as id. This parameter is an artifact of the process of making the diffusion layer reusable. This function allows a constant extraState change after a successfull ledger peer snapshot change.

    TODO: Come up with a better solution (Issue #5065)

data PeerSelectionGovernorArgs extraState extraDebugState extraFlags extraPeers extraAPI extraCounters peeraddr peerconn exception (m :: Type -> Type) Source #

Constructors

PeerSelectionGovernorArgs 

Fields

P2P governor internals

data PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn Source #

The internal state used by the peerSelectionGovernor.

The local and public root sets are disjoint, and their union is the overall root set.

Documentation of individual fields describes some of the invariants these structures should maintain. For the entire picture, see assertPeerSelectionState.

Constructors

PeerSelectionState 

Fields

Instances

Instances details
(Ord peeraddr, Show extraFlags, Show peeraddr, Show extraPeers, Show peerconn, Show extraState) => Show (PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn) Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.Governor.Types

Methods

showsPrec :: Int -> PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn -> ShowS #

show :: PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn -> String #

showList :: [PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn] -> ShowS #

emptyPeerSelectionState :: StdGen -> extraState -> extraPeers -> PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn Source #

data AssociationMode Source #

A node is classified as LocalRootsOnly if it is a hidden relay or a BP, e.g. if it is configured such that it can only have a chance to be connected to local roots. This is true if the node is configured in one of two ways:

Note that in the second case a node might transition between LocalRootsOnly and Unrestricted modes, depending on LedgerStateJudgement.

See readAssociationMode.

data DebugPeerSelectionState extraState extraFlags extraPeers peeraddr Source #

Instances

Instances details
(Ord peeraddr, Show extraFlags, Show peeraddr, Show extraPeers, Show extraState) => Show (DebugPeerSelectionState extraState extraFlags extraPeers peeraddr) Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.Governor.Types

Methods

showsPrec :: Int -> DebugPeerSelectionState extraState extraFlags extraPeers peeraddr -> ShowS #

show :: DebugPeerSelectionState extraState extraFlags extraPeers peeraddr -> String #

showList :: [DebugPeerSelectionState extraState extraFlags extraPeers peeraddr] -> ShowS #

makeDebugPeerSelectionState :: PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn -> Map peeraddr Int -> Map peeraddr Int -> extraDebugState -> AssociationMode -> DebugPeerSelectionState extraDebugState extraFlags extraPeers peeraddr Source #

assertPeerSelectionState Source #

Arguments

:: Ord peeraddr 
=> (extraPeers -> Set peeraddr)

This function comes from PublicExtraPeersAPI It is needed to compute the set of all extraPeers and use that information to compute the invariant.

-> (extraPeers -> Bool)

This function comes from PublicExtraPeersAPI It is needed to compute the invariant of the extraPeers data type.

-> PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn 
-> a 
-> a 

establishedPeersStatus :: Ord peeraddr => PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn -> Map peeraddr PeerStatus Source #

A view of the status of each established peer, for testing and debugging.

newtype PublicPeerSelectionState peeraddr Source #

Public PeerSelectionState that can be accessed by Peer Sharing mechanisms without any problem.

This data type should not expose too much information and keep only essential data needed for computing the peer sharing request result

Constructors

PublicPeerSelectionState 

Fields

toPublicState :: PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn -> PublicPeerSelectionState peeraddr Source #

Convert a PeerSelectionState into a public record accessible by the Peer Sharing mechanisms so we can know about which peers are available and possibly other needed context.

data Guarded (m :: Type -> Type) a where Source #

The governor is using Guarded m (Decision m peeraddr peerconn) where m is an STM monad, to drive its progress.

Bundled Patterns

pattern GuardedSkip :: Maybe Time -> Guarded m a

GuardedSkip is used to instruct that there is no action to be made by the governor. See GuardedSkip.

GuardedSkip is a pattern which hides the usage of Min newtype wrapper in GuardedSkip' constructor (private).

Let us note that the combined value which is computed by guardedDecisions term in peerSelectionGovernorLoop will never return it: this is because there are monitoring decisions which never return this constructor, e.g. targetPeers, jobs, connections, and thus the governor has always something to do.

pattern Guarded :: Maybe Time -> m a -> Guarded m a

Guarded is used to provide an action possibly with a timeout, to the governor main loop.

Guarded is a pattern which which hides the use of FirstToFinish and Min newtype wrappers.

Instances

Instances details
Alternative m => Monoid (Guarded m a) Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.Governor.Types

Methods

mempty :: Guarded m a #

mappend :: Guarded m a -> Guarded m a -> Guarded m a #

mconcat :: [Guarded m a] -> Guarded m a #

Alternative m => Semigroup (Guarded m a) Source #

Guarded constructor is absorbing in the sense that

Guarded x y <> a = Guarded x' y'
a <> Guarded x y = Guarded x' y'

In the algebraic sense, Guarded (Just minBound) (return x) is a left absorbing element when "m ~ STM m' for some monad m'. There is no right absorbing element since there is no right absorbing element in STM m'@.

Ref. absorbing element

Instance details

Defined in Ouroboros.Network.PeerSelection.Governor.Types

Methods

(<>) :: Guarded m a -> Guarded m a -> Guarded m a #

sconcat :: NonEmpty (Guarded m a) -> Guarded m a #

stimes :: Integral b => b -> Guarded m a -> Guarded m a #

data Decision (m :: Type -> Type) extraState extraDebugState extraFlags extraPeers peeraddr peerconn Source #

Constructors

Decision 

Fields

  • decisionTrace :: [TracePeerSelection extraDebugState extraFlags extraPeers peeraddr]

    A trace event to classify the decision and action

  • decisionState :: PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn

    An updated state to use immediately

  • decisionJobs :: [Job () m (Completion m extraState extraDebugState extraFlags extraPeers peeraddr peerconn)]

    An optional Job to execute asynchronously. This job leads to a further Decision. This gives a state update to apply upon completion, but also allows chaining further job actions.

type TimedDecision (m :: Type -> Type) extraState extraDebugState extraFlags extraPeers peeraddr peerconn = Time -> Decision m extraState extraDebugState extraFlags extraPeers peeraddr peerconn Source #

Decision which has access to the current time, rather than the time when the governor's loop blocked to make a decision.

type MkGuardedDecision extraState extraDebugState extraFlags extraPeers peeraddr peerconn (m :: Type -> Type) = PeerSelectionPolicy peeraddr m -> PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn -> Guarded (STM m) (TimedDecision m extraState extraDebugState extraFlags extraPeers peeraddr peerconn) Source #

Type alias for function types which are used to create governor decisions. Almost all decisions are following this pattern.

newtype Completion (m :: Type -> Type) extraState extraDebugState extraFlags extraPeers peeraddr peerconn Source #

Constructors

Completion (PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn -> Time -> Decision m extraState extraDebugState extraFlags extraPeers peeraddr peerconn) 

data PeerSelectionView extraViews a Source #

Peer selection view.

This is a functor which is used to hold computation of various peer sets and their sizes. See peerSelectionStateToView, peerSelectionStateToCounters.

Constructors

PeerSelectionView 

Fields

Bundled Patterns

pattern PeerSelectionCounters :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> extraCounters -> PeerSelectionCounters extraCounters 
pattern PeerSelectionCountersHWC :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> Int -> PeerSelectionCounters extraCounters

A Pattern synonym which computes hot, warm, cold counters from PeerSelectionCounters.

Instances

Instances details
Functor (PeerSelectionView extraViews) Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.Governor.Types

Methods

fmap :: (a -> b) -> PeerSelectionView extraViews a -> PeerSelectionView extraViews b #

(<$) :: a -> PeerSelectionView extraViews b -> PeerSelectionView extraViews a #

(Show a, Show extraViews) => Show (PeerSelectionView extraViews a) Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.Governor.Types

Methods

showsPrec :: Int -> PeerSelectionView extraViews a -> ShowS #

show :: PeerSelectionView extraViews a -> String #

showList :: [PeerSelectionView extraViews a] -> ShowS #

(Eq a, Eq extraViews) => Eq (PeerSelectionView extraViews a) Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.Governor.Types

Methods

(==) :: PeerSelectionView extraViews a -> PeerSelectionView extraViews a -> Bool #

(/=) :: PeerSelectionView extraViews a -> PeerSelectionView extraViews a -> Bool #

type PeerSelectionCounters extraCounters = PeerSelectionView extraCounters Int Source #

type PeerSelectionSetsWithSizes extraViews peeraddr = PeerSelectionView extraViews (Set peeraddr, Int) Source #

emptyPeerSelectionCounters :: extraCounters -> PeerSelectionCounters extraCounters Source #

Cardano Node specific functions

peerSelectionStateToCounters Source #

Arguments

:: Ord peeraddr 
=> (extraPeers -> Set peeraddr)

This function comes from PublicExtraPeersAPI It is needed to compute the set of all extraPeers and use that information to compute the counters.

-> (PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn -> extraCounters) 
-> PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn 
-> PeerSelectionCounters extraCounters 

peerSelectionStateToView :: Ord peeraddr => (extraPeers -> Set peeraddr) -> (PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn -> extraViews) -> PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn -> PeerSelectionSetsWithSizes extraViews peeraddr Source #

Compute peer selection sets & their sizes.

This function is used internally by the outbound-governor and to compute PeerSelectionCounters which are used by churn or are traced (e.g. as EKG metrics). For this reason one has to be very careful when changing the function, as it will affect the outbound governor behaviour.

Peer Sharing Auxiliary data type

data PeerSharingResult peerAddress #

PeerSharing Result type.

We need a constructor for the case when the Governor wins the race versus the Mux (when initialising the peer sharing miniprotocol). This leads the Governor to lookup a peer that hasn't been registered yet.

Constructors

PeerSharingResult [peerAddress] 
PeerSharingNotRegisteredYet 

Instances

Instances details
Show peerAddress => Show (PeerSharingResult peerAddress) 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Methods

showsPrec :: Int -> PeerSharingResult peerAddress -> ShowS #

show :: PeerSharingResult peerAddress -> String #

showList :: [PeerSharingResult peerAddress] -> ShowS #

Eq peerAddress => Eq (PeerSharingResult peerAddress) 
Instance details

Defined in Ouroboros.Network.Protocol.PeerSharing.Type

Methods

(==) :: PeerSharingResult peerAddress -> PeerSharingResult peerAddress -> Bool #

(/=) :: PeerSharingResult peerAddress -> PeerSharingResult peerAddress -> Bool #

Traces

data TracePeerSelection extraDebugState extraFlags extraPeers peeraddr Source #

Constructors

TraceLocalRootPeersChanged (LocalRootPeers extraFlags peeraddr) (LocalRootPeers extraFlags peeraddr) 
TraceTargetsChanged PeerSelectionTargets PeerSelectionTargets

Peer selection targets changed: old targets, new targets.

TracePublicRootsRequest Int Int 
TracePublicRootsResults (PublicRootPeers extraPeers peeraddr) Int DiffTime 
TracePublicRootsFailure SomeException Int DiffTime 
TraceForgetColdPeers Int Int (Set peeraddr)

target known peers, actual known peers, selected peers

TraceBigLedgerPeersRequest Int Int 
TraceBigLedgerPeersResults (Set peeraddr) Int DiffTime 
TraceBigLedgerPeersFailure SomeException Int DiffTime 
TraceForgetBigLedgerPeers Int Int (Set peeraddr)

target known big ledger peers, actual known big ledger peers, selected peers

TracePeerShareRequests Int Int PeerSharingAmount (Set peeraddr) (Set peeraddr)

target known peers, actual known peers, number of peers to request, peers available for peer sharing, peers selected for peer sharing

TracePeerShareResults [(peeraddr, Either SomeException (PeerSharingResult peeraddr))] 
TracePeerShareResultsFiltered [peeraddr] 
TracePickInboundPeers Int Int (Map peeraddr PeerSharing) (Set peeraddr)

target known peers, actual known peers, selected inbound peers, available peers

TracePromoteColdPeers Int Int (Set peeraddr)

target established, actual established, selected peers

TracePromoteColdLocalPeers [(WarmValency, Int)] (Set peeraddr)

target local established, actual local established, selected peers

TracePromoteColdFailed Int Int peeraddr DiffTime SomeException 
TracePromoteColdDone Int Int peeraddr

target established, actual established, peer

TracePromoteColdBigLedgerPeers Int Int (Set peeraddr)

target established big ledger peers, actual established big ledger peers, selected peers

TracePromoteColdBigLedgerPeerFailed Int Int peeraddr DiffTime SomeException

target established big ledger peers, actual established big ledger peers, peer, delay until next promotion, reason

TracePromoteColdBigLedgerPeerDone Int Int peeraddr

target established big ledger peers, actual established big ledger peers, peer

TracePromoteWarmPeers Int Int (Set peeraddr)

target active, actual active, selected peers

TracePromoteWarmLocalPeers

Promote local peers to warm

Fields

  • [(HotValency, Int)]

    local per-group `(target active, actual active)`, only limited to groups which are below their target.

  • (Set peeraddr)

    selected peers | target active, actual active, peer, reason

TracePromoteWarmFailed Int Int peeraddr SomeException 
TracePromoteWarmDone Int Int peeraddr

target active, actual active, peer

TracePromoteWarmAborted Int Int peeraddr

aborted promotion of a warm peer; likely it was asynchronously demoted in the meantime.

target active, actual active, peer

TracePromoteWarmBigLedgerPeers Int Int (Set peeraddr)

target active big ledger peers, actual active big ledger peers, selected peers

TracePromoteWarmBigLedgerPeerFailed Int Int peeraddr SomeException

target active big ledger peers, actual active big ledger peers, peer, reason

TracePromoteWarmBigLedgerPeerDone Int Int peeraddr

target active big ledger peers, actual active big ledger peers, peer

TracePromoteWarmBigLedgerPeerAborted Int Int peeraddr

aborted promotion of a warm big ledger peer; likely it was asynchronously demoted in the meantime.

target active, actual active, peer

TraceDemoteWarmPeers Int Int (Set peeraddr)

target established, actual established, selected peers

TraceDemoteWarmFailed Int Int peeraddr SomeException

target established, actual established, peer, reason

TraceDemoteWarmDone Int Int peeraddr

target established, actual established, peer

TraceDemoteWarmBigLedgerPeers Int Int (Set peeraddr)

target established big ledger peers, actual established big ledger peers, selected peers

TraceDemoteWarmBigLedgerPeerFailed Int Int peeraddr SomeException

target established big ledger peers, actual established big ledger peers, peer, reason

TraceDemoteWarmBigLedgerPeerDone Int Int peeraddr

target established big ledger peers, actual established big ledger peers, peer

TraceDemoteHotPeers Int Int (Set peeraddr)

target active, actual active, selected peers

TraceDemoteLocalHotPeers [(HotValency, Int)] (Set peeraddr)

local per-group (target active, actual active), selected peers

TraceDemoteHotFailed Int Int peeraddr SomeException

target active, actual active, peer, reason

TraceDemoteHotDone Int Int peeraddr

target active, actual active, peer

TraceDemoteHotBigLedgerPeers Int Int (Set peeraddr)

target active big ledger peers, actual active big ledger peers, selected peers

TraceDemoteHotBigLedgerPeerFailed Int Int peeraddr SomeException

target active big ledger peers, actual active big ledger peers, peer, reason

TraceDemoteHotBigLedgerPeerDone Int Int peeraddr

target active big ledger peers, actual active big ledger peers, peer

TraceDemoteAsynchronous (Map peeraddr (PeerStatus, Maybe RepromoteDelay)) 
TraceDemoteLocalAsynchronous (Map peeraddr (PeerStatus, Maybe RepromoteDelay)) 
TraceDemoteBigLedgerPeersAsynchronous (Map peeraddr (PeerStatus, Maybe RepromoteDelay)) 
TraceGovernorWakeup 
TraceChurnWait DiffTime 
TraceChurnMode ChurnMode 
TraceChurnAction 

Fields

  • DiffTime

    duration of the churn action

  • ChurnAction

    churn action type

  • Int

    how many peers were removed or added within the duration of the action.

TraceChurnTimeout 

Fields

  • DiffTime

    duration of the churn action

  • ChurnAction

    churn action type

  • Int

    how many peers were removed or added within the duration of the action; note that if the action timeouts the governor will still look to remove or add peers as required.

TraceLedgerStateJudgementChanged LedgerStateJudgement 
TraceOnlyBootstrapPeers 
TraceBootstrapPeersFlagChangedWhilstInSensitiveState 
TraceUseBootstrapPeersChanged UseBootstrapPeers 
TraceVerifyPeerSnapshot Bool 
TraceOutboundGovernorCriticalFailure SomeException 
TraceDebugState Time (DebugPeerSelectionState extraDebugState extraFlags extraPeers peeraddr) 

Instances

Instances details
(Ord peeraddr, Show extraFlags, Show extraPeers, Show peeraddr, Show extraDebugState) => Show (TracePeerSelection extraDebugState extraFlags extraPeers peeraddr) Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.Governor.Types

Methods

showsPrec :: Int -> TracePeerSelection extraDebugState extraFlags extraPeers peeraddr -> ShowS #

show :: TracePeerSelection extraDebugState extraFlags extraPeers peeraddr -> String #

showList :: [TracePeerSelection extraDebugState extraFlags extraPeers peeraddr] -> ShowS #

data DebugPeerSelection extraState extraFlags extraPeers peeraddr where Source #

Constructors

TraceGovernorState :: forall extraState extraFlags extraPeers peeraddr peerconn. Show peerconn => Time -> Maybe DiffTime -> PeerSelectionState extraState extraFlags extraPeers peeraddr peerconn -> DebugPeerSelection extraState extraFlags extraPeers peeraddr 

Instances

Instances details
(Show extraState, Show extraFlags, Show extraPeers, Ord peeraddr, Show peeraddr) => Show (DebugPeerSelection extraState extraFlags extraPeers peeraddr) Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.Governor.Types

Methods

showsPrec :: Int -> DebugPeerSelection extraState extraFlags extraPeers peeraddr -> ShowS #

show :: DebugPeerSelection extraState extraFlags extraPeers peeraddr -> String #

showList :: [DebugPeerSelection extraState extraFlags extraPeers peeraddr] -> ShowS #

Error types