Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module contains just the type of protocol parameters.
Synopsis
- class EraPParams era ⇒ AlonzoEraPParams era where
- hkdCoinsPerUTxOWordL ∷ (HKDFunctor f, ExactEra AlonzoEra era) ⇒ Lens' (PParamsHKD f era) (HKD f CoinPerWord)
- hkdCostModelsL ∷ HKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f CostModels)
- hkdPricesL ∷ HKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Prices)
- hkdMaxTxExUnitsL ∷ HKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f ExUnits)
- hkdMaxBlockExUnitsL ∷ HKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f ExUnits)
- hkdMaxValSizeL ∷ HKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Natural)
- hkdCollateralPercentageL ∷ HKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Natural)
- hkdMaxCollateralInputsL ∷ HKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Natural)
- ppCoinsPerUTxOWordL ∷ ∀ era. (AlonzoEraPParams era, ExactEra AlonzoEra era) ⇒ Lens' (PParams era) CoinPerWord
- ppCostModelsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParams era) CostModels
- ppPricesL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParams era) Prices
- ppMaxTxExUnitsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParams era) ExUnits
- ppMaxBlockExUnitsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParams era) ExUnits
- ppMaxValSizeL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParams era) Natural
- ppCollateralPercentageL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParams era) Natural
- ppMaxCollateralInputsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParams era) Natural
- ppuCoinsPerUTxOWordL ∷ ∀ era. (AlonzoEraPParams era, ExactEra AlonzoEra era) ⇒ Lens' (PParamsUpdate era) (StrictMaybe CoinPerWord)
- ppuCostModelsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe CostModels)
- ppuPricesL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Prices)
- ppuMaxTxExUnitsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe ExUnits)
- ppuMaxBlockExUnitsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe ExUnits)
- ppuMaxValSizeL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Natural)
- ppuCollateralPercentageL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Natural)
- ppuMaxCollateralInputsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Natural)
- data AlonzoPParams f era = AlonzoPParams {
- appMinFeeA ∷ !(HKD f Coin)
- appMinFeeB ∷ !(HKD f Coin)
- appMaxBBSize ∷ !(HKD f Word32)
- appMaxTxSize ∷ !(HKD f Word32)
- appMaxBHSize ∷ !(HKD f Word16)
- appKeyDeposit ∷ !(HKD f Coin)
- appPoolDeposit ∷ !(HKD f Coin)
- appEMax ∷ !(HKD f EpochInterval)
- appNOpt ∷ !(HKD f Word16)
- appA0 ∷ !(HKD f NonNegativeInterval)
- appRho ∷ !(HKD f UnitInterval)
- appTau ∷ !(HKD f UnitInterval)
- appD ∷ !(HKD f UnitInterval)
- appExtraEntropy ∷ !(HKD f Nonce)
- appProtocolVersion ∷ !(HKD f ProtVer)
- appMinPoolCost ∷ !(HKD f Coin)
- appCoinsPerUTxOWord ∷ !(HKD f CoinPerWord)
- appCostModels ∷ !(HKD f CostModels)
- appPrices ∷ !(HKD f Prices)
- appMaxTxExUnits ∷ !(HKD f OrdExUnits)
- appMaxBlockExUnits ∷ !(HKD f OrdExUnits)
- appMaxValSize ∷ !(HKD f Natural)
- appCollateralPercentage ∷ !(HKD f Natural)
- appMaxCollateralInputs ∷ !(HKD f Natural)
- data UpgradeAlonzoPParams f = UpgradeAlonzoPParams {
- uappCoinsPerUTxOWord ∷ !(HKD f CoinPerWord)
- uappCostModels ∷ !(HKD f CostModels)
- uappPrices ∷ !(HKD f Prices)
- uappMaxTxExUnits ∷ !(HKD f ExUnits)
- uappMaxBlockExUnits ∷ !(HKD f ExUnits)
- uappMaxValSize ∷ !(HKD f Natural)
- uappCollateralPercentage ∷ !(HKD f Natural)
- uappMaxCollateralInputs ∷ !(HKD f Natural)
- newtype DowngradeAlonzoPParams f = DowngradeAlonzoPParams {
- dappMinUTxOValue ∷ HKD f Coin
- emptyAlonzoPParams ∷ ∀ era. Era era ⇒ AlonzoPParams Identity era
- emptyAlonzoPParamsUpdate ∷ AlonzoPParams StrictMaybe era
- upgradeAlonzoPParams ∷ ∀ f era1 era2. HKDFunctor f ⇒ UpgradeAlonzoPParams f → ShelleyPParams f era1 → AlonzoPParams f era2
- downgradeAlonzoPParams ∷ DowngradeAlonzoPParams f → AlonzoPParams f era2 → ShelleyPParams f era1
- getLanguageView ∷ AlonzoEraPParams era ⇒ PParams era → Language → LangDepView
- data LangDepView = LangDepView {}
- encodeLangViews ∷ Set LangDepView → Encoding
- newtype OrdExUnits = OrdExUnits {}
- newtype CoinPerWord = CoinPerWord {}
- alonzoCommonPParamsHKDPairs ∷ ∀ f era. (HKDFunctor f, AlonzoEraPParams era) ⇒ Proxy f → PParamsHKD f era → [(Key, HKD f Value)]
Era Agnostic
class EraPParams era ⇒ AlonzoEraPParams era where Source #
hkdCoinsPerUTxOWordL ∷ (HKDFunctor f, ExactEra AlonzoEra era) ⇒ Lens' (PParamsHKD f era) (HKD f CoinPerWord) Source #
hkdCostModelsL ∷ HKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f CostModels) Source #
hkdPricesL ∷ HKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Prices) Source #
hkdMaxTxExUnitsL ∷ HKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f ExUnits) Source #
hkdMaxBlockExUnitsL ∷ HKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f ExUnits) Source #
hkdMaxValSizeL ∷ HKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Natural) Source #
hkdCollateralPercentageL ∷ HKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Natural) Source #
hkdMaxCollateralInputsL ∷ HKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f Natural) Source #
Instances
ppCoinsPerUTxOWordL ∷ ∀ era. (AlonzoEraPParams era, ExactEra AlonzoEra era) ⇒ Lens' (PParams era) CoinPerWord Source #
ppCostModelsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParams era) CostModels Source #
ppMaxTxExUnitsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParams era) ExUnits Source #
ppMaxBlockExUnitsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParams era) ExUnits Source #
ppMaxValSizeL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParams era) Natural Source #
ppCollateralPercentageL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParams era) Natural Source #
ppMaxCollateralInputsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParams era) Natural Source #
ppuCoinsPerUTxOWordL ∷ ∀ era. (AlonzoEraPParams era, ExactEra AlonzoEra era) ⇒ Lens' (PParamsUpdate era) (StrictMaybe CoinPerWord) Source #
ppuCostModelsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe CostModels) Source #
ppuPricesL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Prices) Source #
ppuMaxTxExUnitsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe ExUnits) Source #
ppuMaxBlockExUnitsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe ExUnits) Source #
ppuMaxValSizeL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Natural) Source #
ppuCollateralPercentageL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Natural) Source #
ppuMaxCollateralInputsL ∷ ∀ era. AlonzoEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Natural) Source #
Alonzo specific
data AlonzoPParams f era Source #
Protocol parameters. Shelley parameters + additional ones
AlonzoPParams | |
|
Instances
data UpgradeAlonzoPParams f Source #
Parameters that were added in Alonzo
UpgradeAlonzoPParams | |
|
Instances
newtype DowngradeAlonzoPParams f Source #
Parameters that were removed in Alonzo
Instances
Generic (DowngradeAlonzoPParams f) Source # | |
Defined in Cardano.Ledger.Alonzo.PParams from ∷ DowngradeAlonzoPParams f → Rep (DowngradeAlonzoPParams f) x Source # to ∷ Rep (DowngradeAlonzoPParams f) x → DowngradeAlonzoPParams f Source # | |
Show (DowngradeAlonzoPParams Identity) Source # | |
NFData (DowngradeAlonzoPParams Identity) Source # | |
Defined in Cardano.Ledger.Alonzo.PParams rnf ∷ DowngradeAlonzoPParams Identity → () Source # | |
Eq (DowngradeAlonzoPParams Identity) Source # | |
NoThunks (DowngradeAlonzoPParams Identity) Source # | |
type Rep (DowngradeAlonzoPParams f) Source # | |
Defined in Cardano.Ledger.Alonzo.PParams type Rep (DowngradeAlonzoPParams f) = D1 ('MetaData "DowngradeAlonzoPParams" "Cardano.Ledger.Alonzo.PParams" "cardano-ledger-alonzo-1.13.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
downgradeAlonzoPParams ∷ DowngradeAlonzoPParams f → AlonzoPParams f era2 → ShelleyPParams f era1 Source #
Turn an AlonzoPParams into a ShelleyParams
getLanguageView ∷ AlonzoEraPParams era ⇒ PParams era → Language → LangDepView Source #
data LangDepView Source #
Instances
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.
Instances
newtype CoinPerWord Source #
Instances
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.