Skip to main content

Network Team Update

· 3 min read
Marcin Szamotulski

High-level overview of sprint 60

Edited on 8th of May: new EGK counters will be included in `cardano-node-8.9.3`, added links to `cardano-node-8.9.3` PR and `ouroboros-network-0.15` release.

Peer-Sharing Improvements

We continued working on improving peer sharing. As part of this work light peer sharing (e.g. including inbound peers to the known set of outbound governor), was restructured. Now, sending more peers than what was requested by the peer-sharing client is a protocol error, and the connection will be terminated; This hasn't been a resource attack vector since we always limited the number of peers taken by the outbound-governor and the number of peers has always been limited by the size of the mux ingress queue reserved for peer-sharing mini-protocol. These changes will be released in cardano-node-8.9.3. See ouroboros-network#4868

We also merged the work on outbound governor counters, which initially started as just an extension for peer-sharing counters but turned into a larger refactorisation. We announced it in the previous report. These changes will be included in 8.9.3. See ouroboros-network#4845, ouroboros-network#4861.

Light peer sharing (inbound peers) refactorisation allowed us to refactor the inbound governor loop: we restructured it so that the internal state is kept pure (and thus not shared with other threads), while the public part is computed incrementally (with good amortised costs and thus leading to good performance) and exposed to other components (e.g. the outbound-governor), see ouroboros-network#4871 (which is built on top of ouroboros-network#4868).

The PR [cardano-nod#5831] integrates ouroboros-network-0.15 with cardano-node-8.9.x branch. All included PRs / issues in ouroboros-network-0.15 are listed here.

Genesis

We implemented the API needed by the consensus layer for Genesis; see ouroboros-network#4815, ouroboros-network#4846.

We continued working on outbound governor changes to support Genesis:

Bootstrap Peers

Karl Knutsson ([CF]) found and fixed some problems related to big-ledger and public root peers. Here's an excerpt from the changelog file:

  • updated the big-ledger retry state in case of an exception;
  • reset public root retry state when transitioning between LedgerStateJudgements;
  • reduced public root retry timer;
  • don't classify a config file with public-root/bootstrap-peers IP addresses only as a DNS error. See ouroboros-network#4867.

Churn

We merged a refactorisation which synchronises churn with the outbound governor, see ouroboros-network#4617.

Minor Improvements

A few other minor improvements were merged:

Testing

We added quickcheck-monoids package and also submitted an upstream patch to QuickCheck to include a version of the standard All / Any monoids, which are helpful when writing more complex properties. We will use quickcheck-monoids until the upstream PR will be released. It will be available from CHaP. See quickcheck#397.