Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data HardForkEnvelopeErr xs
- data HardForkLedgerError xs
- data HardForkLedgerUpdate xs
- = HardForkUpdateInEra (OneEraLedgerUpdate xs)
- | HardForkUpdateTransitionConfirmed (EraIndex xs) (EraIndex xs) EpochNo
- | HardForkUpdateTransitionDone (EraIndex xs) (EraIndex xs) EpochNo
- | HardForkUpdateTransitionRolledBack (EraIndex xs) (EraIndex xs)
- data HardForkLedgerWarning xs
- = HardForkWarningInEra (OneEraLedgerWarning xs)
- | HardForkWarningTransitionMismatch (EraIndex xs) EraParams EpochNo
- | HardForkWarningTransitionInFinalEra (EraIndex xs) EpochNo
- | HardForkWarningTransitionUnconfirmed (EraIndex xs)
- | HardForkWarningTransitionReconfirmed (EraIndex xs) (EraIndex xs) EpochNo EpochNo
- data family Ticked st ∷ Type
- data AnnForecast state view blk = AnnForecast {
- annForecast ∷ Forecast (view blk)
- annForecastState ∷ state blk
- annForecastTip ∷ WithOrigin SlotNo
- annForecastEnd ∷ Maybe Bound
- mkHardForkForecast ∷ ∀ state view xs. SListI xs ⇒ InPairs (CrossEraForecaster state view) xs → HardForkState (AnnForecast state view) xs → Forecast (HardForkLedgerView_ view xs)
Documentation
data HardForkEnvelopeErr xs Source #
HardForkEnvelopeErrFromEra (OneEraEnvelopeErr xs) | Validation error from one of the eras |
HardForkEnvelopeErrWrongEra (MismatchEraInfo xs) | We tried to apply a block from the wrong era |
Instances
data HardForkLedgerError xs Source #
HardForkLedgerErrorFromEra (OneEraLedgerError xs) | Validation error from one of the eras |
HardForkLedgerErrorWrongEra (MismatchEraInfo xs) | We tried to apply a block from the wrong era |
Instances
data HardForkLedgerUpdate xs Source #
HardForkUpdateInEra (OneEraLedgerUpdate xs) | |
HardForkUpdateTransitionConfirmed (EraIndex xs) (EraIndex xs) EpochNo | Hard fork transition got confirmed |
HardForkUpdateTransitionDone (EraIndex xs) (EraIndex xs) EpochNo | Hard fork transition happened We record the |
HardForkUpdateTransitionRolledBack (EraIndex xs) (EraIndex xs) | The hard fork transition rolled back |
Instances
CanHardFork xs ⇒ Show (HardForkLedgerUpdate xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger showsPrec ∷ Int → HardForkLedgerUpdate xs → ShowS # show ∷ HardForkLedgerUpdate xs → String # showList ∷ [HardForkLedgerUpdate xs] → ShowS # | |
CanHardFork xs ⇒ Eq (HardForkLedgerUpdate xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger (==) ∷ HardForkLedgerUpdate xs → HardForkLedgerUpdate xs → Bool # (/=) ∷ HardForkLedgerUpdate xs → HardForkLedgerUpdate xs → Bool # | |
CanHardFork xs ⇒ Condense (HardForkLedgerUpdate xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger condense ∷ HardForkLedgerUpdate xs → String Source # |
data HardForkLedgerWarning xs Source #
HardForkWarningInEra (OneEraLedgerWarning xs) | Warning from the underlying era |
HardForkWarningTransitionMismatch (EraIndex xs) EraParams EpochNo | The transition to the next era does not match the The |
HardForkWarningTransitionInFinalEra (EraIndex xs) EpochNo | Transition in the final era The final era should never confirm any transitions. For clarity, we also record the index of that final era. |
HardForkWarningTransitionUnconfirmed (EraIndex xs) | An already-confirmed transition got un-confirmed |
HardForkWarningTransitionReconfirmed (EraIndex xs) (EraIndex xs) EpochNo EpochNo | An already-confirmed transition got changed We record the indices of the era we are transitioning from and to,
as well as the old and new |
Instances
CanHardFork xs ⇒ Show (HardForkLedgerWarning xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger showsPrec ∷ Int → HardForkLedgerWarning xs → ShowS # show ∷ HardForkLedgerWarning xs → String # showList ∷ [HardForkLedgerWarning xs] → ShowS # | |
CanHardFork xs ⇒ Eq (HardForkLedgerWarning xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger (==) ∷ HardForkLedgerWarning xs → HardForkLedgerWarning xs → Bool # (/=) ∷ HardForkLedgerWarning xs → HardForkLedgerWarning xs → Bool # |
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.
Instances
Low-level API (exported for the benefit of testing)
data AnnForecast state view blk Source #
Forecast annotated with details about the ledger it was derived from
AnnForecast | |
|
mkHardForkForecast ∷ ∀ state view xs. SListI xs ⇒ InPairs (CrossEraForecaster state view) xs → HardForkState (AnnForecast state view) xs → Forecast (HardForkLedgerView_ view xs) Source #
Change a telescope of a forecast into a forecast of a telescope