Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 :: forall 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
Current | |
|
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.1-DT4Cvwf63DZKctsEvaJqCU" '
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.
HardForkState | |
|
Instances
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.1-DT4Cvwf63DZKctsEvaJqCU" '
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 :: forall 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
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
Show TransitionInfo Source # | |
Generic TransitionInfo Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.State.Types from :: TransitionInfo -> Rep TransitionInfo x Source # to :: Rep TransitionInfo x -> TransitionInfo Source # |
|
NoThunks TransitionInfo Source # | |
type Rep TransitionInfo Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.State.Types
type
Rep
TransitionInfo
=
D1
('
MetaData
"TransitionInfo" "Ouroboros.Consensus.HardFork.Combinator.State.Types" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" '
False
) (
C1
('
MetaCons
"TransitionUnknown" '
PrefixI
'
False
) (
S1
('
MetaSel
('
Nothing
::
Maybe
Symbol
) '
NoSourceUnpackedness
'
SourceStrict
'
DecidedStrict
) (
Rec0
(
WithOrigin
SlotNo
)))
:+:
(
C1
('
MetaCons
"TransitionKnown" '
PrefixI
'
False
) (
S1
('
MetaSel
('
Nothing
::
Maybe
Symbol
) '
NoSourceUnpackedness
'
SourceStrict
'
DecidedStrict
) (
Rec0
EpochNo
))
:+:
C1
('
MetaCons
"TransitionImpossible" '
PrefixI
'
False
) (
U1
::
Type
->
Type
)))
|
newtype Translate f x y Source #
Translate
f x
to
f y
across an era transition
Typically
f
will be
LedgerState
or
WrapChainDepState
.
Translate | |
|
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.
TranslateForecast | |
|