feat: propagate consensus spans
Signed-off-by: Eric Torreborre <[email protected]>
Signed-off-by: Eric Torreborre <[email protected]>
Monte carlo simulation of TCP CUBIC, taking into account slow start, transition into congestion avoidance, and packet losses which affect the cwnd. The `tools` directory contains `plot_chunking.py` script for producing a CDF showing the benefit of chunking a large datum and requesting from multiple peers. Co-authored with Claude
Update most node instances to the 11.0.1 version.
Signed-off-by: Sasha Bogicevic <[email protected]>
Replace locally-defined orphan `ToJSON`/`FromJSON` instances that already exist in `Cardano.Network.OrphanInstances` (from the `cardano-diffusion:orphan-instances` sublibrary) with imports of that module: - `TopologyP2P`: remove `FromJSON/ToJSON PeerTrustable`, `FromJSON/ToJSON (NetworkTopology UseBootstrapPeers PeerTrustable)`, and `FromJSON UseBootstrapPeers`; add `Cardano.Network.OrphanInstances ()` and `Ouroboros.Network.OrphanInstances ()` imports. - `StateRep`: remove local `ToJSON/FromJSON NodeToNodeVersion`, `ToJSON/FromJSON NodeToClientVersion`, and `parseBoundedEnum`; add `Cardano.Network.OrphanInstances ()` import. - `Tracers`: remove Show-based `ToJSON NodeToNodeVersionData` and `ToJSON NodeToClientVersionData` stubs; add `Cardano.Network.OrphanInstances ()` import. Additionally fix two pre-existing issues in `Consensus.hs`: - `deltaq`: use `toJSON gsv` (structured JSON via `Ouroboros.Network.OrphanInstances`) instead of `String . show`. - `TraceDecisionEvent`: restore the `dtal >= DMaximum` conditional branch (replacing the reversed fold), using `forMachine DMaximum` for the verbose case. In `Startup.hs`, fix `ConsensusNetworkVersionTuple` to emit proper structured JSON for `nodeToClientVersion`/`nodeToNodeVersion` via `ToJSON` from `Cardano.Network.OrphanInstances`, and fix the `maxNodeToNode/ClientVersion` field to show only the version key rather than the full `(key, value)` pair.
We used to need to call `cborTermVersionDataCodec` to get `VersionDataCodec` from `CodecCBORTerm`. The `VersionDataCodec` and `cborTermVersionDataCodec` is moved to `ouroboros-network:api` library (`Ouroboros.network.CodecCBORTerm` module). `cardano-diffusion` provides both `nodeToNodeVersionDataCodec` and `nodeToClientVersionDataCodec`. This required a refactorisation in tests to get rid of some newtype wrappers, however the semantics of all the tests is preserved.
The tests started to fail due to usage of version data codec which doesn't satisfy round robin property on invalid version data in the previous commit.
Exposed `nodeTo{Node,Client}VersionDataCodec` instead.