Skip to content

NOT MERGE: Leios prototype remake#5370

Merged
ch1bo merged 857 commits into
leios-prototypefrom
leios-prototype-remake
Jun 1, 2026
Merged

NOT MERGE: Leios prototype remake#5370
ch1bo merged 857 commits into
leios-prototypefrom
leios-prototype-remake

Conversation

@ch1bo

@ch1bo ch1bo commented May 15, 2026

Copy link
Copy Markdown

Note

This PR intends to fast-forward leios-prototype into the head of leios-prototype-remake. The remake now targets ouroboros-network-1.1.0.0 (the release shipped with cardano-node 11.0.1 / ouroboros-consensus 3.0.1.0), not master. For side-by-side comparison see diffs to the branch points:

Commits

Four commits on top of 47ef632cb1 Reset leios-prototype to ouroboros-network-1.1.0.0 (Leios commits replayed below) — a snapshot-merge whose first parent is the original leios-prototype tip (479f0d0d82 leiosdemo202511: introduce BearerBytes class) and second parent is the ouroboros-network-1.1.0.0 release tag. The merge's tree equals the 1.1.0.0 tree, so git log --first-parent leios-prototype-remake walks back through the original prototype's history (preserved in the DAG), while the topical commits build on the released base.

  • Bump trace-dispatcher to ^>=2.12 (compat with cardano-node 11.0.1). Released 1.1.0.0 of ouroboros-network and 1.0.0.0 of cardano-diffusion pin trace-dispatcher ^>=2.11.0, but cardano-node 11.0.1 pulls in trace-dispatcher 2.12.x. Bumps ouroboros-network/ouroboros-network.cabal and cardano-diffusion/cardano-diffusion.cabal constraints, advances cabal.project's CHaP index-state to 2026-04-13T13:33:52Z (the same date the consensus 3.0.1.0 release was cut), and refreshes flake.lock for the new CHaP nar-hash. No code change.
  • Leios N: BearerBytes class replaces dataSize on ProtocolSizeLimits (Nicolas Frisby's original chunk). Introduces the BearerBytes typeclass and removes the dataSize :: bytes -> Word function argument from ProtocolSizeLimits-using entry points (byteLimits*, runPeerWithLimits, runDriver*). Downstream codec / driver layers express the size-limit dependency as a constraint rather than a passed-in function.
  • Leios N: Reception arrival-time on recv (demo-tuning) (Nicolas Frisby's original chunk). Wraps Channel m a recv values in Reception a = MkReception !(IntMap Time) !a, recording per-chunk arrival times. In the mux demuxer the chunk's arrival time is paired with its starting byte offset; codec / driver layers either strip the time map (codec sees only bytes) or propagate it through wrapMiniProtocolTrailing at the mini-protocol callback boundary. Tests / demos / benches synthesise trailing as MkReception IntMap.empty. This is the network half of the November Leios demo's arrival-time plumbing; consumers (e.g. Praos block-arrival tracing on the consensus side) wire up separately.
  • Drop unused Data.ByteString.Lazy / Data.List / Data.IntMap imports. Upstream cleanup, not Leios-specific: eight unused-import warnings that the network's own -Werror (via nix/ouroboros-network.nix) promotes to errors. They were present at the main-peras-5202-merged SHA but surface here as well; cleaned for cabal build all --ghc-options=-Werror.

Verified by

  • cabal build all clean in the dev-top-level devshell.
  • Downstream cabal build all in ouroboros-consensus (with its cabal.project SRP at this branch tip) and in cardano-node 11.0.1 (with its SRPs at the consensus/network rebased tips). End-to-end proto-devnet run (3 cardano-node 11.0.1 binaries linked against this network) reaches era=Dijkstra and confirms LeiosNotify/LeiosFetch diffusion.

Companion PRs

coot and others added 30 commits October 24, 2025 14:17
The governor will not demote an established peer if we are above the
target but demotions are in progress.
…positive-test-failure

peer selection: fixed a false positive tests failure
If the number of established peers replaced is lower than the number of
active peers replaced the set of established peers risk becoming a
graveyard of already tried peers.

This change enforces a min number of changed established and known peers
based on the number of replaced active and established peers.
Add support for nothunks == 0.3.*
It is not used, without we don't need genesis file in the configuration.
…ution-config

dmq-node: removed KES evolution config
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…actions/checkout-6

build(deps): bump actions/checkout from 5 to 6
Make sure that we can reliably decode mux headers even if the span
multiple tcp segments.
This ensures that cache is populated for feature branches.
This fixes a bug in network-mux, where trailing bytes are assembled out
of order. This bug is not executable on cardano, since there for any
mini-protocol the initiator side sends the initial message.  It only
affects the process of restarting a mini-protocol on an established
connection.

The commit includes a test which exhibits this behaviour in an
artificial way.
@ch1bo ch1bo linked an issue May 15, 2026 that may be closed by this pull request
4 tasks
@ch1bo ch1bo changed the title Leios prototype recreation onto current main Leios prototype recreation onto current main (chunked) May 16, 2026
@ch1bo ch1bo force-pushed the leios-prototype-remake branch from f034838 to 23915a2 Compare May 17, 2026 17:32
@ch1bo ch1bo marked this pull request as draft May 18, 2026 07:59
@ch1bo ch1bo changed the title Leios prototype recreation onto current main (chunked) Leios prototype remake onto network as released into 11.0.1 May 18, 2026
@ch1bo ch1bo force-pushed the leios-prototype-remake branch from 1cc6149 to fda0623 Compare May 18, 2026 08:37
@ch1bo ch1bo marked this pull request as ready for review May 18, 2026 08:38
@ch1bo ch1bo changed the title Leios prototype remake onto network as released into 11.0.1 NOT MERGE: Leios prototype remake onto network as released into 11.0.1 May 18, 2026
@ch1bo ch1bo changed the base branch from leios-prototype to main May 18, 2026 11:04
@ch1bo ch1bo changed the title NOT MERGE: Leios prototype remake onto network as released into 11.0.1 NOT MERGE: Leios prototype remake May 18, 2026
@ch1bo ch1bo force-pushed the leios-prototype-remake branch 2 times, most recently from 4f2c9ea to 589fba6 Compare May 19, 2026 08:13
ch1bo and others added 2 commits May 19, 2026 10:19
The 1.1.0.0 release of 'ouroboros-network' and the 1.0.0.0 release of
'cardano-diffusion' both pin 'trace-dispatcher ^>=2.11.0', but
cardano-node 11.0.1 pulls in trace-dispatcher 2.12.x. Bump the bounds
in both cabal files so the rebased Leios fork builds against the
trace-dispatcher version shipped with cardano-node 11.0.1.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace the `dataSize :: bytes -> Word` field of `ProtocolSizeLimits`
with a `BearerBytes` class:

    class BearerBytes bytes where
        bearerBytesSize :: bytes -> Word

Default instances cover `BS.ByteString`, `BL.ByteString`, `[Char]` and
`AnyMessage msg` (for tests).  Driver/Limits gains a `BearerBytes bytes`
constraint on the public entry points (`runPeerWithLimits` and friends).
The seven `byteLimits*` codec helpers no longer take a
`(bytes -> Word)` argument — call sites drop the `(fromIntegral .
LBS.length)` boilerplate.  Two test predicates that previously used
`dataSize` now call `bearerBytesSize` directly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
nfrisby and others added 2 commits May 23, 2026 09:20
Wrap `Channel m a` recv values in a new `Reception a = MkReception
!(IntMap Time) !a`, recording per-chunk arrival times.  In the mux
demuxer the chunk's arrival time is paired with its starting byte
offset; codec/driver layers either strip the time map (the codec sees
only bytes) or propagate it through `wrapMiniProtocolTrailing` at the
mini-protocol callback boundary.  Tests/demos/benches use `IntMap.empty`
when synthesising trailing.

This is the network half of the November Leios demo's arrival-time
plumbing; consumers (e.g. Praos block-arrival tracing on the consensus
side) will be wired up separately.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Upstream cleanup, not Leios-specific: eight unused-import warnings that
upstream's own ghc-options promote to errors via 'nix/ouroboros-network.nix'
('-Werror' on forAllProjectPackages). They've been present at the
'main-peras-5202-merged' SHA that cardano-node and ouroboros-consensus
master both consume; surface when downstream haskell.nix builds also
inherit `-Werror`.

Affected files (one unused qualified import each):
- framework/lib/Ouroboros/Network/Protocol/Handshake/Codec.hs (BL)
- framework/tests-lib/.../ConnectionManager/Experiments.hs (LBS)
- framework/io-tests/.../Driver.hs (List)
- framework/io-tests/.../Socket.hs (IntMap)
- tests/lib/.../TxSubmission/AppV1.hs (BSL)
- tests/lib/.../TxSubmission/AppV2.hs (BSL)
- protocols/tests-lib/.../KeepAlive/Test.hs (BL)
- protocols/tests-lib/.../PeerSharing/Test.hs (BL)

Verified with 'cabal clean && cabal build all --ghc-options=-Werror' →
exit 0.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@ch1bo ch1bo force-pushed the leios-prototype-remake branch from e010b5e to c66e9a2 Compare May 23, 2026 07:37
The definition is already guarded by '#if !defined(mingw32_HOST_OS)';
the export was not, causing Windows cross-compile to fail with
'Not in scope: createSocketConnectedChannels'.
@ch1bo ch1bo changed the base branch from main to leios-prototype June 1, 2026 07:29
@ch1bo ch1bo merged commit 35bf51d into leios-prototype Jun 1, 2026
3 of 7 checks passed
@ch1bo ch1bo deleted the leios-prototype-remake branch June 1, 2026 07:32
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Ouroboros Network Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

leios Issues / PRs related to Leios

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Update prototype to Dijkstra