LND and etcd
With the recent introduction of the
kvdbinterface LND can support multiple database backends allowing experimentation with the storage model as well as improving robustness trough eg. replicating essential data.
kvdbin v0.11.0 we're adding experimental etcd support to LND. As this is an unstable feature heavily in development, it still has many rough edges for the time being. It is therefore highly recommended to not use LND on
etcdin any kind of production environment especially not on bitcoin mainnet.
To create a dev build of LND with etcd support use the following command:
⛰ make tags="kvdb_etcd"
The important tag is the
kvdb_etcd, without which the binary is built without the etcd driver.
For development it is advised to set the
GOFLAGSenvironment variable to
goplswon't work on code in
To start your local etcd instance for testing run:
⛰ ./etcd \
max-request-bytesvalues are currently required in case of running LND with the full graph in etcd. Upcoming versions will split the database to local and replicated parts and only essential parts will remain in the replicated database, removing the requirement for these additional settings. These parameters have been tested to work with testnet LND.
To run LND with etcd, additional configuration is needed, specified either through command line flags or in
Sample command line:
⛰ ./lnd-debug \
lnd.conf(with other setting omitted):
Optionally users can specify
db.etcd.passfor db user authentication. If the database is shared, it is possible to separate our data from other users by setting
db.etcd.namespaceto an (already existing) etcd namespace. In order to test without TLS, users are able to set
This is currently not supported.
As mentioned before this is an experimental feature, and with that your data may be lost. Use at your own risk!