shelley-spec-ledger-0.1.0.0
Safe HaskellNone
LanguageHaskell98

Shelley.Spec.Ledger.PParams

Description

This module contains just the type of protocol parameters.

Synopsis

Documentation

data PParams' f era Source #

Protocol parameters.

We use the HKD type family so that the protocol parameters type and the type for the updates to the protocol parameters can share records fields. The protocol parameters will have type PParams' Identity, and the updates will have type PParams' StrictMaybe, though Identity will be hidden from use.

For example:

  myParameters =
    PParams
      { _minfeeA = 0,
        _minfeeB = 0,
        ...
      }

  myUpdate =
    PParamsUpdate
      { _minfeeA = SNothing,
        _minfeeB = SJust 42,
        ...
      }

Constructors

PParams 

Fields

Instances

Instances details
Era era ⇒ ToCBOR (PParamsUpdate era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

toCBORPParamsUpdate era → Encoding Source #

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

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

Era era ⇒ ToCBOR (PParams era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

toCBORPParams era → Encoding Source #

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

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

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

Defined in Shelley.Spec.Ledger.PParams

Era era ⇒ FromCBOR (PParams era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

fromCBORDecoder s (PParams era) Source #

labelProxy (PParams era) → Text Source #

NoThunks (PParamsUpdate era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

noThunks ∷ Context → PParamsUpdate era → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → PParamsUpdate era → IO (Maybe ThunkInfo)

showTypeOfProxy (PParamsUpdate era) → String

NoThunks (PParams era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

noThunks ∷ Context → PParams era → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → PParams era → IO (Maybe ThunkInfo)

showTypeOfProxy (PParams era) → String

FromJSON (PParams era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

parseJSON ∷ Value → Parser (PParams era)

parseJSONList ∷ Value → Parser [PParams era]

ToJSON (PParams era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

toJSONPParams era → Value

toEncodingPParams era → Encoding

toJSONList ∷ [PParams era] → Value

toEncodingList ∷ [PParams era] → Encoding

Eq (PParams' Identity era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

(==)PParams' Identity era → PParams' Identity era → Bool #

(/=)PParams' Identity era → PParams' Identity era → Bool #

Eq (PParams' StrictMaybe era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Ord (PParams' StrictMaybe era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Show (PParams' Identity era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

showsPrecIntPParams' Identity era → ShowS #

showPParams' Identity era → String #

showList ∷ [PParams' Identity era] → ShowS #

Show (PParams' StrictMaybe era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Generic (PParams' f era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Associated Types

type Rep (PParams' f era) ∷ TypeType #

Methods

fromPParams' f era → Rep (PParams' f era) x #

toRep (PParams' f era) x → PParams' f era #

NFData (PParams' Identity era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

rnfPParams' Identity era → () #

NFData (PParams' StrictMaybe era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

rnfPParams' StrictMaybe era → () #

type Rep (PParams' f era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

type Rep (PParams' f era)

emptyPParamsPParams era Source #

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

data ProtVer Source #

Constructors

ProtVer 

Fields

Instances

Instances details
Eq ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

(==)ProtVerProtVerBool #

(/=)ProtVerProtVerBool #

Ord ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

compareProtVerProtVerOrdering #

(<)ProtVerProtVerBool #

(<=)ProtVerProtVerBool #

(>)ProtVerProtVerBool #

(>=)ProtVerProtVerBool #

maxProtVerProtVerProtVer #

minProtVerProtVerProtVer #

Show ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

showsPrecIntProtVerShowS #

showProtVerString #

showList ∷ [ProtVer] → ShowS #

Generic ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Associated Types

type Rep ProtVerTypeType #

Methods

fromProtVerRep ProtVer x #

toRep ProtVer x → ProtVer #

NFData ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

rnfProtVer → () #

ToCBOR ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

toCBORProtVerEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ProtVerSize Source #

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

FromCBOR ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

NoThunks ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

noThunks ∷ Context → ProtVerIO (Maybe ThunkInfo)

wNoThunks ∷ Context → ProtVerIO (Maybe ThunkInfo)

showTypeOfProxy ProtVerString

FromJSON ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

parseJSON ∷ Value → Parser ProtVer

parseJSONList ∷ Value → Parser [ProtVer]

ToJSON ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

toJSONProtVer → Value

toEncodingProtVer → Encoding

toJSONList ∷ [ProtVer] → Value

toEncodingList ∷ [ProtVer] → Encoding

FromCBORGroup ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

ToCBORGroup ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

type Rep ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

type Rep ProtVer = D1 ('MetaData "ProtVer" "Shelley.Spec.Ledger.PParams" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "ProtVer" 'PrefixI 'True) (S1 ('MetaSel ('Just "pvMajor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural) :*: S1 ('MetaSel ('Just "pvMinor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural)))

data PPUpdateEnv era Source #

Constructors

PPUpdateEnv SlotNo (GenDelegs era) 

Instances

Instances details
Eq (PPUpdateEnv era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

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

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

Show (PPUpdateEnv era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

showsPrecIntPPUpdateEnv era → ShowS #

showPPUpdateEnv era → String #

showList ∷ [PPUpdateEnv era] → ShowS #

Generic (PPUpdateEnv era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Associated Types

type Rep (PPUpdateEnv era) ∷ TypeType #

Methods

fromPPUpdateEnv era → Rep (PPUpdateEnv era) x #

toRep (PPUpdateEnv era) x → PPUpdateEnv era #

NoThunks (PPUpdateEnv era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

noThunks ∷ Context → PPUpdateEnv era → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → PPUpdateEnv era → IO (Maybe ThunkInfo)

showTypeOfProxy (PPUpdateEnv era) → String

type Rep (PPUpdateEnv era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

type Rep (PPUpdateEnv era) = D1 ('MetaData "PPUpdateEnv" "Shelley.Spec.Ledger.PParams" "shelley-spec-ledger-0.1.0.0-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

Constructors

ProposedPPUpdates (Map (KeyHash 'Genesis (Crypto era)) (PParamsUpdate era)) 

Instances

Instances details
Eq (ProposedPPUpdates era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Show (ProposedPPUpdates era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Generic (ProposedPPUpdates era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Associated Types

type Rep (ProposedPPUpdates era) ∷ TypeType #

Methods

fromProposedPPUpdates era → Rep (ProposedPPUpdates era) x #

toRep (ProposedPPUpdates era) x → ProposedPPUpdates era #

NFData (ProposedPPUpdates era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

rnfProposedPPUpdates era → () #

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

Defined in Shelley.Spec.Ledger.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 ⇒ FromCBOR (ProposedPPUpdates era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

NoThunks (ProposedPPUpdates era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

noThunks ∷ Context → ProposedPPUpdates era → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → ProposedPPUpdates era → IO (Maybe ThunkInfo)

showTypeOfProxy (ProposedPPUpdates era) → String

type Rep (ProposedPPUpdates era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

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

data Update era Source #

Update Proposal

Constructors

Update !(ProposedPPUpdates era) !EpochNo 

Instances

Instances details
HasField "update" (TxBody era) (StrictMaybe (Update era)) Source # 
Instance details

Defined in Shelley.Spec.Ledger.TxBody

Methods

getFieldTxBody era → StrictMaybe (Update era) #

Eq (Update era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

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

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

Show (Update era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

showsPrecIntUpdate era → ShowS #

showUpdate era → String #

showList ∷ [Update era] → ShowS #

Generic (Update era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Associated Types

type Rep (Update era) ∷ TypeType #

Methods

fromUpdate era → Rep (Update era) x #

toRep (Update era) x → Update era #

Era era ⇒ ToCBOR (Update era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

toCBORUpdate era → Encoding Source #

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

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

Era era ⇒ FromCBOR (Update era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

fromCBORDecoder s (Update era) Source #

labelProxy (Update era) → Text Source #

NoThunks (Update era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

noThunks ∷ Context → Update era → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → Update era → IO (Maybe ThunkInfo)

showTypeOfProxy (Update era) → String

type Rep (Update era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

type Rep (Update era) = D1 ('MetaData "Update" "Shelley.Spec.Ledger.PParams" "shelley-spec-ledger-0.1.0.0-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)))