Skip to content

Commit

Permalink
network update: sprint 46
Browse files Browse the repository at this point in the history
  • Loading branch information
coot committed Oct 4, 2023
1 parent a02bc94 commit 67c45e0
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions blog/2023-10-02-network.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: Network Team Update
slug: 2023-10-02-network
authors: coot
tags: [network]
hide_table_of_contents: false
---

## High-level overview of [sprint 45][sprint-45]

[sprint-45]: https://github.com/orgs/input-output-hk/projects/19/views/16?filterQuery=sprint%3A%22sprint+45%22

### Bootstrap Peers

We started reviewing the bootstrap peers PR, [ouroboros-network#4615].

### Towards Typed Protocols 0.2.0.0

We discovered a performance regression when using `typed-protocols-0.2.0.0`, and we
started investigating where it comes from. Currently, we see that
`typed-protocols-0.2.0.0` can outperform `typed-protocols-0.1.0.0` when running
in isolation with a simple `ping-pong` protocol, so the regression might be in
the new block fetch implementation which comes with `typed-protocols-0.2.0.0`
See

### Tech Debt

We merged two PRs written by Galois engineers:

* a pull request which refactors the main entry function for P2P, see [ouroboros-network#3834];
* a pull request which reviews usage of `unsafe` function in the network code based.

### IO-Sim

#### IOSimPOR
We found and fixed a bug in `IOSimPOR`. We'd like to thank Prof. John Hughes
(Quviq AB) for helping us with debugging the issue.

We also provided a more uniform API for `IOSimPOR`, and added ways to make the
debugging similar problems in the future easier.

We removed the usage of `unsafePerformIO` from `IOSimPOR`, which also means
removing parallel evaluation of discovered races. We found out that it gives
only 25% better performance. In the future QuickCheck will offer running
different cases in parallel which should provide better performance as there
are no dependencies between the evaluation of different test cases, while schedules
are discovered while running which limits the possible gains from running them
concurrently. The performance was not the only factor though. When using
parallelism in the lazy `ST` monad we'd need to rely on memory guarantees of
`STRefs`. In `GHC-9.6` they share the implementation with `IORef`s, but it
might not be the case in the future.

#### IOSim

To prepare for the next release, we consolidate packages taking advantage of
the public sublibraries supported now both by `cabal` and `Hackage`. This is
a work in progress, [io-sim#114].

### P2P adoption

In the last two weeks, we've seen increase in P2P adoption. Karl Knutsson
([Cardano Foundation][CF]) is investigating this issue.
![P2P relays](/images/network/2023-10-04-p2p-relays.png)


The following graphs show several different versions of relays running on the mainnet. The
green line `NodeToNodeVersionV10.True` denotes P2P relays.
![node versions](/images/network/2023-10-04-relay-versions.png)

### Open Source

We upstreamed our FFI bindings to Windows named pipes to `Win32` package, the
PR was accepted and merged.

We also received an external contribution which enhanced our documentation, see
[ouroboros-network#4676].

[ouroboros-network#4615]: https://github.com/input-output-hk/ouroboros-network/issues/4615
[ouroboros-network#3834]: https://github.com/input-output-hk/ouroboros-network/issues/3834
[ouroboros-network#3835]: https://github.com/input-output-hk/ouroboros-network/issues/3835
[ouroboros-network#4676]: https://github.com/input-output-hk/ouroboros-network/pull/4676
[io-sim#113]: https://github.com/input-output-hk/io-sim/issues/113
[io-sim#114]: https://github.com/input-output-hk/io-sim/issues/114
Binary file added static/images/network/2023-10-04-p2p-relays.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 67c45e0

Please sign in to comment.