cardano-ledger-shelley-1.16.0.0: Shelley Ledger Executable Model
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Shelley.PoolRank

Synopsis

Documentation

desirability ∷ (NonNegativeInterval, Word16) → CoinPoolParamsPerformanceEstimateCoinDouble Source #

Desirability calculation for non-myopic utility, corresponding to f^~ in section 5.6.1 of "Design Specification for Delegation and Incentives in Cardano"

newtype PerformanceEstimate Source #

This is a estimate of the proportion of allowed blocks a pool will make in the future. It is used for ranking pools in delegation.

Instances

Instances details
Generic PerformanceEstimate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Associated Types

type Rep PerformanceEstimateTypeType Source #

Show PerformanceEstimate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

DecCBOR PerformanceEstimate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

EncCBOR PerformanceEstimate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Eq PerformanceEstimate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

NoThunks PerformanceEstimate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

type Rep PerformanceEstimate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

type Rep PerformanceEstimate = D1 ('MetaData "PerformanceEstimate" "Cardano.Ledger.Shelley.PoolRank" "cardano-ledger-shelley-1.16.0.0-inplace" 'True) (C1 ('MetaCons "PerformanceEstimate" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerformanceEstimate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)))

data NonMyopic Source #

Constructors

NonMyopic 

Instances

Instances details
ToJSON NonMyopic Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Generic NonMyopic Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Associated Types

type Rep NonMyopicTypeType Source #

Show NonMyopic Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

DecShareCBOR NonMyopic Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Associated Types

type Share NonMyopic Source #

EncCBOR NonMyopic Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Methods

encCBORNonMyopicEncoding Source #

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

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

Default NonMyopic Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Methods

defNonMyopic Source #

NFData NonMyopic Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Methods

rnfNonMyopic → () Source #

Eq NonMyopic Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

NoThunks NonMyopic Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

type Rep NonMyopic Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

type Rep NonMyopic = D1 ('MetaData "NonMyopic" "Cardano.Ledger.Shelley.PoolRank" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "NonMyopic" 'PrefixI 'True) (S1 ('MetaSel ('Just "likelihoodsNM") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) Likelihood)) :*: S1 ('MetaSel ('Just "rewardPotNM") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin)))
type Share NonMyopic Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

getTopRankedPoolsEraPParams era ⇒ CoinCoinPParams era → Map (KeyHash 'StakePool) PoolParamsMap (KeyHash 'StakePool) PerformanceEstimateSet (KeyHash 'StakePool) Source #

Computes the top ranked stake pools corresponding to section 5.6.1 of "Design Specification for Delegation and Incentives in Cardano"

nonMyopicStakeEraPParams era ⇒ PParams era → StakeShareStakeShareStakeShareKeyHash 'StakePoolSet (KeyHash 'StakePool) → StakeShare Source #

Compute the Non-Myopic Pool Stake

This function implements non-myopic stake calculation in section 5.6.2 of "Design Specification for Delegation and Incentives in Cardano". Note that the protocol parameters are implicit in the design document. Additionally, instead of passing a rank r to compare with k, we pass the top k desirable pools and check for membership.

nonMyopicMemberRewEraPParams era ⇒ PParams era → CoinPoolParamsStakeShareStakeShareStakeShareSet (KeyHash 'StakePool) → PerformanceEstimateCoin Source #

Compute the Non-Myopic Pool Member Reward

This function implements equation (3) in section 5.6.4 of "Design Specification for Delegation and Incentives in Cardano". Note that the protocol parameters and the reward pot are implicit in the design document. Additionally, instead of passing a rank r to compare with k, we pass the top k desirable pools and check for membership.

newtype Histogram Source #

Constructors

Histogram 

Instances

Instances details
Generic Histogram Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Associated Types

type Rep HistogramTypeType Source #

Show Histogram Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Eq Histogram Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

type Rep Histogram Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

type Rep Histogram = D1 ('MetaData "Histogram" "Cardano.Ledger.Shelley.PoolRank" "cardano-ledger-shelley-1.16.0.0-inplace" 'True) (C1 ('MetaCons "Histogram" 'PrefixI 'True) (S1 ('MetaSel ('Just "unHistogram") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictSeq LogWeight))))

newtype LogWeight Source #

Constructors

LogWeight 

Fields

Instances

Instances details
FromJSON LogWeight Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

ToJSON LogWeight Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Generic LogWeight Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Associated Types

type Rep LogWeightTypeType Source #

Num LogWeight Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Show LogWeight Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

DecCBOR LogWeight Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

EncCBOR LogWeight Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Methods

encCBORLogWeightEncoding Source #

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

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

NFData LogWeight Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Methods

rnfLogWeight → () Source #

Eq LogWeight Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Ord LogWeight Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

NoThunks LogWeight Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

type Rep LogWeight Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

type Rep LogWeight = D1 ('MetaData "LogWeight" "Cardano.Ledger.Shelley.PoolRank" "cardano-ledger-shelley-1.16.0.0-inplace" 'True) (C1 ('MetaCons "LogWeight" 'PrefixI 'True) (S1 ('MetaSel ('Just "unLogWeight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Float)))

applyDecayFloatLikelihoodLikelihood Source #

Decay previous likelihood

newtype Likelihood Source #

Constructors

Likelihood 

Instances

Instances details
ToJSON Likelihood Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Monoid Likelihood Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Semigroup Likelihood Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Generic Likelihood Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Associated Types

type Rep LikelihoodTypeType Source #

Show Likelihood Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

DecCBOR Likelihood Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

EncCBOR Likelihood Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Methods

encCBORLikelihoodEncoding Source #

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

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

NFData Likelihood Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Methods

rnfLikelihood → () Source #

Eq Likelihood Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Ord Likelihood Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

NoThunks Likelihood Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

type Rep Likelihood Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

type Rep Likelihood = D1 ('MetaData "Likelihood" "Cardano.Ledger.Shelley.PoolRank" "cardano-ledger-shelley-1.16.0.0-inplace" 'True) (C1 ('MetaCons "Likelihood" 'PrefixI 'True) (S1 ('MetaSel ('Just "unLikelihood") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictSeq LogWeight))))