Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ouroboros.Network.PeerSelection.LedgerPeers.Type
Contents
Description
Various types related to ledger peers. This module is re-exported from Ouroboros.Network.PeerSelection.LedgerPeers.
Synopsis
- newtype PoolStake = PoolStake {}
- newtype AccPoolStake = AccPoolStake {}
- data IsBigLedgerPeer
- data LedgerStateJudgement
- data LedgerPeersConsensusInterface m = LedgerPeersConsensusInterface {}
- data UseLedgerPeers
- data AfterSlot
- data LedgerPeersKind
- data LedgerPeerSnapshot where
- LedgerPeerSnapshotV1 (WithOrigin SlotNo, [(AccPoolStake, (PoolStake, NonEmpty RelayAccessPoint))])
- pattern LedgerPeerSnapshot ∷ (WithOrigin SlotNo, [(AccPoolStake, (PoolStake, NonEmpty RelayAccessPoint))]) → LedgerPeerSnapshot
- isLedgerPeersEnabled ∷ UseLedgerPeers → Bool
Documentation
The relative stake of a stakepool in relation to the total amount staked. A value in the [0, 1] range.
Constructors
PoolStake | |
Fields |
newtype AccPoolStake Source #
The accumulated relative stake of a stake pool, like PoolStake but it also includes the relative stake of all preceding pools. A value in the range [0, 1].
Constructors
AccPoolStake | |
Fields |
Instances
Num AccPoolStake Source # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods (+) ∷ AccPoolStake → AccPoolStake → AccPoolStake # (-) ∷ AccPoolStake → AccPoolStake → AccPoolStake # (*) ∷ AccPoolStake → AccPoolStake → AccPoolStake # negate ∷ AccPoolStake → AccPoolStake # abs ∷ AccPoolStake → AccPoolStake # | |
Fractional AccPoolStake Source # | |
Show AccPoolStake Source # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods showsPrec ∷ Int → AccPoolStake → ShowS # show ∷ AccPoolStake → String # showList ∷ [AccPoolStake] → ShowS # | |
Eq AccPoolStake Source # | |
Ord AccPoolStake Source # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods compare ∷ AccPoolStake → AccPoolStake → Ordering # (<) ∷ AccPoolStake → AccPoolStake → Bool # (<=) ∷ AccPoolStake → AccPoolStake → Bool # (>) ∷ AccPoolStake → AccPoolStake → Bool # (>=) ∷ AccPoolStake → AccPoolStake → Bool # max ∷ AccPoolStake → AccPoolStake → AccPoolStake # min ∷ AccPoolStake → AccPoolStake → AccPoolStake # |
data IsBigLedgerPeer Source #
A boolean like type. Big ledger peers are the largest SPOs which control 90% of staked stake.
Note that IsBigLedgerPeer
indicates a role that peer plays in the eclipse
evasion, e.g. that a peer was explicitly selected as a big ledger peer, e.g.
IsNotBigLedgerPeer
does not necessarily mean that the peer isn't a big
ledger peer. This is because we select root peers from all ledger peers
(including big ones).
Constructors
IsBigLedgerPeer | |
IsNotBigLedgerPeer |
Instances
Eq IsBigLedgerPeer Source # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods (==) ∷ IsBigLedgerPeer → IsBigLedgerPeer → Bool # (/=) ∷ IsBigLedgerPeer → IsBigLedgerPeer → Bool # |
data LedgerStateJudgement Source #
Wether the node is caught up or fell too far behind the chain
Constructors
YoungEnough | |
TooOld |
Instances
Generic LedgerStateJudgement Source # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Associated Types type Rep LedgerStateJudgement ∷ Type → Type # Methods | |
Show LedgerStateJudgement Source # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods showsPrec ∷ Int → LedgerStateJudgement → ShowS # show ∷ LedgerStateJudgement → String # showList ∷ [LedgerStateJudgement] → ShowS # | |
Eq LedgerStateJudgement Source # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods | |
NoThunks LedgerStateJudgement Source # | |
type Rep LedgerStateJudgement Source # | |
data LedgerPeersConsensusInterface m Source #
Return ledger state information and ledger peers.
Constructors
LedgerPeersConsensusInterface | |
Fields |
data UseLedgerPeers Source #
Only use the ledger after the given slot number.
Constructors
DontUseLedgerPeers | |
UseLedgerPeers AfterSlot |
Instances
Only use the ledger after the given slot number.
Instances
Generic AfterSlot Source # | |
Show AfterSlot Source # | |
Eq AfterSlot Source # | |
NoThunks AfterSlot Source # | |
type Rep AfterSlot Source # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type type Rep AfterSlot = D1 ('MetaData "AfterSlot" "Ouroboros.Network.PeerSelection.LedgerPeers.Type" "ouroboros-network-api-0.7.3.0-inplace" 'False) (C1 ('MetaCons "Always" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "After" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo))) |
data LedgerPeersKind Source #
Which ledger peers to pick.
Constructors
AllLedgerPeers | |
BigLedgerPeers |
Instances
Show LedgerPeersKind Source # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods showsPrec ∷ Int → LedgerPeersKind → ShowS # show ∷ LedgerPeersKind → String # showList ∷ [LedgerPeersKind] → ShowS # |
data LedgerPeerSnapshot Source #
The type of big ledger peers that is serialised or later provided by node configuration for the networking layer to connect to when syncing.
Constructors
LedgerPeerSnapshotV1 (WithOrigin SlotNo, [(AccPoolStake, (PoolStake, NonEmpty RelayAccessPoint))]) | Internal use for version 1, use pattern synonym for public API |
Bundled Patterns
pattern LedgerPeerSnapshot ∷ (WithOrigin SlotNo, [(AccPoolStake, (PoolStake, NonEmpty RelayAccessPoint))]) → LedgerPeerSnapshot | Public API to access snapshot data. Currently access to only most recent version is available. Nonetheless, serialisation from the node into JSON is supported for older versions via internal api so that newer CLI can still support older node formats. |
Instances
FromJSON LedgerPeerSnapshot Source # | |
ToJSON LedgerPeerSnapshot Source # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods toJSON ∷ LedgerPeerSnapshot → Value Source # toEncoding ∷ LedgerPeerSnapshot → Encoding Source # toJSONList ∷ [LedgerPeerSnapshot] → Value Source # | |
Show LedgerPeerSnapshot Source # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods showsPrec ∷ Int → LedgerPeerSnapshot → ShowS # show ∷ LedgerPeerSnapshot → String # showList ∷ [LedgerPeerSnapshot] → ShowS # | |
FromCBOR LedgerPeerSnapshot Source # | |
ToCBOR LedgerPeerSnapshot Source # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods toCBOR ∷ LedgerPeerSnapshot → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy LedgerPeerSnapshot → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [LedgerPeerSnapshot] → Size Source # | |
Eq LedgerPeerSnapshot Source # | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type Methods |