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

Cardano.Ledger.Shelley.PParams

Description

This module contains just the type of protocol parameters.

Synopsis

Documentation

data ShelleyPParams f era Source #

Protocol parameters.

Constructors

ShelleyPParams 

Fields

Instances

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

Defined in Cardano.Ledger.Shelley.PParams

(EraPParams era, PParamsHKD Identity era ~ ShelleyPParams Identity era, ProtVerAtMost era 4, ProtVerAtMost era 6, ProtVerAtMost era 8) ⇒ ToJSON (ShelleyPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

(EraPParams era, PParamsHKD StrictMaybe era ~ ShelleyPParams StrictMaybe era, ProtVerAtMost era 4, ProtVerAtMost era 6, ProtVerAtMost era 8) ⇒ ToJSON (ShelleyPParams StrictMaybe era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Generic (ShelleyPParams f era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Associated Types

type Rep (ShelleyPParams f era) ∷ TypeType Source #

Methods

fromShelleyPParams f era → Rep (ShelleyPParams f era) x Source #

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

Show (ShelleyPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Show (ShelleyPParams StrictMaybe era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

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

Defined in Cardano.Ledger.Shelley.PParams

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

Defined in Cardano.Ledger.Shelley.PParams

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

Defined in Cardano.Ledger.Shelley.PParams

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

Defined in Cardano.Ledger.Shelley.PParams

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

Defined in Cardano.Ledger.Shelley.PParams

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

Defined in Cardano.Ledger.Shelley.PParams

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

Defined in Cardano.Ledger.Shelley.PParams

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

Defined in Cardano.Ledger.Shelley.PParams

NFData (ShelleyPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Methods

rnfShelleyPParams Identity era → () Source #

NFData (ShelleyPParams StrictMaybe era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Methods

rnfShelleyPParams StrictMaybe era → () Source #

Eq (ShelleyPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Eq (ShelleyPParams StrictMaybe era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Ord (ShelleyPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Ord (ShelleyPParams StrictMaybe era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

NoThunks (ShelleyPParams Identity era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

NoThunks (ShelleyPParams StrictMaybe era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

type Rep (ShelleyPParams f era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

type Rep (ShelleyPParams f era) = D1 ('MetaData "ShelleyPParams" "Cardano.Ledger.Shelley.PParams" "cardano-ledger-shelley-1.12.2.1-inplace" 'False) (C1 ('MetaCons "ShelleyPParams" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "sppMinFeeA") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Coin)) :*: S1 ('MetaSel ('Just "sppMinFeeB") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Coin))) :*: (S1 ('MetaSel ('Just "sppMaxBBSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Word32)) :*: S1 ('MetaSel ('Just "sppMaxTxSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Word32)))) :*: ((S1 ('MetaSel ('Just "sppMaxBHSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Word16)) :*: S1 ('MetaSel ('Just "sppKeyDeposit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Coin))) :*: (S1 ('MetaSel ('Just "sppPoolDeposit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Coin)) :*: S1 ('MetaSel ('Just "sppEMax") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f EpochInterval))))) :*: (((S1 ('MetaSel ('Just "sppNOpt") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Natural)) :*: S1 ('MetaSel ('Just "sppA0") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f NonNegativeInterval))) :*: (S1 ('MetaSel ('Just "sppRho") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f UnitInterval)) :*: S1 ('MetaSel ('Just "sppTau") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f UnitInterval)))) :*: ((S1 ('MetaSel ('Just "sppD") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f UnitInterval)) :*: S1 ('MetaSel ('Just "sppExtraEntropy") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Nonce))) :*: (S1 ('MetaSel ('Just "sppProtocolVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f ProtVer)) :*: (S1 ('MetaSel ('Just "sppMinUTxOValue") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Coin)) :*: S1 ('MetaSel ('Just "sppMinPoolCost") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HKD f Coin))))))))

type family HKD (f ∷ TypeType) a where ... Source #

Higher Kinded Data

Equations

HKD Identity a = a 
HKD f a = f a 

data PPUpdateEnv era Source #

Constructors

PPUpdateEnv SlotNo (GenDelegs era) 

Instances

Instances details
Generic (PPUpdateEnv era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Associated Types

type Rep (PPUpdateEnv era) ∷ TypeType Source #

Methods

fromPPUpdateEnv era → Rep (PPUpdateEnv era) x Source #

toRep (PPUpdateEnv era) x → PPUpdateEnv era Source #

Show (PPUpdateEnv era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Eq (PPUpdateEnv era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Methods

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

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

NoThunks (PPUpdateEnv era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

type Rep (PPUpdateEnv era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

type Rep (PPUpdateEnv era) = D1 ('MetaData "PPUpdateEnv" "Cardano.Ledger.Shelley.PParams" "cardano-ledger-shelley-1.12.2.1-inplace" 'False) (C1 ('MetaCons "PPUpdateEnv" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenDelegs era))))

newtype ProposedPPUpdates era Source #

Update operation for protocol parameters structure PParams

Instances

Instances details
EraPParams era ⇒ ToJSON (ProposedPPUpdates era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Monoid (ProposedPPUpdates era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Semigroup (ProposedPPUpdates era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Generic (ProposedPPUpdates era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Associated Types

type Rep (ProposedPPUpdates era) ∷ TypeType Source #

Show (PParamsUpdate era) ⇒ Show (ProposedPPUpdates era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

(Era era, FromCBOR (PParamsUpdate era)) ⇒ FromCBOR (ProposedPPUpdates era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

(Era era, ToCBOR (PParamsUpdate era)) ⇒ ToCBOR (ProposedPPUpdates era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Methods

toCBORProposedPPUpdates 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 # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

(Era era, EncCBOR (PParamsUpdate era)) ⇒ EncCBOR (ProposedPPUpdates era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Methods

encCBORProposedPPUpdates era → Encoding Source #

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

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

NFData (PParamsUpdate era) ⇒ NFData (ProposedPPUpdates era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Methods

rnfProposedPPUpdates era → () Source #

Eq (PParamsUpdate era) ⇒ Eq (ProposedPPUpdates era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

NoThunks (PParamsUpdate era) ⇒ NoThunks (ProposedPPUpdates era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

type Rep (ProposedPPUpdates era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

type Rep (ProposedPPUpdates era) = D1 ('MetaData "ProposedPPUpdates" "Cardano.Ledger.Shelley.PParams" "cardano-ledger-shelley-1.12.2.1-inplace" 'True) (C1 ('MetaCons "ProposedPPUpdates" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (KeyHash 'Genesis (EraCrypto era)) (PParamsUpdate era)))))

data Update era Source #

Update Proposal

Constructors

Update !(ProposedPPUpdates era) !EpochNo 

Instances

Instances details
Generic (Update era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Associated Types

type Rep (Update era) ∷ TypeType Source #

Methods

fromUpdate era → Rep (Update era) x Source #

toRep (Update era) x → Update era Source #

Show (PParamsUpdate era) ⇒ Show (Update era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Methods

showsPrecIntUpdate era → ShowS Source #

showUpdate era → String Source #

showList ∷ [Update era] → ShowS Source #

(Era era, DecCBOR (PParamsUpdate era)) ⇒ DecCBOR (Update era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Methods

decCBORDecoder s (Update era) Source #

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

labelProxy (Update era) → Text Source #

(Era era, EncCBOR (PParamsUpdate era)) ⇒ EncCBOR (Update era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Methods

encCBORUpdate era → Encoding Source #

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

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

NFData (PParamsUpdate era) ⇒ NFData (Update era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Methods

rnfUpdate era → () Source #

Eq (PParamsUpdate era) ⇒ Eq (Update era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Methods

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

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

NoThunks (PParamsUpdate era) ⇒ NoThunks (Update era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

type Rep (Update era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.PParams

type Rep (Update era) = D1 ('MetaData "Update" "Cardano.Ledger.Shelley.PParams" "cardano-ledger-shelley-1.12.2.1-inplace" 'False) (C1 ('MetaCons "Update" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProposedPPUpdates era)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochNo)))

pvCanFollow Source #

Arguments

ProtVer

Previous protocol version

ProtVer

New protocol version

Bool 

Check whether the new protocol version is a legitimate version bump with respect to the previous one.

hasLegalProtVerUpdate ∷ (ProtVerAtMost era 8, 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.

JSON helpers

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

These are the fields that are common across all eras

shelleyCommonPParamsHKDPairsV6 ∷ ∀ f era. (HKDFunctor f, EraPParams era, ProtVerAtMost era 6) ⇒ Proxy f → PParamsHKD f era → [(Key, HKD f Value)] Source #

These are the fields that are common only up to major protocol version 6

shelleyCommonPParamsHKDPairsV8 ∷ ∀ f era. (HKDFunctor f, EraPParams era, ProtVerAtMost era 8) ⇒ Proxy f → PParamsHKD f era → [(Key, HKD f Value)] Source #

Deprecated

updatePParamsEraPParams era ⇒ PParams era → PParamsUpdate era → PParams era Source #

Deprecated: Use applyPPUpdates instead

Orphan instances

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

Associated Types

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

type UpgradePParams f (ShelleyEra c) Source #

type DowngradePParams f (ShelleyEra c) Source #

Methods

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

emptyPParamsIdentityPParamsHKD Identity (ShelleyEra c) Source #

emptyPParamsStrictMaybePParamsHKD StrictMaybe (ShelleyEra c) Source #

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

ppDGSimpleGetter (PParams (ShelleyEra c)) UnitInterval Source #

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

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

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

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

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

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