Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Cardano.Ledger.Shelley.RewardProvenance
Synopsis
- data RewardProvenance = RewardProvenance {
- spe ∷ !Word64
- blocks ∷ !BlocksMade
- maxLL ∷ !Coin
- deltaR1 ∷ !Coin
- deltaR2 ∷ !Coin
- r ∷ !Coin
- totalStake ∷ !Coin
- blocksCount ∷ !Integer
- d ∷ !Rational
- expBlocks ∷ !Integer
- eta ∷ !Rational
- rPot ∷ !Coin
- deltaT1 ∷ !Coin
- activeStake ∷ !Coin
- pools ∷ !(Map (KeyHash 'StakePool) RewardProvenancePool)
- desirabilities ∷ !(Map (KeyHash 'StakePool) Desirability)
- data RewardProvenancePool = RewardProvenancePool {
- poolBlocksP ∷ !Natural
- sigmaP ∷ !Rational
- sigmaAP ∷ !Rational
- ownerStakeP ∷ !Coin
- poolParamsP ∷ !PoolParams
- pledgeRatioP ∷ !Rational
- maxPP ∷ !Coin
- appPerfP ∷ !Rational
- poolRP ∷ !Coin
- lRewardP ∷ !Coin
- data Desirability = Desirability {}
Documentation
data RewardProvenance Source #
RewardProvenenace
captures some of the intermediate calculations when computing
the staking reward distribution. Most of these fields are simple scalar
values, computed from the current State, and are fixed before we start to compute
the distribution. Two of them are aggregates computed when we compute the distribution
(pools
and desirabilities
).
For more background, see "Figure 48: The Reward Calculation" and "Figure 51: Reward Update Creation" of the the formal specification. The variable names here align with those in the specification. See also Section 5 of the https://github.com/intersectmbo/cardano-ledger/releases/latest/download/shelley-delegation.pdf
Constructors
RewardProvenance | |
Fields
|
Instances
FromJSON RewardProvenance Source # | |
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods parseJSON ∷ Value → Parser RewardProvenance Source # | |
ToJSON RewardProvenance Source # | |
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods toJSON ∷ RewardProvenance → Value Source # toEncoding ∷ RewardProvenance → Encoding Source # toJSONList ∷ [RewardProvenance] → Value Source # | |
Generic RewardProvenance Source # | |
Defined in Cardano.Ledger.Shelley.RewardProvenance Associated Types type Rep RewardProvenance ∷ Type → Type # Methods from ∷ RewardProvenance → Rep RewardProvenance x # to ∷ Rep RewardProvenance x → RewardProvenance # | |
Show RewardProvenance Source # | |
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods showsPrec ∷ Int → RewardProvenance → ShowS # show ∷ RewardProvenance → String # showList ∷ [RewardProvenance] → ShowS # | |
DecCBOR RewardProvenance Source # | |
Defined in Cardano.Ledger.Shelley.RewardProvenance | |
EncCBOR RewardProvenance Source # | |
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods encCBOR ∷ RewardProvenance → Encoding Source # encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy RewardProvenance → Size Source # encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [RewardProvenance] → Size Source # | |
Default RewardProvenance Source # | |
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods | |
NFData RewardProvenance Source # | |
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods rnf ∷ RewardProvenance → () # | |
Eq RewardProvenance Source # | |
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods | |
NoThunks RewardProvenance Source # | |
Defined in Cardano.Ledger.Shelley.RewardProvenance | |
type Rep RewardProvenance Source # | |
Defined in Cardano.Ledger.Shelley.RewardProvenance type Rep RewardProvenance = D1 ('MetaData "RewardProvenance" "Cardano.Ledger.Shelley.RewardProvenance" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "RewardProvenance" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "spe") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "blocks") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlocksMade)) :*: (S1 ('MetaSel ('Just "maxLL") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "deltaR1") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))) :*: ((S1 ('MetaSel ('Just "deltaR2") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "r") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin)) :*: (S1 ('MetaSel ('Just "totalStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "blocksCount") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)))) :*: (((S1 ('MetaSel ('Just "d") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Rational) :*: S1 ('MetaSel ('Just "expBlocks") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)) :*: (S1 ('MetaSel ('Just "eta") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Rational) :*: S1 ('MetaSel ('Just "rPot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))) :*: ((S1 ('MetaSel ('Just "deltaT1") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "activeStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin)) :*: (S1 ('MetaSel ('Just "pools") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) RewardProvenancePool)) :*: S1 ('MetaSel ('Just "desirabilities") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) Desirability))))))) |
data RewardProvenancePool Source #
Provenance for an individual stake pool's reward calculation.
Constructors
RewardProvenancePool | |
Fields
|
Instances
data Desirability Source #
The desirability score of a stake pool, as described in "Reward Sharing Schemes for Stake Pools". Additionally, the hit rate estimation described in the stake pool ranking document is included.
Constructors
Desirability | |
Fields |