cardano-ledger-alonzo-1.12.0.0: Cardano ledger introducing Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Alonzo.PParams

Description

This module contains just the type of protocol parameters.

Synopsis

Era Agnostic

class EraPParams era ⇒ AlonzoEraPParams era where Source #

Instances

Instances details
Crypto c ⇒ AlonzoEraPParams (AlonzoEra c) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Alonzo specific

data AlonzoPParams f era Source #

Protocol parameters. Shelley parameters + additional ones

Constructors

AlonzoPParams 

Fields

Instances

Instances details
FromJSON (AlonzoPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Crypto c ⇒ ToJSON (AlonzoPParams Identity (AlonzoEra c)) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Crypto c ⇒ ToJSON (AlonzoPParams StrictMaybe (AlonzoEra c)) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Generic (AlonzoPParams f era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Associated Types

type Rep (AlonzoPParams f era) ∷ TypeType Source #

Methods

fromAlonzoPParams f era → Rep (AlonzoPParams f era) x Source #

toRep (AlonzoPParams f era) x → AlonzoPParams f era Source #

Show (AlonzoPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Show (AlonzoPParams StrictMaybe era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Era era ⇒ FromCBOR (AlonzoPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Era era ⇒ FromCBOR (AlonzoPParams StrictMaybe era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Era era ⇒ ToCBOR (AlonzoPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Methods

toCBORAlonzoPParams Identity era → Encoding Source #

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

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

Era era ⇒ ToCBOR (AlonzoPParams StrictMaybe era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Era era ⇒ DecCBOR (AlonzoPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Era era ⇒ DecCBOR (AlonzoPParams StrictMaybe era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Era era ⇒ EncCBOR (AlonzoPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Era era ⇒ EncCBOR (AlonzoPParams StrictMaybe era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

NFData (AlonzoPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Methods

rnfAlonzoPParams Identity era → () Source #

NFData (AlonzoPParams StrictMaybe era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Methods

rnfAlonzoPParams StrictMaybe era → () Source #

Eq (AlonzoPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Eq (AlonzoPParams StrictMaybe era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Ord (AlonzoPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Ord (AlonzoPParams StrictMaybe era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

NoThunks (AlonzoPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

NoThunks (AlonzoPParams StrictMaybe era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

type Rep (AlonzoPParams f era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

type Rep (AlonzoPParams f era) = D1 ('MetaData "AlonzoPParams" "Cardano.Ledger.Alonzo.PParams" "cardano-ledger-alonzo-1.12.0.0-inplace" 'False) (C1 ('MetaCons "AlonzoPParams" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "appMinFeeA") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Coin)) :*: (S1 ('MetaSel ('Just "appMinFeeB") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Coin)) :*: S1 ('MetaSel ('Just "appMaxBBSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Word32)))) :*: (S1 ('MetaSel ('Just "appMaxTxSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Word32)) :*: (S1 ('MetaSel ('Just "appMaxBHSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Word16)) :*: S1 ('MetaSel ('Just "appKeyDeposit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Coin))))) :*: ((S1 ('MetaSel ('Just "appPoolDeposit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Coin)) :*: (S1 ('MetaSel ('Just "appEMax") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f EpochInterval)) :*: S1 ('MetaSel ('Just "appNOpt") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Natural)))) :*: (S1 ('MetaSel ('Just "appA0") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f NonNegativeInterval)) :*: (S1 ('MetaSel ('Just "appRho") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f UnitInterval)) :*: S1 ('MetaSel ('Just "appTau") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f UnitInterval)))))) :*: (((S1 ('MetaSel ('Just "appD") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f UnitInterval)) :*: (S1 ('MetaSel ('Just "appExtraEntropy") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Nonce)) :*: S1 ('MetaSel ('Just "appProtocolVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f ProtVer)))) :*: (S1 ('MetaSel ('Just "appMinPoolCost") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Coin)) :*: (S1 ('MetaSel ('Just "appCoinsPerUTxOWord") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f CoinPerWord)) :*: S1 ('MetaSel ('Just "appCostModels") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f CostModels))))) :*: ((S1 ('MetaSel ('Just "appPrices") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Prices)) :*: (S1 ('MetaSel ('Just "appMaxTxExUnits") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f OrdExUnits)) :*: S1 ('MetaSel ('Just "appMaxBlockExUnits") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f OrdExUnits)))) :*: (S1 ('MetaSel ('Just "appMaxValSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Natural)) :*: (S1 ('MetaSel ('Just "appCollateralPercentage") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Natural)) :*: S1 ('MetaSel ('Just "appMaxCollateralInputs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Natural))))))))

data UpgradeAlonzoPParams f Source #

Parameters that were added in Alonzo

Instances

Instances details
Generic (UpgradeAlonzoPParams f) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Associated Types

type Rep (UpgradeAlonzoPParams f) ∷ TypeType Source #

Show (UpgradeAlonzoPParams Identity) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Default (UpgradeAlonzoPParams StrictMaybe) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

NFData (UpgradeAlonzoPParams Identity) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Eq (UpgradeAlonzoPParams Identity) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

NoThunks (UpgradeAlonzoPParams Identity) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

type Rep (UpgradeAlonzoPParams f) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

type Rep (UpgradeAlonzoPParams f) = D1 ('MetaData "UpgradeAlonzoPParams" "Cardano.Ledger.Alonzo.PParams" "cardano-ledger-alonzo-1.12.0.0-inplace" 'False) (C1 ('MetaCons "UpgradeAlonzoPParams" 'PrefixI 'True) (((S1 ('MetaSel ('Just "uappCoinsPerUTxOWord") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f CoinPerWord)) :*: S1 ('MetaSel ('Just "uappCostModels") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f CostModels))) :*: (S1 ('MetaSel ('Just "uappPrices") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Prices)) :*: S1 ('MetaSel ('Just "uappMaxTxExUnits") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f ExUnits)))) :*: ((S1 ('MetaSel ('Just "uappMaxBlockExUnits") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f ExUnits)) :*: S1 ('MetaSel ('Just "uappMaxValSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Natural))) :*: (S1 ('MetaSel ('Just "uappCollateralPercentage") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Natural)) :*: S1 ('MetaSel ('Just "uappMaxCollateralInputs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Natural))))))

newtype DowngradeAlonzoPParams f Source #

Parameters that were removed in Alonzo

Constructors

DowngradeAlonzoPParams 

Fields

Instances

Instances details
Generic (DowngradeAlonzoPParams f) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Associated Types

type Rep (DowngradeAlonzoPParams f) ∷ TypeType Source #

Show (DowngradeAlonzoPParams Identity) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

NFData (DowngradeAlonzoPParams Identity) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Eq (DowngradeAlonzoPParams Identity) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

NoThunks (DowngradeAlonzoPParams Identity) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

type Rep (DowngradeAlonzoPParams f) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

type Rep (DowngradeAlonzoPParams f) = D1 ('MetaData "DowngradeAlonzoPParams" "Cardano.Ledger.Alonzo.PParams" "cardano-ledger-alonzo-1.12.0.0-inplace" 'True) (C1 ('MetaCons "DowngradeAlonzoPParams" 'PrefixI 'True) (S1 ('MetaSel ('Just "dappMinUTxOValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HKD f Coin))))

emptyAlonzoPParams ∷ ∀ era. Era era ⇒ AlonzoPParams Identity era Source #

Returns a basic "empty" PParams structure with all zero values.

upgradeAlonzoPParams ∷ ∀ f era1 era2. HKDFunctor f ⇒ UpgradeAlonzoPParams f → ShelleyPParams f era1 → AlonzoPParams f era2 Source #

Given the missing pieces, turn a ShelleyPParams into a AlonzoPParams

downgradeAlonzoPParamsDowngradeAlonzoPParams f → AlonzoPParams f era2 → ShelleyPParams f era1 Source #

Turn an AlonzoPParams into a ShelleyParams

data LangDepView Source #

Constructors

LangDepView 

Fields

Instances

Instances details
Generic LangDepView Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Associated Types

type Rep LangDepViewTypeType Source #

Show LangDepView Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Eq LangDepView Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Ord LangDepView Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

NoThunks LangDepView Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

type Rep LangDepView Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

type Rep LangDepView = D1 ('MetaData "LangDepView" "Cardano.Ledger.Alonzo.PParams" "cardano-ledger-alonzo-1.12.0.0-inplace" 'False) (C1 ('MetaCons "LangDepView" 'PrefixI 'True) (S1 ('MetaSel ('Just "tag") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString) :*: S1 ('MetaSel ('Just "params") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

newtype OrdExUnits Source #

This is a helper type that allows us to define an Ord instance for executions units without affecting the ExUnits type. This is needed in order to derive an Ord instance` for PParams. This is just a helper type and should not be used directly. Both lenses that operate on TxExUnits and BlockExUnits use the ExUnits type, not this one.

Constructors

OrdExUnits 

Fields

Instances

Instances details
FromJSON OrdExUnits Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

ToJSON OrdExUnits Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Show OrdExUnits Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

DecCBOR OrdExUnits Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

EncCBOR OrdExUnits Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Methods

encCBOROrdExUnitsEncoding Source #

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

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

NFData OrdExUnits Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Methods

rnfOrdExUnits → () Source #

Eq OrdExUnits Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Ord OrdExUnits Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

NoThunks OrdExUnits Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

newtype CoinPerWord Source #

Constructors

CoinPerWord 

Fields

Instances

Instances details
FromJSON CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

ToJSON CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Show CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

DecCBOR CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

EncCBOR CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Methods

encCBORCoinPerWordEncoding Source #

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

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

NFData CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Methods

rnfCoinPerWord → () Source #

Eq CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Ord CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

NoThunks CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

JSON helpers

alonzoCommonPParamsHKDPairs ∷ ∀ f era. (HKDFunctor f, AlonzoEraPParams era) ⇒ Proxy f → PParamsHKD f era → [(Key, HKD f Value)] Source #

These are the fields that are common across all eras starting with Alonzo.

Orphan instances

Crypto c ⇒ EraPParams (AlonzoEra c) Source # 
Instance details

Associated Types

type PParamsHKD f (AlonzoEra c) = (r ∷ Type) Source #

type UpgradePParams f (AlonzoEra c) Source #

type DowngradePParams f (AlonzoEra c) Source #

Methods

applyPPUpdatesPParams (AlonzoEra c) → PParamsUpdate (AlonzoEra c) → PParams (AlonzoEra c) Source #

emptyPParamsIdentityPParamsHKD Identity (AlonzoEra c) Source #

emptyPParamsStrictMaybePParamsHKD StrictMaybe (AlonzoEra c) Source #

upgradePParamsHKD ∷ ∀ (f ∷ TypeType). (HKDApplicative f, EraPParams (PreviousEra (AlonzoEra c))) ⇒ UpgradePParams f (AlonzoEra c) → PParamsHKD f (PreviousEra (AlonzoEra c)) → PParamsHKD f (AlonzoEra c) Source #

downgradePParamsHKD ∷ ∀ (f ∷ TypeType). (HKDFunctor f, EraPParams (PreviousEra (AlonzoEra c))) ⇒ DowngradePParams f (AlonzoEra c) → PParamsHKD f (AlonzoEra c) → PParamsHKD f (PreviousEra (AlonzoEra c)) Source #

hkdMinFeeAL ∷ ∀ (f ∷ TypeType). HKDFunctor f ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f Coin) Source #

hkdMinFeeBL ∷ ∀ (f ∷ TypeType). HKDFunctor f ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f Coin) Source #

hkdMaxBBSizeL ∷ ∀ (f ∷ TypeType). HKDFunctor f ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f Word32) Source #

hkdMaxTxSizeL ∷ ∀ (f ∷ TypeType). HKDFunctor f ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f Word32) Source #

hkdMaxBHSizeL ∷ ∀ (f ∷ TypeType). HKDFunctor f ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f Word16) Source #

hkdKeyDepositL ∷ ∀ (f ∷ TypeType). HKDFunctor f ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f Coin) Source #

hkdPoolDepositL ∷ ∀ (f ∷ TypeType). HKDFunctor f ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f Coin) Source #

hkdEMaxL ∷ ∀ (f ∷ TypeType). HKDFunctor f ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f EpochInterval) Source #

hkdNOptL ∷ ∀ (f ∷ TypeType). HKDFunctor f ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f Natural) Source #

hkdA0L ∷ ∀ (f ∷ TypeType). HKDFunctor f ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f NonNegativeInterval) Source #

hkdRhoL ∷ ∀ (f ∷ TypeType). HKDFunctor f ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f UnitInterval) Source #

hkdTauL ∷ ∀ (f ∷ TypeType). HKDFunctor f ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f UnitInterval) Source #

hkdDL ∷ ∀ (f ∷ TypeType). (HKDFunctor f, ProtVerAtMost (AlonzoEra c) 6) ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f UnitInterval) Source #

ppDGSimpleGetter (PParams (AlonzoEra c)) UnitInterval Source #

hkdExtraEntropyL ∷ ∀ (f ∷ TypeType). (HKDFunctor f, ProtVerAtMost (AlonzoEra c) 6) ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f Nonce) Source #

hkdProtocolVersionL ∷ ∀ (f ∷ TypeType). (HKDFunctor f, ProtVerAtMost (AlonzoEra c) 8) ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f ProtVer) Source #

ppProtocolVersionLLens' (PParams (AlonzoEra c)) ProtVer Source #

ppuProtocolVersionLLens' (PParamsUpdate (AlonzoEra c)) (StrictMaybe ProtVer) Source #

hkdMinUTxOValueL ∷ ∀ (f ∷ TypeType). (HKDFunctor f, ProtVerAtMost (AlonzoEra c) 4) ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f Coin) Source #

hkdMinPoolCostL ∷ ∀ (f ∷ TypeType). HKDFunctor f ⇒ Lens' (PParamsHKD f (AlonzoEra c)) (HKD f Coin) Source #

Crypto c ⇒ EraGov (AlonzoEra c) Source # 
Instance details

Associated Types

type GovState (AlonzoEra c) = (r ∷ Type) Source #