@@ -68,6 +68,10 @@ import Ouroboros.Consensus.MiniProtocol.ChainSync.Client
68
68
)
69
69
import qualified Ouroboros.Consensus.MiniProtocol.ChainSync.Client as CsClient
70
70
import Ouroboros.Consensus.MiniProtocol.ChainSync.Server
71
+ import Ouroboros.Consensus.MiniProtocol.ObjectDiffusion.Inbound (objectDiffusionInbound )
72
+ import Ouroboros.Consensus.MiniProtocol.ObjectDiffusion.ObjectPool.PerasCert
73
+ import Ouroboros.Consensus.MiniProtocol.ObjectDiffusion.Outbound (objectDiffusionOutbound )
74
+ import Ouroboros.Consensus.MiniProtocol.ObjectDiffusion.PerasCert
71
75
import Ouroboros.Consensus.Node.ExitPolicy
72
76
import Ouroboros.Consensus.Node.NetworkProtocolVersion
73
77
import Ouroboros.Consensus.Node.Run
@@ -197,6 +201,19 @@ data Handlers m addr blk = Handlers
197
201
NodeToNodeVersion ->
198
202
ConnectionId addr ->
199
203
TxSubmissionServerPipelined (GenTxId blk ) (GenTx blk ) m ()
204
+ , hPerasCertDiffusionInbound ::
205
+ NodeToNodeVersion ->
206
+ ConnectionId addr ->
207
+ PerasCertDiffusionInboundPipelined blk m ()
208
+ -- ^ TODO: We should pass 'hPerasCertDiffusionInbound' to the network
209
+ -- layer, as per https://github.com/tweag/cardano-peras/issues/78
210
+ , hPerasCertDiffusionOutbound ::
211
+ NodeToNodeVersion ->
212
+ ControlMessageSTM m ->
213
+ ConnectionId addr ->
214
+ PerasCertDiffusionOutbound blk m ()
215
+ -- ^ TODO: We should pass 'hPerasCertDiffusionOutbound' to the network
216
+ -- layer, as per https://github.com/tweag/cardano-peras/issues/78
200
217
, hKeepAliveClient ::
201
218
NodeToNodeVersion ->
202
219
ControlMessageSTM m ->
@@ -293,6 +310,22 @@ mkHandlers
293
310
(mapTxSubmissionMempoolReader txForgetValidated $ getMempoolReader getMempool)
294
311
(getMempoolWriter getMempool)
295
312
version
313
+ , hPerasCertDiffusionInbound = \ version peer ->
314
+ objectDiffusionInbound
315
+ (contramap (TraceLabelPeer peer) (Node. perasCertDiffusionInboundTracer tracers))
316
+ ( perasCertDiffusionMaxFifoLength miniProtocolParameters
317
+ , 10 -- TODO https://github.com/tweag/cardano-peras/issues/97
318
+ , 10 -- TODO https://github.com/tweag/cardano-peras/issues/97
319
+ )
320
+ (makePerasCertPoolWriterFromChainDB $ getChainDB)
321
+ version
322
+ , hPerasCertDiffusionOutbound = \ version controlMessageSTM peer ->
323
+ objectDiffusionOutbound
324
+ (contramap (TraceLabelPeer peer) (Node. perasCertDiffusionOutboundTracer tracers))
325
+ (perasCertDiffusionMaxFifoLength miniProtocolParameters)
326
+ (makePerasCertPoolReaderFromChainDB $ getChainDB)
327
+ version
328
+ controlMessageSTM
296
329
, hKeepAliveClient = \ _version -> keepAliveClient (Node. keepAliveClientTracer tracers) keepAliveRng
297
330
, hKeepAliveServer = \ _version _peer -> keepAliveServer
298
331
, hPeerSharingClient = \ _version controlMessageSTM _peer -> peerSharingClient controlMessageSTM
0 commit comments