ouroboros-consensus-0.1.0.1: Consensus layer for the Ouroboros blockchain protocol
Safe Haskell None
Language Haskell2010

Ouroboros.Consensus.Network.NodeToNode

Description

Intended for qualified import

Synopsis

Handlers

mkHandlers :: forall m blk remotePeer localPeer. ( IOLike m, MonadTime m, MonadTimer m, LedgerSupportsMempool blk, HasTxId ( GenTx blk), LedgerSupportsProtocol blk, Ord remotePeer) => NodeKernelArgs m remotePeer localPeer blk -> NodeKernel m remotePeer localPeer blk -> Handlers m remotePeer blk Source #

Codecs

Byte Limits

data ByteLimits bCS bBF bTX bKA Source #

Per mini-protocol byte limits; For each mini-protocol they provide per-state byte size limits, i.e. how much data can arrive from the network.

They don't depend on the instantiation of the protocol parameters (which block type is used, etc.), hence the use of RankNTypes .

Tracers

type Tracers m peer blk e = Tracers' peer blk e ( Tracer m) Source #

A record of Tracer s for the different protocols.

nullTracers :: Monad m => Tracers m peer blk e Source #

Use a nullTracer for each protocol.

Applications

data Apps m peer bCS bBF bTX bKA a Source #

Applications for the node-to-node protocols

See MuxApplication

Constructors

Apps

Fields

type ClientApp m peer bytes a = NodeToNodeVersion -> ControlMessageSTM m -> peer -> Channel m bytes -> m (a, Maybe bytes) Source #

A node-to-node application

type ServerApp m peer bytes a = NodeToNodeVersion -> peer -> Channel m bytes -> m (a, Maybe bytes) Source #

mkApps Source #

Arguments

:: forall m remotePeer localPeer blk e bCS bBF bTX bKA. ( IOLike m, MonadTimer m, Ord remotePeer, Exception e, LedgerSupportsProtocol blk, ShowProxy blk, ShowProxy ( Header blk), ShowProxy ( TxId ( GenTx blk)), ShowProxy ( GenTx blk))
=> NodeKernel m remotePeer localPeer blk

Needed for bracketing only

-> Tracers m remotePeer blk e
-> ( NodeToNodeVersion -> Codecs blk e m bCS bCS bBF bBF bTX bKA)
-> ByteLimits bCS bBF bTX bKA
-> m ChainSyncTimeout
-> ReportPeerMetrics m remotePeer
-> Handlers m remotePeer blk
-> Apps m remotePeer bCS bBF bTX bKA ()

Construct the NetworkApplication for the node-to-node protocols

Projections

initiator :: MiniProtocolParameters -> NodeToNodeVersion -> Apps m ( ConnectionId peer) b b b b a -> OuroborosBundle ' InitiatorMode peer b m a Void Source #

A projection from NetworkApplication to a client-side OuroborosApplication for the node-to-node protocols.

Implementation note: network currently doesn't enable protocols conditional on the protocol version, but it eventually may; this is why _version is currently unused.

initiatorAndResponder :: MiniProtocolParameters -> NodeToNodeVersion -> Apps m ( ConnectionId peer) b b b b a -> OuroborosBundle ' InitiatorResponderMode peer b m a a Source #

A bi-directional network applicaiton.

Implementation note: network currently doesn't enable protocols conditional on the protocol version, but it eventually may; this is why _version is currently unused.

Re-exports

data ChainSyncTimeout Source #

Configurable timeouts

These are configurable for at least the following reasons.

o So that deployment and testing can use different values.

o So that a net running Praos can better cope with streaks of empty slots. (See input-output-hk/ouroboros-network#2245 .)