From ef624d8e6395f5174b97d4e0d2d240a24339d2cf Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Mon, 2 Nov 2020 13:15:22 +0100 Subject: [PATCH] docs: add pool examples --- README.md | 4 ++- doc/compile.md | 8 +++-- doc/config-lnd-integrated.md | 32 ++++++++++++++--- doc/config-lnd-remote.md | 66 +++++++++++++++++++++++++----------- doc/letsencrypt.md | 21 ++++++++++++ doc/troubleshooting.md | 1 + 6 files changed, 103 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 94dcabaf..0b590401 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ Lightning Terminal (LiT) is a browser-based interface for managing channel liqui - Visualize your channels and balances - Perform submarine swaps via the [Lightning Loop](https://lightning.engineering/loop) service - Classify channels according to your node's operating mode -- Run a single binary that integrates both [`loopd`](https://github.com/lightninglabs/loop) and [`faraday`](https://github.com/lightninglabs/faraday) daemons all in one +- Run a single binary that integrates [`loopd`](https://github.com/lightninglabs/loop), + [`poold`](https://github.com/lightninglabs/pool) and + [`faraday`](https://github.com/lightninglabs/faraday) daemons all in one ## Installation Download the latest binaries from the [releases](https://github.com/lightninglabs/lightning-terminal/releases) page. diff --git a/doc/compile.md b/doc/compile.md index 913eca7f..bb3d4b1e 100644 --- a/doc/compile.md +++ b/doc/compile.md @@ -20,7 +20,9 @@ $ make install ``` This will produce the `litd` executable and add it to your `GOPATH`. The CLI binaries for -`lncli`, `loop`, and `frcli` are not created by `make install`. You will need to download -those binaries from the [lnd](https://github.com/lightningnetwork/lnd/releases), -[loop](https://github.com/lightninglabs/loop/releases), and +`lncli`, `loop`, `pool`, and `frcli` are not created by `make install`. You will +need to download those binaries from the +[lnd](https://github.com/lightningnetwork/lnd/releases), +[loop](https://github.com/lightninglabs/loop/releases), +[pool](https://github.com/lightninglabs/pool/releases), and [faraday](https://github.com/lightninglabs/faraday/releases) repos manually. diff --git a/doc/config-lnd-integrated.md b/doc/config-lnd-integrated.md index 095dd7db..d3b2fa3c 100644 --- a/doc/config-lnd-integrated.md +++ b/doc/config-lnd-integrated.md @@ -2,12 +2,12 @@ The "integrated" mode means that `lnd` is started within the same process as `litd`, alongside the UI server. Once the integrated `lnd` has been unlocked, -`litd` then goes ahead and starts `faraday` and `loop` and connects them to the -integrated `lnd` node. +`litd` then goes ahead and starts `faraday`, `pool` and `loop` and connects them +to the integrated `lnd` node. -Currently the UI server cannot connect to `loop` or `faraday` daemons that -aren't running in the same process. But that feature will also be available in -future versions. +Currently the UI server cannot connect to `loop`, `pool` or `faraday` daemons +that aren't running in the same process. But that feature will also be available +in future versions. ## Use command line parameters only @@ -99,6 +99,9 @@ lnd.bitcoind.zmqpubrawtx=localhost:28333 # Loop loop.loopoutmaxparts=5 +# Pool +pool.newnodesonly=true + # Faraday faraday.min_monitored=48h @@ -314,6 +317,25 @@ You can easily create an alias for this by adding the following line to your alias lit-loop="loop --rpcserver=localhost:10009 --tlscertpath=~/.lnd/tls.cert --macaroonpath=~/.loop/testnet/loop.macaroon" ``` +### Example `pool` command + +Again, `poold` also runs on the same gRPC server as `lnd` and we have to specify +the `host:port` and the TLS certificate of `lnd` but use the macaroon from the +`.pool` directory. + +```shell script +$ pool --rpcserver=localhost:10009 --tlscertpath=~/.lnd/tls.cert \ + --macaroonpath=~/.pool/testnet/pool.macaroon \ + accounts list +``` + +You can easily create an alias for this by adding the following line to your +`~/.bashrc` file: + +```shell script +alias lit-pool="pool --rpcserver=localhost:10009 --tlscertpath=~/.lnd/tls.cert --macaroonpath=~/.pool/testnet/pool.macaroon" +``` + ### Example `frcli` command Faraday's command line tool follows the same pattern as loop. We also have to diff --git a/doc/config-lnd-remote.md b/doc/config-lnd-remote.md index fed32441..7d6456ef 100644 --- a/doc/config-lnd-remote.md +++ b/doc/config-lnd-remote.md @@ -54,25 +54,26 @@ Visit https://localhost:8443 to access LiT. The "remote" mode means that `lnd` is started as a standalone process, possibly on another host, and `litd` connects to it, right after starting its UI server. Once the connection -to the remote `lnd` node has been established, `litd` then goes ahead and starts `faraday` -and `loop` and connects them to that `lnd` node as well. +to the remote `lnd` node has been established, `litd` then goes ahead and starts +`faraday`, `pool` and `loop` and connects them to that `lnd` node as well. -Currently the UI server cannot connect to `loop` or `faraday` daemons that aren't running -in the same process. But that feature will also be available in future versions. +Currently the UI server cannot connect to `loop`, `pool` or `faraday` daemons +that aren't running in the same process. But that feature will also be available +in future versions. ## Use command line parameters only In addition to the LiT specific and remote `lnd` parameters, you must also provide -configuration to the `loop` and `faraday` daemons. For the remote `lnd` node, all +configuration to the `loop`, `pool`, and `faraday` daemons. For the remote `lnd` node, all `remote.lnd` flags must be specified. Note that `loopd` and `faraday` will automatically connect to the same remote `lnd` node, so you do not need to provide them with any additional parameters unless you want to override them. If you do override them, be sure -to add the `loop.` and `faraday.` prefixes. +to add the `loop.`, `pool.`, and `faraday.` prefixes. To see all available command line options, run `litd --help`. -The most minimal example command to start `litd` and connect it to a local `lnd` node that -is running with default configuration settings is: +The most minimal example command to start `litd` and connect it to a local `lnd` +node that is running with default configuration settings is: ```shell script $ litd --uipassword=My$trongP@ssword @@ -80,8 +81,9 @@ $ litd --uipassword=My$trongP@ssword All other command line flags are only needed to overwrite the default behavior. -Here is an example command to start `litd` connected to a testnet `lnd` that is running on -another host and overwrites a few default settings in `loop` and `faraday` (optional): +Here is an example command to start `litd` connected to a testnet `lnd` that is +running on another host and overwrites a few default settings in `loop`, `pool`, +and `faraday` (optional): ```shell script $ litd \ @@ -96,6 +98,7 @@ $ litd \ --remote.lnd.macaroondir=/some/folder/with/lnd/data \ --remote.lnd.tlscertpath=/some/folder/with/lnd/data/tls.cert \ --loop.loopoutmaxparts=5 \ + --pool.newnodesonly=true \ --faraday.min_monitored=48h \ --faraday.connect_bitcoin \ --faraday.bitcoin.host=some-other-host \ @@ -103,10 +106,11 @@ $ litd \ --faraday.bitcoin.password=testnetpw ``` -NOTE: Even though LiT itself only needs `lnd`'s `admin.macaroon`, the `loop` and `faraday` -daemons will require other macaroons and will look for them in the folder specified with -`--remote.lnd.macaroondir`. It is advised to copy all `*.macaroon` files and the -`tls.cert` file from the remote host to the host that is running `litd`. +NOTE: Even though LiT itself only needs `lnd`'s `admin.macaroon`, the `loop`, +`pool`, and `faraday` daemons will require other macaroons and will look for +them in the folder specified with `--remote.lnd.macaroondir`. It is advised to +copy all `*.macaroon` files and the `tls.cert` file from the remote host to the +host that is running `litd`. ## Use a configuration file @@ -130,8 +134,8 @@ uipassword=My$trongP@ssword All other configuration settings are only needed to overwrite the default behavior. Here is an example `~/.lit/lit.conf` file that connects LiT to a testnet `lnd` node -running on another host and overwrites a few default settings in `loop` and `faraday` -(optional): +running on another host and overwrites a few default settings in `loop`, `pool`, + and `faraday` (optional): ```text # Application Options @@ -153,6 +157,9 @@ remote.lnd.tlscertpath=/some/folder/with/lnd/data/tls.cert # Loop loop.loopoutmaxparts=5 +# Pool +pool.newnodesonly=true + # Faraday faraday.min_monitored=48h @@ -189,10 +196,10 @@ remote.lnd.macaroondir=/some/folder/with/lnd/data remote.lnd.tlscertpath=/some/folder/with/lnd/data/tls.cert ``` -Because in the remote `lnd` mode all other LiT components (`loop`, `faraday` and the UI -server) listen on the same port (`443` in this example) and use the same TLS certificate -(`~/.lit/tls.cert` in this example), some command line calls now need some extra options -that weren't necessary before. +Because in the remote `lnd` mode all other LiT components (`loop`, `pool`, +`faraday` and the UI server) listen on the same port (`443` in this example) and +use the same TLS certificate (`~/.lit/tls.cert` in this example), some command +line calls now need some extra options that weren't necessary before. **NOTE**: All mentioned command line tools have the following behavior in common: You either specify the `--network` flag and the `--tlscertpath` and `--macaroonpath` are @@ -233,6 +240,25 @@ file: alias lit-loop="loop --rpcserver=localhost:443 --tlscertpath=~/.lit/tls.cert --macaroonpath=~/.loop/testnet/loop.macaroon" ``` +### Example `pool` command + +Again, `poold` also runs on the same port as the UI server and we have to +specify the `host:port` and the TLS certificate of LiT but use the macaroon from +the `.pool` directory. + +```shell script +$ pool --rpcserver=localhost:443 --tlscertpath=~/.lit/tls.cert \ + --macaroonpath=~/.pool/testnet/pool.macaroon \ + accounts list +``` + +You can easily create an alias for this by adding the following line to your +`~/.bashrc` file: + +```shell script +alias lit-pool="pool --rpcserver=localhost:443 --tlscertpath=~/.lit/tls.cert --macaroonpath=~/.pool/testnet/pool.macaroon" +``` + ### Example `frcli` command Faraday's command line tool follows the same pattern as loop. We also have to specify the diff --git a/doc/letsencrypt.md b/doc/letsencrypt.md index 0cb9516b..9631eaad 100644 --- a/doc/letsencrypt.md +++ b/doc/letsencrypt.md @@ -112,6 +112,27 @@ file: alias lit-loop="loop --rpcserver=terminal.mydomain.com:8443 --tlscertpath=~/.lit/letsencrypt/terminal.mydomain.com --macaroonpath=~/.loop/testnet/loop.macaroon" ``` +### Example `pool` command + +Since `poold` also runs on the same gRPC server as `lnd`, we have to specify the +**LetEncrypt** `host:port` and TLS certificate. But `poold` verifies its own +macaroon, so we have to specify that one from the `.pool` directory. + +```shell script +$ pool \ + --rpcserver=terminal.mydomain.com:8443 \ + --tlscertpath=~/.lit/letsencrypt/terminal.mydomain.com \ + --macaroonpath=~/.pool/testnet/pool.macaroon \ + accounts list +``` + +You can easily create an alias for this by adding the following line to your +`~/.bashrc` file: + +```shell script +alias lit-pool="pool --rpcserver=terminal.mydomain.com:8443 --tlscertpath=~/.lit/letsencrypt/terminal.mydomain.com --macaroonpath=~/.loop/testnet/loop.macaroon" +``` + ### Example `frcli` command Faraday's command line tool follows the same pattern as loop. We also have to specify the diff --git a/doc/troubleshooting.md b/doc/troubleshooting.md index 33970081..4a59c652 100644 --- a/doc/troubleshooting.md +++ b/doc/troubleshooting.md @@ -4,6 +4,7 @@ If you have trouble running your node, please first check the logs for warnings If there are errors relating to one of the embedded servers, then you should open an issue in their respective GitHub repos ([lnd](https://github.com/lightningnetwork/lnd/issues), [loop](https://github.com/lightninglabs/loop/issues), +[pool](https://github.com/lightninglabs/pool/issues), [faraday](https://github.com/lightninglabs/faraday/issues). If the issue is related to the web app, then you should open an [issue](https://github.com/lightninglabs/lightning-terminal/issues) here in this repo.