| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.HardFork.Combinator.State.Types
Contents
Synopsis
- newtype HardForkState f xs = HardForkState {
- getHardForkState :: Telescope (K Past) (Current f) xs
- data Current f blk = Current {
- currentStart :: !Bound
- currentState :: !(f blk)
- data Past = Past {}
- 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))
- data TransitionInfo
Main types
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 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 # | |
| NoThunks (f blk) => NoThunks (Current f blk) Source # | |
| Serialise (f blk) => Serialise (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.1.0.0-GfJNvFcM6lj2s5utKAUPEp" '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)))) | |
Information about a past era
Instances
| Eq Past Source # | |
| Show Past Source # | |
| Generic Past Source # | |
| NoThunks Past Source # | |
| Serialise 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.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "Past" 'PrefixI 'True) (S1 ('MetaSel ('Just "pastStart") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bound) :*: S1 ('MetaSel ('Just "pastEnd") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bound))) | |
Supporting types
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
| |
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:
|