ouroboros-network:api
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.PeerSelection.LedgerPeers.Type

Contents

Description

Various types related to ledger peers. This module is re-exported from Ouroboros.Network.PeerSelection.LedgerPeers.

Synopsis

Documentation

newtype PoolStake Source #

The relative stake of a stakepool in relation to the total amount staked. A value in the [0, 1] range.

Constructors

PoolStake 

Instances

Instances details
FromJSON PoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

ToJSON PoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

FromCBOR PoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

ToCBOR PoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Methods

toCBOR :: PoolStake -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy PoolStake -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [PoolStake] -> Size #

NFData PoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Methods

rnf :: PoolStake -> () #

Num PoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Fractional PoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Show PoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Eq PoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Ord PoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

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 

Instances

Instances details
FromJSON AccPoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

ToJSON AccPoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

FromCBOR AccPoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

ToCBOR AccPoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Methods

toCBOR :: AccPoolStake -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy AccPoolStake -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [AccPoolStake] -> Size #

NFData AccPoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Methods

rnf :: AccPoolStake -> () #

Num AccPoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Fractional AccPoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Show AccPoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Eq AccPoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Ord AccPoolStake Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

data IsLedgerPeer Source #

Identifies a peer as coming from ledger or not.

Constructors

IsLedgerPeer

a ledger peer.

IsNotLedgerPeer 

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).

data LedgerPeersConsensusInterface extraAPI (m :: Type -> Type) Source #

Return ledger state information and ledger peers.

Constructors

LedgerPeersConsensusInterface 

Fields

data UseLedgerPeers Source #

Only use the ledger after the given slot number.

Instances

Instances details
Generic UseLedgerPeers Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Associated Types

type Rep UseLedgerPeers 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

type Rep UseLedgerPeers = D1 ('MetaData "UseLedgerPeers" "Ouroboros.Network.PeerSelection.LedgerPeers.Type" "ouroboros-network-0.24.0.0-inplace-api" 'False) (C1 ('MetaCons "DontUseLedgerPeers" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UseLedgerPeers" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AfterSlot)))
Show UseLedgerPeers Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Eq UseLedgerPeers Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

NoThunks UseLedgerPeers Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

type Rep UseLedgerPeers Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

type Rep UseLedgerPeers = D1 ('MetaData "UseLedgerPeers" "Ouroboros.Network.PeerSelection.LedgerPeers.Type" "ouroboros-network-0.24.0.0-inplace-api" 'False) (C1 ('MetaCons "DontUseLedgerPeers" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UseLedgerPeers" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AfterSlot)))

data AfterSlot Source #

Only use the ledger after the given slot number.

Constructors

Always 
After SlotNo 

Instances

Instances details
Generic AfterSlot Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Associated Types

type Rep AfterSlot 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

type Rep AfterSlot = D1 ('MetaData "AfterSlot" "Ouroboros.Network.PeerSelection.LedgerPeers.Type" "ouroboros-network-0.24.0.0-inplace-api" 'False) (C1 ('MetaCons "Always" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "After" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo)))
Show AfterSlot Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Eq AfterSlot Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

NoThunks AfterSlot Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

type Rep AfterSlot Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

type Rep AfterSlot = D1 ('MetaData "AfterSlot" "Ouroboros.Network.PeerSelection.LedgerPeers.Type" "ouroboros-network-0.24.0.0-inplace-api" '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 #

Used by functions to indicate what kind of ledger peer to process

data LedgerPeerSnapshot (a :: LedgerPeersKind) where Source #

A snapshot of ledger peers extracted from the ledger state at some point

data SomeHashableBlock Source #

We hide the block type to avoid parametrizing ouroboros-network with it

Constructors

(StandardHash blk, ToCBOR (HeaderHash blk), FromCBOR (HeaderHash blk), ToJSON (HeaderHash blk), Typeable blk) => SomeHashableBlock !(Proxy blk) !(HeaderHash blk) 

Instances

Instances details
ToJSON SomeHashableBlock Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Show SomeHashableBlock Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Eq SomeHashableBlock Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Ord SomeHashableBlock Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

NoThunks SomeHashableBlock Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

StandardHash SomeHashableBlock Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

type HeaderHash SomeHashableBlock Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type

Re-exports

type SRVPrefix = Domain Source #

Type of a DNS SRV prefix as defined by CIP#0155

data RelayAccessPoint Source #

A relay can have either an IP address and a port number or a domain with a port number

Constructors

RelayAccessDomain !Domain !PortNumber 
RelayAccessSRVDomain !Domain

SRV domain, prefixed (as defined in CIP#0155)

RelayAccessAddress !IP !PortNumber 

Instances

Instances details
FromJSON RelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

ToJSON RelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

FromCBOR RelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

ToCBOR RelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

NFData RelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

Methods

rnf :: RelayAccessPoint -> () #

Show RelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

Eq RelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

Ord RelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

data LedgerRelayAccessPoint Source #

A Relay as registered on the ledger.

The only difference with RelayAccessPoint is that LedgerRelayAccessSRVDomain is not prefixed, as required by CIP#0155.

Instances

Instances details
FromJSON LedgerRelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

ToJSON LedgerRelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

FromCBOR LedgerRelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

ToCBOR LedgerRelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

NFData LedgerRelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

Methods

rnf :: LedgerRelayAccessPoint -> () #

Show LedgerRelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

Eq LedgerRelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint

Ord LedgerRelayAccessPoint Source # 
Instance details

Defined in Ouroboros.Network.PeerSelection.RelayAccessPoint