cardano-ledger-core-1.14.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.PoolDistr

Description

The stake distribution, aggregated by stake pool (as opposed to stake credential), plays a primary role in Cardano's proof of stake network. Together with the VRF checks, the stake distribution determines leader election. The leader election is the precisely the part of the ledger that is determined by Ouroboros (Praos and Genesis), our consensus mechanism. See Section 16, "Leader Value Calculation", of the formal specification.

Synopsis

Documentation

data IndividualPoolStake c Source #

The IndividualPoolStake contains all the stake controlled by a single stake pool (the combination of owners and delegates) for a given epoch, and also the hash of the stake pool's registered VRF key.

When a stake pool produces a block, the header contains the full VRF verification key and VRF value for leader election. We check the VRF key against the value in IndividualPoolStake and we check the VRF value using the epoch nonce and the relative stake of the pool as given in IndividualPoolStake. The stake is relative to the total amount of active stake in the network. Stake is active if it is both registered and delegated to a registered stake pool.

Constructors

IndividualPoolStake 

Fields

Instances

Instances details
Crypto c ⇒ ToJSON (IndividualPoolStake c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

Generic (IndividualPoolStake c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

Associated Types

type Rep (IndividualPoolStake c) ∷ TypeType Source #

Show (IndividualPoolStake c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

Crypto c ⇒ DecCBOR (IndividualPoolStake c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

Crypto c ⇒ EncCBOR (IndividualPoolStake c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

NFData (IndividualPoolStake c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

Methods

rnfIndividualPoolStake c → () Source #

Eq (IndividualPoolStake c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

NoThunks (IndividualPoolStake c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

type Rep (IndividualPoolStake c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

type Rep (IndividualPoolStake c) = D1 ('MetaData "IndividualPoolStake" "Cardano.Ledger.PoolDistr" "cardano-ledger-core-1.14.0.0-inplace" 'False) (C1 ('MetaCons "IndividualPoolStake" 'PrefixI 'True) (S1 ('MetaSel ('Just "individualPoolStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Rational) :*: (S1 ('MetaSel ('Just "individualTotalPoolStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CompactForm Coin)) :*: S1 ('MetaSel ('Just "individualPoolStakeVrf") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Hash c (VerKeyVRF c))))))

data PoolDistr c Source #

A map of stake pool IDs (the hash of the stake pool operator's verification key) to IndividualPoolStake. Also holds absolute values necessary for the calculations in the computeDRepDistr.

Constructors

PoolDistr 

Fields

Instances

Instances details
Crypto c ⇒ ToJSON (PoolDistr c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

Generic (PoolDistr c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

Associated Types

type Rep (PoolDistr c) ∷ TypeType Source #

Methods

fromPoolDistr c → Rep (PoolDistr c) x Source #

toRep (PoolDistr c) x → PoolDistr c Source #

Show (PoolDistr c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

Crypto c ⇒ DecCBOR (PoolDistr c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

Crypto c ⇒ EncCBOR (PoolDistr c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

Methods

encCBORPoolDistr c → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (PoolDistr c) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [PoolDistr c] → Size Source #

NFData (PoolDistr c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

Methods

rnfPoolDistr c → () Source #

Eq (PoolDistr c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

Methods

(==)PoolDistr c → PoolDistr c → Bool Source #

(/=)PoolDistr c → PoolDistr c → Bool Source #

NoThunks (PoolDistr c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

type Rep (PoolDistr c) Source # 
Instance details

Defined in Cardano.Ledger.PoolDistr

type Rep (PoolDistr c) = D1 ('MetaData "PoolDistr" "Cardano.Ledger.PoolDistr" "cardano-ledger-core-1.14.0.0-inplace" 'False) (C1 ('MetaCons "PoolDistr" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPoolDistr") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool c) (IndividualPoolStake c))) :*: S1 ('MetaSel ('Just "pdTotalActiveStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CompactForm Coin))))