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

Cardano.Ledger.EpochBoundary

Description

This modules implements the necessary functions for the changes that can happen at epoch boundaries.

Synopsis

Documentation

newtype Stake Source #

Type of stake as map from hash key to coins associated.

Constructors

Stake 

Instances

Instances details
ToJSON Stake Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Generic Stake Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Associated Types

type Rep StakeTypeType Source #

Methods

fromStakeRep Stake x Source #

toRep Stake x → Stake Source #

Show Stake Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

DecShareCBOR Stake Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Associated Types

type Share Stake Source #

EncCBOR Stake Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Methods

encCBORStakeEncoding Source #

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

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

NFData Stake Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Methods

rnfStake → () Source #

Eq Stake Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Methods

(==)StakeStakeBool Source #

(/=)StakeStakeBool Source #

NoThunks Stake Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

type Rep Stake Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

type Rep Stake = D1 ('MetaData "Stake" "Cardano.Ledger.EpochBoundary" "cardano-ledger-core-1.17.0.0-inplace" 'True) (C1 ('MetaCons "Stake" 'PrefixI 'True) (S1 ('MetaSel ('Just "unStake") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (VMap VB VP (Credential 'Staking) (CompactForm Coin)))))
type Share Stake Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

data SnapShot Source #

Snapshot of the stake distribution.

Instances

Instances details
ToJSON SnapShot Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Generic SnapShot Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Associated Types

type Rep SnapShotTypeType Source #

Show SnapShot Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

DecShareCBOR SnapShot Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Associated Types

type Share SnapShot Source #

EncCBOR SnapShot Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Methods

encCBORSnapShotEncoding Source #

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

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

NFData SnapShot Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Methods

rnfSnapShot → () Source #

Eq SnapShot Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

NoThunks SnapShot Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

type Rep SnapShot Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

type Rep SnapShot = D1 ('MetaData "SnapShot" "Cardano.Ledger.EpochBoundary" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "SnapShot" 'PrefixI 'True) (S1 ('MetaSel ('Just "ssStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Stake) :*: (S1 ('MetaSel ('Just "ssDelegations") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (VMap VB VB (Credential 'Staking) (KeyHash 'StakePool))) :*: S1 ('MetaSel ('Just "ssPoolParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (VMap VB VB (KeyHash 'StakePool) PoolParams)))))
type Share SnapShot Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

data SnapShots Source #

Snapshots of the stake distribution.

Note that ssStakeMark and ssStakeMarkPoolDistr are lazy on purpose since we only want to force the thunk after one stability window when we know that they are stable (so that we do not compute them if we do not have to). See more info in the Optimize TICKF ADR

Instances

Instances details
ToJSON SnapShots Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Generic SnapShots Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Associated Types

type Rep SnapShotsTypeType Source #

Show SnapShots Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

DecCBOR SnapShots Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

DecShareCBOR SnapShots Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Associated Types

type Share SnapShots Source #

EncCBOR SnapShots Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Methods

encCBORSnapShotsEncoding Source #

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

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

Default SnapShots Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Methods

defSnapShots Source #

NFData SnapShots Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

Methods

rnfSnapShots → () Source #

Eq SnapShots Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

NoThunks SnapShots Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

type Rep SnapShots Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

type Rep SnapShots = D1 ('MetaData "SnapShots" "Cardano.Ledger.EpochBoundary" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "SnapShots" 'PrefixI 'True) ((S1 ('MetaSel ('Just "ssStakeMark") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapShot) :*: S1 ('MetaSel ('Just "ssStakeMarkPoolDistr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PoolDistr)) :*: (S1 ('MetaSel ('Just "ssStakeSet") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SnapShot) :*: (S1 ('MetaSel ('Just "ssStakeGo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SnapShot) :*: S1 ('MetaSel ('Just "ssFee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin)))))
type Share SnapShots Source # 
Instance details

Defined in Cardano.Ledger.EpochBoundary

poolStakeKeyHash 'StakePoolVMap VB VB (Credential 'Staking) (KeyHash 'StakePool) → StakeStake Source #

Get stake of one pool

maxPoolEraPParams era ⇒ PParams era → CoinRationalRationalCoin Source #

Version of maxPool` that extracts ppA0L and ppNOptL from a PParams

maxPool'NonNegativeIntervalWord16CoinRationalRationalCoin Source #

Calculate maximal pool reward

calculatePoolStake ∷ (KeyHash 'StakePoolBool) → VMap VB VB (Credential 'Staking) (KeyHash 'StakePool) → StakeMap (KeyHash 'StakePool) Word64 Source #

Sum up the Coin (as CompactForm Coin = Word64) for each StakePool