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

Ouroboros.Consensus.MiniProtocol.BlockFetch.ClientInterface

Description

Initialization of the BlockFetchConsensusInterface

Synopsis

Documentation

data ChainDbView m blk Source #

Abstract over the ChainDB

type SlotForgeTimeOracle m blk = RealPoint blk → STM m UTCTime Source #

How to get the wall-clock time of a slot. Note that this is a very non-trivial operation in the context of the HFC, cf. headerForgeUTCTime.

initSlotForgeTimeOracle ∷ ∀ m blk. (IOLike m, BlockSupportsProtocol blk, HasHardForkHistory blk, ConfigSupportsNode blk, IsLedger (LedgerState blk)) ⇒ TopLevelConfig blk → ChainDB m blk → m (SlotForgeTimeOracle m blk) Source #

Create a HFC-enabled SlotForgeTimeOracle. Note that its semantics are rather tricky, cf. headerForgeUTCTime.

mkBlockFetchConsensusInterface Source #

Arguments

∷ ∀ m peer blk. (IOLike m, BlockSupportsDiffusionPipelining blk, Ord peer, LedgerSupportsProtocol blk) 
Tracer m (TraceEvent peer) 
BlockConfig blk 
ChainDbView m blk 
ChainSyncClientHandleCollection peer m blk 
→ (Header blk → SizeInBytes) 
SlotForgeTimeOracle m blk

Slot forge time, see headerForgeUTCTime and blockForgeUTCTime.

STM m FetchMode

See readFetchMode.

DiffusionPipeliningSupport 
BlockFetchConsensusInterface peer (Header blk) blk m