Skip to content

Release v2.11.0.1#1

Merged
johnalotoski merged 12 commits into
masterfrom
setup-for-hydra
May 30, 2026
Merged

Release v2.11.0.1#1
johnalotoski merged 12 commits into
masterfrom
setup-for-hydra

Conversation

@johnalotoski
Copy link
Copy Markdown

@johnalotoski johnalotoski commented May 27, 2026

Releases v2.11.0.1 with cardano-node 11.0.1 compatibility and protocol version 11 van Rossem
integration, plus Nix/Hydra build infrastructure.

What's in here

  • Ledger migration - updated for cardano-node 11.0 ledger/network APIs,
    including dependency bumps and cabal source-repository-package updates.
  • Nix build - flake-parts haskell.nix project exposing kupo (dynamic)
    and kupo-musl (fully static) packages, plus kupo-tests, a devShell, and
    Hydra aggregates.
  • GitHub Actions - integration tests against a preprod cardano-node
    (downloading test binary from Hydra cache, restoring node DB from S3),
    plus a release-upload workflow for static musl binaries.
  • Tests - fix pooled HTTP connection reuse in state-machine and e2e
    managers; assert /checkpoints encoding; own warp's listening socket via
    bracket.
  • Docs - README compat table, build instructions (Nix + cabal via
    make shell), direnv setup, and flake-ref examples for external builders.

Compatibility

Kupo Cardano-node
v2.11.0.1 11.0.1

Build

nix build .#kupo      # dynamic glibc
nix build .#kupo-musl # static musl

See the updated README.md for more information.

@johnalotoski johnalotoski force-pushed the setup-for-hydra branch 2 times, most recently from 072ee2a to 8c7c3e2 Compare May 27, 2026 01:34
Jimbo4350 added a commit that referenced this pull request May 28, 2026
After the warp-bracket fix, failures #1/#2/CardanoSolutions#4 still reproduce with a
different shape: stage N+1's kupo logs ConfigurationMaxConcurrency and
then stalls before ConfigurationCardanoNode. That maps to the call
between newDBPool returning and newProducer being called — i.e. inside
withDatabaseExclusiveWriter / withLongLivedConnection. Most likely
stage N+1's withConnection' is blocking on a SQLite file lock that
stage N's RW connection hasn't released yet.

Add [db-trace] OPENING / OPENED / BODYEND / CLOSED stderr lines so we
can confirm whether stage N's close actually runs before stage N+1's
open, and measure the inter-stage gap. Same shape as the existing
[port-trace] diagnostic on the warp side.

Diagnostic only; no semantic change to the bracket itself.
@snarlysodboxer snarlysodboxer force-pushed the setup-for-hydra branch 7 times, most recently from 21a72d0 to ce4dd0f Compare May 30, 2026 04:44
@snarlysodboxer snarlysodboxer changed the title nix: add flake Release v2.11.0.1 May 30, 2026
@snarlysodboxer snarlysodboxer marked this pull request as ready for review May 30, 2026 05:34
Copilot AI review requested due to automatic review settings May 30, 2026 16:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Releases v2.11.0.1 with cardano-node 11.0.1 / Conway ledger API migration, a new flake-parts/haskell.nix build (including a static musl variant), Hydra job aggregates, a CI workflow that drives integration tests against a real preprod node, and a release-upload workflow. Also fixes pooled-HTTP and warp socket-ownership issues that affected test reliability.

