From 3a13b5f77c27e4f644a0ad3c634fb62cbb1c4610 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 20 Oct 2025 21:57:21 +0200 Subject: [PATCH 1/3] ci/test-info.nix: read scenarios from github workflow file Simplifies maintenance, both files no longer need to be kept in sync. --- .github/workflows/test.yml | 5 ++++- test/ci/test-info.nix | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ed0c6f..964384f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - scenario: [default, netns, netnsRegtest] + scenario: + - default + - netns + - netnsRegtest needs: build_test_drivers if: needs.build_test_drivers.outputs.run_scenario_tests == 'true' steps: diff --git a/test/ci/test-info.nix b/test/ci/test-info.nix index 3333804..bfadded 100644 --- a/test/ci/test-info.nix +++ b/test/ci/test-info.nix @@ -1,12 +1,19 @@ pkgs: instantiateTests: let + scenarioNames = let + inherit (pkgs) lib; + workflowSrc = builtins.readFile ../../.github/workflows/test.yml; + matches = builtins.match ".*scenario:(([ \n]+-[ ]+[^ \n]+)+).*" workflowSrc; + scenariosStr = builtins.head matches; + particles = builtins.split "[ \n]+-[ ]+" scenariosStr; + # The first split particle is always an empty str + particles' = builtins.tail particles; + in + builtins.filter lib.isString particles'; + # `instantiateTests` prints the test name before evaluating, which is useful for debugging - ciTests = instantiateTests [ - "default" - "netns" - "netnsRegtest" - ]; + ciTests = instantiateTests scenarioNames; drivers = map (x: x.driver) ciTests; driverDrvs = map (x: ''"${x.drvPath}^*"'') drivers; in '' From 1c786d67c634a386d501c8a71242633a4e72ea0d Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 20 Oct 2025 21:57:22 +0200 Subject: [PATCH 2/3] update nixpkgs bitcoin: 29.1 -> 30.0 bitcoind: 29.1 -> 30.0 bitcoind-knots: 29.1.knots20250903 -> 29.2.knots20251010 clboss: 0.14.1 -> 0.15.1 --- flake.lock | 12 ++++++------ pkgs/pinned.nix | 2 +- test/nixos-search/flake.lock | 18 +++++++++--------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/flake.lock b/flake.lock index 2d2156f..9aa93d9 100644 --- a/flake.lock +++ b/flake.lock @@ -44,11 +44,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1759735786, - "narHash": "sha256-a0+h02lyP2KwSNrZz4wLJTu9ikujNsTWIC874Bv7IJ0=", + "lastModified": 1761016216, + "narHash": "sha256-G/iC4t/9j/52i/nm+0/4ybBmAF4hzR8CNHC75qEhjHo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "20c4598c84a671783f741e02bf05cbfaf4907cff", + "rev": "481cf557888e05d3128a76f14c76397b7d7cc869", "type": "github" }, "original": { @@ -60,11 +60,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1759632233, - "narHash": "sha256-krgZxGAIIIKFJS+UB0l8do3sYUDWJc75M72tepmVMzE=", + "lastModified": 1760965567, + "narHash": "sha256-0JDOal5P7xzzAibvD0yTE3ptyvoVOAL0rcELmDdtSKg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d7f52a7a640bc54c7bb414cca603835bf8dd4b10", + "rev": "cb82756ecc37fa623f8cf3e88854f9bf7f64af93", "type": "github" }, "original": { diff --git a/pkgs/pinned.nix b/pkgs/pinned.nix index d5bab3b..0a3ea7f 100644 --- a/pkgs/pinned.nix +++ b/pkgs/pinned.nix @@ -2,7 +2,6 @@ pkgs: pkgsUnstable: { inherit (pkgs) - clboss elementsd extra-container fulcrum @@ -16,6 +15,7 @@ pkgs: pkgsUnstable: bitcoind-knots btcpayserver charge-lnd + clboss clightning electrs lightning-loop diff --git a/test/nixos-search/flake.lock b/test/nixos-search/flake.lock index 26c54e6..941ebfc 100644 --- a/test/nixos-search/flake.lock +++ b/test/nixos-search/flake.lock @@ -21,11 +21,11 @@ "nixos-infra": { "flake": false, "locked": { - "lastModified": 1759503106, - "narHash": "sha256-eKiDUEHAZJqPrUwM5UAJ1Wz2WbyhF7s/KmGc71QI0u4=", + "lastModified": 1760816325, + "narHash": "sha256-XG4d9wXQ4HytME1my2U0VRlo2G66ZOY3wwofFhqi1/c=", "owner": "NixOS", "repo": "infra", - "rev": "8896c2175a5bcb70539ddb8a113df013cf4cfb6e", + "rev": "85a21b518d7dae68cb8309d7eb93ecf064764c04", "type": "github" }, "original": { @@ -43,11 +43,11 @@ "npmlock2nix": "npmlock2nix" }, "locked": { - "lastModified": 1759748199, - "narHash": "sha256-C5NLUHWQBp6HkNYo3x6LrthTRMNEzTnPAo+mWaTN7zU=", + "lastModified": 1760963929, + "narHash": "sha256-dc1E/3ia5ii9IIc6/cSfUE40lYuDzpDDTDt5FYddtRg=", "owner": "nixos", "repo": "nixos-search", - "rev": "701750cafad9cef7ca5384324e936df9e365e2d5", + "rev": "7144dd7a84eda607b015cac7375ad7d82b98984d", "type": "github" }, "original": { @@ -58,11 +58,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1759381078, - "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=", + "lastModified": 1760524057, + "narHash": "sha256-EVAqOteLBFmd7pKkb0+FIUyzTF61VKi7YmvP1tw4nEw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee", + "rev": "544961dfcce86422ba200ed9a0b00dd4b1486ec5", "type": "github" }, "original": { From bba75b0a7f3c58c9e9836714563d354b1b5f3de2 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Tue, 21 Oct 2025 07:11:16 +0200 Subject: [PATCH 3/3] support running joinmarket with bitcoind 29 --- .github/workflows/test.yml | 1 + modules/joinmarket.nix | 13 +++++++++++++ modules/netns-isolation.nix | 2 +- pkgs/default.nix | 2 ++ test/run-tests.sh | 1 + test/tests.nix | 10 ++++++++-- 6 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 964384f..1454f11 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,6 +35,7 @@ jobs: - default - netns - netnsRegtest + - joinmarket-bitcoind-29 needs: build_test_drivers if: needs.build_test_drivers.outputs.run_scenario_tests == 'true' steps: diff --git a/modules/joinmarket.nix b/modules/joinmarket.nix index 151092d..1ea6684 100644 --- a/modules/joinmarket.nix +++ b/modules/joinmarket.nix @@ -251,6 +251,19 @@ in { } (mkIf cfg.enable { + assertions = [ + { + assertion = lib.versionOlder bitcoind.package.version "30"; + message = '' + Joinmarket is not compatible with bitcoind >= 30. + (https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/1775) + + To fix this, add the following to your config: + services.bitcoind.package = config.nix-bitcoin.pkgs.bitcoind_29; + ''; + } + ]; + services.bitcoind = { enable = true; disablewallet = false; diff --git a/modules/netns-isolation.nix b/modules/netns-isolation.nix index 602eb7f..9357503 100644 --- a/modules/netns-isolation.nix +++ b/modules/netns-isolation.nix @@ -341,7 +341,7 @@ in { services.nbxplorer.address = netns.nbxplorer.address; services.btcpayserver.address = netns.btcpayserver.address; - services.joinmarket = { + services.joinmarket = mkIf config.services.joinmarket.enable { payjoinAddress = netns.joinmarket.address; messagingAddress = netns.joinmarket.address; cliExec = mkCliExec "joinmarket"; diff --git a/pkgs/default.nix b/pkgs/default.nix index 97f705d..737bfba 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -25,6 +25,8 @@ let self = { mempool-nginx-conf; trustedcoin = pkgs.callPackage ./trustedcoin { }; + bitcoind_29 = pkgs.bitcoind; + pyPkgs = import ./python-packages self pkgs.python3; inherit (self.pyPkgs) nbPython3Packages diff --git a/test/run-tests.sh b/test/run-tests.sh index 2c4da76..1b5420e 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -302,6 +302,7 @@ buildable=( lndPruned wireguard-lndconnect trustedcoin + joinmarket-bitcoind-29 ) buildable() { buildTests buildable "$@"; } diff --git a/test/tests.nix b/test/tests.nix index cee3b7b..53c01d4 100644 --- a/test/tests.nix +++ b/test/tests.nix @@ -213,7 +213,6 @@ let services.fulcrum.enable = true; services.liquidd.enable = true; services.btcpayserver.enable = true; - services.joinmarket.enable = true; services.joinmarket-ob-watcher.enable = true; services.backups.enable = true; @@ -261,7 +260,6 @@ let services.electrs.enable = true; services.fulcrum.enable = true; services.btcpayserver.enable = true; - services.joinmarket.enable = true; }; # netns and regtest, without secure-node.nix @@ -342,6 +340,14 @@ let plugins.trustedcoin.enable = true; }; }; + + # The full regtest test with bitcoind 29 and joinmarket enabled. + # Joinmarket only supports bitcoind 29. + joinmarket-bitcoind-29 = { config, ... }: { + imports = [ scenarios.regtest ]; + services.joinmarket.enable = true; + services.bitcoind.package = config.nix-bitcoin.pkgs.bitcoind_29; + }; } // (import ../dev/dev-scenarios.nix { inherit lib scenarios; });