Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.HardFork.Combinator.State.Types
Contents
Synopsis
- data Current f blk = Current {
- currentStart ∷ !Bound
- currentState ∷ !(f blk)
- newtype HardForkState f xs = HardForkState {
- getHardForkState ∷ Telescope (K Past) (Current f) xs
- data Past = Past {}
- sequenceHardForkState ∷ ∀ m f xs. (All Top xs, Functor m) ⇒ HardForkState (m :.: f) xs → m (HardForkState f xs)
- data TransitionInfo
- newtype Translate f x y = Translate {
- translateWith ∷ EpochNo → f x → f y
- newtype TranslateForecast f g x y = TranslateForecast {
- translateForecastWith ∷ Bound → SlotNo → f x → Except OutsideForecastRange (Ticked (g y))
Main types
Information about the current era
Constructors
Current | |
Fields
|
Instances
Eq (f blk) ⇒ Eq (Current f blk) Source # | |
Show (f blk) ⇒ Show (Current f blk) Source # | |
Generic (Current f blk) Source # | |
Serialise (f blk) ⇒ Serialise (Current f blk) Source # | |
NoThunks (f blk) ⇒ NoThunks (Current f blk) Source # | |
type Rep (Current f blk) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.State.Types type Rep (Current f blk) = D1 ('MetaData "Current" "Ouroboros.Consensus.HardFork.Combinator.State.Types" "ouroboros-consensus-0.3.1.0-inplace" 'False) (C1 ('MetaCons "Current" 'PrefixI 'True) (S1 ('MetaSel ('Just "currentStart") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bound) :*: S1 ('MetaSel ('Just "currentState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (f blk)))) |
newtype HardForkState f xs Source #
Generic hard fork state
This is used both for the consensus state and the ledger state.
Constructors
HardForkState | |
Fields
|
Instances
Information about a past era
Instances
Eq Past Source # | |
Show Past Source # | |
Generic Past Source # | |
Serialise Past Source # | |
NoThunks Past Source # | |
type Rep Past Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.State.Types type Rep Past = D1 ('MetaData "Past" "Ouroboros.Consensus.HardFork.Combinator.State.Types" "ouroboros-consensus-0.3.1.0-inplace" 'False) (C1 ('MetaCons "Past" 'PrefixI 'True) (S1 ('MetaSel ('Just "pastStart") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bound) :*: S1 ('MetaSel ('Just "pastEnd") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bound))) |
sequenceHardForkState ∷ ∀ m f xs. (All Top xs, Functor m) ⇒ HardForkState (m :.: f) xs → m (HardForkState f xs) Source #
Thin wrapper around sequence
Supporting types
data TransitionInfo Source #
Knowledge in a particular era of the transition to the next era
Constructors
TransitionUnknown !(WithOrigin SlotNo) | No transition is yet known for this era We instead record the ledger tip (which must be in this era) NOTE: If we are forecasting, this will be set to the slot number of the
(past) ledger state in which the forecast was created. This means that
when we construct an |
TransitionKnown !EpochNo | Transition to the next era is known to happen at this |
TransitionImpossible | The transition is impossible This can be due to one of two reasons:
|
Instances
newtype Translate f x y Source #
Translate f x
to f y
across an era transition
Typically f
will be LedgerState
or WrapChainDepState
.
Constructors
Translate | |
Fields
|
newtype TranslateForecast f g x y Source #
Translate (a forecast of) f x
to (a forecast of) f y
across an era transition.
Typically f
will be WrapLedgerView
.
In addition to the Bound
of the transition, this is also told the
SlotNo
we're constructing a forecast for. This enables the translation
function to take into account any scheduled changes that the final ledger
view in the preceding era might have.
Constructors
TranslateForecast | |
Fields
|