Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.HardFork.Combinator.Forging
Synopsis
- type HardForkCannotForge (xs ∷ [Type]) = OneEraCannotForge xs
- data HardForkForgeStateInfo (xs ∷ [Type]) where
- CurrentEraLacksBlockForging ∷ ∀ x y (xs1 ∷ [Type]). EraIndex (x ': (y ': xs1)) → HardForkForgeStateInfo (x ': (y ': xs1))
- CurrentEraForgeStateUpdated ∷ ∀ (xs ∷ [Type]). OneEraForgeStateInfo xs → HardForkForgeStateInfo xs
- type HardForkForgeStateUpdateError (xs ∷ [Type]) = OneEraForgeStateUpdateError xs
- hardForkBlockForging ∷ ∀ (m ∷ Type → Type) (xs ∷ [Type]). (CanHardFork xs, Monad m) ⇒ Text → NonEmptyOptNP (BlockForging m) xs → BlockForging m (HardForkBlock xs)
Documentation
type HardForkCannotForge (xs ∷ [Type]) = OneEraCannotForge xs Source #
If we cannot forge, it's because the current era could not forge
data HardForkForgeStateInfo (xs ∷ [Type]) where Source #
For each era in which we want to forge blocks, we have a BlockForging
,
and thus ForgeStateInfo
.
When we update the hard fork forge state, we only update the forge state of
the current era. However, the current era might not have a forge state as
it lacks a BlockForging
.
TODO #2766: expire past ForgeState
Constructors
CurrentEraLacksBlockForging ∷ ∀ x y (xs1 ∷ [Type]). EraIndex (x ': (y ': xs1)) → HardForkForgeStateInfo (x ': (y ': xs1)) | There is no |
CurrentEraForgeStateUpdated ∷ ∀ (xs ∷ [Type]). OneEraForgeStateInfo xs → HardForkForgeStateInfo xs | The |
Instances
CanHardFork xs ⇒ Show (HardForkForgeStateInfo xs) Source # | |
Defined in Ouroboros.Consensus.HardFork.Combinator.Forging Methods showsPrec ∷ Int → HardForkForgeStateInfo xs → ShowS # show ∷ HardForkForgeStateInfo xs → String # showList ∷ [HardForkForgeStateInfo xs] → ShowS # |
type HardForkForgeStateUpdateError (xs ∷ [Type]) = OneEraForgeStateUpdateError xs Source #
For each era in which we want to forge blocks, we have a BlockForging
,
and thus ForgeStateUpdateError
.
Arguments
∷ ∀ (m ∷ Type → Type) (xs ∷ [Type]). (CanHardFork xs, Monad m) | |
⇒ Text | Used as the |
→ NonEmptyOptNP (BlockForging m) xs | |
→ BlockForging m (HardForkBlock xs) |