Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype ExtLedgerCfg blk = ExtLedgerCfg {}
- data ExtLedgerState blk = ExtLedgerState {
- ledgerState ∷ !(LedgerState blk)
- headerState ∷ !(HeaderState blk)
- data ExtValidationError blk
- = ExtValidationErrorLedger !(LedgerError blk)
- | ExtValidationErrorHeader !(HeaderError blk)
- decodeDiskExtLedgerState ∷ ∀ blk. (DecodeDisk blk (LedgerState blk), DecodeDisk blk (ChainDepState (BlockProtocol blk)), DecodeDisk blk (AnnTip blk)) ⇒ CodecConfig blk → ∀ s. Decoder s (ExtLedgerState blk)
- decodeExtLedgerState ∷ (∀ s. Decoder s (LedgerState blk)) → (∀ s. Decoder s (ChainDepState (BlockProtocol blk))) → (∀ s. Decoder s (AnnTip blk)) → ∀ s. Decoder s (ExtLedgerState blk)
- encodeDiskExtLedgerState ∷ ∀ blk. (EncodeDisk blk (LedgerState blk), EncodeDisk blk (ChainDepState (BlockProtocol blk)), EncodeDisk blk (AnnTip blk)) ⇒ CodecConfig blk → ExtLedgerState blk → Encoding
- encodeExtLedgerState ∷ (LedgerState blk → Encoding) → (ChainDepState (BlockProtocol blk) → Encoding) → (AnnTip blk → Encoding) → ExtLedgerState blk → Encoding
- castExtLedgerState ∷ (Coercible (LedgerState blk) (LedgerState blk'), Coercible (ChainDepState (BlockProtocol blk)) (ChainDepState (BlockProtocol blk')), TipInfo blk ~ TipInfo blk') ⇒ ExtLedgerState blk → ExtLedgerState blk'
- data family Ticked st ∷ Type
Extended ledger state
newtype ExtLedgerCfg blk Source #
" Ledger " configuration for the extended ledger
Since the extended ledger also does the consensus protocol validation, we also need the consensus config.
Instances
Generic (ExtLedgerCfg blk) Source # | |
Defined in Ouroboros.Consensus.Ledger.Extended type Rep (ExtLedgerCfg blk) ∷ Type → Type # from ∷ ExtLedgerCfg blk → Rep (ExtLedgerCfg blk) x # to ∷ Rep (ExtLedgerCfg blk) x → ExtLedgerCfg blk # | |
(ConsensusProtocol (BlockProtocol blk), NoThunks (BlockConfig blk), NoThunks (CodecConfig blk), NoThunks (LedgerConfig blk), NoThunks (StorageConfig blk), NoThunks (HeaderHash blk)) ⇒ NoThunks (ExtLedgerCfg blk) Source # | |
Defined in Ouroboros.Consensus.Ledger.Extended | |
type Rep (ExtLedgerCfg blk) Source # | |
Defined in Ouroboros.Consensus.Ledger.Extended type Rep (ExtLedgerCfg blk) = D1 ('MetaData "ExtLedgerCfg" "Ouroboros.Consensus.Ledger.Extended" "ouroboros-consensus-0.21.0.0-inplace" 'True) (C1 ('MetaCons "ExtLedgerCfg" 'PrefixI 'True) (S1 ('MetaSel ('Just "getExtLedgerCfg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TopLevelConfig blk)))) |
data ExtLedgerState blk Source #
Extended ledger state
This is the combination of the header state and the ledger state proper.
ExtLedgerState | |
|
Instances
data ExtValidationError blk Source #
Instances
Serialisation
decodeDiskExtLedgerState ∷ ∀ blk. (DecodeDisk blk (LedgerState blk), DecodeDisk blk (ChainDepState (BlockProtocol blk)), DecodeDisk blk (AnnTip blk)) ⇒ CodecConfig blk → ∀ s. Decoder s (ExtLedgerState blk) Source #
decodeExtLedgerState ∷ (∀ s. Decoder s (LedgerState blk)) → (∀ s. Decoder s (ChainDepState (BlockProtocol blk))) → (∀ s. Decoder s (AnnTip blk)) → ∀ s. Decoder s (ExtLedgerState blk) Source #
encodeDiskExtLedgerState ∷ ∀ blk. (EncodeDisk blk (LedgerState blk), EncodeDisk blk (ChainDepState (BlockProtocol blk)), EncodeDisk blk (AnnTip blk)) ⇒ CodecConfig blk → ExtLedgerState blk → Encoding Source #
encodeExtLedgerState ∷ (LedgerState blk → Encoding) → (ChainDepState (BlockProtocol blk) → Encoding) → (AnnTip blk → Encoding) → ExtLedgerState blk → Encoding Source #
Casts
castExtLedgerState ∷ (Coercible (LedgerState blk) (LedgerState blk'), Coercible (ChainDepState (BlockProtocol blk)) (ChainDepState (BlockProtocol blk')), TipInfo blk ~ TipInfo blk') ⇒ ExtLedgerState blk → ExtLedgerState blk' Source #
Type family instances
data family Ticked st ∷ Type 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
must equal
forecastFor
(ledgerViewForecastAt
cfg st)
slot
. Thus a
protocolLedgerView
cfg
(applyChainTick
cfg slot st)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.