ouroboros-consensus:cardano
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Shelley.Ledger.Ledger

Synopsis

Documentation

data family LedgerState blk (mk ∷ MapKind) Source #

Ledger state associated with a block

This is the Consensus notion of a Ledger ledger state. Each block type is associated with one of the Ledger types for the ledger state. Virtually every concept in this codebase revolves around this type, or the referenced blk. Whenever we use the type variable l we intend to signal that the expected instantiation is either a LedgerState or some wrapper over it (like the ExtLedgerState).

This type is parametrized over mk :: MapKind to express the LedgerTables contained in such a LedgerState. See LedgerTables for a more thorough description.

The main operations we can do with a LedgerState are ticking (defined in IsLedger), and applying a block (defined in ApplyBlock).

Instances

Instances details
ApplyBlock LedgerState ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

IsLedger LedgerState ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

CanUpgradeLedgerTables LedgerState ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

HasLedgerTables LedgerState ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

LedgerTablesAreTrivial LedgerState ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

convertMapKind ∷ ∀ (mk ∷ MapKind) (mk' ∷ MapKind). LedgerState ByronBlock mk → LedgerState ByronBlock mk' Source #

SerializeTablesWithHint LedgerState ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

IndexedMemPack LedgerState ByronBlock Void Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

(CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ ApplyBlock LedgerState (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

CanHardFork xs ⇒ IsLedger LedgerState (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

(CanHardFork xs, HasHardForkTxOut xs) ⇒ CanUpgradeLedgerTables LedgerState (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

(CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ HasLedgerTables LedgerState (HardForkBlock xs) Source #

Warning: projectLedgerTables and withLedgerTables are prohibitively expensive when using big tables or when used multiple times. See the TxOut instance for the HardForkBlock for more information.

Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

CardanoHardForkConstraints c ⇒ SerializeTablesWithHint LedgerState (HardForkBlock (CardanoEras c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Cardano.Ledger

SerializeTablesWithHint LedgerState (HardForkBlock '[ByronBlock]) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.ByronHFC

ShelleyCompatible proto era ⇒ SerializeTablesWithHint LedgerState (HardForkBlock '[ShelleyBlock proto era]) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.ShelleyHFC

IndexedMemPack LedgerState (HardForkBlock '[ByronBlock]) Void Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.ByronHFC

(txout ~ TxOut era, MemPack txout) ⇒ IndexedMemPack LedgerState (HardForkBlock '[ShelleyBlock proto era]) txout Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.ShelleyHFC

CardanoHardForkConstraints c ⇒ IndexedMemPack LedgerState (HardForkBlock (CardanoEras c)) (CardanoTxOut c) Source # 
Instance details

Defined in Ouroboros.Consensus.Cardano.Ledger

Bridge m a ⇒ ApplyBlock LedgerState (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

ShelleyCompatible proto era ⇒ ApplyBlock LedgerState (ShelleyBlock proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Bridge m a ⇒ IsLedger LedgerState (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Associated Types

type LedgerErr LedgerState (DualBlock m a) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

ShelleyBasedEra era ⇒ IsLedger LedgerState (ShelleyBlock proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Associated Types

type LedgerErr LedgerState (ShelleyBlock proto era) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

CanUpgradeLedgerTables LedgerState (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

upgradeTables ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). LedgerState (DualBlock m a) mk1 → LedgerState (DualBlock m a) mk2 → LedgerTables (DualBlock m a) ValuesMK → LedgerTables (DualBlock m a) ValuesMK Source #

CanUpgradeLedgerTables LedgerState (ShelleyBlock proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Methods

upgradeTables ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). LedgerState (ShelleyBlock proto era) mk1 → LedgerState (ShelleyBlock proto era) mk2 → LedgerTables (ShelleyBlock proto era) ValuesMK → LedgerTables (ShelleyBlock proto era) ValuesMK Source #

(Bridge m a, HasLedgerTables LedgerState m) ⇒ HasLedgerTables LedgerState (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (DualBlock m a) mk → LedgerTables (DualBlock m a) mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (DualBlock m a) any → LedgerTables (DualBlock m a) mk → LedgerState (DualBlock m a) mk Source #

ShelleyBasedEra era ⇒ HasLedgerTables LedgerState (ShelleyBlock proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (ShelleyBlock proto era) mk → LedgerTables (ShelleyBlock proto era) mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (ShelleyBlock proto era) any → LedgerTables (ShelleyBlock proto era) mk → LedgerState (ShelleyBlock proto era) mk Source #

(Ord (TxIn m), MemPack (TxIn m), MemPack (TxOut m)) ⇒ SerializeTablesWithHint LedgerState (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

ShelleyCompatible proto era ⇒ SerializeTablesWithHint LedgerState (ShelleyBlock proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

DecodeDisk ByronBlock (LedgerState ByronBlock mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

EncodeDisk ByronBlock (LedgerState ByronBlock mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

(txout ~ TxOut m, IndexedMemPack LedgerState m txout) ⇒ IndexedMemPack LedgerState (DualBlock m a) txout Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

(txout ~ TxOut era, MemPack txout) ⇒ IndexedMemPack LedgerState (ShelleyBlock proto era) txout Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Methods

indexedPackedByteCount ∷ LedgerState (ShelleyBlock proto era) EmptyMK → txout → Int Source #

indexedPackM ∷ LedgerState (ShelleyBlock proto era) EmptyMK → txout → Pack s () Source #

indexedUnpackM ∷ Buffer b ⇒ ∀ s. LedgerState (ShelleyBlock proto era) EmptyMK → Unpack s b txout Source #

indexedTypeName ∷ Proxy txout → LedgerState (ShelleyBlock proto era) EmptyMK → String Source #

(ShelleyBasedEra era, ShelleyBasedEra (PreviousEra era), TranslateEra era (ShelleyTip proto), TranslateEra era NewEpochState, TranslationError era NewEpochState ~ Void, CanMapMK mk, CanMapKeysMK mk) ⇒ TranslateEra era (Flip LedgerState mk :.: ShelleyBlock proto) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.ShelleyHFC

Associated Types

type TranslationError era (Flip LedgerState mk :.: ShelleyBlock proto) 
Instance details

Defined in Ouroboros.Consensus.Shelley.ShelleyHFC

CanHardFork xs ⇒ GetTip (LedgerState (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Methods

getTip ∷ ∀ (mk ∷ MapKind). LedgerState (HardForkBlock xs) mk → Point (LedgerState (HardForkBlock xs)) Source #

Bridge m a ⇒ GetTip (LedgerState (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

getTip ∷ ∀ (mk ∷ MapKind). LedgerState (DualBlock m a) mk → Point (LedgerState (DualBlock m a)) Source #

GetTip (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

GetTip (LedgerState (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Methods

getTip ∷ ∀ (mk ∷ MapKind). LedgerState (ShelleyBlock proto era) mk → Point (LedgerState (ShelleyBlock proto era)) Source #

CanHardFork xs ⇒ LedgerStateSupportsPeras (LedgerState (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

LedgerStateSupportsPeras (LedgerState (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

LedgerStateSupportsPeras (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

LedgerStateSupportsPeras (LedgerState (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

All (Compose CanStowLedgerTables LedgerState) xs ⇒ CanStowLedgerTables (LedgerState (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

CanStowLedgerTables (LedgerState m) ⇒ CanStowLedgerTables (LedgerState (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanStowLedgerTables (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

ShelleyBasedEra era ⇒ CanStowLedgerTables (LedgerState (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

SerialiseHFC xs ⇒ DecodeDisk (HardForkBlock xs) (LedgerState (HardForkBlock xs) EmptyMK) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

SerialiseHFC xs ⇒ EncodeDisk (HardForkBlock xs) (LedgerState (HardForkBlock xs) EmptyMK) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

(EqMK mk, CanHardFork xs) ⇒ Eq (LedgerState (HardForkBlock xs) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

(Bridge m a, EqMK mk) ⇒ Eq (LedgerState (DualBlock m a) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

(==) ∷ LedgerState (DualBlock m a) mk → LedgerState (DualBlock m a) mk → Bool #

(/=) ∷ LedgerState (DualBlock m a) mk → LedgerState (DualBlock m a) mk → Bool #

Eq (LedgerState ByronBlock mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

(ShelleyBasedEra era, EqMK mk) ⇒ Eq (LedgerState (ShelleyBlock proto era) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Methods

(==) ∷ LedgerState (ShelleyBlock proto era) mk → LedgerState (ShelleyBlock proto era) mk → Bool #

(/=) ∷ LedgerState (ShelleyBlock proto era) mk → LedgerState (ShelleyBlock proto era) mk → Bool #

Generic (LedgerState ByronBlock mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Associated Types

type Rep (LedgerState ByronBlock mk) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type Rep (LedgerState ByronBlock mk) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "ByronLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "byronLedgerTipBlockNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin BlockNo)) :*: (S1 ('MetaSel ('Just "byronLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainValidationState) :*: S1 ('MetaSel ('Just "byronLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByronTransition))))
Generic (LedgerState (ShelleyBlock proto era) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Associated Types

type Rep (LedgerState (ShelleyBlock proto era) mk) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (LedgerState (ShelleyBlock proto era) mk) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "ShelleyLedgerState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "shelleyLedgerTip") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin (ShelleyTip proto era))) :*: S1 ('MetaSel ('Just "shelleyLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NewEpochState era))) :*: (S1 ('MetaSel ('Just "shelleyLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ShelleyTransition) :*: S1 ('MetaSel ('Just "shelleyLedgerTables") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LedgerTables (ShelleyBlock proto era) mk)))))

Methods

from ∷ LedgerState (ShelleyBlock proto era) mk → Rep (LedgerState (ShelleyBlock proto era) mk) x #

to ∷ Rep (LedgerState (ShelleyBlock proto era) mk) x → LedgerState (ShelleyBlock proto era) mk #

(ShowMK mk, CanHardFork xs) ⇒ Show (LedgerState (HardForkBlock xs) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

(Bridge m a, ShowMK mk) ⇒ Show (LedgerState (DualBlock m a) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showsPrec ∷ Int → LedgerState (DualBlock m a) mk → ShowS #

show ∷ LedgerState (DualBlock m a) mk → String #

showList ∷ [LedgerState (DualBlock m a) mk] → ShowS #

Show (LedgerState ByronBlock mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

(ShelleyBasedEra era, ShowMK mk) ⇒ Show (LedgerState (ShelleyBlock proto era) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Methods

showsPrec ∷ Int → LedgerState (ShelleyBlock proto era) mk → ShowS #

show ∷ LedgerState (ShelleyBlock proto era) mk → String #

showList ∷ [LedgerState (ShelleyBlock proto era) mk] → ShowS #

(NoThunksMK mk, CanHardFork xs) ⇒ NoThunks (LedgerState (HardForkBlock xs) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

NoThunks (LedgerState (DualBlock m a) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

NoThunks (LedgerState ByronBlock mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

(ShelleyBasedEra era, NoThunksMK mk) ⇒ NoThunks (LedgerState (ShelleyBlock proto era) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

HasLedgerTables (Ticked LedgerState) ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

LedgerTablesAreTrivial (Ticked LedgerState) ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

(CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ HasLedgerTables (Ticked LedgerState) (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

StandardHash blk ⇒ StandardHash (LedgerState blk ∷ MapKind → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

(Bridge m a, HasLedgerTables (Ticked LedgerState) m) ⇒ HasLedgerTables (Ticked LedgerState) (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (DualBlock m a) mk → LedgerTables (DualBlock m a) mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (DualBlock m a) any → LedgerTables (DualBlock m a) mk → Ticked LedgerState (DualBlock m a) mk Source #

ShelleyBasedEra era ⇒ HasLedgerTables (Ticked LedgerState) (ShelleyBlock proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (ShelleyBlock proto era) mk → LedgerTables (ShelleyBlock proto era) mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (ShelleyBlock proto era) any → LedgerTables (ShelleyBlock proto era) mk → Ticked LedgerState (ShelleyBlock proto era) mk Source #

ShelleyCompatible proto era ⇒ DecodeDisk (ShelleyBlock proto era) (LedgerState (ShelleyBlock proto era) EmptyMK) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

Methods

decodeDisk ∷ CodecConfig (ShelleyBlock proto era) → ∀ s. Decoder s (LedgerState (ShelleyBlock proto era) EmptyMK) Source #

ShelleyCompatible proto era ⇒ EncodeDisk (ShelleyBlock proto era) (LedgerState (ShelleyBlock proto era) EmptyMK) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

CanHardFork xs ⇒ GetTip (Ticked LedgerState (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Bridge m a ⇒ GetTip (Ticked LedgerState (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (DualBlock m a) mk → Point (Ticked LedgerState (DualBlock m a)) Source #

GetTip (Ticked LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

GetTip (Ticked LedgerState (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Methods

getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (ShelleyBlock proto era) mk → Point (Ticked LedgerState (ShelleyBlock proto era)) Source #

CanHardFork xs ⇒ LedgerStateSupportsPeras (Ticked LedgerState (HardForkBlock xs)) Source #

LedgerStateSupportsPeras for the ticked hard fork ledger state, mirroring the instance for the unticked ledger state in Ouroboros.Consensus.HardFork.Combinator.Basics.

Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

LedgerStateSupportsPeras (Ticked LedgerState (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

LedgerStateSupportsPeras (Ticked LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

LedgerStateSupportsPeras (Ticked LedgerState (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

ShelleyBasedEra era ⇒ CanStowLedgerTables (Ticked LedgerState (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Generic (Ticked LedgerState ByronBlock mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Associated Types

type Rep (Ticked LedgerState ByronBlock mk) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type Rep (Ticked LedgerState ByronBlock mk) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "TickedByronLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "tickedByronLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainValidationState) :*: S1 ('MetaSel ('Just "untickedByronLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByronTransition)))
Generic (Ticked LedgerState (ShelleyBlock proto era) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Associated Types

type Rep (Ticked LedgerState (ShelleyBlock proto era) mk) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (Ticked LedgerState (ShelleyBlock proto era) mk) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "TickedShelleyLedgerState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "untickedShelleyLedgerTip") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin (ShelleyTip proto era))) :*: S1 ('MetaSel ('Just "tickedShelleyLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ShelleyTransition)) :*: (S1 ('MetaSel ('Just "tickedShelleyLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NewEpochState era)) :*: S1 ('MetaSel ('Just "tickedShelleyLedgerTables") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LedgerTables (ShelleyBlock proto era) mk)))))

Methods

from ∷ Ticked LedgerState (ShelleyBlock proto era) mk → Rep (Ticked LedgerState (ShelleyBlock proto era) mk) x #

to ∷ Rep (Ticked LedgerState (ShelleyBlock proto era) mk) x → Ticked LedgerState (ShelleyBlock proto era) mk #

NoThunks (Ticked LedgerState (DualBlock m a) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

NoThunks (Ticked LedgerState ByronBlock mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Inject (Flip LedgerState mk) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). (CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ InjectionIndex xs x → Flip LedgerState mk x → Flip LedgerState mk (HardForkBlock xs) Source #

Isomorphic (Flip LedgerState mk) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Methods

project ∷ NoHardForks blk ⇒ Flip LedgerState mk (HardForkBlock '[blk]) → Flip LedgerState mk blk Source #

inject ∷ NoHardForks blk ⇒ Flip LedgerState mk blk → Flip LedgerState mk (HardForkBlock '[blk]) Source #

data LedgerState ByronBlock mk Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type LedgerCfg LedgerState ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type LedgerErr LedgerState ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type LedgerCfg LedgerState (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type LedgerErr LedgerState (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type LedgerCfg LedgerState (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type LedgerCfg LedgerState (ShelleyBlock proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type LedgerErr LedgerState (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type LedgerErr LedgerState (ShelleyBlock proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type TranslationError era (Flip LedgerState mk :.: ShelleyBlock proto) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.ShelleyHFC

newtype LedgerState (HardForkBlock xs) mk Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type Rep (LedgerState ByronBlock mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type Rep (LedgerState ByronBlock mk) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "ByronLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "byronLedgerTipBlockNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin BlockNo)) :*: (S1 ('MetaSel ('Just "byronLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainValidationState) :*: S1 ('MetaSel ('Just "byronLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByronTransition))))
type Rep (LedgerState (ShelleyBlock proto era) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (LedgerState (ShelleyBlock proto era) mk) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "ShelleyLedgerState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "shelleyLedgerTip") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin (ShelleyTip proto era))) :*: S1 ('MetaSel ('Just "shelleyLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NewEpochState era))) :*: (S1 ('MetaSel ('Just "shelleyLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ShelleyTransition) :*: S1 ('MetaSel ('Just "shelleyLedgerTables") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LedgerTables (ShelleyBlock proto era) mk)))))
data LedgerState (DualBlock m a) mk Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data LedgerState (ShelleyBlock proto era) mk Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

data Ticked LedgerState ByronBlock (mk ∷ MapKind) Source #

The ticked Byron ledger state

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

data Ticked LedgerState (HardForkBlock xs ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

data Ticked LedgerState (DualBlock m a ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data Ticked LedgerState (ShelleyBlock proto era ∷ Type) (mk ∷ MapKind) Source #

Ticking only affects the state itself

Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type HeaderHash (LedgerState blk ∷ MapKind → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

type HeaderHash (LedgerState blk ∷ MapKind → Type) = HeaderHash blk
type Rep (Ticked LedgerState ByronBlock mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type Rep (Ticked LedgerState ByronBlock mk) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "TickedByronLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "tickedByronLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainValidationState) :*: S1 ('MetaSel ('Just "untickedByronLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByronTransition)))
type Rep (Ticked LedgerState (ShelleyBlock proto era) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (Ticked LedgerState (ShelleyBlock proto era) mk) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "TickedShelleyLedgerState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "untickedShelleyLedgerTip") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin (ShelleyTip proto era))) :*: S1 ('MetaSel ('Just "tickedShelleyLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ShelleyTransition)) :*: (S1 ('MetaSel ('Just "tickedShelleyLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NewEpochState era)) :*: S1 ('MetaSel ('Just "tickedShelleyLedgerTables") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LedgerTables (ShelleyBlock proto era) mk)))))

newtype LedgerTables blk (mk ∷ MapKind) Source #

The Ledger Tables represent the portion of the data on disk that has been pulled from disk and attached to the in-memory Ledger State or that will eventually be written to disk.

With UTxO-HD and the split of the Ledger ledger state into the in-memory part and the on-disk part, this splitting was reflected in the new type parameter added to the (Consensus) LedgerState, to which we refer as "the MapKind" or mk.

Every LedgerState (or LedgerState-like type, such as the ExtLedgerState) is associated with a LedgerTables and they both share the mk. They both are of kind LedgerStateKind. LedgerTables is just a way to refer only to a partial view of the on-disk data without having the rest of the in-memory LedgerState in scope.

The mk can be instantiated to anything that is map-like, i.e. that expects two type parameters, the key and the value.

Constructors

LedgerTables 

Fields

Instances

Instances details
(∀ k v. LedgerTableConstraints' l k v ⇒ Monoid (mk k v), LedgerTableConstraints l) ⇒ Monoid (LedgerTables l mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Combinators

Methods

mempty ∷ LedgerTables l mk #

mappend ∷ LedgerTables l mk → LedgerTables l mk → LedgerTables l mk #

mconcat ∷ [LedgerTables l mk] → LedgerTables l mk #

(∀ k v. LedgerTableConstraints' blk k v ⇒ Semigroup (mk k v), LedgerTableConstraints blk) ⇒ Semigroup (LedgerTables blk mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Combinators

Methods

(<>) ∷ LedgerTables blk mk → LedgerTables blk mk → LedgerTables blk mk #

sconcat ∷ NonEmpty (LedgerTables blk mk) → LedgerTables blk mk #

stimes ∷ Integral b ⇒ b → LedgerTables blk mk → LedgerTables blk mk #

Eq (mk (TxIn blk) (TxOut blk)) ⇒ Eq (LedgerTables blk mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

Methods

(==) ∷ LedgerTables blk mk → LedgerTables blk mk → Bool #

(/=) ∷ LedgerTables blk mk → LedgerTables blk mk → Bool #

Generic (LedgerTables blk mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

Associated Types

type Rep (LedgerTables blk mk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

type Rep (LedgerTables blk mk) = D1 ('MetaData "LedgerTables" "Ouroboros.Consensus.Ledger.Tables.Basics" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "LedgerTables" 'PrefixI 'True) (S1 ('MetaSel ('Just "getLedgerTables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mk (TxIn blk) (TxOut blk)))))

Methods

from ∷ LedgerTables blk mk → Rep (LedgerTables blk mk) x #

to ∷ Rep (LedgerTables blk mk) x → LedgerTables blk mk #

Show (mk (TxIn blk) (TxOut blk)) ⇒ Show (LedgerTables blk mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

Methods

showsPrec ∷ Int → LedgerTables blk mk → ShowS #

show ∷ LedgerTables blk mk → String #

showList ∷ [LedgerTables blk mk] → ShowS #

NoThunks (mk (TxIn blk) (TxOut blk)) ⇒ NoThunks (LedgerTables blk mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

type Rep (LedgerTables blk mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

type Rep (LedgerTables blk mk) = D1 ('MetaData "LedgerTables" "Ouroboros.Consensus.Ledger.Tables.Basics" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "LedgerTables" 'PrefixI 'True) (S1 ('MetaSel ('Just "getLedgerTables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mk (TxIn blk) (TxOut blk)))))

class (EraBlockBody era, EraGov era, ApplyTx era, ApplyTick era, EraTransition era, EraForecast era, NoThunks (StashedAVVMAddresses era), EncCBOR (StashedAVVMAddresses era), DecCBOR (StashedAVVMAddresses era), Show (StashedAVVMAddresses era), Eq (StashedAVVMAddresses era), DecCBOR (PredicateFailure (EraRule "LEDGER" era)), EncCBOR (PredicateFailure (EraRule "LEDGER" era)), DecCBOR (PredicateFailure (EraRule "UTXOW" era)), EncCBOR (PredicateFailure (EraRule "UTXOW" era)), Eq (PredicateFailure (EraRule "BBODY" era)), Show (PredicateFailure (EraRule "BBODY" era)), NoThunks (TranslationContext era), ToCBOR (TranslationContext era), FromCBOR (TranslationContext era)) ⇒ ShelleyBasedEra era where Source #

Consensus often needs some more functionality than the ledger currently provides.

Either the functionality shouldn't or can't live in the ledger, in which case it can be part and remain part of ShelleyBasedEra. Or, the functionality should live in the ledger, but hasn't yet been added to the ledger, or it hasn't yet been propagated to this repository, in which case it can be added to this class until that is the case.

If this class becomes redundant, We can move it to ledger and re-export it from here.

TODO Currently we include some constraints on the update state which are needed to determine the hard fork point. In the future this should be replaced with an appropriate API - see https://github.com/IntersectMBO/ouroboros-network/issues/2890

Methods

applyShelleyBasedTx ∷ Globals → LedgerEnv era → LedgerState era → WhetherToIntervene → Tx 'TopTx era → Except (ApplyTxError era) (LedgerState era, Validated (Tx 'TopTx era)) Source #

getConwayEraGovDict ∷ proxy era → Maybe (ConwayEraGovDict era) Source #

Whether the era has an instance of ConwayEraGov

mkEraMkMempoolApplyTxError ∷ proxy era → Maybe (Text → ApplyTxError era) Source #

getShelleyEraPerasRoundLength ∷ proxy era → PerasEnabled PerasRoundLength Source #

Retrieve the optionally enabled Peras round length of this epoch.

Defaults to NoPerasEnabled for eras that don't explictily support Peras.

Instances

Instances details
ShelleyBasedEra AllegraEra Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Eras

ShelleyBasedEra AlonzoEra Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Eras

ShelleyBasedEra BabbageEra Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Eras

ShelleyBasedEra ConwayEra Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Eras

ShelleyBasedEra DijkstraEra Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Eras

ShelleyBasedEra MaryEra Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Eras

ShelleyBasedEra ShelleyEra Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Eras

data ShelleyTip proto era Source #

Instances

Instances details
(ShelleyBasedEra era, ShelleyBasedEra (PreviousEra era), Era (PreviousEra era)) ⇒ TranslateEra era (ShelleyTip proto) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.ShelleyHFC

Associated Types

type TranslationError era (ShelleyTip proto) 
Instance details

Defined in Ouroboros.Consensus.Shelley.ShelleyHFC

type TranslationError era (ShelleyTip proto) = Void

Methods

translateEra ∷ TranslationContext era → ShelleyTip proto (PreviousEra era) → Except (TranslationError era (ShelleyTip proto)) (ShelleyTip proto era) Source #

Eq (ShelleyTip proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Methods

(==) ∷ ShelleyTip proto era → ShelleyTip proto era → Bool #

(/=) ∷ ShelleyTip proto era → ShelleyTip proto era → Bool #

Generic (ShelleyTip proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Associated Types

type Rep (ShelleyTip proto era) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (ShelleyTip proto era) = D1 ('MetaData "ShelleyTip" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "ShelleyTip" 'PrefixI 'True) (S1 ('MetaSel ('Just "shelleyTipSlotNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNo) :*: (S1 ('MetaSel ('Just "shelleyTipBlockNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlockNo) :*: S1 ('MetaSel ('Just "shelleyTipHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HeaderHash (ShelleyBlock proto era))))))

Methods

from ∷ ShelleyTip proto era → Rep (ShelleyTip proto era) x #

to ∷ Rep (ShelleyTip proto era) x → ShelleyTip proto era #

Show (ShelleyTip proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Methods

showsPrec ∷ Int → ShelleyTip proto era → ShowS #

show ∷ ShelleyTip proto era → String #

showList ∷ [ShelleyTip proto era] → ShowS #

NoThunks (ShelleyTip proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Methods

noThunks ∷ Context → ShelleyTip proto era → IO (Maybe ThunkInfo) Source #

wNoThunks ∷ Context → ShelleyTip proto era → IO (Maybe ThunkInfo) Source #

showTypeOf ∷ Proxy (ShelleyTip proto era) → String Source #

type TranslationError era (ShelleyTip proto) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.ShelleyHFC

type TranslationError era (ShelleyTip proto) = Void
type Rep (ShelleyTip proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (ShelleyTip proto era) = D1 ('MetaData "ShelleyTip" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "ShelleyTip" 'PrefixI 'True) (S1 ('MetaSel ('Just "shelleyTipSlotNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNo) :*: (S1 ('MetaSel ('Just "shelleyTipBlockNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlockNo) :*: S1 ('MetaSel ('Just "shelleyTipHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HeaderHash (ShelleyBlock proto era))))))

newtype ShelleyTransition Source #

Information required to determine the hard fork point from Shelley to the next ledger

Constructors

ShelleyTransitionInfo 

Fields

  • shelleyAfterVoting ∷ Word32

    The number of blocks in this epoch past the voting deadline

    We record this to make sure that we can tell the HFC about hard forks if and only if we are certain:

    1. Blocks that came in within an epoch after the 4k/f voting deadline are not relevant (10kf - 2 * 3kf).
    2. Since there are slots between blocks, we are probably only sure that there will be no more relevant block when we have seen the first block after the deadline.
    3. If we count how many blocks we have seen post deadline, and we have reached k of them, we know that that last pre-deadline block won't be rolled back anymore.
    4. At this point we can look at the ledger state and see if there is a new protocol version update scheduled on the next epoch boundary, and notify the HFC that we need to transition into a new era at that point.

Instances

Instances details
Eq ShelleyTransition Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Generic ShelleyTransition Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Associated Types

type Rep ShelleyTransition 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep ShelleyTransition = D1 ('MetaData "ShelleyTransition" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'True) (C1 ('MetaCons "ShelleyTransitionInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "shelleyAfterVoting") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))
Show ShelleyTransition Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

NoThunks ShelleyTransition Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep ShelleyTransition Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep ShelleyTransition = D1 ('MetaData "ShelleyTransition" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'True) (C1 ('MetaCons "ShelleyTransitionInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "shelleyAfterVoting") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))

data family Ticked (st ∷ k) ∷ k Source #

" Ticked " piece of state, either LedgerState or ChainDepState

Ticking refers to the passage of time (the ticking of the clock). When a piece of state is marked as ticked, it means that time-related changes have been applied to the state. There are exactly two methods in the interface that do that: tickChainDepState and applyChainTickLedgerResult.

Also note that a successful forecast forecastFor (ledgerViewForecastAt cfg st) slot must equal protocolLedgerView cfg (applyChainTick cfg slot st). Thus a LedgerView can only be projected from a Ticked state, but cannot itself be ticked.

Some examples of time related changes:

  • Scheduled delegations might have been applied in Byron
  • New leader schedule computed for Shelley
  • Transition from Byron to Shelley activated in the hard fork combinator.
  • Nonces switched out at the start of a new epoch.

Ticked is used mainly in two ways:

  • Ticked (Ext)LedgerState where its kind gets concretized to StateKind -> StateKind
  • Ticked (HeaderState blk) where its kind gets concretized to Type -> Type

Instances

Instances details
Show (Ticked ()) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrec ∷ Int → Ticked () → ShowS #

show ∷ Ticked () → String #

showList ∷ [Ticked ()] → ShowS #

CanHardFork xs ⇒ ChainDepStateSupportsPeras (Ticked (HardForkChainDepState xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

ChainDepStateSupportsPeras (Ticked (ChainDepState (BlockProtocol blk))) ⇒ ChainDepStateSupportsPeras (Ticked (HeaderState blk)) Source # 
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

ChainDepStateSupportsPeras (Ticked (PBftState c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

ChainDepStateSupportsPeras (Ticked PraosState) # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

Methods

getEpochNonce ∷ Ticked PraosState → Nonce Source #

ChainDepStateSupportsPeras (Ticked TPraosState) # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Methods

getEpochNonce ∷ Ticked TPraosState → Nonce Source #

ChainDepStateSupportsPeras (Ticked ()) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Abstract

Methods

getEpochNonce ∷ Ticked () → Nonce Source #

HasLedgerTables (Ticked LedgerState) ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

(NoThunks (TxIn blk), NoThunks (TxOut blk), HasLedgerTables (Ticked LedgerState) blk) ⇒ HasLedgerTables (Ticked ExtLedgerState) blk Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked ExtLedgerState blk mk → LedgerTables blk mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked ExtLedgerState blk any → LedgerTables blk mk → Ticked ExtLedgerState blk mk Source #

LedgerTablesAreTrivial (Ticked LedgerState) ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

(CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ HasLedgerTables (Ticked LedgerState) (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

(Bridge m a, HasLedgerTables (Ticked LedgerState) m) ⇒ HasLedgerTables (Ticked LedgerState) (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (DualBlock m a) mk → LedgerTables (DualBlock m a) mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (DualBlock m a) any → LedgerTables (DualBlock m a) mk → Ticked LedgerState (DualBlock m a) mk Source #

ShelleyBasedEra era ⇒ HasLedgerTables (Ticked LedgerState) (ShelleyBlock proto era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (ShelleyBlock proto era) mk → LedgerTables (ShelleyBlock proto era) mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (ShelleyBlock proto era) any → LedgerTables (ShelleyBlock proto era) mk → Ticked LedgerState (ShelleyBlock proto era) mk Source #

CanHardFork xs ⇒ GetTip (Ticked LedgerState (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Bridge m a ⇒ GetTip (Ticked LedgerState (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (DualBlock m a) mk → Point (Ticked LedgerState (DualBlock m a)) Source #

GetTip (Ticked LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

GetTip (Ticked LedgerState (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Methods

getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (ShelleyBlock proto era) mk → Point (Ticked LedgerState (ShelleyBlock proto era)) Source #

IsLedger LedgerState blk ⇒ GetTip (Ticked ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

Methods

getTip ∷ ∀ (mk ∷ MapKind). Ticked ExtLedgerState blk mk → Point (Ticked ExtLedgerState blk) Source #

CanHardFork xs ⇒ LedgerStateSupportsPeras (Ticked LedgerState (HardForkBlock xs)) Source #

LedgerStateSupportsPeras for the ticked hard fork ledger state, mirroring the instance for the unticked ledger state in Ouroboros.Consensus.HardFork.Combinator.Basics.

Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

LedgerStateSupportsPeras (Ticked LedgerState (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

LedgerStateSupportsPeras (Ticked LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

LedgerStateSupportsPeras (Ticked LedgerState (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

ShelleyBasedEra era ⇒ CanStowLedgerTables (Ticked LedgerState (ShelleyBlock proto era)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Generic (Ticked LedgerState ByronBlock mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Associated Types

type Rep (Ticked LedgerState ByronBlock mk) 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type Rep (Ticked LedgerState ByronBlock mk) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "TickedByronLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "tickedByronLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainValidationState) :*: S1 ('MetaSel ('Just "untickedByronLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByronTransition)))
Generic (Ticked LedgerState (ShelleyBlock proto era) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Associated Types

type Rep (Ticked LedgerState (ShelleyBlock proto era) mk) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (Ticked LedgerState (ShelleyBlock proto era) mk) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "TickedShelleyLedgerState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "untickedShelleyLedgerTip") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin (ShelleyTip proto era))) :*: S1 ('MetaSel ('Just "tickedShelleyLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ShelleyTransition)) :*: (S1 ('MetaSel ('Just "tickedShelleyLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NewEpochState era)) :*: S1 ('MetaSel ('Just "tickedShelleyLedgerTables") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LedgerTables (ShelleyBlock proto era) mk)))))

Methods

from ∷ Ticked LedgerState (ShelleyBlock proto era) mk → Rep (Ticked LedgerState (ShelleyBlock proto era) mk) x #

to ∷ Rep (Ticked LedgerState (ShelleyBlock proto era) mk) x → Ticked LedgerState (ShelleyBlock proto era) mk #

NoThunks (Ticked LedgerState (DualBlock m a) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

NoThunks (Ticked LedgerState ByronBlock mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Show (Ticked (f a)) ⇒ Show (((Ticked ∷ Type → Type) :.: f) a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrec ∷ Int → ((Ticked ∷ Type → Type) :.: f) a → ShowS #

show ∷ ((Ticked ∷ Type → Type) :.: f) a → String #

showList ∷ [((Ticked ∷ Type → Type) :.: f) a] → ShowS #

NoThunks (Ticked (f a)) ⇒ NoThunks (((Ticked ∷ Type → Type) :.: f) a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

noThunks ∷ Context → ((Ticked ∷ Type → Type) :.: f) a → IO (Maybe ThunkInfo) Source #

wNoThunks ∷ Context → ((Ticked ∷ Type → Type) :.: f) a → IO (Maybe ThunkInfo) Source #

showTypeOf ∷ Proxy (((Ticked ∷ Type → Type) :.: f) a) → String Source #

data Ticked PraosState # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

data Ticked PraosState = TickedPraosState {}
data Ticked TPraosState # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

data Ticked () Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

data Ticked (HardForkChainDepState xs ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

data Ticked (HeaderState blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

data Ticked (PBftState c ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

newtype Ticked (WrapChainDepState blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

type HeaderHash (Ticked l blk ∷ k2) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

type HeaderHash (Ticked l blk ∷ k2) = HeaderHash (l blk)
data Ticked ExtLedgerState (blk ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

data Ticked LedgerState ByronBlock (mk ∷ MapKind) Source #

The ticked Byron ledger state

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

data Ticked LedgerState (HardForkBlock xs ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

data Ticked LedgerState (DualBlock m a ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data Ticked LedgerState (ShelleyBlock proto era ∷ Type) (mk ∷ MapKind) Source #

Ticking only affects the state itself

Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (Ticked LedgerState ByronBlock mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type Rep (Ticked LedgerState ByronBlock mk) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "TickedByronLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "tickedByronLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainValidationState) :*: S1 ('MetaSel ('Just "untickedByronLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByronTransition)))
type Rep (Ticked LedgerState (ShelleyBlock proto era) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (Ticked LedgerState (ShelleyBlock proto era) mk) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "TickedShelleyLedgerState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "untickedShelleyLedgerTip") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin (ShelleyTip proto era))) :*: S1 ('MetaSel ('Just "tickedShelleyLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ShelleyTransition)) :*: (S1 ('MetaSel ('Just "tickedShelleyLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NewEpochState era)) :*: S1 ('MetaSel ('Just "tickedShelleyLedgerTables") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LedgerTables (ShelleyBlock proto era) mk)))))

castShelleyTip ∷ ShelleyTip proto era → ShelleyTip proto' era' Source #

shelleyLedgerTipPoint ∷ ∀ proto era (mk ∷ MapKind). LedgerState (ShelleyBlock proto era) mk → Point (ShelleyBlock proto era) Source #

Ledger config

data ShelleyLedgerConfig era Source #

Constructors

ShelleyLedgerConfig 

Fields

Instances

Instances details
Generic (ShelleyLedgerConfig era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Associated Types

type Rep (ShelleyLedgerConfig era) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (ShelleyLedgerConfig era) = D1 ('MetaData "ShelleyLedgerConfig" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "ShelleyLedgerConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "shelleyLedgerCompactGenesis") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CompactGenesis) :*: (S1 ('MetaSel ('Just "shelleyLedgerGlobals") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Globals) :*: S1 ('MetaSel ('Just "shelleyLedgerTranslationContext") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (TranslationContext era)))))
Show (TranslationContext era) ⇒ Show (ShelleyLedgerConfig era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

(NoThunks (TranslationContext era), Era era) ⇒ NoThunks (ShelleyLedgerConfig era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

(NoHardForks (ShelleyBlock proto era), ShelleyCompatible proto era) ⇒ SerialiseNodeToClient (ShelleyBlock proto era) (ShelleyLedgerConfig era) Source #

This instance uses the invariant that the EpochInfo in a ShelleyLedgerConfig is fixed i.e. has a constant EpochSize and SlotLength. This is not true in the case of the HFC in a ShelleyPartialLedgerConfig, but that is handled correctly in the respective SerialiseNodeToClient instance for ShelleyPartialLedgerConfig.

Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

type Rep (ShelleyLedgerConfig era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (ShelleyLedgerConfig era) = D1 ('MetaData "ShelleyLedgerConfig" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "ShelleyLedgerConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "shelleyLedgerCompactGenesis") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CompactGenesis) :*: (S1 ('MetaSel ('Just "shelleyLedgerGlobals") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Globals) :*: S1 ('MetaSel ('Just "shelleyLedgerTranslationContext") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (TranslationContext era)))))

data ShelleyPartialLedgerConfig era Source #

Constructors

ShelleyPartialLedgerConfig 

Fields

Instances

Instances details
Generic (ShelleyPartialLedgerConfig era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Associated Types

type Rep (ShelleyPartialLedgerConfig era) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (ShelleyPartialLedgerConfig era) = D1 ('MetaData "ShelleyPartialLedgerConfig" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "ShelleyPartialLedgerConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "shelleyLedgerConfig") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ShelleyLedgerConfig era)) :*: S1 ('MetaSel ('Just "shelleyTriggerHardFork") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TriggerHardFork)))
Show (ShelleyLedgerConfig era) ⇒ Show (ShelleyPartialLedgerConfig era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

(NoThunks (TranslationContext era), Era era) ⇒ NoThunks (ShelleyPartialLedgerConfig era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

ShelleyBasedEra era ⇒ SerialiseNodeToClient (ShelleyBlock proto era) (ShelleyPartialLedgerConfig era) Source #

This instance uses the invariant that the EpochInfo in a ShelleyPartialLedgerConfig is always just a dummy value.

Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

type Rep (ShelleyPartialLedgerConfig era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (ShelleyPartialLedgerConfig era) = D1 ('MetaData "ShelleyPartialLedgerConfig" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "ShelleyPartialLedgerConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "shelleyLedgerConfig") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ShelleyLedgerConfig era)) :*: S1 ('MetaSel ('Just "shelleyTriggerHardFork") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TriggerHardFork)))

shelleyEraParamsNeverHardForks ∷ ShelleyGenesis → PerasEnabled PerasRoundLength → EraParams Source #

Separate variant of shelleyEraParams to be used for a Shelley-only chain.

Auxiliary

data ShelleyLedgerEvent era Source #

All events emitted by the Shelley ledger API

Constructors

ShelleyLedgerEventBBODY (Event (EraRule "BBODY" era))

An event emitted when (re)applying a block

ShelleyLedgerEventTICK (Event (EraRule "TICK" era))

An event emitted during the chain tick

getPParams ∷ EraGov era ⇒ NewEpochState era → PParams era Source #

Serialisation

decodeShelleyLedgerState ∷ ∀ era proto s. ShelleyCompatible proto era ⇒ Decoder s (LedgerState (ShelleyBlock proto era) EmptyMK) Source #

Low-level UTxO manipulations

slUtxoL ∷ NewEpochState era → UTxO era → (UTxO era, NewEpochState era) Source #

newtype BigEndianTxIn Source #

The only purpose of this type is to modify the MemPack instance to use big endian serialization. This is necessary to ensure streaming functions of the UTxO set preserve the order of the entries, as otherwise we would get different sortings if sorting via the Serialized form and the Haskell Ord instance.

TODO: fix this in the Ledger. See cardano-ledger#5336.

Constructors

BigEndianTxIn 

Fields

Instances

Instances details
Eq BigEndianTxIn Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Ord BigEndianTxIn Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Show BigEndianTxIn Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

MemPack BigEndianTxIn Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

NoThunks BigEndianTxIn Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

Orphan instances

ShelleyCompatible proto era ⇒ ApplyBlock LedgerState (ShelleyBlock proto era) Source # 
Instance details

ShelleyBasedEra era ⇒ IsLedger LedgerState (ShelleyBlock proto era) Source # 
Instance details

Associated Types

type LedgerErr LedgerState (ShelleyBlock proto era) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

CanUpgradeLedgerTables LedgerState (ShelleyBlock proto era) Source # 
Instance details

Methods

upgradeTables ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). LedgerState (ShelleyBlock proto era) mk1 → LedgerState (ShelleyBlock proto era) mk2 → LedgerTables (ShelleyBlock proto era) ValuesMK → LedgerTables (ShelleyBlock proto era) ValuesMK Source #

ShelleyBasedEra era ⇒ HasLedgerTables LedgerState (ShelleyBlock proto era) Source # 
Instance details

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (ShelleyBlock proto era) mk → LedgerTables (ShelleyBlock proto era) mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (ShelleyBlock proto era) any → LedgerTables (ShelleyBlock proto era) mk → LedgerState (ShelleyBlock proto era) mk Source #

ShelleyCompatible proto era ⇒ SerializeTablesWithHint LedgerState (ShelleyBlock proto era) Source # 
Instance details

(txout ~ TxOut era, MemPack txout) ⇒ IndexedMemPack LedgerState (ShelleyBlock proto era) txout Source # 
Instance details

Methods

indexedPackedByteCount ∷ LedgerState (ShelleyBlock proto era) EmptyMK → txout → Int Source #

indexedPackM ∷ LedgerState (ShelleyBlock proto era) EmptyMK → txout → Pack s () Source #

indexedUnpackM ∷ Buffer b ⇒ ∀ s. LedgerState (ShelleyBlock proto era) EmptyMK → Unpack s b txout Source #

indexedTypeName ∷ Proxy txout → LedgerState (ShelleyBlock proto era) EmptyMK → String Source #

GetTip (LedgerState (ShelleyBlock proto era)) Source # 
Instance details

Methods

getTip ∷ ∀ (mk ∷ MapKind). LedgerState (ShelleyBlock proto era) mk → Point (LedgerState (ShelleyBlock proto era)) Source #

LedgerStateSupportsPeras (LedgerState (ShelleyBlock proto era)) Source # 
Instance details

ShelleyBasedEra era ⇒ CanStowLedgerTables (LedgerState (ShelleyBlock proto era)) Source # 
Instance details

(ShelleyBasedEra era, EqMK mk) ⇒ Eq (LedgerState (ShelleyBlock proto era) mk) Source # 
Instance details

Methods

(==) ∷ LedgerState (ShelleyBlock proto era) mk → LedgerState (ShelleyBlock proto era) mk → Bool #

(/=) ∷ LedgerState (ShelleyBlock proto era) mk → LedgerState (ShelleyBlock proto era) mk → Bool #

Generic (LedgerState (ShelleyBlock proto era) mk) Source # 
Instance details

Associated Types

type Rep (LedgerState (ShelleyBlock proto era) mk) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (LedgerState (ShelleyBlock proto era) mk) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "ShelleyLedgerState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "shelleyLedgerTip") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin (ShelleyTip proto era))) :*: S1 ('MetaSel ('Just "shelleyLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NewEpochState era))) :*: (S1 ('MetaSel ('Just "shelleyLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ShelleyTransition) :*: S1 ('MetaSel ('Just "shelleyLedgerTables") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LedgerTables (ShelleyBlock proto era) mk)))))

Methods

from ∷ LedgerState (ShelleyBlock proto era) mk → Rep (LedgerState (ShelleyBlock proto era) mk) x #

to ∷ Rep (LedgerState (ShelleyBlock proto era) mk) x → LedgerState (ShelleyBlock proto era) mk #

(ShelleyBasedEra era, ShowMK mk) ⇒ Show (LedgerState (ShelleyBlock proto era) mk) Source # 
Instance details

Methods

showsPrec ∷ Int → LedgerState (ShelleyBlock proto era) mk → ShowS #

show ∷ LedgerState (ShelleyBlock proto era) mk → String #

showList ∷ [LedgerState (ShelleyBlock proto era) mk] → ShowS #

(ShelleyBasedEra era, NoThunksMK mk) ⇒ NoThunks (LedgerState (ShelleyBlock proto era) mk) Source # 
Instance details

ShelleyBasedEra era ⇒ HasHardForkHistory (ShelleyBlock proto era) Source # 
Instance details

Associated Types

type HardForkIndices (ShelleyBlock proto era) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type HardForkIndices (ShelleyBlock proto era) = '[ShelleyBlock proto era]

Methods

hardForkSummary ∷ ∀ (mk ∷ MapKind). LedgerConfig (ShelleyBlock proto era) → LedgerState (ShelleyBlock proto era) mk → Summary (HardForkIndices (ShelleyBlock proto era)) Source #

ShelleyCompatible proto era ⇒ HasPartialLedgerConfig (ShelleyBlock proto era) Source # 
Instance details

Associated Types

type PartialLedgerConfig (ShelleyBlock proto era) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

ShelleyCompatible proto era ⇒ BasicEnvelopeValidation (ShelleyBlock proto era) Source # 
Instance details

Methods

expectedFirstBlockNo ∷ proxy (ShelleyBlock proto era) → BlockNo Source #

expectedNextBlockNo ∷ proxy (ShelleyBlock proto era) → TipInfo (ShelleyBlock proto era) → TipInfo (ShelleyBlock proto era) → BlockNo → BlockNo Source #

minimumPossibleSlotNo ∷ Proxy (ShelleyBlock proto era) → SlotNo Source #

minimumNextSlotNo ∷ proxy (ShelleyBlock proto era) → TipInfo (ShelleyBlock proto era) → TipInfo (ShelleyBlock proto era) → SlotNo → SlotNo Source #

ShelleyCompatible proto era ⇒ ValidateEnvelope (ShelleyBlock proto era) Source # 
Instance details

Associated Types

type OtherHeaderEnvelopeError (ShelleyBlock proto era) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

ShelleyCompatible proto era ⇒ GetBlockKeySets (ShelleyBlock proto era) Source # 
Instance details

Methods

getBlockKeySets ∷ ShelleyBlock proto era → LedgerTables (ShelleyBlock proto era) KeysMK Source #

ShelleyCompatible proto era ⇒ UpdateLedger (ShelleyBlock proto era) Source # 
Instance details

ShelleyCompatible proto era ⇒ CommonProtocolParams (ShelleyBlock proto era) Source # 
Instance details

Methods

maxHeaderSize ∷ ∀ (mk ∷ MapKind). LedgerState (ShelleyBlock proto era) mk → Word32 Source #

maxTxSize ∷ ∀ (mk ∷ MapKind). LedgerState (ShelleyBlock proto era) mk → Word32 Source #

ShelleyBasedEra era ⇒ HasLedgerTables (Ticked LedgerState) (ShelleyBlock proto era) Source # 
Instance details

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (ShelleyBlock proto era) mk → LedgerTables (ShelleyBlock proto era) mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (ShelleyBlock proto era) any → LedgerTables (ShelleyBlock proto era) mk → Ticked LedgerState (ShelleyBlock proto era) mk Source #

GetTip (Ticked LedgerState (ShelleyBlock proto era)) Source # 
Instance details

Methods

getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (ShelleyBlock proto era) mk → Point (Ticked LedgerState (ShelleyBlock proto era)) Source #

LedgerStateSupportsPeras (Ticked LedgerState (ShelleyBlock proto era)) Source # 
Instance details

ShelleyBasedEra era ⇒ CanStowLedgerTables (Ticked LedgerState (ShelleyBlock proto era)) Source # 
Instance details

Generic (Ticked LedgerState (ShelleyBlock proto era) mk) Source # 
Instance details

Associated Types

type Rep (Ticked LedgerState (ShelleyBlock proto era) mk) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type Rep (Ticked LedgerState (ShelleyBlock proto era) mk) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Shelley.Ledger.Ledger" "ouroboros-consensus-4.0.0.0-inplace-cardano" 'False) (C1 ('MetaCons "TickedShelleyLedgerState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "untickedShelleyLedgerTip") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin (ShelleyTip proto era))) :*: S1 ('MetaSel ('Just "tickedShelleyLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ShelleyTransition)) :*: (S1 ('MetaSel ('Just "tickedShelleyLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NewEpochState era)) :*: S1 ('MetaSel ('Just "tickedShelleyLedgerTables") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LedgerTables (ShelleyBlock proto era) mk)))))

Methods

from ∷ Ticked LedgerState (ShelleyBlock proto era) mk → Rep (Ticked LedgerState (ShelleyBlock proto era) mk) x #

to ∷ Rep (Ticked LedgerState (ShelleyBlock proto era) mk) x → Ticked LedgerState (ShelleyBlock proto era) mk #