ouroboros-consensus-cardano-0.20.0.0: The instantation of the Ouroboros consensus layer used by Cardano
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.ByronSpec.Ledger.Ledger

Synopsis

Documentation

Type family instances

data family LedgerState blk Source #

Ledger state associated with a block

This is the Consensus notion of a 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 denote that the expected instantiation is either a LedgerState or some wrapper over it (like the ExtLedgerState).

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

Instances

Instances details
Generic (LedgerState ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

Associated Types

type Rep (LedgerState ByronSpecBlock) ∷ TypeType #

Show (LedgerState ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

Show (Ticked (LedgerState ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

Eq (LedgerState ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

Eq (Ticked (LedgerState ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

NoThunks (LedgerState ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

NoThunks (Ticked (LedgerState ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

GetTip (LedgerState ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

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

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

IsLedger (LedgerState ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

Serialise (LedgerState ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

ApplyBlock (LedgerState ByronSpecBlock) ByronSpecBlock Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

data LedgerState ByronSpecBlock Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

type HeaderHash (LedgerState blk ∷ Type) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

type HeaderHash (LedgerState blk ∷ Type) = HeaderHash blk
type Rep (LedgerState ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

type Rep (LedgerState ByronSpecBlock) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.ByronSpec.Ledger.Ledger" "ouroboros-consensus-cardano-0.20.0.0-inplace-unstable-byronspec" 'False) (C1 ('MetaCons "ByronSpecLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "byronSpecLedgerTip") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SlotNo)) :*: S1 ('MetaSel ('Just "byronSpecLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (State CHAIN))))
type AuxLedgerEvent (LedgerState ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

type LedgerCfg (LedgerState ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

type LedgerErr (LedgerState ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

data Ticked (LedgerState ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

data family Ticked st 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 (LedgerState ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

Show (Ticked ()) 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrecIntTicked () → ShowS #

showTicked () → String #

showList ∷ [Ticked ()] → ShowS #

Eq (Ticked (LedgerState ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

NoThunks (Ticked (LedgerState ByronSpecBlock)) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

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

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

Show (Ticked (f a)) ⇒ Show ((Ticked :.: f) a) 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

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

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

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

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

Defined in Ouroboros.Consensus.Ticked

data Ticked () 
Instance details

Defined in Ouroboros.Consensus.Ticked

type HeaderHash (Ticked l ∷ Type) 
Instance details

Defined in Ouroboros.Consensus.Ticked

type HeaderHash (Ticked l ∷ Type) = HeaderHash l
data Ticked (LedgerState ByronSpecBlock) Source # 
Instance details

Defined in Ouroboros.Consensus.ByronSpec.Ledger.Ledger

Orphan instances

UpdateLedger ByronSpecBlock Source # 
Instance details

CommonProtocolParams ByronSpecBlock Source # 
Instance details

Generic (LedgerState ByronSpecBlock) Source # 
Instance details

Associated Types

type Rep (LedgerState ByronSpecBlock) ∷ TypeType #

Show (LedgerState ByronSpecBlock) Source # 
Instance details

Show (Ticked (LedgerState ByronSpecBlock)) Source # 
Instance details

Eq (LedgerState ByronSpecBlock) Source # 
Instance details

Eq (Ticked (LedgerState ByronSpecBlock)) Source # 
Instance details

NoThunks (LedgerState ByronSpecBlock) Source # 
Instance details

NoThunks (Ticked (LedgerState ByronSpecBlock)) Source # 
Instance details

GetTip (LedgerState ByronSpecBlock) Source # 
Instance details

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

IsLedger (LedgerState ByronSpecBlock) Source # 
Instance details

Serialise (LedgerState ByronSpecBlock) Source # 
Instance details

ApplyBlock (LedgerState ByronSpecBlock) ByronSpecBlock Source # 
Instance details