docs: note that different ZMQ sockets must be used with bitcoind
This commit is contained in:
parent
936fcc1f16
commit
e58486b599
|
@ -240,10 +240,10 @@ the following:
|
||||||
([this has now been fixed](https://github.com/Homebrew/homebrew-core/pull/23088)
|
([this has now been fixed](https://github.com/Homebrew/homebrew-core/pull/23088)
|
||||||
in the latest Homebrew recipe for bitcoin)
|
in the latest Homebrew recipe for bitcoin)
|
||||||
- Configure the `bitcoind` instance for ZMQ with `--zmqpubrawblock` and
|
- Configure the `bitcoind` instance for ZMQ with `--zmqpubrawblock` and
|
||||||
`--zmqpubrawtx` (the latter is optional but allows you to see unconfirmed
|
`--zmqpubrawtx`. These options must each use their own unique address in order
|
||||||
transactions in your wallet). They must be combined in the same ZMQ socket
|
to provide a reliable delivery of notifications (e.g.
|
||||||
address (e.g. `--zmqpubrawblock=tcp://127.0.0.1:28332` and
|
`--zmqpubrawblock=tcp://127.0.0.1:28332` and
|
||||||
`--zmqpubrawtx=tcp://127.0.0.1:28332`).
|
`--zmqpubrawtx=tcp://127.0.0.1:28333`).
|
||||||
- Start `bitcoind` running against testnet, and let it complete a full sync with
|
- Start `bitcoind` running against testnet, and let it complete a full sync with
|
||||||
the testnet chain (alternatively, use `--bitcoind.regtest` instead).
|
the testnet chain (alternatively, use `--bitcoind.regtest` instead).
|
||||||
|
|
||||||
|
@ -253,21 +253,43 @@ testnet=1
|
||||||
server=1
|
server=1
|
||||||
daemon=1
|
daemon=1
|
||||||
zmqpubrawblock=tcp://127.0.0.1:28332
|
zmqpubrawblock=tcp://127.0.0.1:28332
|
||||||
zmqpubrawtx=tcp://127.0.0.1:28332
|
zmqpubrawtx=tcp://127.0.0.1:28333
|
||||||
```
|
```
|
||||||
|
|
||||||
Once all of the above is complete, and you've confirmed `bitcoind` is fully updated with the latest blocks on testnet, run the command below to launch `lnd` with `bitcoind` as your backend (as with `bitcoind`, you can create an `lnd.conf` to save these options, more info on that is described further below):
|
Once all of the above is complete, and you've confirmed `bitcoind` is fully
|
||||||
|
updated with the latest blocks on testnet, run the command below to launch `lnd`
|
||||||
|
with `bitcoind` as your backend (as with `bitcoind`, you can create an
|
||||||
|
`lnd.conf` to save these options, more info on that is described further below):
|
||||||
|
|
||||||
```
|
```
|
||||||
lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug --bitcoin.node=bitcoind --bitcoind.rpcuser=REPLACEME --bitcoind.rpcpass=REPLACEME --bitcoind.zmqpath=tcp://127.0.0.1:28332 --externalip=X.X.X.X
|
lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug --bitcoin.node=bitcoind --bitcoind.rpcuser=REPLACEME --bitcoind.rpcpass=REPLACEME --bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332 --bitcoind.zmqpubrawblock=tcp://127.0.0.1:28333 --externalip=X.X.X.X
|
||||||
```
|
```
|
||||||
|
|
||||||
*NOTE:*
|
*NOTE:*
|
||||||
- The auth parameters `rpcuser` and `rpcpass` parameters can typically be determined by `lnd` for a `bitcoind` instance running under the same user, including when using cookie auth. In this case, you can exclude them from the `lnd` options entirely.
|
- The auth parameters `rpcuser` and `rpcpass` parameters can typically be
|
||||||
- If you DO choose to explicitly pass the auth parameters in your `lnd.conf` or command line options for `lnd` (`bitcoind.rpcuser` and `bitcoind.rpcpass` as shown in example command above), you must also specify the `bitcoind.zmqpath` option. Otherwise, `lnd` will attempt to get the configuration from your `bitcoin.conf`.
|
determined by `lnd` for a `bitcoind` instance running under the same user,
|
||||||
- You must ensure the same address (including port) is used for the `bitcoind.zmqpath` option passed to `lnd` as for the `zmqpubrawblock` and `zmqpubrawtx` passed in the `bitcoind` options.
|
including when using cookie auth. In this case, you can exclude them from the
|
||||||
- When running lnd and bitcoind on the same Windows machine, ensure you use 127.0.0.1, not localhost, for all configuration options that require a TCP/IP host address. If you use "localhost" as the host name, you may see extremely slow inter-process-communication between lnd and the bitcoind backend. If lnd is experiencing this issue, you'll see "Waiting for chain backend to finish sync, start_height=XXXXXX" as the last entry in the console or log output, and lnd will appear to hang. Normal lnd output will quickly show multiple messages like this as lnd consumes blocks from bitcoind.
|
`lnd` options entirely.
|
||||||
- Don't connect more than one instance of `lnd` to `bitcoind`. With the default `bitcoind` settings, having more than one instance of `lnd`, or `lnd` plus any application that consumes the RPC could cause `lnd` to miss crucial updates from the backend.
|
- If you DO choose to explicitly pass the auth parameters in your `lnd.conf` or
|
||||||
|
command line options for `lnd` (`bitcoind.rpcuser` and `bitcoind.rpcpass` as
|
||||||
|
shown in example command above), you must also specify the
|
||||||
|
`bitcoind.zmqpubrawblock` and `bitcoind.zmqpubrawtx` options. Otherwise, `lnd`
|
||||||
|
will attempt to get the configuration from your `bitcoin.conf`.
|
||||||
|
- You must ensure the same addresses are used for the `bitcoind.zmqpubrawblock`
|
||||||
|
and `bitcoind.zmqpubrawtx` options passed to `lnd` as for the `zmqpubrawblock`
|
||||||
|
and `zmqpubrawtx` passed in the `bitcoind` options respectively.
|
||||||
|
- When running lnd and bitcoind on the same Windows machine, ensure you use
|
||||||
|
127.0.0.1, not localhost, for all configuration options that require a TCP/IP
|
||||||
|
host address. If you use "localhost" as the host name, you may see extremely
|
||||||
|
slow inter-process-communication between lnd and the bitcoind backend. If lnd
|
||||||
|
is experiencing this issue, you'll see "Waiting for chain backend to finish
|
||||||
|
sync, start_height=XXXXXX" as the last entry in the console or log output, and
|
||||||
|
lnd will appear to hang. Normal lnd output will quickly show multiple
|
||||||
|
messages like this as lnd consumes blocks from bitcoind.
|
||||||
|
- Don't connect more than two or three instances of `lnd` to `bitcoind`. With
|
||||||
|
the default `bitcoind` settings, having more than one instance of `lnd`, or
|
||||||
|
`lnd` plus any application that consumes the RPC could cause `lnd` to miss
|
||||||
|
crucial updates from the backend.
|
||||||
|
|
||||||
#### Disabling Wallet Encryption
|
#### Disabling Wallet Encryption
|
||||||
|
|
||||||
|
|
|
@ -205,11 +205,11 @@ bitcoin.node=btcd
|
||||||
; (other than for a remote bitcoind instance).
|
; (other than for a remote bitcoind instance).
|
||||||
; bitcoind.rpcpass=kek
|
; bitcoind.rpcpass=kek
|
||||||
|
|
||||||
; ZMQ socket which sends rawblock and (optionally) rawtx notifications from
|
; ZMQ socket which sends rawblock and rawtx notifications from bitcoind. By
|
||||||
; bitcoind. By default, lnd will attempt to automatically obtain this
|
; default, lnd will attempt to automatically obtain this information, so this
|
||||||
; information, so this likely won't need to be set (other than for a remote
|
; likely won't need to be set (other than for a remote bitcoind instance).
|
||||||
; bitcoind instance).
|
; bitcoind.zmqblockhost=tcp://127.0.0.1:28332
|
||||||
; bitcoind.zmqpath=tcp://127.0.0.1:28332
|
; bitcoind.zmqtxhost=tcp://127.0.0.1:28333
|
||||||
|
|
||||||
|
|
||||||
[neutrino]
|
[neutrino]
|
||||||
|
@ -283,11 +283,11 @@ litecoin.node=ltcd
|
||||||
; (other than for a remote litecoind instance).
|
; (other than for a remote litecoind instance).
|
||||||
; litecoind.rpcpass=kek
|
; litecoind.rpcpass=kek
|
||||||
|
|
||||||
; ZMQ socket which sends rawblock and (optionally) rawtx notifications from
|
; ZMQ socket which sends rawblock and rawtx notifications from litecoind. By
|
||||||
; litecoind. By default, lnd will attempt to automatically obtain this
|
; default, lnd will attempt to automatically obtain this information, so this
|
||||||
; information, so this likely won't need to be set (other than for a remote
|
; likely won't need to be set (other than for a remote litecoind instance).
|
||||||
; litecoind instance).
|
; litecoind.zmqblockhost=tcp://127.0.0.1:28332
|
||||||
; litecoind.zmqpath=tcp://127.0.0.1:28332
|
; litecoind.zmqtxhost=tcp://127.0.0.1:28333
|
||||||
|
|
||||||
|
|
||||||
[autopilot]
|
[autopilot]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user