ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.MiniProtocol.BlockFetch.ClientInterface

Description

Initialization of the BlockFetchConsensusInterface

Synopsis

Documentation

data ChainDbView (m ∷ Type → Type) blk Source #

Abstract over the ChainDB

Constructors

ChainDbView 

Fields

data MatchedBlock blk Source #

A fetched block, together with what validating the header it matched revealed

BlockFetch derives this from the header and the block together, which is what ties the annotation to the very header the block was matched against.

Constructors

MatchedBlock 

Fields

defaultChainDbView ∷ ∀ (m ∷ Type → Type) blk. ChainDB m blk → ChainDbView m blk Source #

mkBlockFetchConsensusInterface Source #

Arguments

∷ ∀ (m ∷ Type → Type) peer blk. (IOLike m, BlockSupportsDiffusionPipelining blk, Ord peer, LedgerSupportsProtocol blk, ConfigSupportsNode blk) 
⇒ Tracer m (TraceEventDbf peer) 
→ BlockConfig blk 
→ ChainDbView m blk 
→ ChainSyncClientHandleCollection peer m blk 
→ (Header blk → SizeInBytes) 
→ STM m FetchMode

See readFetchMode.

→ DiffusionPipeliningSupport 
→ BlockFetchConsensusInterface peer (HeaderWithTime blk) blk (MatchedBlock blk) m 

readFetchModeDefault ∷ ∀ (m ∷ Type → Type) blk. (MonadSTM m, HasHeader blk) ⇒ ConsensusMode → BlockchainTime m → STM m (AnchoredFragment blk) → STM m UseBootstrapPeers → STM m LedgerStateJudgement → STM m FetchMode Source #