Commit Graph

11786 Commits

Author SHA1 Message Date
Oliver Gugger
06032b3f75
itest: fix timeout issue in sweep test 2021-08-04 14:55:56 +02:00
Oliver Gugger
fe931d179f
etcd+channeldb: fix linter issues, rename receiver
With this commit we address some issues the linter picked up after
touching older code.
2021-08-04 14:55:56 +02:00
Oliver Gugger
482f76a0f4
mod+kvdb+channeldb: use btcwallet new DB interface
Depends on btcsuite/btcwallet#757.
Pulls in the updated version of btcwallet and walletdb that have the DB
interface enhanced by their own View() and Update() methods with the
reset callback/closure supported out of the box. That way the global
package-level View() and Update() functions now become pure redirects.
2021-08-04 14:55:55 +02: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
6043113857
config: make sure network dir is created
The wallet and macaroon databases are the first files that are created
for a new node. When initializing those databases, the parent directory
is created if it does not exist.
With both of the databases now potentially being remote, that code that
creates the parent directory might never be executed and we need to do
that manually when parsing the configuration.
Otherwise we run into an error when we later try to create our default
macaroons in that folder and it doesn't exist.
2021-08-04 14:55:52 +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
abf3942228
lnd+server: use struct for database instances
As a preparation to initialize more than just the channel database on
startup we introduce a new struct that holds a reference to each of our
database instances.
2021-08-04 14:55:50 +02:00
Oliver Gugger
ad061b73e3
walletunlocker: remove unnecessary conversions 2021-08-04 14:55:49 +02:00
Oliver Gugger
b1b0aac643
kvdb+lncfg: fix some typos in comments 2021-08-04 14:55:48 +02:00
Oliver Gugger
44971f0c46
Merge pull request #5577 from xanoni/master
lnwallet/wallet.go: clarify anchor chan error str
2021-08-02 13:58:42 +02:00
xanoni
f5747c20ef lnwallet/wallet.go: clarify anchor chan error str
Improve 'ErrReservedValueInvalidated' error string to explain that the
error is triggered by a transaction that would deplete funds reserved for
potential future anchor channel closings (via CPFP)

Add hint that further details can be found in the debug log

