ouroboros-consensus-cardano-0.25.0.0: The instantation of the Ouroboros consensus layer used by Cardano
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Byron.Ledger.Ledger

Description

Instances requires for consensus/ledger integration

Synopsis

Documentation

data ByronTransition Source #

Information required to determine the transition from Byron to Shelley

Constructors

ByronTransitionInfo !(Map ProtocolVersion BlockNo)

Per candidate proposal, the BlockNo in which it became a candidate

The HFC needs to know when a candidate proposal becomes stable. We cannot reliably do this using SlotNo: doing so would mean that if we were to switch to a denser fork, something that was previously deemed stable is suddenly not deemed stable anymore (although in actuality it still is). We therefore must do this based on BlockNo instead, but unfortunately the Byron ledger does not record this information. Therefore, we record it here instead.

Invariant: the domain of this map should equal the set of candidate proposals.

Instances

Instances details
Generic ByronTransition Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Associated Types

type Rep ByronTransition 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type Rep ByronTransition = D1 ('MetaData "ByronTransition" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-cardano-0.25.0.0-inplace" 'False) (C1 ('MetaCons "ByronTransitionInfo" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map ProtocolVersion BlockNo))))
Show ByronTransition Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Eq ByronTransition Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

NoThunks ByronTransition Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type Rep ByronTransition Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

type Rep ByronTransition = D1 ('MetaData "ByronTransition" "Ouroboros.Consensus.Byron.Ledger.Ledger" "ouroboros-consensus-cardano-0.25.0.0-inplace" 'False) (C1 ('MetaCons "ByronTransitionInfo" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map ProtocolVersion BlockNo))))

Ledger integration

byronEraParamsConfigEraParams Source #

To be used for a Byron-to-X (where X is typically Shelley) chain.

byronEraParamsNeverHardForksConfigEraParams Source #

Separate variant of byronEraParams to be used for a Byron-only chain.

initByronLedgerState Source #

Arguments

∷ ∀ (mk ∷ MapKind). Config 
Maybe UTxO

Optionally override UTxO

LedgerState ByronBlock mk 

Serialisation

decodeByronResult ∷ ∀ (fp ∷ QueryFootprint) result. BlockQuery ByronBlock fp result → ∀ s. Decoder s result Source #

encodeByronQuery ∷ ∀ (fp ∷ QueryFootprint) result. BlockQuery ByronBlock fp result → Encoding Source #

encodeByronResult ∷ ∀ (fp ∷ QueryFootprint) result. BlockQuery ByronBlock fp result → result → Encoding Source #

Type family instances

data family BlockQueryTypeQueryFootprintTypeType Source #

Different queries supported by the ledger, indexed by the result type.

Instances

Instances details
SerialiseBlockQueryResult ByronBlock BlockQuery Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

SameDepIndex2 (BlockQuery (DualBlock m a) ∷ QueryFootprintTypeType) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a0 (y ∷ QueryFootprint) b. BlockQuery (DualBlock m a) x a0 → BlockQuery (DualBlock m a) y b → Maybe ('(x, a0) :~: '(y, b)) Source #

SameDepIndex2 (BlockQuery ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a (y ∷ QueryFootprint) b. BlockQuery ByronBlock x a → BlockQuery ByronBlock y b → Maybe ('(x, a) :~: '(y, b)) Source #

SameDepIndex2 (BlockQuery (ShelleyBlock proto era) ∷ QueryFootprintTypeType) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a (y ∷ QueryFootprint) b. BlockQuery (ShelleyBlock proto era) x a → BlockQuery (ShelleyBlock proto era) y b → Maybe ('(x, a) :~: '(y, b)) Source #

SerialiseNodeToClient ByronBlock (SomeBlockQuery (BlockQuery ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Node.Serialisation

ShelleyCompatible proto era ⇒ SerialiseBlockQueryResult (ShelleyBlock proto era) BlockQuery Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

Methods

encodeBlockQueryResult ∷ ∀ (fp ∷ QueryFootprint) result. CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → BlockQuery (ShelleyBlock proto era) fp result → result → Encoding Source #

decodeBlockQueryResult ∷ ∀ (fp ∷ QueryFootprint) result. CodecConfig (ShelleyBlock proto era) → BlockNodeToClientVersion (ShelleyBlock proto era) → BlockQuery (ShelleyBlock proto era) fp result → ∀ s. Decoder s result Source #

(∀ (footprint ∷ QueryFootprint) result. Show (BlockQuery blk footprint result)) ⇒ Show (SomeBlockQuery (BlockQuery blk)) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Query

ShowQuery (BlockQuery (DualBlock m a) footprint) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showResultBlockQuery (DualBlock m a) footprint result → result → String Source #

ShowQuery (BlockQuery ByronBlock fp) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

showResultBlockQuery ByronBlock fp result → result → String Source #

ShelleyCompatible proto era ⇒ ShowQuery (BlockQuery (ShelleyBlock proto era) fp) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

showResultBlockQuery (ShelleyBlock proto era) fp result → result → String Source #

(ShelleyCompatible proto era, LedgerSupportsProtocol (ShelleyBlock proto era)) ⇒ SerialiseNodeToClient (ShelleyBlock proto era) (SomeBlockQuery (BlockQuery (ShelleyBlock proto era))) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

(Typeable m, Typeable a) ⇒ ShowProxy (BlockQuery (DualBlock m a) ∷ QueryFootprintTypeType) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

ShowProxy (BlockQuery ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

(Typeable era, Typeable proto) ⇒ ShowProxy (BlockQuery (ShelleyBlock proto era) ∷ QueryFootprintTypeType) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

showProxyProxy (BlockQuery (ShelleyBlock proto era)) → String Source #

Show (BlockQuery (DualBlock m a) footprint result) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showsPrecIntBlockQuery (DualBlock m a) footprint result → ShowS #

showBlockQuery (DualBlock m a) footprint result → String #

showList ∷ [BlockQuery (DualBlock m a) footprint result] → ShowS #

Show (BlockQuery ByronBlock fp result) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

showsPrecIntBlockQuery ByronBlock fp result → ShowS #

showBlockQuery ByronBlock fp result → String #

showList ∷ [BlockQuery ByronBlock fp result] → ShowS #

Show (BlockQuery (ShelleyBlock proto era) fp result) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

showsPrecIntBlockQuery (ShelleyBlock proto era) fp result → ShowS #

showBlockQuery (ShelleyBlock proto era) fp result → String #

showList ∷ [BlockQuery (ShelleyBlock proto era) fp result] → ShowS #

Eq (BlockQuery ByronBlock fp result) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

(==)BlockQuery ByronBlock fp result → BlockQuery ByronBlock fp result → Bool #

(/=)BlockQuery ByronBlock fp result → BlockQuery ByronBlock fp result → Bool #

Eq (BlockQuery (ShelleyBlock proto era) fp result) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

Methods

(==)BlockQuery (ShelleyBlock proto era) fp result → BlockQuery (ShelleyBlock proto era) fp result → Bool #

(/=)BlockQuery (ShelleyBlock proto era) fp result → BlockQuery (ShelleyBlock proto era) fp result → Bool #

Inject (SomeBlockQuery :.: BlockQuery) 
Instance details

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

data BlockQuery ByronBlock fp result Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

data BlockQuery (HardForkBlock xs) footprint result 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

data BlockQuery (HardForkBlock xs) footprint result where
data BlockQuery (DualBlock m a) footprint result 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data BlockQuery (DualBlock m a) footprint result
data BlockQuery (ShelleyBlock proto era) fp result Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Query

data BlockQuery (ShelleyBlock proto era) fp result where

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
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

(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

Bridge m a ⇒ GetTip (LedgerState (DualBlock m a)) 
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 #

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

Defined in Ouroboros.Consensus.Ledger.Dual

Associated Types

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

Defined in Ouroboros.Consensus.Ledger.Dual

type AuxLedgerEvent (LedgerState (DualBlock m a)) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

IsLedger (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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

type AuxLedgerEvent (LedgerState (ShelleyBlock proto era)) 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

CanStowLedgerTables (LedgerState m) ⇒ CanStowLedgerTables (LedgerState (DualBlock m a)) 
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

(Bridge m a, NoThunks (TxOut (LedgerState m)), NoThunks (TxIn (LedgerState m)), Show (TxOut (LedgerState m)), Show (TxIn (LedgerState m)), Eq (TxOut (LedgerState m)), Ord (TxIn (LedgerState m)), MemPack (TxIn (LedgerState m))) ⇒ HasLedgerTables (LedgerState (DualBlock m a)) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

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

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

HasLedgerTables (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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 (LedgerState (ShelleyBlock proto era)) mk Source #

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

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 #

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

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

Defined in Ouroboros.Consensus.Ledger.Dual

SerializeTablesWithHint (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

CanUpgradeLedgerTables (LedgerState (DualBlock m a)) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanUpgradeLedgerTables (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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 (LedgerState (ShelleyBlock proto era)) ValuesMKLedgerTables (LedgerState (ShelleyBlock proto era)) ValuesMK Source #

ApplyBlock (LedgerState ByronBlock) ByronBlock Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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

Defined in Ouroboros.Consensus.Ledger.Dual

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

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-cardano-0.25.0.0-inplace" '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-cardano-0.25.0.0-inplace" '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 (LedgerState (ShelleyBlock proto era)) mk)))))

Methods

fromLedgerState (ShelleyBlock proto era) mk → Rep (LedgerState (ShelleyBlock proto era) mk) x #

toRep (LedgerState (ShelleyBlock proto era) mk) x → LedgerState (ShelleyBlock proto era) mk #

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

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

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showsPrecIntLedgerState (DualBlock m a) mk → ShowS #

showLedgerState (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

showsPrecIntLedgerState (ShelleyBlock proto era) mk → ShowS #

showLedgerState (ShelleyBlock proto era) mk → String #

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

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

(Bridge m a, EqMK mk) ⇒ Eq (LedgerState (DualBlock m a) mk) 
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 #

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

NoThunks (LedgerState (DualBlock m a) mk) 
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

Bridge m a ⇒ GetTip (Ticked (LedgerState (DualBlock m a))) 
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 #

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

(Bridge m a, NoThunks (TxOut (LedgerState m)), NoThunks (TxIn (LedgerState m)), Show (TxOut (LedgerState m)), Show (TxIn (LedgerState m)), Eq (TxOut (LedgerState m)), Ord (TxIn (LedgerState m)), MemPack (TxIn (LedgerState m))) ⇒ HasLedgerTables (Ticked (LedgerState (DualBlock m a))) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

HasLedgerTables (Ticked (LedgerState ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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 (Ticked (LedgerState (ShelleyBlock proto era))) mk Source #

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

LedgerTablesAreTrivial (Ticked (LedgerState ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

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

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

Defined in Ouroboros.Consensus.Byron.ByronHFC

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

Defined in Ouroboros.Consensus.Shelley.ShelleyHFC

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

Defined in Ouroboros.Consensus.Ledger.Dual

IndexedMemPack (LedgerState ByronBlock EmptyMK) Void Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

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

Defined in Ouroboros.Consensus.Cardano.Ledger

StandardHash blk ⇒ StandardHash (LedgerState blk ∷ MapKindType) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

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

Defined in Ouroboros.Consensus.Shelley.Node.Serialisation

Methods

decodeDiskCodecConfig (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

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-cardano-0.25.0.0-inplace" '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-cardano-0.25.0.0-inplace" '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 (LedgerState (ShelleyBlock proto era)) mk)))))

Methods

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

toRep (Ticked (LedgerState (ShelleyBlock proto era)) mk) x → Ticked (LedgerState (ShelleyBlock proto era)) mk #

NoThunks (Ticked (LedgerState (DualBlock m a)) mk) 
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) 
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) 
Instance details

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

Methods

projectNoHardForks blk ⇒ Flip LedgerState mk (HardForkBlock '[blk]) → Flip LedgerState mk blk Source #

injectNoHardForks 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 TranslationError era (Flip LedgerState mk :.: ShelleyBlock proto) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.ShelleyHFC

type AuxLedgerEvent (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type AuxLedgerEvent (LedgerState (DualBlock m a)) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type AuxLedgerEvent (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type LedgerCfg (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

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

Defined in Ouroboros.Consensus.Ledger.Dual

type LedgerCfg (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type LedgerErr (LedgerState (HardForkBlock xs)) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

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

Defined in Ouroboros.Consensus.Ledger.Dual

type LedgerErr (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

newtype LedgerState (HardForkBlock xs) mk 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type TxIn (LedgerState (HardForkBlock xs))

Must be the CannonicalTxIn type, but this will probably change in the future to NS WrapTxIn xs. See HasCanonicalTxIn.

Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type TxIn (LedgerState (DualBlock m a)) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type TxIn (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type TxIn (LedgerState (ShelleyBlock proto era)) = TxIn
type TxOut (LedgerState (HardForkBlock xs))

Must be the HardForkTxOut type

Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type TxOut (LedgerState (DualBlock m a)) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type TxOut (LedgerState ByronBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type TxOut (LedgerState (ShelleyBlock proto era)) = TxOut era
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-cardano-0.25.0.0-inplace" '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-cardano-0.25.0.0-inplace" '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 (LedgerState (ShelleyBlock proto era)) mk)))))
data LedgerState (DualBlock m a) mk 
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 (HardForkBlock xs) ∷ MapKindType) (mk ∷ MapKind) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

data Ticked (LedgerState (DualBlock m a) ∷ MapKindType) (mk ∷ MapKind) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data Ticked (LedgerState ByronBlock) (mk ∷ MapKind) Source #

The ticked Byron ledger state

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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

Ticking only affects the state itself

Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

type HeaderHash (LedgerState blk ∷ MapKindType) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

type HeaderHash (LedgerState blk ∷ MapKindType) = 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-cardano-0.25.0.0-inplace" '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-cardano-0.25.0.0-inplace" '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 (LedgerState (ShelleyBlock proto era)) mk)))))

newtype LedgerTables (l ∷ LedgerStateKind) (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
(Ord (TxIn l), Eq (TxOut l), Show (TxIn l), Show (TxOut l), NoThunks (TxIn l), NoThunks (TxOut l), MemPack (TxIn l), IndexedMemPack (MemPackIdx l EmptyMK) (TxOut l)) ⇒ HasLedgerTables (LedgerTables l) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables

Methods

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

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

Generic (LedgerTables l mk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

Associated Types

type Rep (LedgerTables l mk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

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

Methods

fromLedgerTables l mk → Rep (LedgerTables l mk) x #

toRep (LedgerTables l mk) x → LedgerTables l mk #

Show (mk (TxIn l) (TxOut l)) ⇒ Show (LedgerTables l mk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

Methods

showsPrecIntLedgerTables l mk → ShowS #

showLedgerTables l mk → String #

showList ∷ [LedgerTables l mk] → ShowS #

Eq (mk (TxIn l) (TxOut l)) ⇒ Eq (LedgerTables l mk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

Methods

(==)LedgerTables l mk → LedgerTables l mk → Bool #

(/=)LedgerTables l mk → LedgerTables l mk → Bool #

NoThunks (mk (TxIn l) (TxOut l)) ⇒ NoThunks (LedgerTables l mk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

type TxIn (LedgerTables l) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

type TxIn (LedgerTables l) = TxIn l
type TxOut (LedgerTables l) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

type TxOut (LedgerTables l) = TxOut l
type Rep (LedgerTables l mk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

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

Defined in Ouroboros.Consensus.Ledger.Tables

type InitHint (LedgerTables l ValuesMK) 
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.API

type ReadHint (LedgerTables l ValuesMK) 
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.API

type WriteHint (LedgerTables l DiffMK) 
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.API

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.

Instances

Instances details
Show (Ticked ()) 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrecIntTicked () → ShowS #

showTicked () → String #

showList ∷ [Ticked ()] → ShowS #

Bridge m a ⇒ GetTip (Ticked (LedgerState (DualBlock m a))) 
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)) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

Methods

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

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

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

(Bridge m a, NoThunks (TxOut (LedgerState m)), NoThunks (TxIn (LedgerState m)), Show (TxOut (LedgerState m)), Show (TxIn (LedgerState m)), Eq (TxOut (LedgerState m)), Ord (TxIn (LedgerState m)), MemPack (TxIn (LedgerState m))) ⇒ HasLedgerTables (Ticked (LedgerState (DualBlock m a))) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

HasLedgerTables (Ticked (LedgerState ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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 (Ticked (LedgerState (ShelleyBlock proto era))) mk Source #

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

(HasLedgerTables (Ticked (LedgerState blk)), NoThunks (TxOut (LedgerState blk)), NoThunks (TxIn (LedgerState blk)), Show (TxOut (LedgerState blk)), Show (TxIn (LedgerState blk)), Eq (TxOut (LedgerState blk)), Ord (TxIn (LedgerState blk)), MemPack (TxIn (LedgerState blk))) ⇒ HasLedgerTables (Ticked (ExtLedgerState blk)) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

Methods

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

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

LedgerTablesAreTrivial (Ticked (LedgerState ByronBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

Methods

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

LedgerTablesAreTrivial (Ticked (LedgerState blk)) ⇒ LedgerTablesAreTrivial (Ticked (ExtLedgerState blk)) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

Methods

convertMapKind ∷ ∀ (mk ∷ MapKind) (mk' ∷ MapKind). Ticked (ExtLedgerState blk) mk → Ticked (ExtLedgerState blk) mk' Source #

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-cardano-0.25.0.0-inplace" '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-cardano-0.25.0.0-inplace" '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 (LedgerState (ShelleyBlock proto era)) mk)))))

Methods

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

toRep (Ticked (LedgerState (ShelleyBlock proto era)) mk) x → Ticked (LedgerState (ShelleyBlock proto era)) mk #

NoThunks (Ticked (LedgerState (DualBlock m a)) mk) 
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 (((TickedTypeType) :.: f) a) 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrecInt → ((TickedTypeType) :.: f) a → ShowS #

show ∷ ((TickedTypeType) :.: f) a → String #

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

NoThunks (Ticked (f a)) ⇒ NoThunks (((TickedTypeType) :.: f) a) 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

noThunksContext → ((TickedTypeType) :.: f) a → IO (Maybe ThunkInfo) Source #

wNoThunksContext → ((TickedTypeType) :.: f) a → IO (Maybe ThunkInfo) Source #

showTypeOfProxy (((TickedTypeType) :.: f) a) → String Source #

data Ticked PraosState 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

data Ticked TPraosState 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

data Ticked () 
Instance details

Defined in Ouroboros.Consensus.Ticked

data Ticked (HardForkChainDepState xs ∷ Type) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

data Ticked (HeaderState blk ∷ Type) 
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

data Ticked (PBftState c ∷ Type) 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

newtype Ticked (WrapChainDepState blk ∷ Type) 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

type HeaderHash (Ticked l ∷ k) 
Instance details

Defined in Ouroboros.Consensus.Ticked

type HeaderHash (Ticked l ∷ k) = HeaderHash l
type TxIn (Ticked l) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

type TxIn (Ticked l) = TxIn l
type TxOut (Ticked l) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

type TxOut (Ticked l) = TxOut l
data Ticked (LedgerState (HardForkBlock xs) ∷ MapKindType) (mk ∷ MapKind) 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

data Ticked (LedgerState (DualBlock m a) ∷ MapKindType) (mk ∷ MapKind) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data Ticked (LedgerState ByronBlock) (mk ∷ MapKind) Source #

The ticked Byron ledger state

Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Ledger

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

Ticking only affects the state itself

Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Ledger

data Ticked (ExtLedgerState blk ∷ MapKindType) (mk ∷ MapKind) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

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-cardano-0.25.0.0-inplace" '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-cardano-0.25.0.0-inplace" '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 (LedgerState (ShelleyBlock proto era)) mk)))))

Auxiliary

validationErrorImpossible ∷ err → a Source #

Mark computation as validation error free

Given a BlockValidationMode of NoBlockValidation, a call to applyByronBlock shouldn't fail since the ledger layer won't be performing any block validation checks. However, because applyByronBlock can fail in the event it is given a BlockValidationMode of BlockValidation, it still looks like it can fail (since its type doesn't change based on the ValidationMode) and we must still treat it as such.

Orphan instances

HasHardForkHistory ByronBlock Source # 
Instance details

UpdateLedger ByronBlock Source # 
Instance details

CommonProtocolParams ByronBlock Source # 
Instance details

BlockSupportsLedgerQuery ByronBlock Source # 
Instance details

LedgerSupportsPeerSelection ByronBlock Source # 
Instance details

LedgerSupportsProtocol ByronBlock Source # 
Instance details

SameDepIndex2 (BlockQuery ByronBlock) Source # 
Instance details

Methods

sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a (y ∷ QueryFootprint) b. BlockQuery ByronBlock x a → BlockQuery ByronBlock y b → Maybe ('(x, a) :~: '(y, b)) Source #

GetTip (LedgerState ByronBlock) Source # 
Instance details

IsLedger (LedgerState ByronBlock) Source # 
Instance details

CanStowLedgerTables (LedgerState ByronBlock) Source # 
Instance details

HasLedgerTables (LedgerState ByronBlock) Source # 
Instance details

LedgerTablesAreTrivial (LedgerState ByronBlock) Source # 
Instance details

Methods

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

SerializeTablesWithHint (LedgerState ByronBlock) Source # 
Instance details

CanUpgradeLedgerTables (LedgerState ByronBlock) Source # 
Instance details

ApplyBlock (LedgerState ByronBlock) ByronBlock Source # 
Instance details

Generic (LedgerState ByronBlock mk) Source # 
Instance details

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-cardano-0.25.0.0-inplace" '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))))
Show (LedgerState ByronBlock mk) Source # 
Instance details

Eq (LedgerState ByronBlock mk) Source # 
Instance details

NoThunks (LedgerState ByronBlock mk) Source # 
Instance details

GetTip (Ticked (LedgerState ByronBlock)) Source # 
Instance details

HasLedgerTables (Ticked (LedgerState ByronBlock)) Source # 
Instance details

LedgerTablesAreTrivial (Ticked (LedgerState ByronBlock)) Source # 
Instance details

Methods

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

ShowQuery (BlockQuery ByronBlock fp) Source # 
Instance details

Methods

showResultBlockQuery ByronBlock fp result → result → String Source #

IndexedMemPack (LedgerState ByronBlock EmptyMK) Void Source # 
Instance details

ShowProxy (BlockQuery ByronBlock) Source # 
Instance details

Generic (Ticked (LedgerState ByronBlock) mk) Source # 
Instance details

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-cardano-0.25.0.0-inplace" 'False) (C1 ('MetaCons "TickedByronLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "tickedByronLedgerState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainValidationState) :*: S1 ('MetaSel ('Just "untickedByronLedgerTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByronTransition)))
Show (BlockQuery ByronBlock fp result) Source # 
Instance details

Methods

showsPrecIntBlockQuery ByronBlock fp result → ShowS #

showBlockQuery ByronBlock fp result → String #

showList ∷ [BlockQuery ByronBlock fp result] → ShowS #

Eq (BlockQuery ByronBlock fp result) Source # 
Instance details

Methods

(==)BlockQuery ByronBlock fp result → BlockQuery ByronBlock fp result → Bool #

(/=)BlockQuery ByronBlock fp result → BlockQuery ByronBlock fp result → Bool #

NoThunks (Ticked (LedgerState ByronBlock) mk) Source # 
Instance details