ouroboros-network
ouroboros-network copied to clipboard
data diffusion startup in cardano-node
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 setup → consensus options & network options → consensus 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).