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

Cardano.Ledger.Core.PParams

Synopsis

Documentation

class (Era era, Eq (PParamsHKD Identity era), Ord (PParamsHKD Identity era), Show (PParamsHKD Identity era), NFData (PParamsHKD Identity era), EncCBOR (PParamsHKD Identity era), DecCBOR (PParamsHKD Identity era), ToCBOR (PParamsHKD Identity era), FromCBOR (PParamsHKD Identity era), NoThunks (PParamsHKD Identity era), ToJSON (PParamsHKD Identity era), FromJSON (PParamsHKD Identity era), Eq (PParamsHKD StrictMaybe era), Ord (PParamsHKD StrictMaybe era), Show (PParamsHKD StrictMaybe era), NFData (PParamsHKD StrictMaybe era), EncCBOR (PParamsHKD StrictMaybe era), DecCBOR (PParamsHKD StrictMaybe era), ToCBOR (PParamsHKD StrictMaybe era), FromCBOR (PParamsHKD StrictMaybe era), NoThunks (PParamsHKD StrictMaybe era), ToJSON (PParamsHKD StrictMaybe era)) ⇒ EraPParams era where Source #

Associated Types

type PParamsHKD (f ∷ TypeType) era = (r ∷ Type) | r → era Source #

Protocol parameters where the fields are represented with a HKD

type UpgradePParams (f ∷ TypeType) era ∷ Type Source #

 

type DowngradePParams (f ∷ TypeType) era ∷ Type Source #

Methods

applyPPUpdatesPParams era → PParamsUpdate era → PParams era Source #

Applies a protocol parameters update

default applyPPUpdates ∷ ∀ a u. (Generic (PParamsHKD Identity era), Generic (PParamsHKD StrictMaybe era), Updatable (Rep (PParamsHKD Identity era) a) (Rep (PParamsHKD StrictMaybe era) u)) ⇒ PParams era → PParamsUpdate era → PParams era Source #

emptyPParamsIdentityPParamsHKD Identity era Source #

emptyPParamsStrictMaybePParamsHKD StrictMaybe era Source #

upgradePParamsHKD ∷ (HKDApplicative f, EraPParams (PreviousEra era)) ⇒ UpgradePParams f era → PParamsHKD f (PreviousEra era) → PParamsHKD f era Source #

Upgrade PParams from previous era to the current one

downgradePParamsHKD ∷ (HKDFunctor f, EraPParams (PreviousEra era)) ⇒ DowngradePParams f era → PParamsHKD f era → PParamsHKD f (PreviousEra era) Source #

Downgrade PParams from the current era to the previous one

hkdMinFeeALHKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Coin) Source #

The linear factor for the minimum fee calculation

hkdMinFeeBLHKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Coin) Source #

The constant factor for the minimum fee calculation

hkdMaxBBSizeLHKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Word32) Source #

Maximal block body size

hkdMaxTxSizeLHKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Word32) Source #

Maximal transaction size

hkdMaxBHSizeLHKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Word16) Source #

Maximal block header size

hkdKeyDepositLHKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Coin) Source #

The amount of a key registration deposit

hkdPoolDepositLHKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Coin) Source #

The amount of a pool registration deposit

hkdEMaxLHKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f EpochInterval) Source #

epoch bound on pool retirement

hkdNOptLHKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Natural) Source #

Desired number of pools

hkdA0LHKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f NonNegativeInterval) Source #

Pool influence

hkdRhoLHKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f UnitInterval) Source #

Monetary expansion

hkdTauLHKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f UnitInterval) Source #

Treasury expansion

hkdDL ∷ (HKDFunctor f, ProtVerAtMost era 6) ⇒ Lens' (PParamsHKD f era) (HKD f UnitInterval) Source #

Decentralization parameter

ppDGSimpleGetter (PParams era) UnitInterval Source #

Decentralization parameter getter

hkdExtraEntropyL ∷ (HKDFunctor f, ProtVerAtMost era 6) ⇒ Lens' (PParamsHKD f era) (HKD f Nonce) Source #

Extra entropy

hkdProtocolVersionL ∷ (HKDFunctor f, ProtVerAtMost era 8) ⇒ Lens' (PParamsHKD f era) (HKD f ProtVer) Source #

Protocol version

ppProtocolVersionLLens' (PParams era) ProtVer Source #

ppuProtocolVersionLProtVerAtMost era 8 ⇒ Lens' (PParamsUpdate era) (StrictMaybe ProtVer) Source #

PParamsUpdate Protocol version

hkdMinUTxOValueLHKDFunctor f ⇒ ProtVerAtMost era 4 ⇒ Lens' (PParamsHKD f era) (HKD f Coin) Source #

Minimum UTxO value

hkdMinPoolCostLHKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Coin) Source #

Minimum Stake Pool Cost

newtype PParams era Source #

Protocol parameters

Constructors

PParams (PParamsHKD Identity era) 

Instances

