Skip to content

Port kupo to the cardano-node 11.1 stack (Dijkstra groundwork) - #7

Closed
Jimbo4350 wants to merge 10 commits into
masterfrom
jmillar/vanrossem-integration
Closed

Jimbo4350 wants to merge 10 commits into
masterfrom
jmillar/vanrossem-integration

Conversation

@Jimbo4350

@Jimbo4350 Jimbo4350 commented Sep 17, 2026 •

Copy link
Copy Markdown

Context

Moves kupo onto the cardano-node 11.1.1 release set so it builds against the ledger line that carries the current Dijkstra era (cardano-ledger-dijkstra 0.3.0.0): ouroboros-consensus 4.2.1, ouroboros-network 1.2, cardano-ledger-conway 1.23 / core 1.21.

This is groundwork only. No released node makes Dijkstra functional yet, and cardano-ledger master already has an unreleased cardano-ledger-dijkstra 0.4.0.0 that changes the Dijkstra block body serialisation, so kupo's Dijkstra indexing (the missing foldBlock arm and the canonical-era promotion) is deliberately left for a follow-up once that lands in a node release.

Changes

  • Dependency bump to node 11.1.1 (cabal.project), dropping the stale validation < 1.2 pin that consensus 4.x rejects.
  • contra-tracers is taken from the IntersectMBO/ogmios fork via source-repository-package alongside fast-bech32. Hackage's 1.0.0 no longer compiles against contra-tracer 0.2, which consensus now pins; the one-line fix is in contra-tracers: require Monad m for GConfigureTracers (contra-tracer >= 0.2) ogmios#13. Plan: cut a minor ogmios release once the Dijkstra work has landed and drop the SRP.
  • API port for the new stack:
    • contra-tracer 0.2: Tracer wraps an arrow, build the log sink with mkTracer.
    • consensus 4.x: fromRawHash / fromShortRawHash return Maybe; use the unsafe* variants where the hash size is already known.
    • ledger-core 1.21: Metadatum.B holds a ByteArray; convert via ShortByteString in the JSON codec and test generator.
    • alonzo 1.16: IsValid / isValidTxL -> IsPhase2Valid / isPhase2ValidTxL.
  • Earlier commits on this branch (node 11.0 bump and port, warp listening-socket ownership, no HTTP connection reuse in the e2e and state-machine managers, /checkpoints encoding test) are carried over from the closed Vanrossem integration: dep bumps + stubs #3.

How to trust this PR

  • cabal build all --enable-tests -j4 is clean apart from the pre-existing -Wincomplete-patterns on foldBlock (no Dijkstra arm, intentional) and QuickCheck's withMaxSuccess deprecation in tests.
  • cabal test unit: 336 examples, 0 failures.
  • Formatted with stylish-haskell 0.14.5.0 per the Makefile.

Not in scope

  • Dijkstra era arms in IsBlock Block and promoting the canonical era from Conway to Dijkstra.
  • Running the e2e suites against a node / ogmios / hydra head on the new stack.

🤖 Generated with Claude Code

Open the listening socket ourselves (with SO_REUSEADDR) and close it in a
bracket around Warp.runSettingsSocket rather than letting Warp.runSettings
manage it. The close then runs on every exit path, including async cancel,
so the port is freed before the next e2e stage rebinds it; fixes intermittent
EADDRINUSE when kupo is restarted on the same port.
Set managerIdleConnectionCount = 0 so each request opens a fresh connection.
The e2e tests restart kupo on the same port between stages, and reusing a
connection pooled from the previous instance caused intermittent failures.
…anager

Same fix as the e2e manager (managerIdleConnectionCount = 0) so the
state-machine suite never reuses a connection pooled from a prior kupo
instance on the same port.
Everything under scripts/ except the tracked patch-nix-deps.sh.
Move to the cardano-node 11.1.1 release set: ouroboros-consensus 4.2.1,
ouroboros-network 1.2, cardano-ledger-conway 1.23 (ledger-core 1.21,
ledger-dijkstra 0.3), with the matching CHaP index-state.

Drop the `validation < 1.2` pin, consensus 4.x requires 1.2.

Take contra-tracers from the IntersectMBO/ogmios fork alongside
fast-bech32: Hackage's 1.0.0 no longer compiles against contra-tracer
0.2, which consensus now pins. Fixed in
IntersectMBO/ogmios#13; to be replaced by a
published release once the Dijkstra work has landed.
- contra-tracer 0.2: `Tracer` now wraps an arrow, build the log sink
  with `mkTracer` instead of the constructor.
- consensus 4.x: `fromRawHash`/`fromShortRawHash` return `Maybe`; use
  the `unsafe*` variants where the hash size is already known.
- ledger-core 1.21: `Metadatum.B` holds a `ByteArray`; convert via
  `ShortByteString` in the JSON codec and the test generator.
- alonzo 1.16: `IsValid`/`isValidTxL` -> `IsPhase2Valid`/
  `isPhase2ValidTxL`.
@Jimbo4350

Copy link
Copy Markdown
Author

Superseded by #8. This branch was cut from master on 2026-05-04 and re-did the node 11.0 work that landed on master via #1, so the diff here was mostly duplication. #8 carries only the node 11.1 changes, rebased on current master.

@Jimbo4350 Jimbo4350 closed this Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant