Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module contains just the type of protocol parameters.
Synopsis
- emptyShelleyPParams ∷ ∀ era. Era era ⇒ ShelleyPParams Identity era
- emptyShelleyPParamsUpdate ∷ ShelleyPParams StrictMaybe era
- data ShelleyPParams f 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 Coin)
- sppEMax ∷ !(HKD f EpochInterval)
- sppNOpt ∷ !(HKD f Natural)
- 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 ...
- data PPUpdateEnv era = PPUpdateEnv SlotNo (GenDelegs era)
- newtype ProposedPPUpdates era = ProposedPPUpdates (Map (KeyHash 'Genesis (EraCrypto era)) (PParamsUpdate era))
- emptyPPPUpdates ∷ ProposedPPUpdates era
- data Update era = Update !(ProposedPPUpdates era) !EpochNo
- upgradeUpdate ∷ ∀ era. (EraPParams era, EraPParams (PreviousEra era), EraCrypto (PreviousEra era) ~ EraCrypto era) ⇒ UpgradePParams StrictMaybe era → Update (PreviousEra era) → Update era
- pvCanFollow ∷ ProtVer → ProtVer → Bool
- hasLegalProtVerUpdate ∷ (ProtVerAtMost era 8, EraPParams era) ⇒ PParams era → PParamsUpdate era → Bool
- shelleyCommonPParamsHKDPairs ∷ ∀ f era. (HKDFunctor f, EraPParams era) ⇒ Proxy f → PParamsHKD f era → [(Key, HKD f Value)]
- shelleyCommonPParamsHKDPairsV6 ∷ ∀ f era. (HKDFunctor f, EraPParams era, ProtVerAtMost era 6) ⇒ Proxy f → PParamsHKD f era → [(Key, HKD f Value)]
- shelleyCommonPParamsHKDPairsV8 ∷ ∀ f era. (HKDFunctor f, EraPParams era, ProtVerAtMost era 8) ⇒ Proxy f → PParamsHKD f era → [(Key, HKD f Value)]
Documentation
emptyShelleyPParams ∷ ∀ era. Era era ⇒ ShelleyPParams Identity era Source #
data ShelleyPParams f era Source #
Protocol parameters.
ShelleyPParams | |
|
Instances
emptyPParams ∷ EraPParams era ⇒ PParams era Source #
data PPUpdateEnv era Source #
PPUpdateEnv SlotNo (GenDelegs era) |
Instances
newtype ProposedPPUpdates era Source #
Update operation for protocol parameters structure PParams
ProposedPPUpdates (Map (KeyHash 'Genesis (EraCrypto era)) (PParamsUpdate era)) |
Instances
Update Proposal
Update !(ProposedPPUpdates era) !EpochNo |
Instances
Generic (Update era) Source # | |
Show (PParamsUpdate era) ⇒ Show (Update era) Source # | |
(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 | |
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.15.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 ∷ ∀ era. (EraPParams era, EraPParams (PreviousEra era), EraCrypto (PreviousEra era) ~ EraCrypto 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 ∷ (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 #