Commit Graph
196 Commits
Author SHA1 Message Date
eugene a493caf3c0 server+lncfg: protocol flag to enable scid-alias, zero-conf feature bits
This allows the zero-conf and scid-alias feature bits to be toggled
using the config. The feature bits are off by default to protect users
from accidentally incurring the risk of a zero-conf channel.
2022-07-07 17:10:26 -04:00
Tommy Volk 9a10c80bcb multi: move many t.Fatalf calls to require.NoError 2022-06-17 04:26:55 +00:00
Orbital 7509af1a70 multi: add rpcpolling config options 2022-05-11 09:02:13 +02:00
Elle Mouton c76d04ef91 multi: make ZmqReadDeadline configurable
Make the Bitcoind ZMQReadDeadline option configurable.
2022-05-11 08:45:07 +02:00
Carl Dong 89209ec596 config: Add bitcoind.{config,rpccookie} configuration options
Currently, the Bitcoind.Dir configuration option is used as the base
directory for locating both the bitcoind configuration file and the RPC
cookie file. However, it is quite common for Bitcoin Core to be packaged
in such a way that the configuration file and the RPC cookie file reside
in different directories: "/etc/bitcoin/bitcoin.conf" and
"/var/lib/bitcoind/.cookie".

This change makes it such that --bitcoind.config and
--bitcoind.rpccookie options can be specified to override the default
auto-detection logic, and if either is unspecified, the auto-detection
logic will still do its job.
2022-04-21 14:01:51 -04:00
Turtle 747161a1f4 lnd: add config option for specifying particular peers to connect to 2022-04-19 12:37:44 -05:00
Elle Mouton c582438a4e lncfg: use net pkg IsLoopback method
Use the IsLoopback method provided by the net package instead of using
hardcoded loopback addresses.
2022-03-30 13:21:50 +02:00
Elle Mouton c6e96c67ce lncfg: normal TCP resolution for unspecified IPs
Use normal TCP resolution for any unspecified IP (0.0.0.0 or ::) instead
of using the Tor resolver.
2022-03-30 13:21:48 +02:00
Andras Banki-Horvath 8eca46f142 cluster: configurable session TTL for the leader elector 2022-03-22 14:20:36 +01:00
Oliver Gugger 7dfe4018ce multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease
review:
 - 2d746f68: replace imports
 - 4008f0fd: use ecdsa.Signature
 - 849e33d1: remove btcec.S256()
 - b8f6ebbd: use v2 library correctly
 - fa80bca9: bump go modules
2022-03-09 19:02:37 +01:00
Olaoluwa Osuntokun 9a50cc95b7 Merge pull request #6224 from Roasbeef/prometheus-latency-histograms
monitoring+cfg: add new option to export gRPC perf metrics
2022-02-16 16:38:51 -08:00
Oliver Gugger 895a2e497b multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
Oliver Gugger ffee7d1bcf multi: fix newly detected linter issues 2022-02-10 11:02:02 +01:00
Olaoluwa Osuntokun 10c5d6c0bd monitoring+cfg: add new option to export gRPC perf metrics
In this commit, we expose a new monitoring option to allow users to
export gRPC performance metrics. These metrics can be used to see how
long certain calls are taking, the total amount of time spent handling
calls, broken down by service and also call.

This option consumes additional memory and disk space for the Prometheus
server, which is why we're opting to make it an optional flag.
2022-02-01 15:55:26 -08:00
Oliver Gugger b77c1fb200 Merge pull request #6149 from bhandras/graph_import_rpc
lnd: add `devrpc` sub server and `devrpc.ImportGraph` to import graph dumps
2022-01-28 10:24:59 +01:00
Andras Banki-Horvath 825422a82a lncfg: move ParseHexColor to lncfg 2022-01-24 17:42:54 +01:00
Dimitris Apostolou 530a2059e5 multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
Oliver Gugger bab807a57d multi: add migrate-wallet-to-watch-only flag
To enable converting an existing wallet with private key material into a
watch-only wallet on first startup with remote signing enabled, we add a
new flag. Since the conversion is a destructive process, this shouldn't
happen automatically just because remote signing is enabled.
2022-01-06 14:35:26 +01:00
Oliver Gugger 0bdac59a8c multi: add nochainbackend option 2022-01-06 14:35:25 +01:00
Oliver Gugger da59c1fa62 multi: add health check for remote signer 2022-01-06 14:35:25 +01:00
Oliver Gugger 9601a9ab84 multi: make remote signer RPC timeout configurable 2022-01-06 14:35:25 +01:00
Andras Banki-Horvath 1ccc5e8014 etcd: make max message size configurable 2021-12-02 21:07:49 +01:00
Joost Jager 274faff980 postgres: add connection limit 2021-11-17 11:08:43 +01:00
Olaoluwa Osuntokun 67e18e6089 rpc: optimize DescribeGraph by caching the response
Unfortunately, we can't use the graph cache directly here as it doesn't
include all the information we need, since it only includes the minimal
amount of information needed for path finding.

Instead, we use a simple mutex guarded cache that evicts itself after a
certain interval. The default is set small enough that most users
shouldn't really notice. We also provide a way to disable the cache, and
also disable the cache in the itests.

