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
ToJSON (PParams era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

FromJSON (PParams era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Era era => ToCBOR (PParamsUpdate era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

toCBOR :: PParamsUpdate era -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (PParamsUpdate era) -> Size Source #

encodedListSizeExpr :: (forall 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

toCBOR :: PParams era -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (PParams era) -> Size Source #

encodedListSizeExpr :: (forall 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

fromCBOR :: Decoder s (PParams era) Source #

label :: Proxy (PParams era) -> Text Source #

NoThunks (PParamsUpdate era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

NoThunks (PParams era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Eq (PParams' Identity era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

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

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) :: Type -> Type #

Methods

from :: PParams' f era -> Rep (PParams' f era) x #

to :: Rep (PParams' f era) x -> PParams' f era #

NFData (PParams' Identity era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

rnf :: PParams' Identity era -> () #

NFData (PParams' StrictMaybe era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

rnf :: PParams' StrictMaybe era -> () #

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

Defined in Shelley.Spec.Ledger.PParams

type Rep (PParams' f era)

emptyPParams :: PParams 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

(==) :: ProtVer -> ProtVer -> Bool #

(/=) :: ProtVer -> ProtVer -> Bool #

Ord ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Show ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Generic ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Associated Types

type Rep ProtVer :: Type -> Type #

Methods

from :: ProtVer -> Rep ProtVer x #

to :: Rep ProtVer x -> ProtVer #

NFData ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

rnf :: ProtVer -> () #

ToJSON ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

FromJSON ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

ToCBOR ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

toCBOR :: ProtVer -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy ProtVer -> Size Source #

encodedListSizeExpr :: (forall 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

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-Is3EknyvW92LxCl96jGQVW" '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

showsPrec :: Int -> PPUpdateEnv era -> ShowS #

show :: PPUpdateEnv era -> String #

showList :: [PPUpdateEnv era] -> ShowS #

Generic (PPUpdateEnv era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Associated Types

type Rep (PPUpdateEnv era) :: Type -> Type #

Methods

from :: PPUpdateEnv era -> Rep (PPUpdateEnv era) x #

to :: Rep (PPUpdateEnv era) x -> PPUpdateEnv era #

NoThunks (PPUpdateEnv era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

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-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "PPUpdateEnv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo) :*: S1 ('MetaSel ('Nothing :: Maybe 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) :: Type -> Type #

NFData (ProposedPPUpdates era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

rnf :: ProposedPPUpdates era -> () #

Era era => ToCBOR (ProposedPPUpdates era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

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

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-Is3EknyvW92LxCl96jGQVW" 'True) (C1 ('MetaCons "ProposedPPUpdates" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe 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

getField :: TxBody 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

showsPrec :: Int -> Update era -> ShowS #

show :: Update era -> String #

showList :: [Update era] -> ShowS #

Generic (Update era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Associated Types

type Rep (Update era) :: Type -> Type #

Methods

from :: Update era -> Rep (Update era) x #

to :: Rep (Update era) x -> Update era #

NFData (Update era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

rnf :: Update era -> () #

Era era => ToCBOR (Update era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

Methods

toCBOR :: Update era -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Update era) -> Size Source #

encodedListSizeExpr :: (forall 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

fromCBOR :: Decoder s (Update era) Source #

label :: Proxy (Update era) -> Text Source #

NoThunks (Update era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

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-Is3EknyvW92LxCl96jGQVW" '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)))