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

Cardano.Ledger.Shelley.LedgerState

Description

This module implements the operation rules for treating UTxO transactions (Tx) as state transformations on a ledger state (LedgerState), as specified in A Simplified Formal Specification of a UTxO Ledger.

Synopsis

Documentation

data AccountState Source #

Constructors

AccountState 

Fields

Instances

Instances details
ToJSON AccountState Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Generic AccountState Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Associated Types

type Rep AccountStateTypeType Source #

Show AccountState Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

DecCBOR AccountState Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

EncCBOR AccountState Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Default AccountState Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

NFData AccountState Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

rnfAccountState → () Source #

Eq AccountState Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

NoThunks AccountState Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

type Rep AccountState Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

type Rep AccountState = D1 ('MetaData "AccountState" "Cardano.Ledger.Shelley.LedgerState.Types" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "AccountState" 'PrefixI 'True) (S1 ('MetaSel ('Just "asTreasury") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "asReserves") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin)))

data CertState era Source #

The state associated with the DELPL rule, which combines the DELEG rule and the POOL rule.

Constructors

CertState 

Fields

Instances

Instances details
ToJSON (CertState era) 
Instance details

Defined in Cardano.Ledger.CertState

Generic (CertState era) 
Instance details

Defined in Cardano.Ledger.CertState

Associated Types

type Rep (CertState era) ∷ TypeType Source #

Methods

fromCertState era → Rep (CertState era) x Source #

toRep (CertState era) x → CertState era Source #

Show (CertState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

showsPrecIntCertState era → ShowS Source #

showCertState era → String Source #

showList ∷ [CertState era] → ShowS Source #

Era era ⇒ DecShareCBOR (CertState era) 
Instance details

Defined in Cardano.Ledger.CertState

Associated Types

type Share (CertState era) Source #

Era era ⇒ EncCBOR (CertState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

encCBORCertState era → Encoding Source #

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

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

Default (CertState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

defCertState era Source #

NFData (CertState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

rnfCertState era → () Source #

Eq (CertState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

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

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

NoThunks (CertState era) 
Instance details

Defined in Cardano.Ledger.CertState

type Rep (CertState era) 
Instance details

Defined in Cardano.Ledger.CertState

type Rep (CertState era) = D1 ('MetaData "CertState" "Cardano.Ledger.CertState" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "CertState" 'PrefixI 'True) (S1 ('MetaSel ('Just "certVState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (VState era)) :*: (S1 ('MetaSel ('Just "certPState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PState era)) :*: S1 ('MetaSel ('Just "certDState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (DState era)))))
type Share (CertState era) 
Instance details

Defined in Cardano.Ledger.CertState

data DState era Source #

The state used by the DELEG rule, which roughly tracks stake delegation and some governance features.

Constructors

DState 

Fields

Instances

Instances details
ToJSON (DState era) 
Instance details

Defined in Cardano.Ledger.CertState

Generic (DState era) 
Instance details

Defined in Cardano.Ledger.CertState

Associated Types

type Rep (DState era) ∷ TypeType Source #

Methods

fromDState era → Rep (DState era) x Source #

toRep (DState era) x → DState era Source #

Show (DState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

showsPrecIntDState era → ShowS Source #

showDState era → String Source #

showList ∷ [DState era] → ShowS Source #

DecShareCBOR (DState era) 
Instance details

Defined in Cardano.Ledger.CertState

Associated Types

type Share (DState era) Source #

Methods

getShareDState era → Share (DState era) Source #

decShareCBORShare (DState era) → Decoder s (DState era) Source #

decSharePlusCBORStateT (Share (DState era)) (Decoder s) (DState era) Source #

Era era ⇒ EncCBOR (DState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

encCBORDState era → Encoding Source #

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

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

Default (DState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

defDState era Source #

NFData (DState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

rnfDState era → () Source #

Eq (DState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

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

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

NoThunks (DState era) 
Instance details

Defined in Cardano.Ledger.CertState

type Rep (DState era) 
Instance details

Defined in Cardano.Ledger.CertState

type Rep (DState era) = D1 ('MetaData "DState" "Cardano.Ledger.CertState" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "DState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dsUnified") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UMap) :*: S1 ('MetaSel ('Just "dsFutureGenDelegs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map FutureGenDeleg GenDelegPair))) :*: (S1 ('MetaSel ('Just "dsGenDelegs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GenDelegs) :*: S1 ('MetaSel ('Just "dsIRewards") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 InstantaneousRewards))))
type Share (DState era) 
Instance details

Defined in Cardano.Ledger.CertState

data VState era Source #

The state that tracks the voting entities (DReps and Constitutional Committee members). In the formal ledger specification this type is called GState

Constructors

VState 

Fields

  • vsDReps ∷ !(Map (Credential 'DRepRole) DRepState)
     
  • vsCommitteeState ∷ !(CommitteeState era)
     
  • vsNumDormantEpochs ∷ !EpochNo

    Number of contiguous epochs in which there are exactly zero active governance proposals to vote on. It is incremented in every EPOCH rule if the number of active governance proposals to vote on continues to be zero. It is reset to zero when a new governance action is successfully proposed. We need this counter in order to bump DRep expiries through dormant periods when DReps do not have an opportunity to vote on anything.

Instances

Instances details
Generic (VState era) 
Instance details

Defined in Cardano.Ledger.CertState

Associated Types

type Rep (VState era) ∷ TypeType Source #

Methods

fromVState era → Rep (VState era) x Source #

toRep (VState era) x → VState era Source #

Show (VState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

showsPrecIntVState era → ShowS Source #

showVState era → String Source #

showList ∷ [VState era] → ShowS Source #

Era era ⇒ DecCBOR (VState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

decCBORDecoder s (VState era) Source #

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

labelProxy (VState era) → Text Source #

Era era ⇒ DecShareCBOR (VState era) 
Instance details

Defined in Cardano.Ledger.CertState

Associated Types

type Share (VState era) Source #

Methods

getShareVState era → Share (VState era) Source #

decShareCBORShare (VState era) → Decoder s (VState era) Source #

decSharePlusCBORStateT (Share (VState era)) (Decoder s) (VState era) Source #

Era era ⇒ EncCBOR (VState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

encCBORVState era → Encoding Source #

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

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

Default (VState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

defVState era Source #

NFData (VState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

rnfVState era → () Source #

Eq (VState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

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

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

NoThunks (VState era) 
Instance details

Defined in Cardano.Ledger.CertState

type Rep (VState era) 
Instance details

Defined in Cardano.Ledger.CertState

type Rep (VState era) = D1 ('MetaData "VState" "Cardano.Ledger.CertState" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "VState" 'PrefixI 'True) (S1 ('MetaSel ('Just "vsDReps") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'DRepRole) DRepState)) :*: (S1 ('MetaSel ('Just "vsCommitteeState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CommitteeState era)) :*: S1 ('MetaSel ('Just "vsNumDormantEpochs") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 EpochNo))))
type Share (VState era) 
Instance details

Defined in Cardano.Ledger.CertState

type Share (VState era) = ()

ptrsMapDState era → Map Ptr (Credential 'Staking) Source #

get the actual ptrs map, we don't need a view

data EpochState era Source #

Constructors

EpochState 

Fields

Instances

Instances details
(EraTxOut era, EraGov era) ⇒ ToJSON (EpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Generic (EpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Associated Types

type Rep (EpochState era) ∷ TypeType Source #

Methods

fromEpochState era → Rep (EpochState era) x Source #

toRep (EpochState era) x → EpochState era Source #

(EraTxOut era, Show (GovState era)) ⇒ Show (EpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

showsPrecIntEpochState era → ShowS Source #

showEpochState era → String Source #

showList ∷ [EpochState era] → ShowS Source #

(EraTxOut era, EraGov era) ⇒ FromCBOR (EpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

fromCBORDecoder s (EpochState era) Source #

labelProxy (EpochState era) → Text Source #

(EraTxOut era, EraGov era) ⇒ ToCBOR (EpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

toCBOREpochState era → Encoding Source #

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

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

(EraTxOut era, EraGov era) ⇒ DecCBOR (EpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

decCBORDecoder s (EpochState era) Source #

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

labelProxy (EpochState era) → Text Source #

(EraTxOut era, EncCBOR (GovState era)) ⇒ EncCBOR (EpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

encCBOREpochState era → Encoding Source #

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

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

Default (LedgerState era) ⇒ Default (EpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

defEpochState era Source #

(EraTxOut era, NFData (GovState era)) ⇒ NFData (EpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

rnfEpochState era → () Source #

(EraTxOut era, Eq (GovState era)) ⇒ Eq (EpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

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

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

(EraTxOut era, NoThunks (GovState era)) ⇒ NoThunks (EpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

type Rep (EpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

type Rep (EpochState era) = D1 ('MetaData "EpochState" "Cardano.Ledger.Shelley.LedgerState.Types" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "EpochState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "esAccountState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AccountState) :*: S1 ('MetaSel ('Just "esLState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LedgerState era))) :*: (S1 ('MetaSel ('Just "esSnapshots") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SnapShots) :*: S1 ('MetaSel ('Just "esNonMyopic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NonMyopic))))

data PulsingRewUpdate Source #

The state used in the STS rules

Instances

Instances details
ToJSON PulsingRewUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Generic PulsingRewUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Associated Types

type Rep PulsingRewUpdateTypeType Source #

Show PulsingRewUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

DecCBOR PulsingRewUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

EncCBOR PulsingRewUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

NFData PulsingRewUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Methods

rnfPulsingRewUpdate → () Source #

Eq PulsingRewUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

NoThunks PulsingRewUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

type Rep PulsingRewUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

type Rep PulsingRewUpdate = D1 ('MetaData "PulsingRewUpdate" "Cardano.Ledger.Shelley.RewardUpdate" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "Pulsing" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RewardSnapShot) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Pulser)) :+: C1 ('MetaCons "Complete" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RewardUpdate)))

data FutureGenDeleg Source #

Instances

Instances details
ToJSON FutureGenDeleg 
Instance details

Defined in Cardano.Ledger.CertState

Generic FutureGenDeleg 
Instance details

Defined in Cardano.Ledger.CertState

Associated Types

type Rep FutureGenDelegTypeType Source #

Show FutureGenDeleg 
Instance details

Defined in Cardano.Ledger.CertState

DecCBOR FutureGenDeleg 
Instance details

Defined in Cardano.Ledger.CertState

EncCBOR FutureGenDeleg 
Instance details

Defined in Cardano.Ledger.CertState

NFData FutureGenDeleg 
Instance details

Defined in Cardano.Ledger.CertState

Methods

rnfFutureGenDeleg → () Source #

Eq FutureGenDeleg 
Instance details

Defined in Cardano.Ledger.CertState

Ord FutureGenDeleg 
Instance details

Defined in Cardano.Ledger.CertState

NoThunks FutureGenDeleg 
Instance details

Defined in Cardano.Ledger.CertState

type Rep FutureGenDeleg 
Instance details

Defined in Cardano.Ledger.CertState

type Rep FutureGenDeleg = D1 ('MetaData "FutureGenDeleg" "Cardano.Ledger.CertState" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "FutureGenDeleg" 'PrefixI 'True) (S1 ('MetaSel ('Just "fGenDelegSlot") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 SlotNo) :*: S1 ('MetaSel ('Just "fGenDelegGenKeyHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'Genesis))))

data InstantaneousRewards Source #

InstantaneousRewards captures the pending changes to the ledger state caused by MIR certificates. It consists of two mappings, the rewards which will be paid out from the reserves and the rewards which will be paid out from the treasury. It also consists of two coin values which represent the transfer of coins from one pot to the other pot. NOTE that the following property should always hold: deltaReserves + deltaTreasury = 0

Instances

Instances details
ToJSON InstantaneousRewards 
Instance details

Defined in Cardano.Ledger.CertState

Generic InstantaneousRewards 
Instance details

Defined in Cardano.Ledger.CertState

Associated Types

type Rep InstantaneousRewardsTypeType Source #

Show InstantaneousRewards 
Instance details

Defined in Cardano.Ledger.CertState

DecShareCBOR InstantaneousRewards 
Instance details

Defined in Cardano.Ledger.CertState

Associated Types

type Share InstantaneousRewards Source #

EncCBOR InstantaneousRewards 
Instance details

Defined in Cardano.Ledger.CertState

Default InstantaneousRewards 
Instance details

Defined in Cardano.Ledger.CertState

NFData InstantaneousRewards 
Instance details

Defined in Cardano.Ledger.CertState

Methods

rnfInstantaneousRewards → () Source #

Eq InstantaneousRewards 
Instance details

Defined in Cardano.Ledger.CertState

NoThunks InstantaneousRewards 
Instance details

Defined in Cardano.Ledger.CertState

type Rep InstantaneousRewards 
Instance details

Defined in Cardano.Ledger.CertState

type Rep InstantaneousRewards = D1 ('MetaData "InstantaneousRewards" "Cardano.Ledger.CertState" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "InstantaneousRewards" 'PrefixI 'True) ((S1 ('MetaSel ('Just "iRReserves") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking) Coin)) :*: S1 ('MetaSel ('Just "iRTreasury") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking) Coin))) :*: (S1 ('MetaSel ('Just "deltaReserves") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeltaCoin) :*: S1 ('MetaSel ('Just "deltaTreasury") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeltaCoin))))
type Share InstantaneousRewards 
Instance details

Defined in Cardano.Ledger.CertState

data LedgerState era Source #

The state associated with a Ledger.

Constructors

LedgerState 

Fields

Instances

Instances details
(EraTxOut era, EraGov era) ⇒ ToJSON (LedgerState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Generic (LedgerState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Associated Types

type Rep (LedgerState era) ∷ TypeType Source #

Methods

fromLedgerState era → Rep (LedgerState era) x Source #

toRep (LedgerState era) x → LedgerState era Source #

(EraTxOut era, Show (GovState era)) ⇒ Show (LedgerState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

(EraTxOut era, EraGov era) ⇒ FromCBOR (LedgerState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

(EraTxOut era, EraGov era) ⇒ ToCBOR (LedgerState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

toCBORLedgerState era → Encoding Source #

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

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

(EraTxOut era, EraGov era) ⇒ DecShareCBOR (LedgerState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Associated Types

type Share (LedgerState era) Source #

(EraTxOut era, EncCBOR (GovState era)) ⇒ EncCBOR (LedgerState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

encCBORLedgerState era → Encoding Source #

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

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

Default (UTxOState era) ⇒ Default (LedgerState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

defLedgerState era Source #

(EraTxOut era, NFData (GovState era)) ⇒ NFData (LedgerState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

rnfLedgerState era → () Source #

(EraTxOut era, Eq (GovState era)) ⇒ Eq (LedgerState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

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

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

(EraTxOut era, NoThunks (GovState era)) ⇒ NoThunks (LedgerState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

type Rep (LedgerState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

type Rep (LedgerState era) = D1 ('MetaData "LedgerState" "Cardano.Ledger.Shelley.LedgerState.Types" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "LedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "lsUTxOState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (UTxOState era)) :*: S1 ('MetaSel ('Just "lsCertState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CertState era))))
type Share (LedgerState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

data PState era Source #

The state used by the POOL rule, which tracks stake pool information.

Constructors

PState 

Fields

Instances

Instances details
ToJSON (PState era) 
Instance details

Defined in Cardano.Ledger.CertState

Generic (PState era) 
Instance details

Defined in Cardano.Ledger.CertState

Associated Types

type Rep (PState era) ∷ TypeType Source #

Methods

fromPState era → Rep (PState era) x Source #

toRep (PState era) x → PState era Source #

Show (PState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

showsPrecIntPState era → ShowS Source #

showPState era → String Source #

showList ∷ [PState era] → ShowS Source #

(Era era, DecShareCBOR (PState era)) ⇒ DecCBOR (PState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

decCBORDecoder s (PState era) Source #

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

labelProxy (PState era) → Text Source #

DecShareCBOR (PState era) 
Instance details

Defined in Cardano.Ledger.CertState

Associated Types

type Share (PState era) Source #

Methods

getSharePState era → Share (PState era) Source #

decShareCBORShare (PState era) → Decoder s (PState era) Source #

decSharePlusCBORStateT (Share (PState era)) (Decoder s) (PState era) Source #

Era era ⇒ EncCBOR (PState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

encCBORPState era → Encoding Source #

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

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

Default (PState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

defPState era Source #

NFData (PState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

rnfPState era → () Source #

Eq (PState era) 
Instance details

Defined in Cardano.Ledger.CertState

Methods

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

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

NoThunks (PState era) 
Instance details

Defined in Cardano.Ledger.CertState

type Rep (PState era) 
Instance details

Defined in Cardano.Ledger.CertState

type Rep (PState era) = D1 ('MetaData "PState" "Cardano.Ledger.CertState" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "PState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "psStakePoolParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) PoolParams)) :*: S1 ('MetaSel ('Just "psFutureStakePoolParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) PoolParams))) :*: (S1 ('MetaSel ('Just "psRetiring") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) EpochNo)) :*: S1 ('MetaSel ('Just "psDeposits") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) Coin)))))
type Share (PState era) 
Instance details

Defined in Cardano.Ledger.CertState

data RewardUpdate Source #

The ultimate goal of a reward update computation. Aggregating rewards for each staking credential.

Constructors

RewardUpdate 

Instances

Instances details
ToJSON RewardUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Generic RewardUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Associated Types

type Rep RewardUpdateTypeType Source #

Show RewardUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

DecCBOR RewardUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

EncCBOR RewardUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

NFData RewardUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Methods

rnfRewardUpdate → () Source #

Eq RewardUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

NoThunks RewardUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

type Rep RewardUpdate Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

type Rep RewardUpdate = D1 ('MetaData "RewardUpdate" "Cardano.Ledger.Shelley.RewardUpdate" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "RewardUpdate" 'PrefixI 'True) ((S1 ('MetaSel ('Just "deltaT") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeltaCoin) :*: S1 ('MetaSel ('Just "deltaR") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeltaCoin)) :*: (S1 ('MetaSel ('Just "rs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking) (Set Reward))) :*: (S1 ('MetaSel ('Just "deltaF") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeltaCoin) :*: S1 ('MetaSel ('Just "nonMyopic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NonMyopic)))))

data RewardSnapShot Source #

To complete the reward update, we need a snap shot of the EpochState particular to this computation

Instances

Instances details
Generic RewardSnapShot Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Associated Types

type Rep RewardSnapShotTypeType Source #

Show RewardSnapShot Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

DecCBOR RewardSnapShot Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

EncCBOR RewardSnapShot Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

NFData RewardSnapShot Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Methods

rnfRewardSnapShot → () Source #

Eq RewardSnapShot Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

NoThunks RewardSnapShot Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

type Rep RewardSnapShot Source # 
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

type Rep RewardSnapShot = D1 ('MetaData "RewardSnapShot" "Cardano.Ledger.Shelley.RewardUpdate" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "RewardSnapShot" 'PrefixI 'True) (((S1 ('MetaSel ('Just "rewFees") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "rewProtocolVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ProtVer)) :*: (S1 ('MetaSel ('Just "rewNonMyopic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NonMyopic) :*: S1 ('MetaSel ('Just "rewDeltaR1") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))) :*: ((S1 ('MetaSel ('Just "rewR") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "rewDeltaT1") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin)) :*: (S1 ('MetaSel ('Just "rewLikelihoods") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) Likelihood)) :*: S1 ('MetaSel ('Just "rewLeaders") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking) (Set Reward)))))))

data UTxOState era Source #

There is a serious invariant that we must maintain in the UTxOState. Given (UTxOState utxo _ _ _ istake) it must be the case that istake == (updateStakeDistribution (UTxO Map.empty) (UTxO Map.empty) utxo) Of course computing the RHS of the above equality can be very expensive, so we only use this route in the testing function smartUTxO. But we are very careful, wherever we update the UTxO, we carefully make INCREMENTAL changes to istake to maintain this invariant. This happens in the UTxO rule.

Constructors

UTxOState 

Fields

Instances

Instances details
(EraTxOut era, EraGov era) ⇒ ToJSON (UTxOState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Generic (UTxOState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Associated Types

type Rep (UTxOState era) ∷ TypeType Source #

Methods

fromUTxOState era → Rep (UTxOState era) x Source #

toRep (UTxOState era) x → UTxOState era Source #

(EraTxOut era, Show (GovState era)) ⇒ Show (UTxOState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

showsPrecIntUTxOState era → ShowS Source #

showUTxOState era → String Source #

showList ∷ [UTxOState era] → ShowS Source #

(EraTxOut era, EraGov era) ⇒ FromCBOR (UTxOState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

fromCBORDecoder s (UTxOState era) Source #

labelProxy (UTxOState era) → Text Source #

(EraTxOut era, EraGov era) ⇒ ToCBOR (UTxOState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

toCBORUTxOState era → Encoding Source #

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

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

(EraTxOut era, EraGov era) ⇒ DecShareCBOR (UTxOState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Associated Types

type Share (UTxOState era) Source #

(EraTxOut era, EncCBOR (GovState era)) ⇒ EncCBOR (UTxOState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

encCBORUTxOState era → Encoding Source #

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

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

EraGov era ⇒ Default (UTxOState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

defUTxOState era Source #

(EraTxOut era, NFData (GovState era)) ⇒ NFData (UTxOState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

rnfUTxOState era → () Source #

(EraTxOut era, Eq (GovState era)) ⇒ Eq (UTxOState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

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

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

(NoThunks (UTxO era), NoThunks (GovState era), Era era) ⇒ NoThunks (UTxOState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

type Rep (UTxOState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

type Rep (UTxOState era) = D1 ('MetaData "UTxOState" "Cardano.Ledger.Shelley.LedgerState.Types" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "UTxOState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "utxosUtxo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (UTxO era)) :*: (S1 ('MetaSel ('Just "utxosDeposited") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin) :*: S1 ('MetaSel ('Just "utxosFees") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))) :*: (S1 ('MetaSel ('Just "utxosGovState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (GovState era)) :*: (S1 ('MetaSel ('Just "utxosStakeDistr") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IncrementalStake) :*: S1 ('MetaSel ('Just "utxosDonation") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin)))))
type Share (UTxOState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

smartUTxOStateEraTxOut era ⇒ PParams era → UTxO era → CoinCoinGovState era → CoinUTxOState era Source #

A valid (or self-consistent) UTxOState{utxosUtxo, utxosDeposited , utxosFees , utxosPpups , utxosStakeDistr} maintains an invariant between the utxosUtxo and utxosStakeDistr fields. the utxosStakeDistr field is the aggregation of Coin over the StakeReferences in the UTxO. It can be computed by a pure function from the _utxo field. In some situations, mostly unit or example tests, or when initializing a small UTxO, we want to create a UTxOState that computes the utxosStakeDistr from the utxosUtxo. This is aways safe to do, but if the utxosUtxo field is big, this can be very expensive, which defeats the purpose of memoizing the utxosStakeDistr field. So use of this function should be restricted to tests and initializations, where the invariant should be maintained.

TO IncrementalStake

data IncrementalStake Source #

Incremental Stake, Stake along with possible missed coins from danging Ptrs. Transactions can use Ptrs to refer to a stake credential in a TxOut. The Ptr does not have to point to anything until the epoch boundary, when we compute rewards and aggregate staking information for ranking. This is unusual but legal. In a non incremental system, we use whatever legal Ptrs exist at the epoch boundary. Here we are computing things incrementally, so we need to remember Ptrs that might point to something by the time the epoch boundary is reached. When the epoch boundary is reached we resolve these pointers, to see if any have become non-dangling since the time they were first used in the incremental computation.

Constructors

IStake 

Instances

Instances details
ToJSON IncrementalStake Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Monoid IncrementalStake Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Semigroup IncrementalStake Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Generic IncrementalStake Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Associated Types

type Rep IncrementalStakeTypeType Source #

Show IncrementalStake Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

DecShareCBOR IncrementalStake Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Associated Types

type Share IncrementalStake Source #

EncCBOR IncrementalStake Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Default IncrementalStake Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

NFData IncrementalStake Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

rnfIncrementalStake → () Source #

Eq IncrementalStake Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Ord IncrementalStake Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Group IncrementalStake Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

NoThunks IncrementalStake Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

type Rep IncrementalStake Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

type Rep IncrementalStake = D1 ('MetaData "IncrementalStake" "Cardano.Ledger.Shelley.LedgerState.Types" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "IStake" 'PrefixI 'True) (S1 ('MetaSel ('Just "credMap") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking) (CompactForm Coin))) :*: S1 ('MetaSel ('Just "ptrMap") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map Ptr (CompactForm Coin)))))
type Share IncrementalStake Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Genesis State

genesisState ∷ ∀ era. EraGov era ⇒ Map (KeyHash 'Genesis) GenDelegPairUTxO era → LedgerState era Source #

Creates the ledger state for an empty ledger which contains the specified transaction outputs.

Validation

consumedEraUTxO era ⇒ PParams era → CertState era → UTxO era → TxBody era → Value era Source #

For eras before Conway, VState is expected to have an empty Map for vsDReps, and so deposit summed up is zero.

producedEraUTxO era ⇒ PParams era → CertState era → TxBody era → Value era Source #

Compute the lovelace which are created by the transaction For eras before Conway, VState is expected to have an empty Map for vsDReps, and so deposit summed up is zero.

DelegationState

payPoolDepositEraPParams era ⇒ KeyHash 'StakePoolPParams era → PState era → PState era Source #

One only pays a deposit on the initial pool registration. So return the the Deposits unchanged if the keyhash already exists. There are legal situations where a pool may be registered multiple times.

totalObligationEraGov era ⇒ CertState era → GovState era → Coin Source #

Epoch boundary

incrementalStakeDistr ∷ ∀ era. EraPParams era ⇒ PParams era → IncrementalStakeDState era → PState era → SnapShot Source #

This computes a Snapshot using IncrementalStake (which is an aggregate of the current UTxO) and UMap (which tracks Coin, SPoolUView, and Ptrs simultaneously). Note that logically: 1) IncrementalStake = (credStake, ptrStake) 2) UMap = (rewards, activeDelegs, ptrmap :: Map ptr cred)

Using this scheme the logic can do 3 things in one go, without touching the UTxO. 1) Resolve Pointers 2) Throw away things not actively delegated 3) Add up the coin

The Stake distribution function (Map cred coin) (the first component of a SnapShot) is defined by this SetAlgebra expression: (dom activeDelegs) ◁ (aggregate+ (credStake ∪ ptrStake ∪ rewards))

We can apply meaning preserving operations to get equivalent expressions

(dom activeDelegs) ◁ (aggregate+ (credStake ∪ ptrStake ∪ rewards)) aggregate+ (dom activeDelegs ◁ (credStake ∪ ptrStake ∪ rewards)) aggregate+ ((dom activeDelegs ◁ credStake) ∪ (dom activeDelegs ◁ ptrStake) ∪ (dom activeDelegs ◁ rewards))

We will compute this in several steps step1 = (dom activeDelegs ◁ credStake) ∪ (dom activeDelegs ◁ ptrStake) step2 = aggregate (dom activeDelegs ◁ rewards) step1 This function has a non-incremental analog, stakeDistr, mosty used in tests, which does use the UTxO.

updateStakeDistributionEraTxOut era ⇒ PParams era → IncrementalStakeUTxO era → UTxO era → IncrementalStake Source #

Incrementally add the inserts utxoAdd and the deletes utxoDel to the IncrementalStake.

applyRUpdEraGov era ⇒ RewardUpdateEpochState era → EpochState era Source #

Apply a RewardUpdate to the EpochState. Does several things 1) Adds reward coins to Rewards component of the UMap field of the DState, for actively delegated Stake 2) Adds to the Treasury of the AccountState for non-actively delegated stake 3) Adds fees to the UTxOState

data FilteredRewards era Source #

Constructors

FilteredRewards 

Fields

Instances

Instances details
NFData (FilteredRewards era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.IncrementalStake

Methods

rnfFilteredRewards era → () Source #

createRUpd ∷ ∀ era. EraGov era ⇒ EpochSizeBlocksMadeEpochState era → CoinActiveSlotCoeffWord64ShelleyBase RewardUpdate Source #

To create a reward update, run all 3 phases This function is not used in the rules, so it ignores RewardEvents

completeRupdPulsingRewUpdateShelleyBase (RewardUpdate, RewardEvent) Source #

Phase 3 of reward update has several parts a) completeM the pulser (in case there are still computions to run) b) Combine the pulser provenance with the RewardProvenance c) Construct the final RewardUpdate d) Add the leader rewards to both the events and the computed Rewards

pulseStepPulsingRewUpdateShelleyBase (PulsingRewUpdate, RewardEvent) Source #

Run the pulser for a bit. If is has nothing left to do, complete it.

data NewEpochState era Source #

New Epoch state and environment

Instances

Instances details
Generic (NewEpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Associated Types

type Rep (NewEpochState era) ∷ TypeType Source #

Methods

fromNewEpochState era → Rep (NewEpochState era) x Source #

toRep (NewEpochState era) x → NewEpochState era Source #

(EraTxOut era, Show (StashedAVVMAddresses era), Show (GovState era)) ⇒ Show (NewEpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

(EraTxOut era, EraGov era, DecCBOR (StashedAVVMAddresses era)) ⇒ FromCBOR (NewEpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

(EraTxOut era, EraGov era, EncCBOR (StashedAVVMAddresses era)) ⇒ ToCBOR (NewEpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

toCBORNewEpochState era → Encoding Source #

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

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

(EraTxOut era, EraGov era, DecCBOR (StashedAVVMAddresses era)) ⇒ DecCBOR (NewEpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

(EraTxOut era, EncCBOR (StashedAVVMAddresses era), EncCBOR (GovState era)) ⇒ EncCBOR (NewEpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

encCBORNewEpochState era → Encoding Source #

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

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

(EraTxOut era, NFData (StashedAVVMAddresses era), NFData (GovState era)) ⇒ NFData (NewEpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

rnfNewEpochState era → () Source #

(EraTxOut era, Eq (StashedAVVMAddresses era), Eq (GovState era)) ⇒ Eq (NewEpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

Methods

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

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

(Era era, NoThunks (EpochState era), NoThunks (StashedAVVMAddresses era)) ⇒ NoThunks (NewEpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

type Rep (NewEpochState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState.Types

stashedAVVMAddressesNewEpochState era → StashedAVVMAddresses era Source #

AVVM addresses to be removed at the end of the Shelley era. Note that the existence of this field is a hack, related to the transition of UTxO to disk. We remove AVVM addresses from the UTxO on the Shelley/Allegra boundary. However, by this point the UTxO will be moved to disk, and hence doing a scan of the UTxO for AVVM addresses will be expensive. Our solution to this is to do a scan of the UTxO on the Byron/Shelley boundary (since Byron UTxO are still on disk), stash the results here, and then remove them at the Shelley/Allegra boundary.

This is very much an awkward implementation hack, and hence we hide it from as many places as possible.

updateNESEraGov era ⇒ NewEpochState era → BlocksMadeLedgerState era → NewEpochState era Source #

Update new epoch state

circulationEpochState era → CoinCoin Source #

Calculate the current circulation

This is used in the rewards calculation, and for API endpoints for pool ranking.

Decay

Remove Bootstrap Redeem Addresses

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.

availableAfterMIRMIRPotAccountStateInstantaneousRewardsCoin Source #

This function returns the coin balance of a given pot, either the reserves or the treasury, after the instantaneous rewards and pot transfers are accounted for.

data ShelleyGovState era Source #

Constructors

ShelleyGovState 

Fields

Instances

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

Defined in Cardano.Ledger.Shelley.Governance

Generic (ShelleyGovState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Governance

Associated Types

type Rep (ShelleyGovState era) ∷ TypeType Source #

(Show (PParamsUpdate era), Show (PParams era)) ⇒ Show (ShelleyGovState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Governance

(Era era, DecCBOR (PParamsUpdate era), DecCBOR (PParams era)) ⇒ FromCBOR (ShelleyGovState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Governance

(Era era, EncCBOR (PParamsUpdate era), EncCBOR (PParams era)) ⇒ ToCBOR (ShelleyGovState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Governance

Methods

toCBORShelleyGovState era → Encoding Source #

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

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

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

Defined in Cardano.Ledger.Shelley.Governance

(Era era, DecCBOR (PParamsUpdate era), DecCBOR (PParams era)) ⇒ DecShareCBOR (ShelleyGovState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Governance

Associated Types

type Share (ShelleyGovState era) Source #

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

Defined in Cardano.Ledger.Shelley.Governance

Methods

encCBORShelleyGovState era → Encoding Source #

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

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

EraPParams era ⇒ Default (ShelleyGovState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Governance

Methods

defShelleyGovState era Source #

(NFData (PParamsUpdate era), NFData (PParams era)) ⇒ NFData (ShelleyGovState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Governance

Methods

rnfShelleyGovState era → () Source #

(Eq (PParamsUpdate era), Eq (PParams era)) ⇒ Eq (ShelleyGovState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Governance

(NoThunks (PParamsUpdate era), NoThunks (PParams era)) ⇒ NoThunks (ShelleyGovState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Governance

type Rep (ShelleyGovState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Governance

type Rep (ShelleyGovState era) = D1 ('MetaData "ShelleyGovState" "Cardano.Ledger.Shelley.Governance" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyGovState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "sgsCurProposals") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProposedPPUpdates era)) :*: S1 ('MetaSel ('Just "sgsFutureProposals") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProposedPPUpdates era))) :*: (S1 ('MetaSel ('Just "sgsCurPParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PParams era)) :*: (S1 ('MetaSel ('Just "sgsPrevPParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PParams era)) :*: S1 ('MetaSel ('Just "sgsFuturePParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (FuturePParams era))))))
type Share (ShelleyGovState era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Governance

type Share (ShelleyGovState era) = ()

Lenses from Types

Lenses from CertState

Lenses from SnapShot(s)