From 875fac6862b166378be29958eef7a82d79fa416e Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Sat, 10 Dec 2022 21:26:30 +0000 Subject: [PATCH 1/2] update nixpkgs btcpayserver: 1.6.12 -> 1.7.1 bitcoind: 24.0 -> 24.0.1 clightning: 0.12.1 -> 22.11.1 lnd: 0.15.4-beta -> 0.15.5-beta nbxplorer: 2.3.41 -> 2.3.49 --- flake.lock | 12 ++++++------ pkgs/clightning-plugins/default.nix | 2 +- pkgs/pinned.nix | 2 +- pkgs/python-packages/pyln-client/default.nix | 8 -------- pkgs/python-packages/pyln-client/msat-null.patch | 16 ---------------- test/nixos-search/flake.lock | 12 ++++++------ 6 files changed, 14 insertions(+), 38 deletions(-) delete mode 100644 pkgs/python-packages/pyln-client/msat-null.patch diff --git a/flake.lock b/flake.lock index 24c8a47..590bab3 100644 --- a/flake.lock +++ b/flake.lock @@ -40,11 +40,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1669418739, - "narHash": "sha256-T86oFvcUIRwHWBWUt7WjaP4BP/3lDGbv5AppQSI1FkI=", + "lastModified": 1670700605, + "narHash": "sha256-5dlpATkcyITpdtMflhltuD+A3RNpsVI1Mb+dtKkll6Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "695b3515251873e0a7e2021add4bba643c56cde3", + "rev": "7b9eeb856cbf976482fa8d1cb295ea03fb3e1277", "type": "github" }, "original": { @@ -56,11 +56,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1669535121, - "narHash": "sha256-koZLM7oWVGrjyHnYDo7/w5qlmUn9UZUKSFNfmIjueE8=", + "lastModified": 1670918062, + "narHash": "sha256-iOhkyBYUU9Jfkk0lvI4ahpjyrTsLXj9uyJWwmjKg+gg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b45ec953794bb07922f0468152ad1ebaf8a084b3", + "rev": "84575b0bd882be979516f4fecfe4d7c8de8f6a92", "type": "github" }, "original": { diff --git a/pkgs/clightning-plugins/default.nix b/pkgs/clightning-plugins/default.nix index aa26c6b..e991da6 100644 --- a/pkgs/clightning-plugins/default.nix +++ b/pkgs/clightning-plugins/default.nix @@ -32,7 +32,7 @@ let extraPkgs = [ prometheus_client ]; patchRequirements = "--replace prometheus-client==0.6.0 prometheus-client==0.13.1" - + " --replace pyln-client~=0.9.3 pyln-client~=0.11.1"; + + " --replace pyln-client~=0.9.3 pyln-client~=22.11rc1"; }; rebalance = { description = "Keeps your channels balanced"; diff --git a/pkgs/pinned.nix b/pkgs/pinned.nix index cc92ae7..1d61bd0 100644 --- a/pkgs/pinned.nix +++ b/pkgs/pinned.nix @@ -3,7 +3,6 @@ pkgs: pkgsUnstable: { inherit (pkgs) lightning-pool - lnd lndconnect; inherit (pkgsUnstable) @@ -18,6 +17,7 @@ pkgs: pkgsUnstable: fulcrum hwi lightning-loop + lnd nbxplorer; inherit pkgs pkgsUnstable; diff --git a/pkgs/python-packages/pyln-client/default.nix b/pkgs/python-packages/pyln-client/default.nix index afc7798..99e1a2c 100644 --- a/pkgs/python-packages/pyln-client/default.nix +++ b/pkgs/python-packages/pyln-client/default.nix @@ -16,13 +16,5 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook ]; - # TODO-EXTERNAL: - # This patch is a variant (fixed relative path) of - # https://github.com/ElementsProject/lightning/pull/5574. This is already - # fixed upstream. Remove this after the next clightning release. - patches = [ - ./msat-null.patch - ]; - postUnpack = "sourceRoot=$sourceRoot/contrib/${pname}"; } diff --git a/pkgs/python-packages/pyln-client/msat-null.patch b/pkgs/python-packages/pyln-client/msat-null.patch deleted file mode 100644 index ee3c611..0000000 --- a/pkgs/python-packages/pyln-client/msat-null.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/pyln/client/lightning.py b/pyln/client/lightning.py -index 38fc7563f..0013b89a3 100644 ---- a/pyln/client/lightning.py -+++ b/pyln/client/lightning.py -@@ -455,6 +455,11 @@ class LightningRpc(UnixDomainSocketRpc): - if k.endswith('msat'): - if isinstance(v, list): - obj[k] = [Millisatoshi(e) for e in v] -+ # FIXME: Deprecated "listconfigs" gives two 'null' fields: -+ # "lease-fee-base-msat": null, -+ # "channel-fee-max-base-msat": null, -+ elif v is None: -+ obj[k] = None - else: - obj[k] = Millisatoshi(v) - else: diff --git a/test/nixos-search/flake.lock b/test/nixos-search/flake.lock index 9072593..c0dc972 100644 --- a/test/nixos-search/flake.lock +++ b/test/nixos-search/flake.lock @@ -18,11 +18,11 @@ "nixos-org-configurations": { "flake": false, "locked": { - "lastModified": 1669145578, - "narHash": "sha256-sCUYmI7xorVypnaUantUJN0CQNaCQCEFUwcQovQGoUs=", + "lastModified": 1669836977, + "narHash": "sha256-21+3DkUXbWmIhXnQmJ9Tp/+QnyQnSiWuW8UDjjvPX2w=", "owner": "NixOS", "repo": "nixos-org-configurations", - "rev": "1a9733350a22181466188582692bbd8eabf107ca", + "rev": "241f12bc9218ee081dc12b6c1b4a10e5e78ffeb3", "type": "github" }, "original": { @@ -39,11 +39,11 @@ "npmlock2nix": "npmlock2nix" }, "locked": { - "lastModified": 1669203559, - "narHash": "sha256-DPMqbQoY9J4Dphp7T9wrQMVDOsYgIM/BEmj/i4iOz4s=", + "lastModified": 1670367531, + "narHash": "sha256-ArMS2vkvfym5SZC2bBfOdr4ZX+8PepH07PsU2KpiytY=", "owner": "nixos", "repo": "nixos-search", - "rev": "853fd5c0c8aa8e3c38d090aef1234a0193694757", + "rev": "4bea45b15019ad6f2187c5fa0142b27e06586e36", "type": "github" }, "original": { From d1b3a4617dd32ead2a549863565eec8ddd8b26a1 Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Sat, 17 Dec 2022 12:43:33 +0000 Subject: [PATCH 2/2] clightning: set "database-upgrade=true" for 22.11.1 --- modules/clightning.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/clightning.nix b/modules/clightning.nix index 370ec40..bda94b5 100644 --- a/modules/clightning.nix +++ b/modules/clightning.nix @@ -117,6 +117,11 @@ let rpc-file-mode=0660 log-timestamps=false ${optionalString (cfg.wallet != null) "wallet=${cfg.wallet}"} + ${ # TODO-EXTERNAL: When updating from a version of clightning before 22.11 + # to version 22.11.1, then the database upgrade needs to be allowed + # explicitly. Remove this when it's unlikely that this module is used + # with a clightning version 22.11.1 package. + optionalString (cfg.package.version == "22.11.1") "database-upgrade=true"} ${cfg.extraConfig} '';