Update strings in 'lntest/itest/log_error_whitelist.txt' correspondingly
2021-08-02 05:38:09 -04:00
Oliver Gugger
a8530b9dfc
Merge pull request #5535 from ErikEk/trivial-cmd-fix
trivial: missing dots
2021-08-02 08:28:10 +02:00
ErikEk
c8fc9b0a85 trivial: missing dots 2021-08-01 02:35:14 +02:00
Oliver Gugger
9331a259d8
Merge pull request #5588 from guggero/disable-itest-err-whitelist
make: disable itest error whitelist check
2021-07-30 10:24:12 +02:00
Oliver Gugger
3d9d985fdf
make: disable itest error whitelist check
Since we don't really do anything with the errors we check in the itest
error whitelist but get a lot of failed Travis runs because of it, we
disable the check for the moment.
2021-07-30 10:18:43 +02:00
Oliver Gugger
6906c838ed
Merge pull request #5573 from yyforyongyu/5530-payment-test-race
routing: fix race in TestSendMPPaymentFailed
2021-07-30 10:04:04 +02:00
yyforyongyu
3005207167
docs: update release notes for #5573 2021-07-30 12:06:30 +08:00
yyforyongyu
46747057c3
routing: fix race in TestSendMPPaymentFailed 2021-07-30 12:05:58 +08:00
Oliver Gugger
ebabda6717
Merge pull request #5582 from guggero/fix-js-healthcheck
build: fix JS health check and module git tag
2021-07-28 13:27:44 +02:00
Oliver Gugger
417effd223
mod: bump healthcheck to next version
We bump the version of the healthcheck module to a version that does not
exist. But by doing so we can tag the merge commit of this PR with that
actual version and have everything working. That is faster than merging
the changes to the module, pushing a tag, then bumping the tag in
go.mod.
2021-07-28 11:01:27 +02:00
Oliver Gugger
a35031ca2e
healthcheck: fix missing import 2021-07-28 11:01:27 +02:00
Oliver Gugger
4a6b1f7c82
Merge pull request #5534 from Kixunil/admin-macaroon-group-read
Allow group reading admin macaroon
2021-07-27 18:16:21 +02:00
Oliver Gugger
c3962528e2
Merge pull request #5473 from guggero/grpc-gateway-update
maintenance: update etcd and grpc-gateway libraries, rename rpc.proto to lightning.proto
2021-07-27 16:11:48 +02:00
Oliver Gugger
046d4513b0
Merge pull request #5579 from bhandras/payment_bench_timeout_flake
itest: fix async payment benchmark timeout flakes
2021-07-27 16:10:41 +02:00
Andras Banki-Horvath
7da0b80674
docs: update 0.14 release notes 2021-07-27 13:57:09 +02:00
Andras Banki-Horvath
f54c127021
itest: fix async payment benchmark timeout flakes 2021-07-27 13:57:09 +02:00
Oliver Gugger
64360c0e34
docs: add release notes 2021-07-27 13:10:00 +02:00
Oliver Gugger
c8df606427
GitHub+lint: reduce linter memory usage
To reduce the likelyhood of the linter OOMing on the GitHub runner, we
exclude any generated code from being inspected and also tune the golang
garbage collector to be a bit more agressive.
2021-07-27 13:09:59 +02:00
Oliver Gugger
dd749fe580
lnrpc: update grpc-gateway library to v2 2021-07-27 13:09:59 +02:00
Oliver Gugger
76e1223bf2
mod+kvdb: update etcd to v3.5.0 2021-07-27 13:09:59 +02:00
Oliver Gugger
235efc04e4
docs+lnrpc: rename rpc.proto to lightning.proto
To avoid a naming conflict with etcd, we rename our very generic
rpc.proto to lightning.proto to match the service name that's declared
within. This will break many external tutorials and possibly also our
API docs but the change needs to be done eventually.
2021-07-27 12:59:56 +02:00
Oliver Gugger
62888894d2
walletrpc: add missing REST body annotation
The missing body annotation caused the library to ignore any parameters
sent to this RPC endpoint when using the REST proxy.
2021-07-27 12:59:55 +02:00
Oliver Gugger
36a316e29a
make+scripts: fix rpc-check command 2021-07-27 12:59:54 +02:00
Oliver Gugger
4a0025c1b7
lnrpc: split REST annotations into service files
As a preparation for the migration to the grpc-gateway/v2 library we
declare each service's REST annotations in its own file. This is
optional in the v1 library but mandatory in v2.
2021-07-27 12:59:52 +02:00
Oliver Gugger
d3973c9b49
Merge pull request #5576 from guggero/dependabot-dns-fix
mod: upgrade miekg/dns library to fix dependabot alert
2021-07-27 11:25:20 +02:00
Oliver Gugger
fa26657950
mod: upgrade miekg/dns library to fix dependabot alert
We're using an old and potentially vulnerable version of the DNS
resolution library. This commit bumps the library to the latest
recommended version.
2021-07-27 09:41:00 +02:00
András Bánki-Horváth
5de6af798d
Merge pull request #5515 from bhandras/mc_store_optimization
routing: store missioncontrol state in blocks and eliminate cursor use
2021-07-26 23:36:51 +02:00
Andras Banki-Horvath
cfa3f708f1
docs: update release notes 2021-07-26 17:02:14 +02:00
Andras Banki-Horvath
f13a348c97
config: update sample-lnd.conf with routerrpc.mcflushinterval 2021-07-26 17:02:14 +02:00
Andras Banki-Horvath
6d80ddfe91
routing: store missioncontrol state in blocks and eliminate cursor use
This commit changes missioncontrol's store update from per payment to
every second. Updating the missioncontrol store on every payment caused
gradual slowdown when using etcd.
We also completely eliminate the use of the cursor, further reducing
the performance bottleneck.
2021-07-26 17:02:11 +02:00
Oliver Gugger
a427451b75
Merge pull request #5553 from Kixunil/patch-3
Remove warning about pruned nodes
2021-07-23 15:43:31 +02:00
Martin Habovštiak
410b30b9ca docs: remove warning about pruned nodes
This removes a warning in the documentation saying that pruned nodes are
not supported. This is no longer the case as [pruning is supported since
0.13](https://github.com/lightningnetwork/lnd/pull/5154). So instead it
now says pruning is supported and notes the version and implications of
pruning.
2021-07-23 14:27:13 +02:00
Oliver Gugger
79010cc097
Merge pull request #5541 from jholton/patch-1
Fix typos in `dest_custom_records` comment
2021-07-23 10:33:26 +02:00
Johnny Holton
9ff4b9b652 Fix typos in dest_custom_records comment 2021-07-22 21:41:38 -04:00