From 7e0d54a19ae2a5727e0e7324f6fcddea080858df Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 15 Jan 2024 23:04:25 +0100 Subject: [PATCH 1/5] docs/services: improve lndconnect-wireguard docs --- docs/services.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/services.md b/docs/services.md index 2ab5d0e..a45884a 100644 --- a/docs/services.md +++ b/docs/services.md @@ -236,7 +236,7 @@ There are two ways to establish a secure, direct connection: ``` 3. Deploy your configuration. -4. If your node is behind an external firewall or NAT, add the following port forwarding +4. If your node is behind an external firewall or NAT (e.g. a router), add the following port forwarding rule to the external device: - Port: 51820 (the default value of option `networking.wireguard.interfaces.wg-nb.listenPort`) - Protocol: UDP From 434712534401684c0d360d6087e0b0e88510b92e Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 15 Jan 2024 23:04:26 +0100 Subject: [PATCH 2/5] nix-bitcoin: add example for option `pkgOverlays` --- modules/nix-bitcoin.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/nix-bitcoin.nix b/modules/nix-bitcoin.nix index ef8f7a2..8b09f0a 100644 --- a/modules/nix-bitcoin.nix +++ b/modules/nix-bitcoin.nix @@ -20,6 +20,13 @@ with lib; pkgOverlays = mkOption { internal = true; type = with types; functionTo attrs; + example = lib.literalExpression '' + super: self: { + bitcoind = super.bitcoind.overrideAttrs (old: { + # dostuff + }); + } + ''; }; lib = mkOption { From c1a7ab7b2f3a797dca0762664063eb523051e142 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 15 Jan 2024 23:04:27 +0100 Subject: [PATCH 3/5] onion-services: fix markdown code formatting --- modules/onion-services.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/onion-services.nix b/modules/onion-services.nix index 042ffb5..6341869 100644 --- a/modules/onion-services.nix +++ b/modules/onion-services.nix @@ -18,7 +18,7 @@ let default = config.public; description = mdDoc '' Create an onion service for the given service. - The service must define options {option}'address' and {option}'onionPort' (or `port`). + The service must define options {option}`address` and {option}`onionPort` (or `port`). ''; }; public = mkOption { From d61dc8b8d931e299b6f4ab3fb85cabba1f267a72 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 15 Jan 2024 23:04:28 +0100 Subject: [PATCH 4/5] test/README: fix typos --- test/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/README.md b/test/README.md index 4cc4125..d1125ad 100644 --- a/test/README.md +++ b/test/README.md @@ -1,4 +1,4 @@ -The [`run-tests.sh`](./run-tests.sh) command is most convenient and versatile way to run tests.\ +The [`run-tests.sh`](./run-tests.sh) command is the most convenient and versatile way to run tests.\ It leave no traces (outside of `/nix/store`) on the host system. `run-tests.sh` requires Nix >= 2.10. @@ -30,7 +30,7 @@ Test scenarios are defined in [tests.nix](./tests.nix) and [tests.py](tests.py). ``` #### Debugging ```bash -# Start a shell is inside a test VM. No tests are executed. +# Start a shell inside a test VM. No tests are executed. ./run-tests.sh -s bitcoind vm systemctl status bitcoind From 73d6d1e8cab384f2f2eff7f13e621aba6324f669 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 15 Jan 2024 23:04:29 +0100 Subject: [PATCH 5/5] dev: move mempool to `dev-features.sh` The mempool dev cmd docs are too short for a dedicated file. --- dev/dev-features.sh | 24 ++++++++++++++++++++++++ dev/topics/mempool.sh | 22 ---------------------- 2 files changed, 24 insertions(+), 22 deletions(-) delete mode 100644 dev/topics/mempool.sh diff --git a/dev/dev-features.sh b/dev/dev-features.sh index 9fd7dcc..38daff2 100644 --- a/dev/dev-features.sh +++ b/dev/dev-features.sh @@ -288,6 +288,30 @@ c journalctl -u clightning -f # This should show log msgs like # plugin-trustedcoin returning block 801409, 0000000000000000000482ddc4…, 1483968 bytes +#――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― +# mempool +run-tests.sh -s mempool-regtest container + +c systemctl status mempool +c systemctl status mysql +c nodeinfo + +# Check backend +c curl -fsS localhost:8999/api/v1/blocks/1 | jq +c curl -fsS localhost:8999/api/v1/blocks/tip/height | jq +c curl -fsS localhost:8999/api/v1/address/1CGG9qVq2P6F7fo6sZExvNq99Jv2GDpaLE | jq + +# Check frontend +c curl -fsS localhost:60845 +c curl -fsS localhost:60845/api/mempool | jq +c curl -fsS localhost:60845/api/blocks/1 | jq +c curl -fsS localhost:60845/api/v1/blocks/1 | jq +c curl -fsS localhost:60845/api/blocks/tip/height | jq + +# Open frontend +# shellcheck disable=SC2154 +runuser -u "$(logname)" -- xdg-open "http://$ip:60845/" + #――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # rtl # see ./topics/rtl.sh diff --git a/dev/topics/mempool.sh b/dev/topics/mempool.sh deleted file mode 100644 index fb4f4fb..0000000 --- a/dev/topics/mempool.sh +++ /dev/null @@ -1,22 +0,0 @@ -# Start mempool container -run-tests.sh -s mempool-regtest container - -c systemctl status mempool -c systemctl status mysql -c nodeinfo - -# Check backend -c curl -fsS localhost:8999/api/v1/blocks/1 | jq -c curl -fsS localhost:8999/api/v1/blocks/tip/height | jq -c curl -fsS localhost:8999/api/v1/address/1CGG9qVq2P6F7fo6sZExvNq99Jv2GDpaLE | jq - -# Check frontend -c curl -fsS localhost:60845 -c curl -fsS localhost:60845/api/mempool | jq -c curl -fsS localhost:60845/api/blocks/1 | jq -c curl -fsS localhost:60845/api/v1/blocks/1 | jq -c curl -fsS localhost:60845/api/blocks/tip/height | jq - -# Open frontend -# shellcheck disable=SC2154 -runuser -u "$(logname)" -- xdg-open "http://$ip:60845/"