Fixes https://github.com/lightningnetwork/lnd/issues/1232
2021-11-04 15:30:31 -07:00
Oliver Gugger a2ad533136 docs+lncfg+sample-lnd.conf: add no-graph-cache option 2021-10-22 09:32:47 +02:00
Wilmer Paulino 35fd985118 lncfg: add protocol config option for script enforced lease support 2021-10-19 18:30:12 -07:00
Olaoluwa Osuntokun 94b7b71809 Merge pull request #5689 from guggero/remote-signer
Support remote signing over RPC
2021-10-18 18:39:17 -07:00
Oliver Gugger 9cae7ad3c2 multi: add remote RPC signing wallet implementation 2021-10-14 15:42:49 +02:00
yyforyongyu f41f5c7fa6 multi: add tor connection healthcheck
This commit adds a new health check, tor connection, to our liveness
monitor. A monitor refactor is applied to the server creation such that
the scope of health check creation is managed within one function.
2021-10-11 13:11:55 +08:00
Olaoluwa Osuntokun 91edfaed85 Merge pull request #5802 from yyforyongyu/5318-fix-addr-format
lndcfg: give verbose err when failed to load config
2021-09-30 20:14:08 -07:00
Oliver Gugger 0b4e03f5fc multi: add golang 1.17 compatible build tags
With go 1.17 a change to the build flags was implemented:
https://go.googlesource.com/proposal/+/master/design/draft-gobuild.md

The formatter now automatically adds the forward-compatible build tag
format and the linter checks for them, so we need to include them in our
code.
2021-09-29 17:31:37 -07:00
yyforyongyu 98ca821085 lndcfg: give verbose err when failed to load config 2021-09-29 04:37:05 +08:00
ErikEk d5463818a8 bbolt sync-freelist ignored 2021-09-27 06:49:56 +01:00
Joost Jager ae6cf72b46 lncfg: add postgres 2021-09-21 10:44:20 +02:00
Oliver Gugger 918e021177 config+sample-lnd.conf+lncfg: add RPC middleware config 2021-09-20 13:05:47 +02:00
Andras Banki-Horvath 6c2d8bb176 etcd: enable optional log file for embedded etcd log output
In this commit we add an extra config for enabling logging to an
external file when using embedded etcd. This can be useful when running
integration tests to see more details about etcd related issues.
2021-09-10 14:40:54 +02:00
Olaoluwa Osuntokun ec3af13081 Merge pull request #5410 from adriansmares/feature/add-hybrid-mode
Add Tor hybrid connectivity mode
2021-08-22 12:05:25 -07:00
Oliver Gugger 1e84b52fee lncfg+etcd: add namespace support for etcd databases
Since we're now storing the content of multiple previously distinct
database files in etcd, we want to properly namespace them as not to
provoke any key collisions. We append a sub namespace to the given
global namespace in order to still support multiple lnd nodes using the
same etcd database simultaneously.

Because the btcwallet code uses the legacy walletdb interface we must
assume it is not fully concurrency safe. Therefore we make sure only a
single writer can be active at any given time for the wallet DB backend
when using etcd.
2021-08-04 14:55:54 +02:00
Oliver Gugger 57c7862eeb lnd+lncfg: move wallet DB options into backend method
To have all the database backend related code in one place, we finally
also move the initialization of the wallet DB loader option into the
GetBackends() method.
2021-08-04 14:55:54 +02:00
Oliver Gugger 75531455da multi: make watchtower client/server DBs remote compatible
The final database that needs to be made remote compatible is the
watchtower server and client database.
They are handled a bit differently because both of them are not always
active, only when specifically turned on in the config.
2021-08-04 14:55:53 +02:00
Oliver Gugger 1e27f491c7 multi: make decayed log DB remote compatible
Even though the sphinx router's persistent replay log is not crucial in
the operation of lnd as its state can be re-created by creating a new
brontide connection, we want to make lnd fully stateless and therefore
have the option of not storing any state on disk.
2021-08-04 14:55:53 +02:00
Oliver Gugger f7b17df452 multi: make macaroon DB remote compatible
The macaroon root keys should also be stored to the remote database if a
replicated backend such as etcd is used.
This commit refactors the macaroons service and wallet unlocker to
accept a kvdb backend directly instead of creating the bolt instance
automatically.
2021-08-04 14:55:52 +02:00
Oliver Gugger 0d3647d715 lnd+lncfg: make etcd fully remote
This commit gets rid of the concept of a local and remote database when
etcd is used. Instead the same backend is now used for both the
(previously renamed from local and remote DB) graph and channel state
databases.
This will make path finding extremely slow on etcd and will require
further optimizations and possibly a write-through cache for the graph
DB. But this is a requirement for making lnd itself fully stateless.
2021-08-04 14:55:51 +02:00
Oliver Gugger c4917ae7fc multi: use kvdb.Backend for height hint DB
In order to separate our databases more clearly, we refactor the height
hint cache DB to use a kvdb backend instead of the channel DB instance
directly.
2021-08-04 14:55:51 +02:00
Oliver Gugger 9138c8abac multi: rename local and remote chan DBs
As a preparation to not have a local and remote version of the database
around anymore, we rename the variables into what their actual function
is. In case of the RPC server we even directly use the channel graph
instead of the DB instance. This should allow us to extract the channel
graph into its own, separate database (perhaps with better access
characteristics) in the future.
2021-08-04 14:55:50 +02:00
Oliver Gugger b1b0aac643 kvdb+lncfg: fix some typos in comments 2021-08-04 14:55:48 +02:00
Adrian-Stefan Mares 3378ad0120 config+lnd+tor: Update naming 2021-08-01 14:28:32 +02:00
Adrian-Stefan Mares c4221c3c3a config+lnd: Update Tor configuration for hybrid node mode 2021-07-10 19:16:58 +02:00
Oliver Gugger 4460903399 multi: add signet parameters
With this commit we make lnd compatible with the public signet test
network.
2021-05-18 13:06:03 +02:00
Olaoluwa Osuntokun 7ab5906093 Merge pull request #5245 from bhandras/kvdb_module
kvdb: make kvdb a top level submodule to allow dependency in other projects
2021-05-13 15:59:20 -07:00