shelley-spec-ledger-0.1.0.0
Safe HaskellNone
LanguageHaskell98

Shelley.Spec.Ledger.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
Eq AccountState Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Show AccountState Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Generic AccountState Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Associated Types

type Rep AccountStateTypeType #

NFData AccountState Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

rnfAccountState → () #

ToCBOR AccountState Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

toCBORAccountStateEncoding Source #

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

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

FromCBOR AccountState Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

NoThunks AccountState Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

noThunks ∷ Context → AccountStateIO (Maybe ThunkInfo)

wNoThunks ∷ Context → AccountStateIO (Maybe ThunkInfo)

showTypeOfProxy AccountStateString

type Rep AccountState Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

type Rep AccountState = D1 ('MetaData "AccountState" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "AccountState" 'PrefixI 'True) (S1 ('MetaSel ('Just "_treasury") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "_reserves") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin)))

data DPState era Source #

The state associated with the current stake delegation.

Constructors

DPState 

Fields

Instances

Instances details
Eq (DPState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

(==)DPState era → DPState era → Bool #

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

Show (DPState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

showsPrecIntDPState era → ShowS #

showDPState era → String #

showList ∷ [DPState era] → ShowS #

Generic (DPState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Associated Types

type Rep (DPState era) ∷ TypeType #

Methods

fromDPState era → Rep (DPState era) x #

toRep (DPState era) x → DPState era #

NFData (DPState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

rnfDPState era → () #

(Era era, AnnotatedData (Script era)) ⇒ ToCBOR (DPState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

toCBORDPState era → Encoding Source #

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

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

(Era era, AnnotatedData (Script era)) ⇒ FromCBOR (DPState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

fromCBORDecoder s (DPState era) Source #

labelProxy (DPState era) → Text Source #

NoThunks (DPState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

showTypeOfProxy (DPState era) → String

type Rep (DPState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

type Rep (DPState era) = D1 ('MetaData "DPState" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "DPState" 'PrefixI 'True) (S1 ('MetaSel ('Just "_dstate") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (DState era)) :*: S1 ('MetaSel ('Just "_pstate") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PState era))))

data DState era Source #

State of staking pool delegations and rewards

Constructors

DState 

Fields

Instances

Instances details
Eq (DState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

Show (DState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

showsPrecIntDState era → ShowS #

showDState era → String #

showList ∷ [DState era] → ShowS #

Generic (DState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Associated Types

type Rep (DState era) ∷ TypeType #

Methods

fromDState era → Rep (DState era) x #

toRep (DState era) x → DState era #

NFData (DState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

rnfDState era → () #

(Era era, AnnotatedData (Script era)) ⇒ ToCBOR (DState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

toCBORDState era → Encoding Source #

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

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

(Era era, AnnotatedData (Script era)) ⇒ FromCBOR (DState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

fromCBORDecoder s (DState era) Source #

labelProxy (DState era) → Text Source #

NoThunks (DState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

showTypeOfProxy (DState era) → String

type Rep (DState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

type Rep (DState era) = D1 ('MetaData "DState" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "DState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_rewards") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (RewardAccounts era)) :*: (S1 ('MetaSel ('Just "_delegations") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking era) (KeyHash 'StakePool (Crypto era)))) :*: S1 ('MetaSel ('Just "_ptrs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Bimap Ptr (Credential 'Staking era))))) :*: (S1 ('MetaSel ('Just "_fGenDelegs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (FutureGenDeleg (Crypto era)) (GenDelegPair (Crypto era)))) :*: (S1 ('MetaSel ('Just "_genDelegs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (GenDelegs (Crypto era))) :*: S1 ('MetaSel ('Just "_irwd") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (InstantaneousRewards era))))))

data EpochState era Source #

Constructors

EpochState 

Fields

Instances

Instances details
ShelleyBased era ⇒ Eq (EpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

ShelleyBased era ⇒ Show (EpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

showsPrecIntEpochState era → ShowS #

showEpochState era → String #

showList ∷ [EpochState era] → ShowS #

Generic (EpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Associated Types

type Rep (EpochState era) ∷ TypeType #

Methods

fromEpochState era → Rep (EpochState era) x #

toRep (EpochState era) x → EpochState era #

Era era ⇒ NFData (EpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

rnfEpochState era → () #

ShelleyBased era ⇒ ToCBOR (EpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

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 #

ShelleyBased era ⇒ FromCBOR (EpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

fromCBORDecoder s (EpochState era) Source #

labelProxy (EpochState era) → Text Source #

NoThunks (EpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

showTypeOfProxy (EpochState era) → String

type Rep (EpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

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

data FutureGenDeleg crypto Source #

Constructors

FutureGenDeleg 

Instances

Instances details
Eq (FutureGenDeleg crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

(==)FutureGenDeleg crypto → FutureGenDeleg crypto → Bool #

(/=)FutureGenDeleg crypto → FutureGenDeleg crypto → Bool #

Ord (FutureGenDeleg crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

compareFutureGenDeleg crypto → FutureGenDeleg crypto → Ordering #

(<)FutureGenDeleg crypto → FutureGenDeleg crypto → Bool #

(<=)FutureGenDeleg crypto → FutureGenDeleg crypto → Bool #

(>)FutureGenDeleg crypto → FutureGenDeleg crypto → Bool #

(>=)FutureGenDeleg crypto → FutureGenDeleg crypto → Bool #

maxFutureGenDeleg crypto → FutureGenDeleg crypto → FutureGenDeleg crypto #

minFutureGenDeleg crypto → FutureGenDeleg crypto → FutureGenDeleg crypto #

Show (FutureGenDeleg crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

showsPrecIntFutureGenDeleg crypto → ShowS #

showFutureGenDeleg crypto → String #

showList ∷ [FutureGenDeleg crypto] → ShowS #

Generic (FutureGenDeleg crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Associated Types

type Rep (FutureGenDeleg crypto) ∷ TypeType #

Methods

fromFutureGenDeleg crypto → Rep (FutureGenDeleg crypto) x #

toRep (FutureGenDeleg crypto) x → FutureGenDeleg crypto #

NFData (FutureGenDeleg crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

rnfFutureGenDeleg crypto → () #

Crypto crypto ⇒ ToCBOR (FutureGenDeleg crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

toCBORFutureGenDeleg crypto → Encoding Source #

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

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

Crypto crypto ⇒ FromCBOR (FutureGenDeleg crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

fromCBORDecoder s (FutureGenDeleg crypto) Source #

labelProxy (FutureGenDeleg crypto) → Text Source #

NoThunks (FutureGenDeleg crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

noThunks ∷ Context → FutureGenDeleg crypto → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → FutureGenDeleg crypto → IO (Maybe ThunkInfo)

showTypeOfProxy (FutureGenDeleg crypto) → String

type Rep (FutureGenDeleg crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

type Rep (FutureGenDeleg crypto) = D1 ('MetaData "FutureGenDeleg" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "FutureGenDeleg" 'PrefixI 'True) (S1 ('MetaSel ('Just "fGenDelegSlot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNo) :*: S1 ('MetaSel ('Just "fGenDelegGenKeyHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'Genesis crypto))))

data InstantaneousRewards era Source #

Constructors

InstantaneousRewards 

Fields

Instances

Instances details
Eq (InstantaneousRewards era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Show (InstantaneousRewards era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Generic (InstantaneousRewards era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Associated Types

type Rep (InstantaneousRewards era) ∷ TypeType #

NFData (InstantaneousRewards era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

rnfInstantaneousRewards era → () #

(Era era, AnnotatedData (Script era)) ⇒ ToCBOR (InstantaneousRewards era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

(Era era, AnnotatedData (Script era)) ⇒ FromCBOR (InstantaneousRewards era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

NoThunks (InstantaneousRewards era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

showTypeOfProxy (InstantaneousRewards era) → String

type Rep (InstantaneousRewards era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

type Rep (InstantaneousRewards era) = D1 ('MetaData "InstantaneousRewards" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "InstantaneousRewards" 'PrefixI 'True) (S1 ('MetaSel ('Just "iRReserves") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking era) Coin)) :*: S1 ('MetaSel ('Just "iRTreasury") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking era) Coin))))

type KeyPairs era = [(KeyPair 'Payment era, KeyPair 'Staking era)] Source #

Representation of a list of pairs of key pairs, e.g., pay and stake keys

data LedgerState era Source #

The state associated with a Ledger.

Constructors

LedgerState 

Fields

Instances

Instances details
ShelleyBased era ⇒ Eq (LedgerState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

ShelleyBased era ⇒ Show (LedgerState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

showsPrecIntLedgerState era → ShowS #

showLedgerState era → String #

showList ∷ [LedgerState era] → ShowS #

Generic (LedgerState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Associated Types

type Rep (LedgerState era) ∷ TypeType #

Methods

fromLedgerState era → Rep (LedgerState era) x #

toRep (LedgerState era) x → LedgerState era #

Era era ⇒ NFData (LedgerState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

rnfLedgerState era → () #

ShelleyBased era ⇒ ToCBOR (LedgerState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

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 #

ShelleyBased era ⇒ FromCBOR (LedgerState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

NoThunks (LedgerState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

showTypeOfProxy (LedgerState era) → String

type Rep (LedgerState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

type Rep (LedgerState era) = D1 ('MetaData "LedgerState" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "LedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "_utxoState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (UTxOState era)) :*: S1 ('MetaSel ('Just "_delegationState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (DPState era))))

data PPUPState era Source #

Constructors

PPUPState 

Instances

Instances details
Eq (PPUPState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

(==)PPUPState era → PPUPState era → Bool #

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

Show (PPUPState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

showsPrecIntPPUPState era → ShowS #

showPPUPState era → String #

showList ∷ [PPUPState era] → ShowS #

Generic (PPUPState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Associated Types

type Rep (PPUPState era) ∷ TypeType #

Methods

fromPPUPState era → Rep (PPUPState era) x #

toRep (PPUPState era) x → PPUPState era #

NFData (PPUPState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

rnfPPUPState era → () #

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

Defined in Shelley.Spec.Ledger.LedgerState

Methods

toCBORPPUPState era → Encoding Source #

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

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

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

Defined in Shelley.Spec.Ledger.LedgerState

Methods

fromCBORDecoder s (PPUPState era) Source #

labelProxy (PPUPState era) → Text Source #

NoThunks (PPUPState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

showTypeOfProxy (PPUPState era) → String

type Rep (PPUPState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

type Rep (PPUPState era) = D1 ('MetaData "PPUPState" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "PPUPState" 'PrefixI 'True) (S1 ('MetaSel ('Just "proposals") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProposedPPUpdates era)) :*: S1 ('MetaSel ('Just "futureProposals") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProposedPPUpdates era))))

data PState era Source #

Current state of staking pools and their certificate counters.

Constructors

PState 

Fields

Instances

Instances details
Eq (PState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

Show (PState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

showsPrecIntPState era → ShowS #

showPState era → String #

showList ∷ [PState era] → ShowS #

Generic (PState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Associated Types

type Rep (PState era) ∷ TypeType #

Methods

fromPState era → Rep (PState era) x #

toRep (PState era) x → PState era #

NFData (PState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

rnfPState era → () #

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

Defined in Shelley.Spec.Ledger.LedgerState

Methods

toCBORPState era → Encoding Source #

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

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

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

Defined in Shelley.Spec.Ledger.LedgerState

Methods

fromCBORDecoder s (PState era) Source #

labelProxy (PState era) → Text Source #

NoThunks (PState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

showTypeOfProxy (PState era) → String

type Rep (PState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

type Rep (PState era) = D1 ('MetaData "PState" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "PState" 'PrefixI 'True) (S1 ('MetaSel ('Just "_pParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool (Crypto era)) (PoolParams era))) :*: (S1 ('MetaSel ('Just "_fPParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool (Crypto era)) (PoolParams era))) :*: S1 ('MetaSel ('Just "_retiring") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool (Crypto era)) EpochNo)))))

data RewardUpdate era Source #

Constructors

RewardUpdate 

Fields

Instances

Instances details
Eq (RewardUpdate era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

(==)RewardUpdate era → RewardUpdate era → Bool #

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

Show (RewardUpdate era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

showsPrecIntRewardUpdate era → ShowS #

showRewardUpdate era → String #

showList ∷ [RewardUpdate era] → ShowS #

Generic (RewardUpdate era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Associated Types

type Rep (RewardUpdate era) ∷ TypeType #

Methods

fromRewardUpdate era → Rep (RewardUpdate era) x #

toRep (RewardUpdate era) x → RewardUpdate era #

NFData (RewardUpdate era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

rnfRewardUpdate era → () #

(Era era, AnnotatedData (Script era)) ⇒ ToCBOR (RewardUpdate era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

toCBORRewardUpdate era → Encoding Source #

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

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

(Era era, AnnotatedData (Script era)) ⇒ FromCBOR (RewardUpdate era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

NoThunks (RewardUpdate era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

showTypeOfProxy (RewardUpdate era) → String

type Rep (RewardUpdate era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

type Rep (RewardUpdate era) = D1 ('MetaData "RewardUpdate" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "RewardUpdate" 'PrefixI 'True) ((S1 ('MetaSel ('Just "deltaT") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "deltaR") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeltaCoin)) :*: (S1 ('MetaSel ('Just "rs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking era) Coin)) :*: (S1 ('MetaSel ('Just "deltaF") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeltaCoin) :*: S1 ('MetaSel ('Just "nonMyopic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonMyopic era))))))

data UTxOState era Source #

Constructors

UTxOState 

Fields

Instances

Instances details
ShelleyBased era ⇒ Eq (UTxOState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

ShelleyBased era ⇒ Show (UTxOState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

showsPrecIntUTxOState era → ShowS #

showUTxOState era → String #

showList ∷ [UTxOState era] → ShowS #

Generic (UTxOState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Associated Types

type Rep (UTxOState era) ∷ TypeType #

Methods

fromUTxOState era → Rep (UTxOState era) x #

toRep (UTxOState era) x → UTxOState era #

Era era ⇒ NFData (UTxOState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

rnfUTxOState era → () #

ShelleyBased era ⇒ ToCBOR (UTxOState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

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 #

ShelleyBased era ⇒ FromCBOR (UTxOState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

fromCBORDecoder s (UTxOState era) Source #

labelProxy (UTxOState era) → Text Source #

NoThunks (UTxOState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

showTypeOfProxy (UTxOState era) → String

type Rep (UTxOState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

type Rep (UTxOState era) = D1 ('MetaData "UTxOState" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "UTxOState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_utxo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (UTxO era)) :*: S1 ('MetaSel ('Just "_deposited") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin)) :*: (S1 ('MetaSel ('Just "_fees") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "_ppups") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PPUPState era)))))

depositPoolChangeHasField "certs" (TxBody era) (StrictSeq (DCert era)) ⇒ LedgerState era → PParams era → TxBody era → Coin Source #

Calculate the change to the deposit pool for a given transaction.

updatePpupUTxOState era → PParams era → UTxOState era Source #

Update the protocol parameter updates by clearing out the proposals and making the future proposals become the new proposals, provided the new proposals can follow (otherwise reset them).

state transitions

Genesis State

genesisStateMap (KeyHash 'Genesis (Crypto era)) (GenDelegPair (Crypto era)) → UTxO era → LedgerState era Source #

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

Validation

newtype WitHashes era Source #

Constructors

WitHashes 

Fields

Instances

Instances details
Eq (WitHashes era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

(==)WitHashes era → WitHashes era → Bool #

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

Show (WitHashes era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

showsPrecIntWitHashes era → ShowS #

showWitHashes era → String #

showList ∷ [WitHashes era] → ShowS #

Generic (WitHashes era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Associated Types

type Rep (WitHashes era) ∷ TypeType #

Methods

fromWitHashes era → Rep (WitHashes era) x #

toRep (WitHashes era) x → WitHashes era #

Era era ⇒ NoThunks (WitHashes era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

showTypeOfProxy (WitHashes era) → String

type Rep (WitHashes era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

type Rep (WitHashes era) = D1 ('MetaData "WitHashes" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-inplace" 'True) (C1 ('MetaCons "WitHashes" 'PrefixI 'True) (S1 ('MetaSel ('Just "unWitHashes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set (KeyHash 'Witness (Crypto era))))))

nullWitHashesWitHashes era → Bool Source #

Check if a set of witness hashes is empty.

diffWitHashesWitHashes era → WitHashes era → WitHashes era Source #

Extract the difference between two sets of witness hashes.

minfeePParams era → Tx era → Coin Source #

Minimum fee calculation

minfeeBound ∷ ∀ era. (ShelleyBased era, HasField "outputs" (TxBody era) (StrictSeq (TxOut era)), HasField "inputs" (TxBody era) (Set (TxIn era))) ⇒ PParams era → Tx era → Coin Source #

Minimum fee bound using txsizeBound

txsizeTx era → Integer Source #

Implementation of abstract transaction size

txsizeBound ∷ ∀ era. (ShelleyBased era, HasField "outputs" (TxBody era) (StrictSeq (TxOut era)), HasField "inputs" (TxBody era) (Set (TxIn era))) ⇒ Tx era → Integer Source #

Convenience Function to bound the txsize function. | It can be helpful for coin selection.

produced ∷ (ShelleyBased era, HasField "certs" (TxBody era) (StrictSeq (DCert era)), HasField "outputs" (TxBody era) (StrictSeq (TxOut era)), HasField "txfee" (TxBody era) Coin) ⇒ PParams era → Map (KeyHash 'StakePool (Crypto era)) (PoolParams era) → TxBody era → Value era Source #

Compute the lovelace which are created by the transaction

consumed ∷ (ShelleyBased era, HasField "certs" (TxBody era) (StrictSeq (DCert era)), HasField "inputs" (TxBody era) (Set (TxIn era)), HasField "wdrls" (TxBody era) (Wdrl era)) ⇒ PParams era → UTxO era → TxBody era → Value era Source #

Compute the lovelace which are destroyed by the transaction TODO this is only correct for Shelley!

verifiedWits ∷ (TxBodyConstraints era, AnnotatedData (Script era), DSignable (Crypto era) (Hash (Crypto era) EraIndependentTxBody)) ⇒ Tx era → Either [VKey 'Witness (Crypto era)] () Source #

Given a ledger state, determine if the UTxO witnesses in a given transaction are correct.

witsVKeyNeeded ∷ ∀ era. (ShelleyBased era, HasField "wdrls" (TxBody era) (Wdrl era), HasField "certs" (TxBody era) (StrictSeq (DCert era)), HasField "inputs" (TxBody era) (Set (TxIn era)), HasField "update" (TxBody era) (StrictMaybe (Update era))) ⇒ UTxO era → Tx era → GenDelegs (Crypto era) → WitHashes era Source #

Collect the set of hashes of keys that needs to sign a given transaction. This set consists of the txin owners, certificate authors, and withdrawal reward accounts.

witsFromWitnessSet ∷ (Era era, AnnotatedData (Script era)) ⇒ WitnessSet era → WitHashes era Source #

Extract the witness hashes from the Witness set.

DelegationState

keyRefundsHasField "certs" (TxBody era) (StrictSeq (DCert era)) ⇒ PParams era → TxBody era → Coin Source #

Compute the key deregistration refunds in a transaction

Epoch boundary

stakeDistr ∷ ∀ era. ShelleyBased era ⇒ UTxO era → DState era → PState era → SnapShot era Source #

applyRUpdRewardUpdate era → EpochState era → EpochState era Source #

Apply a reward update

createRUpdEpochSizeBlocksMade era → EpochState era → CoinShelleyBase (RewardUpdate era) Source #

Create a reward update

data NewEpochState era Source #

New Epoch state and environment

Constructors

NewEpochState 

Fields

Instances

Instances details
ShelleyBased era ⇒ Eq (NewEpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

ShelleyBased era ⇒ Show (NewEpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

showsPrecIntNewEpochState era → ShowS #

showNewEpochState era → String #

showList ∷ [NewEpochState era] → ShowS #

Generic (NewEpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Associated Types

type Rep (NewEpochState era) ∷ TypeType #

Methods

fromNewEpochState era → Rep (NewEpochState era) x #

toRep (NewEpochState era) x → NewEpochState era #

Era era ⇒ NFData (NewEpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

rnfNewEpochState era → () #

ShelleyBased era ⇒ ToCBOR (NewEpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

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 #

ShelleyBased era ⇒ FromCBOR (NewEpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

NoThunks (NewEpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

Methods

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

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

showTypeOfProxy (NewEpochState era) → String

type Rep (NewEpochState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.LedgerState

type Rep (NewEpochState era) = D1 ('MetaData "NewEpochState" "Shelley.Spec.Ledger.LedgerState" "shelley-spec-ledger-0.1.0.0-inplace" 'False) (C1 ('MetaCons "NewEpochState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "nesEL") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochNo) :*: (S1 ('MetaSel ('Just "nesBprev") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (BlocksMade era)) :*: S1 ('MetaSel ('Just "nesBcur") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (BlocksMade era)))) :*: (S1 ('MetaSel ('Just "nesEs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (EpochState era)) :*: (S1 ('MetaSel ('Just "nesRu") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictMaybe (RewardUpdate era))) :*: S1 ('MetaSel ('Just "nesPd") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PoolDistr (Crypto era)))))))

updateNESNewEpochState era → BlocksMade era → LedgerState 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