| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Ledger.Shelley.PParams
Contents
Description
This module contains just the type of protocol parameters.
Synopsis
- emptyShelleyPParams ∷ Era era ⇒ ShelleyPParams Identity era
- emptyShelleyPParamsUpdate ∷ ShelleyPParams StrictMaybe era
- data ShelleyPParams (f ∷ Type → Type) era = ShelleyPParams {
- sppMinFeeA ∷ !(HKD f Coin)
- sppMinFeeB ∷ !(HKD f Coin)
- sppMaxBBSize ∷ !(HKD f Word32)
- sppMaxTxSize ∷ !(HKD f Word32)
- sppMaxBHSize ∷ !(HKD f Word16)
- sppKeyDeposit ∷ !(HKD f Coin)
- sppPoolDeposit ∷ !(HKD f (CompactForm Coin))
- sppEMax ∷ !(HKD f EpochInterval)
- sppNOpt ∷ !(HKD f Word16)
- sppA0 ∷ !(HKD f NonNegativeInterval)
- sppRho ∷ !(HKD f UnitInterval)
- sppTau ∷ !(HKD f UnitInterval)
- sppD ∷ !(HKD f UnitInterval)
- sppExtraEntropy ∷ !(HKD f Nonce)
- sppProtocolVersion ∷ !(HKD f ProtVer)
- sppMinUTxOValue ∷ !(HKD f Coin)
- sppMinPoolCost ∷ !(HKD f Coin)
- emptyPParams ∷ EraPParams era ⇒ PParams era
- type family HKD (f ∷ Type → Type) a where ...
- newtype ProposedPPUpdates era = ProposedPPUpdates (Map (KeyHash 'GenesisRole) (PParamsUpdate era))
- emptyPPPUpdates ∷ ProposedPPUpdates era
- data Update era = Update !(ProposedPPUpdates era) !EpochNo
- upgradeUpdate ∷ (EraPParams era, EraPParams (PreviousEra era)) ⇒ UpgradePParams StrictMaybe era → Update (PreviousEra era) → Update era
- pvCanFollow ∷ ProtVer → ProtVer → Bool
- hasLegalProtVerUpdate ∷ (AtMostEra "Babbage" era, EraPParams era) ⇒ PParams era → PParamsUpdate era → Bool
- shelleyPParams ∷ (EraPParams era, AtMostEra "Mary" era, AtMostEra "Alonzo" era, AtMostEra "Babbage" era) ⇒ [PParam era]
- ppA0 ∷ EraPParams era ⇒ PParam era
- ppD ∷ (EraPParams era, AtMostEra "Alonzo" era) ⇒ PParam era
- ppEMax ∷ EraPParams era ⇒ PParam era
- ppExtraEntropy ∷ (EraPParams era, AtMostEra "Alonzo" era) ⇒ PParam era
- ppMaxBBSize ∷ EraPParams era ⇒ PParam era
- ppKeyDeposit ∷ EraPParams era ⇒ PParam era
- ppMinFeeA ∷ EraPParams era ⇒ PParam era
- ppMinFeeB ∷ EraPParams era ⇒ PParam era
- ppMinPoolCost ∷ EraPParams era ⇒ PParam era
- ppMaxBHSize ∷ EraPParams era ⇒ PParam era
- ppMaxTxSize ∷ EraPParams era ⇒ PParam era
- ppNOpt ∷ EraPParams era ⇒ PParam era
- ppProtocolVersion ∷ (EraPParams era, AtMostEra "Babbage" era) ⇒ PParam era
- ppPoolDeposit ∷ EraPParams era ⇒ PParam era
- ppRho ∷ EraPParams era ⇒ PParam era
- ppTau ∷ EraPParams era ⇒ PParam era
Documentation
emptyShelleyPParams ∷ Era era ⇒ ShelleyPParams Identity era Source #
data ShelleyPParams (f ∷ Type → Type) era Source #
Protocol parameters.
Constructors
| ShelleyPParams | |
Fields
| |
Instances
emptyPParams ∷ EraPParams era ⇒ PParams era Source #
newtype ProposedPPUpdates era Source #
Update operation for protocol parameters structure PParams
Constructors
| ProposedPPUpdates (Map (KeyHash 'GenesisRole) (PParamsUpdate era)) |
Instances
| EraPParams era ⇒ ToJSON (ProposedPPUpdates era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams Methods toJSON ∷ ProposedPPUpdates era → Value Source # toEncoding ∷ ProposedPPUpdates era → Encoding Source # toJSONList ∷ [ProposedPPUpdates era] → Value Source # toEncodingList ∷ [ProposedPPUpdates era] → Encoding Source # omitField ∷ ProposedPPUpdates era → Bool Source # | |||||
| (Era era, FromCBOR (PParamsUpdate era)) ⇒ FromCBOR (ProposedPPUpdates era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams | |||||
| (Era era, ToCBOR (PParamsUpdate era)) ⇒ ToCBOR (ProposedPPUpdates era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams Methods toCBOR ∷ ProposedPPUpdates era → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (ProposedPPUpdates era) → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ProposedPPUpdates era] → Size Source # | |||||
| (Era era, DecCBOR (PParamsUpdate era)) ⇒ DecCBOR (ProposedPPUpdates era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams | |||||
| (Era era, EncCBOR (PParamsUpdate era)) ⇒ EncCBOR (ProposedPPUpdates era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams Methods encCBOR ∷ ProposedPPUpdates era → Encoding Source # | |||||
| NFData (PParamsUpdate era) ⇒ NFData (ProposedPPUpdates era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams Methods rnf ∷ ProposedPPUpdates era → () # | |||||
| Monoid (ProposedPPUpdates era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams Methods mempty ∷ ProposedPPUpdates era # mappend ∷ ProposedPPUpdates era → ProposedPPUpdates era → ProposedPPUpdates era # mconcat ∷ [ProposedPPUpdates era] → ProposedPPUpdates era # | |||||
| Semigroup (ProposedPPUpdates era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams Methods (<>) ∷ ProposedPPUpdates era → ProposedPPUpdates era → ProposedPPUpdates era # sconcat ∷ NonEmpty (ProposedPPUpdates era) → ProposedPPUpdates era # stimes ∷ Integral b ⇒ b → ProposedPPUpdates era → ProposedPPUpdates era # | |||||
| Generic (ProposedPPUpdates era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams Associated Types
Methods from ∷ ProposedPPUpdates era → Rep (ProposedPPUpdates era) x # to ∷ Rep (ProposedPPUpdates era) x → ProposedPPUpdates era # | |||||
| Show (PParamsUpdate era) ⇒ Show (ProposedPPUpdates era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams Methods showsPrec ∷ Int → ProposedPPUpdates era → ShowS # show ∷ ProposedPPUpdates era → String # showList ∷ [ProposedPPUpdates era] → ShowS # | |||||
| Eq (PParamsUpdate era) ⇒ Eq (ProposedPPUpdates era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams Methods (==) ∷ ProposedPPUpdates era → ProposedPPUpdates era → Bool # (/=) ∷ ProposedPPUpdates era → ProposedPPUpdates era → Bool # | |||||
| NoThunks (PParamsUpdate era) ⇒ NoThunks (ProposedPPUpdates era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams | |||||
| type Rep (ProposedPPUpdates era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams type Rep (ProposedPPUpdates era) = D1 ('MetaData "ProposedPPUpdates" "Cardano.Ledger.Shelley.PParams" "cardano-ledger-shelley-1.18.0.0-inplace" 'True) (C1 ('MetaCons "ProposedPPUpdates" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (KeyHash 'GenesisRole) (PParamsUpdate era))))) | |||||
Update Proposal
Constructors
| Update !(ProposedPPUpdates era) !EpochNo |
Instances
| (Era era, DecCBOR (PParamsUpdate era)) ⇒ DecCBOR (Update era) Source # | |||||
| (Era era, EncCBOR (PParamsUpdate era)) ⇒ EncCBOR (Update era) Source # | |||||
| NFData (PParamsUpdate era) ⇒ NFData (Update era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams | |||||
| Generic (Update era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams Associated Types
| |||||
| Show (PParamsUpdate era) ⇒ Show (Update era) Source # | |||||
| Eq (PParamsUpdate era) ⇒ Eq (Update era) Source # | |||||
| NoThunks (PParamsUpdate era) ⇒ NoThunks (Update era) Source # | |||||
| type Rep (Update era) Source # | |||||
Defined in Cardano.Ledger.Shelley.PParams type Rep (Update era) = D1 ('MetaData "Update" "Cardano.Ledger.Shelley.PParams" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "Update" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProposedPPUpdates era)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochNo))) | |||||
upgradeUpdate ∷ (EraPParams era, EraPParams (PreviousEra era)) ⇒ UpgradePParams StrictMaybe era → Update (PreviousEra era) → Update era Source #
Check whether the new protocol version is a legitimate version bump with respect to the previous one.
hasLegalProtVerUpdate ∷ (AtMostEra "Babbage" era, EraPParams era) ⇒ PParams era → PParamsUpdate era → Bool Source #
Check whether PParamsUpdate contains a valid ProtVer update. When a protocol version
update is not included in PParamsUpdate it is considered a legal update.
shelleyPParams ∷ (EraPParams era, AtMostEra "Mary" era, AtMostEra "Alonzo" era, AtMostEra "Babbage" era) ⇒ [PParam era] Source #
PParam
ppA0 ∷ EraPParams era ⇒ PParam era Source #
ppEMax ∷ EraPParams era ⇒ PParam era Source #
ppExtraEntropy ∷ (EraPParams era, AtMostEra "Alonzo" era) ⇒ PParam era Source #
ppMaxBBSize ∷ EraPParams era ⇒ PParam era Source #
ppKeyDeposit ∷ EraPParams era ⇒ PParam era Source #
ppMinFeeA ∷ EraPParams era ⇒ PParam era Source #
ppMinFeeB ∷ EraPParams era ⇒ PParam era Source #
ppMinPoolCost ∷ EraPParams era ⇒ PParam era Source #
ppMaxBHSize ∷ EraPParams era ⇒ PParam era Source #
ppMaxTxSize ∷ EraPParams era ⇒ PParam era Source #
ppNOpt ∷ EraPParams era ⇒ PParam era Source #
ppProtocolVersion ∷ (EraPParams era, AtMostEra "Babbage" era) ⇒ PParam era Source #
ppPoolDeposit ∷ EraPParams era ⇒ PParam era Source #
ppRho ∷ EraPParams era ⇒ PParam era Source #
ppTau ∷ EraPParams era ⇒ PParam era Source #
Orphan instances
| EraPParams ShelleyEra Source # | |||||||||||||
Associated Types
Methods applyPPUpdates ∷ PParams ShelleyEra → PParamsUpdate ShelleyEra → PParams ShelleyEra Source # emptyPParamsIdentity ∷ PParamsHKD Identity ShelleyEra Source # emptyPParamsStrictMaybe ∷ PParamsHKD StrictMaybe ShelleyEra Source # emptyUpgradePParamsUpdate ∷ UpgradePParams StrictMaybe ShelleyEra Source # upgradePParamsHKD ∷ ∀ (f ∷ Type → Type). (HKDApplicative f, EraPParams (PreviousEra ShelleyEra)) ⇒ UpgradePParams f ShelleyEra → PParamsHKD f (PreviousEra ShelleyEra) → PParamsHKD f ShelleyEra Source # downgradePParamsHKD ∷ ∀ (f ∷ Type → Type). (HKDFunctor f, EraPParams (PreviousEra ShelleyEra)) ⇒ DowngradePParams f ShelleyEra → PParamsHKD f ShelleyEra → PParamsHKD f (PreviousEra ShelleyEra) Source # hkdMinFeeAL ∷ ∀ (f ∷ Type → Type). HKDFunctor f ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f Coin) Source # hkdMinFeeBL ∷ ∀ (f ∷ Type → Type). HKDFunctor f ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f Coin) Source # hkdMaxBBSizeL ∷ ∀ (f ∷ Type → Type). HKDFunctor f ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f Word32) Source # hkdMaxTxSizeL ∷ ∀ (f ∷ Type → Type). HKDFunctor f ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f Word32) Source # hkdMaxBHSizeL ∷ ∀ (f ∷ Type → Type). HKDFunctor f ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f Word16) Source # hkdKeyDepositL ∷ ∀ (f ∷ Type → Type). HKDFunctor f ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f Coin) Source # hkdPoolDepositCompactL ∷ ∀ (f ∷ Type → Type). HKDFunctor f ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f (CompactForm Coin)) Source # hkdEMaxL ∷ ∀ (f ∷ Type → Type). HKDFunctor f ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f EpochInterval) Source # hkdNOptL ∷ ∀ (f ∷ Type → Type). HKDFunctor f ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f Word16) Source # hkdA0L ∷ ∀ (f ∷ Type → Type). HKDFunctor f ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f NonNegativeInterval) Source # hkdRhoL ∷ ∀ (f ∷ Type → Type). HKDFunctor f ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f UnitInterval) Source # hkdTauL ∷ ∀ (f ∷ Type → Type). HKDFunctor f ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f UnitInterval) Source # hkdDL ∷ ∀ (f ∷ Type → Type). (HKDFunctor f, AtMostEra "Alonzo" ShelleyEra) ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f UnitInterval) Source # ppDG ∷ SimpleGetter (PParams ShelleyEra) UnitInterval Source # hkdExtraEntropyL ∷ ∀ (f ∷ Type → Type). (HKDFunctor f, AtMostEra "Alonzo" ShelleyEra) ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f Nonce) Source # hkdProtocolVersionL ∷ ∀ (f ∷ Type → Type). (HKDFunctor f, AtMostEra "Babbage" ShelleyEra) ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f ProtVer) Source # ppProtocolVersionL ∷ Lens' (PParams ShelleyEra) ProtVer Source # ppuProtocolVersionL ∷ Lens' (PParamsUpdate ShelleyEra) (StrictMaybe ProtVer) Source # hkdMinUTxOValueL ∷ ∀ (f ∷ Type → Type). (HKDFunctor f, AtMostEra "Mary" ShelleyEra) ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f Coin) Source # hkdMinPoolCostL ∷ ∀ (f ∷ Type → Type). HKDFunctor f ⇒ Lens' (PParamsHKD f ShelleyEra) (HKD f Coin) Source # | |||||||||||||