ouroboros-network icon indicating copy to clipboard operation
ouroboros-network copied to clipboard

data diffusion startup in cardano-node

Open coot opened this issue 5 years ago • 2 comments
trafficstars

Currently the flow of data in cardano-node is not very clear. Partially the confusion comes from the fact that runDataDiffusion is run by consensus application. The current flow is:

environment (genesis, config, cli options) → consensus protocol setupconsensus options & network optionsconsensus starts data diffusion

Some network options go into consensus like network magic (it's needed to start protocols), some not (node addresses for diffusion). We should have something like this:

runDataDiffusion
  ∷ DiffusionArguments
  → (NetworkArgumentsRequiredByConsensus → m NodeToNodeProtocols)
  → m Void

NetworkArgumentsRequiredByConsensus would be passed as part of DiffusionArguments and they can come from environment (genesis, CLI args, etc), without going through consensus setup first (the protocolInfo and friends).

coot avatar May 12 '20 04:05 coot