diff --git a/README.md b/README.md index 2669a40..bbef7ef 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ NixOS modules ([src](modules/modules.nix)) * [prometheus](https://github.com/lightningd/plugins/tree/master/prometheus): lightning node exporter for the prometheus timeseries server * [rebalance](https://github.com/lightningd/plugins/tree/master/rebalance): keeps your channels balanced * [summary](https://github.com/lightningd/plugins/tree/master/summary): print a nice summary of the node status - * [trustedcoin](https://github.com/nbd-wtf/trustedcoin) [[experimental](docs/services.md#trustedcoin-hints)]: replaces bitcoind with trusted public explorers + * [trustedcoin](https://github.com/nbd-wtf/trustedcoin) ([experimental](docs/services.md#trustedcoin)): replaces bitcoind with trusted public explorers * [zmq](https://github.com/lightningd/plugins/tree/master/zmq): publishes notifications via ZeroMQ to configured endpoints * [clightning-rest](https://github.com/Ride-The-Lightning/c-lightning-REST): REST server for clightning * [lnd](https://github.com/lightningnetwork/lnd) with support for announcing an onion service and [static channel backups](https://github.com/lightningnetwork/lnd/blob/master/docs/recovery.md) diff --git a/dev/dev-features.sh b/dev/dev-features.sh index 67514eb..9fd7dcc 100644 --- a/dev/dev-features.sh +++ b/dev/dev-features.sh @@ -279,6 +279,15 @@ c curl 127.0.0.1:62601 nix run --inputs-from . nixpkgs#lynx -- --dump $ip:62601 c curl -s 127.0.0.1:62601 | grep -i "orders found" +#――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― +# trustedcoin +run-tests.sh -s trustedcoin-online container + +c systemctl start clightning +c journalctl -u clightning -f +# This should show log msgs like +# plugin-trustedcoin returning block 801409, 0000000000000000000482ddc4…, 1483968 bytes + #――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # rtl # see ./topics/rtl.sh diff --git a/dev/dev-scenarios.nix b/dev/dev-scenarios.nix index 9091e65..37b1744 100644 --- a/dev/dev-scenarios.nix +++ b/dev/dev-scenarios.nix @@ -75,4 +75,23 @@ with lib; }; nix-bitcoin.nodeinfo.enable = true; }; + + trustedcoin-online = { + services.clightning = { + enable = true; + tor.proxy = true; + plugins.trustedcoin.enable = true; + plugins.trustedcoin.tor.proxy = false; + }; + + # Don't run clightning on startup. + # This breaks the follwing dependency cycle: + # clightning + # -> network (trustedcoin fails and exits clightning without network access) + # -> multi-user.target (NixOS containers only gain network access after multi-user.target has completed) + # -> clightning + systemd.services.clightning.wantedBy = mkForce []; + + test.container.enableWAN = true; + }; } diff --git a/docs/services.md b/docs/services.md index 961b95a..2ab5d0e 100644 --- a/docs/services.md +++ b/docs/services.md @@ -579,26 +579,18 @@ services.clightning = { Please have a look at the module for a plugin (e.g. [prometheus.nix](../modules/clightning-plugins/prometheus.nix)) to learn its configuration options. -### Trustedcoin hints -The [trustedcoin](https://github.com/nbd-wtf/trustedcoin) plugin use a Tor -proxy for all of its external connections by default. That's why you can -sometimes face issues with your connections to esploras getting blocked. - -An example of clightning log error output in a case your connections are getting blocked: +### Trustedcoin +When `services.clightning.tor.proxy` is enabled, [trustedcoin](https://github.com/nbd-wtf/trustedcoin) +also uses Tor for all external connections by default. +In this case, connections to block explorers can sometimes get blocked. +An example of clightning log error output when connections are getting blocked: ``` lightningd[5138]: plugin-trustedcoin estimatefees error: https://blockstream.info/api error: 403 Forbidden +lightningd[4933]: plugin-trustedcoin getblock error: got something that isn't a block hash:
... ``` -``` -lightningd[4933]: plugin-trustedcoin getblock error: got something that isn't a block hash: -lightningd[4933]: