Commit Graph

197 Commits

Author SHA1 Message Date
yyforyongyu
2f27a52f7f
server+lncfg: make sweepr batch window duration configurable 2022-09-01 10:44:29 +08:00
Olaoluwa Osuntokun
89529fbb4f
feature+lncfg: add config option to turn of anysegwit 2022-08-10 18:44:37 -07:00
yyforyongyu
87f58a274b
multi: add the flag prune-revocation to perform the optional migration 2022-07-12 21:01:11 +08:00
eugene
91b26f8ce7
sample-lnd: showing how to enable scid-alias, zero-conf feature bits 2022-07-07 17:10:30 -04:00
Tommy Volk
8291e8a170 multi: add keep-failed-payment-attempts flag 2022-07-03 21:04:27 +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
Hitanshu Mehta
3dc5ddc168 fix typos [skip ci] 2022-04-11 18:26:54 +05:30
yyforyongyu
1c8c0b4fa0
multi: make PendingCommitInterval configurable 2022-03-24 10:01:42 +08:00
Andras Banki-Horvath
7c8093ad1a
config: update sample-lnd.conf 2022-03-22 14:20:40 +01:00
Joost Jager
ae314ec794
htlcswitch: add an always on mode to interceptable switch
Co-authored-by: Juan Pablo Civile <elementohb@gmail.com>
2022-03-17 17:39:37 +01:00
eugene
9d8ff1fae5
config: clamp channel-commit-interval to reasonable time 2022-02-24 13:41:31 -05: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
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
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
Oliver Gugger
03a038c769
Merge pull request #5888 from BhaagBoseDK/patch-1
payments-expiration-grace-period needs time unit
2021-11-29 09:55:30 +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
BhhagBoseDK
16e96784d1 [skip-ci] payments-expiration-grace-period needs time unit
[skip-ci]
payments-expiration-grace-period needs time unit h/m/s or else the lnd does not start.
; payments-expiration-grace-period=30s
Corrected minor typo.
2021-11-01 13:13:13 +00: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
eugene
702b3a3258
multi: introduce config-level DustThreshold for defining threshold 2021-09-30 13:44:35 -04: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
Adrian-Stefan Mares
3378ad0120 config+lnd+tor: Update naming 2021-08-01 14:28:32 +02:00
Andras Banki-Horvath
f13a348c97
config: update sample-lnd.conf with routerrpc.mcflushinterval 2021-07-26 17:02:14 +02:00
Adrian-Stefan Mares
be666b55b6 tor: Allow direct connections to clearnet targets 2021-07-10 19:16:57 +02:00
Olaoluwa Osuntokun
7e4b2b82f1
Merge pull request #5448 from xanoni/sample-lnd-conf-cleanup
sample-lnd.conf: remove duplicate setting and clean up section separators
2021-07-09 14:37:32 -07:00
Oliver Gugger
6ca38bc815
lnd+config+sample-lnd.conf: add wallet-unlock-allow-create flag
As requested by users of node bundle software. They want to use the
wallet-unlock-password-file configuration option in their
default/template config file. This makes the first-time lnd setup a bit
more tricky since lnd will fail with an error if no wallet exists yet
while that config option is used.
The new wallet-unlock-allow-create option instructs lnd to not fail if
no wallet exists yet but instead spin up its unlocker RPC as it would
without the wallet-unlock-password-file being present.
This is not recommended for auto-provisioned or high-security systems
because the wallet creation RPC is unauthenticated and an attacker could
inject a seed while lnd is in that state.
2021-07-01 11:10:25 +02:00
xanoni
54b55b924a sample-lnd.conf: remove duplicate setting
Remove duplicate `nolisten` setting in sample-lnd.conf
2021-06-30 01:17:16 -04:00
xanoni
06ad5ecfe5 sample-lnd.conf: harmonize section separators
Harmonize formatting of section separators and clean up whitespace in
sample-lnd.conf
2021-06-30 01:14:58 -04:00
Linus Curiel Xanoni
dc7d79abc2
doc/sample-lnd.conf: remove deprecated protocol.anchors flag
Remove deprecated "protocol.anchors" setting from sample-lnd.conf
2021-06-28 12:25:04 -07:00
Vincent Woo
6ff53226d0 In sample-lnd.conf, move astray neutrino and routing options into their respective sections 2021-06-19 20:01:23 -07:00
Olaoluwa Osuntokun
a45827ff4d
docs: add prometheus flags to sample-lnd.conf (#5331) 2021-06-01 15:22:47 -07:00
ErikEk
4114cc5a77 docs: add prometheus flags to sample-lnd.conf 2021-06-01 08:21:12 +02:00
Olaoluwa Osuntokun
0ed72b8c6a
Merge pull request #5025 from guggero/signet
Add basic bitcoin signet support
2021-05-26 18:19:57 -07:00
Joost Jager
42f4afef75
multi: add random coin selection 2021-05-24 20:09:56 +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
86c5e483b2
Merge pull request #5206 from carlaKC/4987-heightexpirywatcher
invoices: add height based expiry watcher
2021-05-12 13:41:52 -07:00
Olaoluwa Osuntokun
93730088c5
Merge pull request #5256 from guggero/wallet-unlock-file
Auto-unlock wallet from password file
2021-05-12 13:41:30 -07:00
carla
34de5922ed
multi: add height-based invoice expiry
This commit adds height-based invoice expiry for hodl invoices
that have active htlcs. This allows us to cancel our intentionally
held htlcs before channels are force closed. We only add this for
hodl invoices because we expect regular invoices to automatically
be resolved.

We still keep hodl invoices in the time-based expiry queue,
because we want to expire open invoices that reach their timeout
before any htlcs are added. Since htlcs are added after the
invoice is created, we add new htlcs as they arrive in the
invoice registry. In this commit, we allow adding of duplicate
entries for an invoice to be added to the expiry queue as each
htlc arrives to keep implementation simple. Our cancellation
logic can already handle the case where an entry is already
canceled, so this is ok.
2021-05-11 08:45:29 +02:00
Conner Fromknecht
2ecd1de713
config: expose distinct accept-amp flag
This mirrors the accept-keysend flag, but also permits users to
eventually toggle off keysend separately from AMP.
2021-05-10 22:02:15 -07:00
Oliver Gugger
571d00b32c
config+lnd: add wallet-unlock-password-file option
In automated or unattended setups such as cluster/container
environments, unlocking the wallet through RPC presents a set of
challenges. Usually the password is present as a file somewhere in the
container already anyway so we might also just read it from there.
2021-05-06 10:07:04 +02:00
Andras Banki-Horvath
d161b34ee5
lnd: integrate leader elector to lnd main
This commit also changes the order of DB init to be run after the RPC
server is up. This will allow us to later add an RPC endpoint to be used
to query leadership status.
2021-05-04 17:33:08 +02:00
Olaoluwa Osuntokun
99fe0ab150
Merge pull request #4878 from bhandras/etcd_doc_fix
etcd: `disabletls` option for etcd
2021-05-03 18:56:42 -07:00
Olaoluwa Osuntokun
140dd944c0
Merge pull request #5257 from wpaulino/neutrino-update
lncfg: add config options for new neutrino options
2021-04-30 16:54:35 -07:00
Olaoluwa Osuntokun
98b0b34bb4
Merge pull request #5237 from guggero/ws-bi-di
REST: Enable support for bi-directional streaming RPCs over REST, fix ping/pong support
2021-04-29 15:55:00 -07:00
Wilmer Paulino
2084cb0ad5
lncfg: add config options for new neutrino options 2021-04-29 13:56:17 -07:00
Oliver Gugger
5df69cf93f
config+lnd: make WebSocket interval/wait configurable
To make it possible to adapt the WebSocket ping interval and pong wait
time to custom situations, we add new configuration flags to customize
them.
2021-04-29 10:39:54 +02:00
Elle Mouton
6702c79216 multi: add block cache size config
This commit adds block cache size to the main lnd config along with the
chainreg config.
2021-04-28 09:46:11 +02:00
Olaoluwa Osuntokun
6c27de7d11
routing: add strict pruning as new flag, default for neutrino
In this commit we add a new flag that controls if lnd will do strict
zombie pruning or not. If true, then this will cause lnd to maintain a
tighter graph as it wants both edges to always be live. We enable this by
default for neutrino as without this, it's possible that a node never
sees both edges begin disabled, so those edges are never actually pruned
from the graph.
2021-04-21 13:56:29 -05:00
Olaoluwa Osuntokun
25dfbc4106
Merge pull request #5193 from wpaulino/neutrino-assume-valid
Use routing.assumechanvalid=true by default in Neutrino mode
2021-04-13 15:37:51 -07:00
Martin Habovštiak
16027b0151
Better document the nature of accept-keysend
This explains the purpose of `accept-keysend` and its planned deprecation in detail.

Fixes #5190
2021-04-10 10:41:18 +02:00
Conner Fromknecht
213b264e4c
Merge pull request #5187 from bottlepay/config-commit-time
config: add commit time parameter
2021-04-09 16:44:40 -07:00
Joost Jager
ffd346e2e1
config: add channel commit batch size parameter 2021-04-09 15:10:43 +02:00
Joost Jager
a181d26287
config: add channel commit interval parameter 2021-04-09 15:10:42 +02:00
Wilmer Paulino
56c536583f
lncfg: add new PrunedNodeMaxPeers config option/flag 2021-04-06 14:55:19 -07:00
Jonathan Underwood
786568fa46
cert: allow cert expiry to be set in config 2021-04-05 20:23:33 -07:00
Oliver Gugger
6fe4114e96
lncfg+sample-lnd.conf: deprecate routing.assumechanvalid 2021-03-30 15:19:05 +02:00
Oliver Gugger
c43a9ea71f
lncfg+sample-lnd.conf: add --neutrino.validatechannels 2021-03-30 15:18:59 +02:00
Wilmer Paulino
dcac5a87f4
lncfg: expose channel update rate limiting options 2021-03-16 11:42:29 -07:00
Elle Mouton
9e9c48fcdd rpc: use default if conf-target is not set
This commit uses the new coop-close-target-confs value as the default to
use for a nodes self initiated channel closures if the conf-target flag
for the channel closure is not set. The defaults for both these options
is 6 so this shouldnt change current behaviour.
2021-03-04 13:07:30 +02:00
Elle Mouton
3b412ce50f multi: allow setting target confs for co-op close
This commit adds a new config option: "--coop-close-target-confs"
which allows a user to override the default target confirmations of 6
that is used to estimate a fee rate to use during a co-op closure
initiated by a remote peer.
2021-03-04 13:04:41 +02:00
Conner Fromknecht
fcd5cb625a
config: expose gossip.pinned-syncers for conf
The pinned syncer set is exposed as a comma-separated list of pubkeys.
2021-01-29 00:19:47 -08:00
Olaoluwa Osuntokun
ff897db293
Merge pull request #4901 from bhandras/etcd_itest_ci
etcd+itests: use itest generated ports for embedded etcd and add etcd itests to travis CI
2021-01-14 17:53:54 -08:00
carla
8eaba51bdc
sample-lnd: add anchors to sample config 2021-01-14 22:21:20 +02:00
Oliver Gugger
236294622e
config+lncfg+sample-lnd.conf: fix feeurl documentation
A new top level feeurl option was added recently to replace the neutrino.feeurl
option. The new option was never added to the sample config file and the
text was never updated to reflect that the option is required for
neutrino on mainnet. We fix this and also add a valid mainnet example
URL to the sample config file.
2021-01-11 09:27:19 +01:00
Andras Banki-Horvath
f1831f0581
etcd: add support for user specified ports for testing 2021-01-08 15:39:11 +01:00
Andras Banki-Horvath
cb2b5efc6e
etcd: add (dev only) disabletls option for etcd 2021-01-05 16:50:53 +01:00
Andras Banki-Horvath
5ee0d77414
build: extend sample-lnd.conf with the new etcd namespace 2020-12-16 18:34:41 +01:00
Johan T. Halseth
99bbd992d2
sample config: add no-anchors and max-commit-fee-rate-anchors 2020-12-15 19:54:50 +01:00
Johan T. Halseth
d69a1a616d
sample config: add no-anchors 2020-12-15 10:13:27 +01:00
Yong
582b164c46
kvdb: add timeout options for bbolt (#4787)
* mod: bump btcwallet version to accept db timeout

* btcwallet: add DBTimeOut in config

* kvdb: add database timeout option for bbolt

This commit adds a DBTimeout option in bbolt config. The relevant
functions walletdb.Open/Create are updated to use this config. In
addition, the bolt compacter also applies the new timeout option.

* channeldb: add DBTimeout in db options

This commit adds the DBTimeout option for channeldb. A new unit
test file is created to test the default options. In addition,
the params used in kvdb.Create inside channeldb_test is updated
with a DefaultDBTimeout value.

* contractcourt+routing: use DBTimeout in kvdb

This commit touches multiple test files in contractcourt and routing.
The call of function kvdb.Create and kvdb.Open are now updated with
the new param DBTimeout, using the default value kvdb.DefaultDBTimeout.

* lncfg: add DBTimeout option in db config

The DBTimeout option is added to db config. A new unit test is
added to check the default DB config is created as expected.

* migration: add DBTimeout param in kvdb.Create/kvdb.Open

* keychain: update tests to use DBTimeout param

* htlcswitch+chainreg: add DBTimeout option

* macaroons: support DBTimeout config in creation

This commit adds the DBTimeout during the creation of macaroons.db.
The usage of kvdb.Create and kvdb.Open in its tests are updated with
a timeout value using kvdb.DefaultDBTimeout.

* walletunlocker: add dbTimeout option in UnlockerService

This commit adds a new param, dbTimeout, during the creation of
UnlockerService. This param is then passed to wallet.NewLoader
inside various service calls, specifying a timeout value to be
used when opening the bbolt. In addition, the macaroonService
is also called with this dbTimeout param.

* watchtower/wtdb: add dbTimeout param during creation

This commit adds the dbTimeout param for the creation of both
watchtower.db and wtclient.db.

* multi: add db timeout param for walletdb.Create

This commit adds the db timeout param for the function call
walletdb.Create. It touches only the test files found in chainntnfs,
lnwallet, and routing.

* lnd: pass DBTimeout config to relevant services

This commit enables lnd to pass the DBTimeout config to the following
services/config/functions,
  - chainControlConfig
  - walletunlocker
  - wallet.NewLoader
  - macaroons
  - watchtower
In addition, the usage of wallet.Create is updated too.

* sample-config: add dbtimeout option
2020-12-07 15:31:49 -08:00
Marty Jones
c04773963b
healthcheck: add healthcheck to shutdown if cert is expired (#4792)
In certain container set ups, it's useful to optionally have lnd just shutdown if it detects that its certs are expired, as assuming there's a hypervisor to restart the container/pod, then upon restart, lnd will have fully up to date certs.
2020-12-01 18:34:19 -08:00
Conner Fromknecht
82a238317c
lncfg+itest: expose configurable batch-commit-interval
This will permit a greater degree of tuning or customization depending
on various hardware/environmental factors.
2020-11-25 16:45:25 -08:00
Johan T. Halseth
a8b6966017
Merge pull request #4402 from bhandras/etcd_itest
itests: option to run our integration tests on etcd + boltdb (remote/local)
2020-11-18 19:48:03 +01:00
Andras Banki-Horvath
5e19c41cb8
build: extend sample-lnd-conf with db.etcd.embedded 2020-11-18 15:34:46 +01:00
Johan T. Halseth
a2f45cb812
config: update debuglevel description + sample conf 2020-11-18 14:19:23 +01:00
Olaoluwa Osuntokun
e4f0f2aa69
Merge pull request #4667 from guggero/auto-compact
channeldb/kvdb/bolt: automatically compact database on startup
2020-11-16 17:50:14 -08:00
Oliver Gugger
6131a53eb4
lncfg+channeldb: add autocompact flags to BoltConfig 2020-11-13 10:19:49 +01:00
Oliver Gugger
1548528a3f
lncfg+sample-lnd.conf: add DNS seed flag to chain cfg 2020-11-13 09:49:18 +01:00
Olaoluwa Osuntokun
58f72df94a
Merge pull request #4715 from guggero/reset-wallet
Implement btcwallet's "dropwtxmgr" command as --reset-wallet-transactions flag
2020-11-11 19:50:21 -08:00
Johan T. Halseth
b529d42929
sample-config: add no-rest-tls 2020-11-11 09:41:23 +01:00
carla
f4136decae
multi: add max local csv config option
To allow nodes more control over the amount of time that their funds
will be locked up, we add a MaxLocalCSVDelay option which sets the
maximum csv delay we will accept for all channels. We default to the
existing constant of 10000, and set a sane minimum on this value so that
clients cannot set unreasonably low maximum csv delays which will result
in their node rejecting all channels.
2020-11-04 13:55:37 +02:00
Oliver Gugger
37817f192e
config: add reset-wallet-transactions flag 2020-11-04 09:12:24 +01:00
carla
325deb36c0
sample-conf: add assumechanvalid to sample conf 2020-10-21 14:13:48 +02:00
Oliver Gugger
96379f3503
sample-lnd.conf: remove extra whitespaces 2020-10-16 08:53:16 +02:00
Oliver Gugger
b555357f9b
sample-lnd.conf: add all flags without build tag
Because we'll add a check that enforces all command line flags that are
available with the default build tags to also be contained in the
sample-lnd.conf file, we first add all that currently are missing.
2020-10-16 08:53:15 +02:00
Ben Woosley
465c2d17f4
autopilot: Change default heuristic to top_centrality 2020-10-02 20:13:54 -07:00
Ben Woosley
da805c022e
Fix top_centrality in sample-lnd.conf
Input:
> autopilot.heuristic={topk_centrality:1}

Result:
> strconv.ParseFloat: parsing "1}": invalid syntax

Input:
> autopilot.heuristic=topk_centrality:1

Result:
> heuristic topk_centrality not available. Available heuristics are: [ 'preferential'  'externalscore'  'top_centrality' ]
2020-10-02 15:09:52 -07:00