Instances details
FromJSON (PParamsHKD Identity era) ⇒ FromJSON (PParams era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

ToJSON (PParamsHKD Identity era) ⇒ ToJSON (PParams era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Generic (PParams era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Associated Types

type Rep (PParams era) ∷ TypeType Source #

Methods

fromPParams era → Rep (PParams era) x Source #

toRep (PParams era) x → PParams era Source #

Show (PParamsHKD Identity era) ⇒ Show (PParams era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

showsPrecIntPParams era → ShowS Source #

showPParams era → String Source #

showList ∷ [PParams era] → ShowS Source #

(Typeable era, FromCBOR (PParamsHKD Identity era)) ⇒ FromCBOR (PParams era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

fromCBORDecoder s (PParams era) Source #

labelProxy (PParams era) → Text Source #

(Typeable era, ToCBOR (PParamsHKD Identity era)) ⇒ ToCBOR (PParams era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

toCBORPParams era → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (PParams era) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PParams era] → Size Source #

(Typeable era, DecCBOR (PParamsHKD Identity era)) ⇒ DecCBOR (PParams era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

decCBORDecoder s (PParams era) Source #

dropCBORProxy (PParams era) → Decoder s () Source #

labelProxy (PParams era) → Text Source #

(Typeable era, EncCBOR (PParamsHKD Identity era)) ⇒ EncCBOR (PParams era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

encCBORPParams era → Encoding Source #

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

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

EraPParams era ⇒ Default (PParams era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

defPParams era Source #

NFData (PParamsHKD Identity era) ⇒ NFData (PParams era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

rnfPParams era → () Source #

Eq (PParamsHKD Identity era) ⇒ Eq (PParams era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

(==)PParams era → PParams era → Bool Source #

(/=)PParams era → PParams era → Bool Source #

Ord (PParamsHKD Identity era) ⇒ Ord (PParams era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

comparePParams era → PParams era → Ordering Source #

(<)PParams era → PParams era → Bool Source #

(<=)PParams era → PParams era → Bool Source #

(>)PParams era → PParams era → Bool Source #

(>=)PParams era → PParams era → Bool Source #

maxPParams era → PParams era → PParams era Source #

minPParams era → PParams era → PParams era Source #

NoThunks (PParamsHKD Identity era) ⇒ NoThunks (PParams era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

type Rep (PParams era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

type Rep (PParams era) = D1 ('MetaData "PParams" "Cardano.Ledger.Core.PParams" "cardano-ledger-core-1.14.0.0-inplace" 'True) (C1 ('MetaCons "PParams" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PParamsHKD Identity era))))

newtype PParamsUpdate era Source #

The type of updates to Protocol parameters

Instances

Instances details
FromJSON (PParamsHKD StrictMaybe era) ⇒ FromJSON (PParamsUpdate era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

ToJSON (PParamsHKD StrictMaybe era) ⇒ ToJSON (PParamsUpdate era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Generic (PParamsUpdate era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Associated Types

type Rep (PParamsUpdate era) ∷ TypeType Source #

Methods

fromPParamsUpdate era → Rep (PParamsUpdate era) x Source #

toRep (PParamsUpdate era) x → PParamsUpdate era Source #

Show (PParamsHKD StrictMaybe era) ⇒ Show (PParamsUpdate era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

(Typeable era, FromCBOR (PParamsHKD StrictMaybe era)) ⇒ FromCBOR (PParamsUpdate era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

(Typeable era, ToCBOR (PParamsHKD StrictMaybe era)) ⇒ ToCBOR (PParamsUpdate era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

toCBORPParamsUpdate era → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (PParamsUpdate era) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PParamsUpdate era] → Size Source #

(Typeable era, DecCBOR (PParamsHKD StrictMaybe era)) ⇒ DecCBOR (PParamsUpdate era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

(Typeable era, EncCBOR (PParamsHKD StrictMaybe era)) ⇒ EncCBOR (PParamsUpdate era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

encCBORPParamsUpdate era → Encoding Source #

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

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

EraPParams era ⇒ Default (PParamsUpdate era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

defPParamsUpdate era Source #

NFData (PParamsHKD StrictMaybe era) ⇒ NFData (PParamsUpdate era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

rnfPParamsUpdate era → () Source #

Eq (PParamsHKD StrictMaybe era) ⇒ Eq (PParamsUpdate era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

(==)PParamsUpdate era → PParamsUpdate era → Bool Source #

(/=)PParamsUpdate era → PParamsUpdate era → Bool Source #

Ord (PParamsHKD StrictMaybe era) ⇒ Ord (PParamsUpdate era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

NoThunks (PParamsHKD StrictMaybe era) ⇒ NoThunks (PParamsUpdate era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

type Rep (PParamsUpdate era) Source # 
Instance details

Defined in Cardano.Ledger.Core.PParams

type Rep (PParamsUpdate era) = D1 ('MetaData "PParamsUpdate" "Cardano.Ledger.Core.PParams" "cardano-ledger-core-1.14.0.0-inplace" 'True) (C1 ('MetaCons "PParamsUpdate" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PParamsHKD StrictMaybe era))))

genericApplyPPUpdates ∷ ∀ era a u. (Generic (PParamsHKD Identity era), Generic (PParamsHKD StrictMaybe era), Updatable (Rep (PParamsHKD Identity era) a) (Rep (PParamsHKD StrictMaybe era) u)) ⇒ PParams era → PParamsUpdate era → PParams era Source #

PParams lens

ppMinFeeAL ∷ ∀ era. EraPParams era ⇒ Lens' (PParams era) Coin Source #

The linear factor for the minimum fee calculation

ppMinFeeBL ∷ ∀ era. EraPParams era ⇒ Lens' (PParams era) Coin Source #

The constant factor for the minimum fee calculation

ppMaxBBSizeL ∷ ∀ era. EraPParams era ⇒ Lens' (PParams era) Word32 Source #

Maximal block body size

ppMaxTxSizeL ∷ ∀ era. EraPParams era ⇒ Lens' (PParams era) Word32 Source #

Maximal transaction size

ppMaxBHSizeL ∷ ∀ era. EraPParams era ⇒ Lens' (PParams era) Word16 Source #

Maximal block header size

ppKeyDepositL ∷ ∀ era. EraPParams era ⇒ Lens' (PParams era) Coin Source #

The amount of a key registration deposit

ppPoolDepositL ∷ ∀ era. EraPParams era ⇒ Lens' (PParams era) Coin Source #

The amount of a pool registration deposit

ppEMaxL ∷ ∀ era. EraPParams era ⇒ Lens' (PParams era) EpochInterval Source #

epoch bound on pool retirement

ppNOptL ∷ ∀ era. EraPParams era ⇒ Lens' (PParams era) Natural Source #

Desired number of pools

ppA0L ∷ ∀ era. EraPParams era ⇒ Lens' (PParams era) NonNegativeInterval Source #

Pool influence

ppRhoL ∷ ∀ era. EraPParams era ⇒ Lens' (PParams era) UnitInterval Source #

Monetary expansion

ppTauL ∷ ∀ era. EraPParams era ⇒ Lens' (PParams era) UnitInterval Source #

Treasury expansion

ppDL ∷ ∀ era. (EraPParams era, ProtVerAtMost era 6) ⇒ Lens' (PParams era) UnitInterval Source #

Decentralization parameter

ppExtraEntropyL ∷ ∀ era. (EraPParams era, ProtVerAtMost era 6) ⇒ Lens' (PParams era) Nonce Source #

Extra entropy

ppMinUTxOValueL ∷ ∀ era. (EraPParams era, ProtVerAtMost era 4) ⇒ Lens' (PParams era) Coin Source #

Minimum UTxO value

ppMinPoolCostL ∷ ∀ era. EraPParams era ⇒ Lens' (PParams era) Coin Source #

Minimum Stake Pool Cost

PParamsUpdate lens

ppuMinFeeAL ∷ ∀ era. EraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Coin) Source #

The linear factor for the minimum fee calculation

ppuMinFeeBL ∷ ∀ era. EraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Coin) Source #

The constant factor for the minimum fee calculation

ppuMaxBBSizeL ∷ ∀ era. EraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Word32) Source #

Maximal block body size

ppuMaxTxSizeL ∷ ∀ era. EraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Word32) Source #

Maximal transaction size

ppuMaxBHSizeL ∷ ∀ era. EraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Word16) Source #

Maximal block header size

ppuKeyDepositL ∷ ∀ era. EraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Coin) Source #

The amount of a key registration deposit

ppuPoolDepositL ∷ ∀ era. EraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Coin) Source #

The amount of a pool registration deposit

ppuEMaxL ∷ ∀ era. EraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe EpochInterval) Source #

epoch bound on pool retirement

ppuNOptL ∷ ∀ era. EraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Natural) Source #

Desired number of pools

ppuA0L ∷ ∀ era. EraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe NonNegativeInterval) Source #

Pool influence

ppuRhoL ∷ ∀ era. EraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe UnitInterval) Source #

Monetary expansion

ppuTauL ∷ ∀ era. EraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe UnitInterval) Source #

Treasury expansion

ppuDL ∷ ∀ era. (EraPParams era, ProtVerAtMost era 6) ⇒ Lens' (PParamsUpdate era) (StrictMaybe UnitInterval) Source #

Decentralization parameter

ppuExtraEntropyL ∷ ∀ era. (EraPParams era, ProtVerAtMost era 6) ⇒ Lens' (PParamsUpdate era) (StrictMaybe Nonce) Source #

Extra entropy

ppuMinUTxOValueL ∷ ∀ era. (EraPParams era, ProtVerAtMost era 4) ⇒ Lens' (PParamsUpdate era) (StrictMaybe Coin) Source #

Minimum UTxO value

ppuMinPoolCostL ∷ ∀ era. EraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Coin) Source #

Minimum Stake Pool Cost

Utility

mapPParams ∷ (PParamsHKD Identity era1 → PParamsHKD Identity era2) → PParams era1 → PParams era2 Source #

PParamsUpdate to Data

data PParam era where Source #

Pair the tag, and exisitenially hide the type of the lens for the field with that Lens'

Constructors

PParamToPlutusData t ⇒ WordLens' (PParamsUpdate era) (StrictMaybe t) → PParam era 

makePParamMap ∷ [PParam era] → Map Word (PParam era) Source #

Turn a list into a Map, this assures we have no duplicates.