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

Cardano.Ledger.Shelley.PoolRank

Synopsis

Documentation

desirability ∷ (NonNegativeInterval, Natural) → CoinPoolParams c → PerformanceEstimateCoinDouble 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.15.0.0-inplace" 'True) (C1 ('MetaCons "PerformanceEstimate" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerformanceEstimate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)))

data NonMyopic c Source #

Constructors

NonMyopic 

Instances

Instances details
Crypto crypto ⇒ ToJSON (NonMyopic crypto) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Methods

toJSONNonMyopic crypto → Value Source #

toEncodingNonMyopic crypto → Encoding Source #

toJSONList ∷ [NonMyopic crypto] → Value Source #

toEncodingList ∷ [NonMyopic crypto] → Encoding Source #

omitFieldNonMyopic crypto → Bool Source #

Generic (NonMyopic c) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Associated Types

type Rep (NonMyopic c) ∷ TypeType Source #

Methods

fromNonMyopic c → Rep (NonMyopic c) x Source #

toRep (NonMyopic c) x → NonMyopic c Source #

Show (NonMyopic c) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Crypto c ⇒ DecShareCBOR (NonMyopic c) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Associated Types

type Share (NonMyopic c) Source #

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

Defined in Cardano.Ledger.Shelley.PoolRank

Methods

encCBORNonMyopic c → Encoding Source #

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

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

Default (NonMyopic c) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Methods

defNonMyopic c Source #

NFData (NonMyopic c) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Methods

rnfNonMyopic c → () Source #

Eq (NonMyopic c) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Methods

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

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

NoThunks (NonMyopic c) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

type Rep (NonMyopic c) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

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

Defined in Cardano.Ledger.Shelley.PoolRank

getTopRankedPoolsEraPParams era ⇒ CoinCoinPParams era → Map (KeyHash 'StakePool c) (PoolParams c) → Map (KeyHash 'StakePool c) PerformanceEstimateSet (KeyHash 'StakePool c) 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 'StakePool c → Set (KeyHash 'StakePool c) → 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 → CoinPoolParams c → StakeShareStakeShareStakeShareSet (KeyHash 'StakePool c) → 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.15.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.15.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.15.0.0-inplace" 'True) (C1 ('MetaCons "Likelihood" 'PrefixI 'True) (S1 ('MetaSel ('Just "unLikelihood") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StrictSeq LogWeight))))