Commit Graph
98 Commits
Author SHA1 Message Date
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
Olaoluwa Osuntokun 6a2fb316ca Merge pull request #5274 from halseth/anchors-reserved-value-max
[anchors] cap value reserved for anchor fee bumping
2021-05-12 16:19:57 -07:00
Johan T. Halseth 820e77d574 lncfg: make anchor channels by default
This commit again enables anchor channels by default.

During itests we still keep anchors opt-in, as many of the tests rely on
the behaviour of non-anchor channels.
2021-05-11 10:27:54 +02: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
Andras Banki-Horvath 14c851c8fc kvdb: move channeldb/kvdb to top level 2021-05-07 14:18:56 +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
Andras Banki-Horvath 41532ce634 cluster: add etcd based leader elector and factory 2021-05-04 17:33:07 +02:00
Andras Banki-Horvath 9992e5c0b5 etcd: decouple embedded etcd instance startup
This refactor changes how we instantiate the etcd based Backend to allow
separate initialization and startup for the embedded instance.
2021-05-04 17:33:05 +02:00
Andras Banki-Horvath 6757e14998 etcd: refactors to simplify etcd configuration
This refactor removes a redundancy where we had etcd configuration under
kvdb and kvdb/etcd packages.
2021-05-04 17:33:04 +02:00
Andras Banki-Horvath 44e312ace9 etcd: remove (unused) etcd root bucket prefix
This commit removes the unused prefix from the etcd backend config as
etcd key space separation in LND is implemented by using namespaces
instead.
2021-05-04 17:32:59 +02:00
Wilmer Paulino 2084cb0ad5 lncfg: add config options for new neutrino options 2021-04-29 13:56:17 -07: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
Wilmer Paulino 56c536583f lncfg: add new PrunedNodeMaxPeers config option/flag 2021-04-06 14:55:19 -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
Olaoluwa Osuntokun 3ad8b86bac Merge pull request #5007 from Roasbeef/ipv6-tor-parse-fix
lncfg: add IPv6 resolution bypass & account for local hostname aliases
2021-02-10 23:49:47 -08:00
Olaoluwa Osuntokun e41091a765 lncfg: detect tor resolution error case and fallback to system resolver
In this commit, we fix a bug that would cause resolution of items in
/etc/hosts (or the like) to fail as Tor wouldn't recognize them as
proper host names. With this commit, we'll catch this error and fall
back to the system's resolver.
2021-02-10 18:36:57 -08:00
Olaoluwa Osuntokun 099efadd92 lncfg: use net.ParseIP to detect IPv6 addresses 2021-02-10 18:35:53 -08:00
Wilmer Paulino 1f1f7be770 Revert "lncfg: add new legacy protocol option to turn off gossip throttling"
This reverts commit b1fbbcf562.
2021-02-10 15:45:49 -08:00
rockstardev 57ac57ea66 fix: correct no-rest-tls parameter in error message 2021-02-07 13:22:53 -06:00
eugene 80eb5dbece lncfg: add isIPv6Host helper to force v6 addrs through system resolver
With this commit, if --tor.active is specified, then IPv6 addresses
will no longer go through the connmgr.TorLookupIP function from btcd.
This function does not have proper IPv6 support and would fail with
the error "tor general error". Instead, use the system resolver.
2021-02-05 15:37:39 -05: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
Johan T. Halseth c86761f1b3 lncfg: make anchor commitments opt-in
This commit reverts the anchors-by-default change, and instead make
anchor commitments and opt-in option. The plan is to enable anchors by
default further down the line.
2021-01-14 09:09:42 +01: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
Johan T. Halseth 64659e6156 protocol+rpctest: disable anchors by default for itests 2020-12-15 10:13:28 +01:00
Johan T. Halseth c92c06400b config+protocol: enable anchor commitments (zero-fee HTLC ) by default 2020-12-15 10:13:25 +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
Olaoluwa Osuntokun b1fbbcf562 lncfg: add new legacy protocol option to turn off gossip throttling 2020-11-30 16:38:53 -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
Andras Banki-Horvath 511e817624 lncfg+channeldb: add config to be able to run lnd on embedded etcd 2020-11-18 15:34:43 +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 f8907fdb47 multi: add AutoCompact option to bolt backend
With this commit we thread the new AutoCompact flags all the way through
to the bolt backend.
2020-11-13 10:19:49 +01: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
Johan T. Halseth 4d0537d4c3 config: enforce safe use of TLS 2020-11-11 09:37:53 +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
Olaoluwa Osuntokun 297c614126 Merge pull request #4701 from carlaKC/4581-removeexperimential
multi: remove experimential build flag for assumechanvalid
2020-11-03 17:34:50 -08:00
Eugene 46ef212de4 lnd+lncfg: move normalizeNetwork to lncfg 2020-10-29 15:20:00 -04:00
carla c92b030652 multi: remove experimential build flag for assumechanvalid 2020-10-21 14:13:50 +02:00
Conner Fromknecht e135047304 Merge pull request #4353 from LN-Zap/feat/neutrino-user-agent
Ability to configure neutrino useragent
2020-09-23 16:45:19 -07:00
Joost Jager 2ebfb64b9b Merge pull request #4606 from joostjager/cpfp-sweep-prep
cnct+sweep+itest: preparations for cpfp-aware sweeper
2020-09-16 11:48:39 +02:00
Joost Jager fc3fd26a3d config: allow web fee estimation on regtest 2020-09-15 10:29:14 +02:00
Olaoluwa Osuntokun ffe7c3e626 Merge pull request #4473 from yyforyongyu/allow-no-auth-private-addr
lncfg: allow no auth on private addresses
2020-09-14 19:03:27 -07:00
carla 5a73029442 multi: add minimum disk space check 2020-08-24 09:38:11 +02:00