| Safe Haskell | None |
|---|---|
| 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
- stakePoolParamsP ∷ !StakePoolParams
- 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
data RewardProvenancePool Source #
Provenance for an individual stake pool's reward calculation.
Constructors
| RewardProvenancePool | |
Fields
| |
Instances
| FromJSON RewardProvenancePool Source # | |||||
| ToJSON RewardProvenancePool Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance | |||||
| DecCBOR RewardProvenancePool Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance | |||||
| EncCBOR RewardProvenancePool Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods | |||||
| Default RewardProvenancePool Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods | |||||
| NFData RewardProvenancePool Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods rnf ∷ RewardProvenancePool → () # | |||||
| Generic RewardProvenancePool Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance Associated Types
Methods | |||||
| Show RewardProvenancePool Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods showsPrec ∷ Int → RewardProvenancePool → ShowS # show ∷ RewardProvenancePool → String # showList ∷ [RewardProvenancePool] → ShowS # | |||||
| Eq RewardProvenancePool Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods | |||||
| NoThunks RewardProvenancePool Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance | |||||
| type Rep RewardProvenancePool Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance type Rep RewardProvenancePool = D1 ('MetaData "RewardProvenancePool" "Cardano.Ledger.Shelley.RewardProvenance" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "RewardProvenancePool" 'PrefixI 'True) (((S1 ('MetaSel ('Just "poolBlocksP") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural) :*: S1 ('MetaSel ('Just "sigmaP") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Rational)) :*: (S1 ('MetaSel ('Just "sigmaAP") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Rational) :*: (S1 ('MetaSel ('Just "ownerStakeP") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "stakePoolParamsP") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StakePoolParams)))) :*: ((S1 ('MetaSel ('Just "pledgeRatioP") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Rational) :*: S1 ('MetaSel ('Just "maxPP") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin)) :*: (S1 ('MetaSel ('Just "appPerfP") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Rational) :*: (S1 ('MetaSel ('Just "poolRP") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "lRewardP") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin)))))) | |||||
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 | |
Instances
| FromJSON Desirability Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods parseJSON ∷ Value → Parser Desirability Source # parseJSONList ∷ Value → Parser [Desirability] Source # | |||||
| ToJSON Desirability Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods toJSON ∷ Desirability → Value Source # toEncoding ∷ Desirability → Encoding Source # toJSONList ∷ [Desirability] → Value Source # toEncodingList ∷ [Desirability] → Encoding Source # omitField ∷ Desirability → Bool Source # | |||||
| DecCBOR Desirability Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance | |||||
| EncCBOR Desirability Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods | |||||
| NFData Desirability Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods rnf ∷ Desirability → () # | |||||
| Generic Desirability Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance Associated Types
| |||||
| Show Desirability Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance Methods showsPrec ∷ Int → Desirability → ShowS # show ∷ Desirability → String # showList ∷ [Desirability] → ShowS # | |||||
| Eq Desirability Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance | |||||
| NoThunks Desirability Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance | |||||
| type Rep Desirability Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardProvenance type Rep Desirability = D1 ('MetaData "Desirability" "Cardano.Ledger.Shelley.RewardProvenance" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "Desirability" 'PrefixI 'True) (S1 ('MetaSel ('Just "desirabilityScore") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "hitRateEstimate") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double))) | |||||