Changes:

  • Ledger migration: switch to Ledger.Tx Ledger.TopTx era, NativeScript/Conway* purposes, PlutusV4, hashSize, txSeqBlockBodyL, Cardano.Network.NodeToClient, and add a stub BlockDijkstra case.
  • New Nix/Hydra infra (flake.nix, flake/lib.nix, perSystem/*, .envrc) plus updated cabal.project/package.yaml/kupo.cabal for the new index-state and sub-libraries.
  • New continuous-integration.yaml and release-upload.yaml workflows (replacing build.yaml); test fixes for HTTP connection pooling and warp socket ownership; README documentation for development and remote flake builds.

Reviewed changes

Copilot reviewed 27 out of 29 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/Test/KupoSpec.hs Disable idle HTTP connection pool to avoid stale-socket reuse between stages.
test/Test/Kupo/AppSpec.hs Same idle-pool fix for the QuickCheck state-machine manager.
src/Kupo/Prelude.hs Rename sizeHashhashSize for cardano-crypto bump.
src/Kupo/Data/Hydra.hs Switch decoder to Conway era types (ConwayPlutusPurpose, fromConwayData/Script).
src/Kupo/Data/Cardano/Transaction.hs Re-parameterize transactions with Ledger.TopTx and use txIdTx.
src/Kupo/Data/Cardano/Script.hs Rename TimelockScriptNativeScript, add PlutusV4 tag, update mkBinaryPlutusScript.
src/Kupo/Data/Cardano/Point.hs Add OVERLAPPING to disambiguate from ouroboros-network's ToJSON Point instance.
src/Kupo/Data/Cardano/Metadata.hs Use Ledger.upgradeTxAuxData chain instead of translateAlonzoTxAuxData.
src/Kupo/Data/Cardano.hs Use txSeqBlockBodyL lens; add unsupported BlockDijkstra case.
src/Kupo/Control/MonadOuroboros.hs Move NodeToClient import to Cardano.Network; add dijkstra codec config; new mux tracers.
src/Kupo/App/Http.hs Own the listening socket via bracket to release the port deterministically on cancel.
README.md New Development/Build sections covering Nix, direnv, and remote flake refs.
perSystem/project.nix haskell.nix cabalProject' with CHaP input, sha256map, musl support, and test fixtures.
perSystem/packages.nix Expose kupo, kupo-lib, kupo-tests, and checks.kupo-unit.
perSystem/musl.nix Expose kupo-musl cross-build.
perSystem/hydraJobs.nix Aggregate required/nonrequired jobs and a gitrev derivation.
perSystem/devShells.nix Default devShell with cabal/ghcid/HLS and submodule re-sync hook.
package.yaml / kupo.cabal Set version 2.11.0.1, swap to ouroboros-* sub-libs and cardano-diffusion.
flake/lib.nix recursiveImports helper for per-system module aggregation.
flake.nix flake-parts entry point with haskell.nix overlays and self.submodules = true.
flake.lock Pin all new flake inputs.
cabal.project Bump index-state and constraints for cardano-node 11.0.1 ecosystem.
.gitmodules Switch submodule URLs to https.
.gitignore Ignore /.direnv.
.github/workflows/release-upload.yaml New workflow: poll Hydra cache for kupo-musl, tar it, draft GitHub release.
.github/workflows/continuous-integration.yaml New workflow: build kupo-tests via Hydra cache, run against a preprod cardano-node restored from S3.
.github/workflows/build.yaml Removed in favor of the new Nix-based workflows.
.envrc direnv bootstrap: init submodules before use flake.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread src/Kupo/Data/Cardano.hs
Comment thread src/Kupo/App/Http.hs
Jimbo4350 added 3 commits May 30, 2026 12:55
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.
Jimbo4350 and others added 4 commits May 30, 2026 12:22
Also drop the redundant /checkpoints golden test: its shape assertions are already covered, more strictly, by the OpenAPI Point schema validated in the session test (additionalProperties: false, required slot_no/header_hash).
- Script: add PlutusV4 to scriptToJson, scriptToBytes and scriptFromBytes
  so the new Ledger.Language constructor is handled and the on-disk script
  tag encode/decode round-trip stays symmetric (-Wincomplete-patterns).
- Prelude: sizeHash -> hashSize (sizeHash deprecated in cardano-crypto-class).
- Metadata: drop redundant qualified Cardano.Ledger.Alonzo.TxAuxData import
  (-Wunused-imports).
Match getAddrInfo's result with `addr :| _` to select its NonEmpty
instance, making the head pattern total rather than the partial
`addr : _`. getAddrInfo never returns an empty list (it throws on
resolution failure), so this is a type-level guarantee, not a
behaviour change. Addresses the review note on openListeningSocket.
@Jimbo4350 Jimbo4350 self-requested a review May 30, 2026 17:57
@johnalotoski johnalotoski merged commit c18adac into master May 30, 2026
1 check passed
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.

4 participants