ouroboros-consensus-0.26.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.HardFork.Combinator.Compat

Synopsis

Documentation

data HardForkCompatQuery blk (fp ∷ QueryFootprint) result where Source #

Version of Query (HardForkBlock xs) without the restriction to have at least two eras

Constructors

CompatIfCurrent ∷ ∀ blk (fp ∷ QueryFootprint) result. BlockQuery blk fp result → HardForkCompatQuery blk fp result 
CompatAnytime ∷ ∀ result blk. QueryAnytime result → EraIndex (HardForkIndices blk) → HardForkCompatQuery blk 'QFNoTables result 
CompatHardFork ∷ ∀ blk result. QueryHardFork (HardForkIndices blk) result → HardForkCompatQuery blk 'QFNoTables result 

Convenience constructors

compatGetEraStartEraIndex (HardForkIndices blk) → HardForkCompatQuery blk 'QFNoTables (Maybe Bound) Source #

Get the start of the specified era, if known

compatGetInterpreterHardForkCompatQuery blk 'QFNoTables (Interpreter (HardForkIndices blk)) Source #

Get an interpreter for history queries

I.e., this can be used for slotepochtime conversions.

compatIfCurrent ∷ ∀ fp (blk ∷ QueryFootprint) result. BlockQuery fp blk result → HardForkCompatQuery fp blk result Source #

Submit query to underlying ledger

Wrappers

forwardCompatQuery Source #

Arguments

∷ ∀ m x (xs ∷ [Type]) (fp ∷ QueryFootprint). IsNonEmpty xs 
⇒ (∀ result. BlockQuery (HardForkBlock (x ': xs)) fp result → m result)

Submit a query through the LocalStateQuery protocol.

→ ∀ result. HardForkCompatQuery (HardForkBlock (x ': xs)) fp result 
→ m result 

Wrapper used when connecting to a server that's running the HFC with at least two eras

singleEraCompatQuery Source #

Arguments

∷ ∀ m blk era (fp ∷ QueryFootprint). (Monad m, HardForkIndices blk ~ '[era]) 
EpochSize 
SlotLength 
GenesisWindow 
→ (∀ result. BlockQuery blk fp result → m result)

Submit a query through the LocalStateQuery protocol.

→ ∀ result. HardForkCompatQuery blk fp result 
→ m result 

Wrapper used when connecting to a server that's not using the HFC, or is using the HFC but with a single era only.