Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update clboss #473

Merged
merged 2 commits into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion modules/clightning-plugins/clboss.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ with lib;
let cfg = config.services.clightning.plugins.clboss; in
{
options.services.clightning.plugins.clboss = {
enable = mkEnableOption "CLBOSS (clightning plugin)";
enable = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable CLBOSS (clightning plugin).
See also: https://github.com/ZmnSCPxj/clboss#operating
'';
};
min-onchain = mkOption {
type = types.ints.positive;
default = 30000;
Expand All @@ -14,6 +21,25 @@ let cfg = config.services.clightning.plugins.clboss; in
the funds in your clightning wallet.
'';
};
min-channel = mkOption {
type = types.ints.positive;
default = 500000;
description = "The minimum size (in satoshi) of channels created by CLBOSS.";
};
max-channel = mkOption {
type = types.ints.positive;
default = 16777215;
description = "The maximum size (in satoshi) of channels created by CLBOSS.";
};
zerobasefee = mkOption {
type = types.enum [ "require" "allow" "disallow" ];
default = "allow";
description = ''
require: set `base_fee` to 0.
allow: set `base_fee` according to the CLBOSS heuristics, which may include value 0.
disallow: set `base_fee` to according to the CLBOSS heuristics, with a minimum value of 1.
'';
};
package = mkOption {
type = types.package;
default = config.nix-bitcoin.pkgs.clboss;
Expand All @@ -26,6 +52,9 @@ let cfg = config.services.clightning.plugins.clboss; in
services.clightning.extraConfig = ''
plugin=${cfg.package}/bin/clboss
clboss-min-onchain=${toString cfg.min-onchain}
clboss-min-channel=${toString cfg.min-channel}
clboss-max-channel=${toString cfg.max-channel}
clboss-zerobasefee=${cfg.zerobasefee}
'';
systemd.services.clightning.path = [
pkgs.dnsutils
Expand Down
4 changes: 2 additions & 2 deletions pkgs/clboss/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ let
in
stdenv.mkDerivation rec {
pname = "clboss";
version = "0.11B";
version = "0.11E";

src = fetchurl {
url = "https://github.com/ZmnSCPxj/clboss/releases/download/${version}/clboss-${version}.tar.gz";
sha256 = "1ba4izgvq1qy3wfcnvs44pm0vi769h6i9ylbbnpxakxmwsd690xi";
hash = "sha256-TDDD5tM3aNRxgSP/6rVM+4bX9zwcErZ0yQpQOjNU1FM=";
};

nativeBuildInputs = [ pkgconfig libev curlWithGnuTLS sqlite ];
Expand Down