ouroboros-consensus-0.18.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Synopsis

Documentation

class Inject f where Source #

Methods

inject Source #

Arguments

∷ ∀ x xs. CanHardFork xs 
Exactly xs Bound

Start bound of each era

Index xs x 
→ f x 
→ f (HardForkBlock xs) 

Instances

Instances details
Inject Header Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → Header x → Header (HardForkBlock xs) Source #

Inject AnnTip Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → AnnTip x → AnnTip (HardForkBlock xs) Source #

Inject HeaderState Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → HeaderState x → HeaderState (HardForkBlock xs) Source #

Inject LedgerState Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → LedgerState x → LedgerState (HardForkBlock xs) Source #

Inject ExtLedgerState Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → ExtLedgerState x → ExtLedgerState (HardForkBlock xs) Source #

Inject GenTx Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → GenTx x → GenTx (HardForkBlock xs) Source #

Inject SerialisedHeader Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → SerialisedHeader x → SerialisedHeader (HardForkBlock xs) Source #

Inject WrapApplyTxErr Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → WrapApplyTxErr x → WrapApplyTxErr (HardForkBlock xs) Source #

Inject WrapChainDepState Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → WrapChainDepState x → WrapChainDepState (HardForkBlock xs) Source #

Inject WrapGenTxId Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → WrapGenTxId x → WrapGenTxId (HardForkBlock xs) Source #

Inject WrapHeaderHash Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → WrapHeaderHash x → WrapHeaderHash (HardForkBlock xs) Source #

Inject I Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → I x → I (HardForkBlock xs) Source #

Inject (SomeSecond BlockQuery) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → SomeSecond BlockQuery x → SomeSecond BlockQuery (HardForkBlock xs) Source #

inject' ∷ ∀ f a b x xs. (Inject f, CanHardFork xs, Coercible a (f x), Coercible b (f (HardForkBlock xs))) ⇒ Proxy f → Exactly xs BoundIndex xs x → a → b Source #

Defaults

injectHardForkState Source #

Arguments

∷ ∀ f x xs. Exactly xs Bound

Start bound of each era

Index xs x 
→ f x 
HardForkState f xs 

injectNestedCtxt_ ∷ ∀ f x xs a. Index xs x → NestedCtxt_ x f a → NestedCtxt_ (HardForkBlock xs) f a Source #

injectQuery ∷ ∀ x xs result. Index xs x → BlockQuery x result → QueryIfCurrent xs result Source #

Initial ExtLedgerState

injectInitialExtLedgerState ∷ ∀ x xs. CanHardFork (x ': xs) ⇒ TopLevelConfig (HardForkBlock (x ': xs)) → ExtLedgerState x → ExtLedgerState (HardForkBlock (x ': xs)) Source #

Inject the first era's initial ExtLedgerState and trigger any translations that should take place in the very first slot.

Performs any hard forks scheduled via TriggerHardForkAtEpoch.

Note: we can translate across multiple eras when computing the initial ledger state, but we do not support translation across multiple eras in general; extending applyChainTick to translate across more than one era is not problematic, but extending ledgerViewForecastAt is a lot more subtle; see forecastNotFinal.