Commit graph

12483 commits

Author SHA1 Message Date
Olaoluwa Osuntokun
55d983dee7
server: defer ticker stop to avoid goroutine leak 2021-11-04 17:53:36 -07:00
Olaoluwa Osuntokun
1ab5cc3ae8
Merge pull request #5925 from ellemouton/staggerConnToMultipleAddresses
server: stagger connReqs to multi-address peers
2021-11-04 17:48:49 -07:00
Olaoluwa Osuntokun
5404fe82c1
Merge pull request #5873 from Roasbeef/rpc-graph-cache
channeldb+rpc: optimize graph related RPC calls
2021-11-04 17:38:28 -07:00
Olaoluwa Osuntokun
7d6915d17c
Merge pull request #5902 from Roasbeef/lru-chan-upd
discovery: revamp premature update map
2021-11-04 16:46:28 -07:00
Olaoluwa Osuntokun
090b917ee2
docs/release-notes: add entry for rpc graph cache 2021-11-04 15:30:36 -07: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
Olaoluwa Osuntokun
79406696ad
rpc: optimize GetNetworkInfo by using the channel graph cache 2021-11-04 15:30:29 -07:00
Olaoluwa Osuntokun
fae470293f
channeldb: add new ForEachNode method using the channel graph cache
This commit, adds a new ForEachNode method to the channel graph cache
that assumes the contents won't be modified. This is generally useful,
and will be used in a later commit to optimize some heavy RPC calls.
2021-11-04 15:30:25 -07:00
Olaoluwa Osuntokun
75ae7e68b0
docs/release-notes: add new entry for gossip cache revamp 2021-11-04 15:21:25 -07:00
Olaoluwa Osuntokun
5a8255550b
discovery: revamp recent rejects map
Similar to the prior commit, in this commit, we move to using a basic
LRU cache to store the set of prior rejected messages.
2021-11-04 15:21:20 -07:00
Olaoluwa Osuntokun
8627b5d128
discovery: revamp premature update map
Turns out we need it right now to handle some low latency race
conditions in our integration tests, so we'll opt to simply cap the size
of it to a low amount. We use a basic LRU caching mechainsm.

Fixes https://github.com/lightningnetwork/lnd/issues/5076
2021-11-04 15:21:18 -07:00
Olaoluwa Osuntokun
fbbf10fecd
Merge pull request #5933 from Roasbeef/neutrino-13
build: upgrade to neutrino v0.13.0
2021-11-04 15:18:13 -07:00
Olaoluwa Osuntokun
36acb107f7
docs/release-notes: add entry for neutrino version upgrade 2021-11-04 15:16:36 -07:00
Olaoluwa Osuntokun
cc643fc0d8
build: upgrade to neutrino v0.13.0
Includes some bug fixes, and a measure to make some heretics more
taproot-proof.
2021-11-04 13:59:14 -07:00
Elle Mouton
ac4fe5ff2e
docs: update release notes 2021-11-04 13:27:38 +02:00
Elle Mouton
6ec9c3c58f
server: stagger multi addr connection attempts
In this commit, we stagger the connection attempts to the multiple
addresses of a peer.
2021-11-04 13:27:33 +02:00
Elle Mouton
b9b7ea2a6a
server: use one func for peer re-connection
Let the connectToPersistentPeer func handle all connection attempts to
persistent peers so that that logic is in once place.
2021-11-04 13:08:50 +02:00
Elle Mouton
789f00746b
server: cleanup persistentPeerAddr when pruned
Delete all the stored addresses from the persistentPeerAddr map when we
prune the persistent peer.
2021-11-04 13:05:40 +02:00
Olaoluwa Osuntokun
a6f22c6185
Merge pull request #5928 from Roasbeef/bitcoind-22
script: update CI to bitcoind 22
2021-11-03 18:10:40 -07:00
Olaoluwa Osuntokun
906120d80c
docs/release-notes: add bitcoind 22 to release notes 2021-11-03 16:43:32 -07:00
Olaoluwa Osuntokun
56d00f40ef
script: update CI to bitcoind 22 2021-11-03 16:43:27 -07:00
Olaoluwa Osuntokun
859c6d7ac5
Merge pull request #5922 from Roasbeef/graph-cache-panic-fix
channeldb: fix crash when inbound policy is unset
2021-11-03 10:30:35 -07:00
Andras Banki-Horvath
4d4b525058
docs: update release notes 2021-11-02 20:19:07 -07:00
Olaoluwa Osuntokun
fc2a29f717
channeldb: add failing test to demonstrate panic w/o graph cache
This test panics as is, since we assume the inbound edge is always
there.
2021-11-02 20:19:01 -07:00
Andras Banki-Horvath
ea5d43a2a8
channeldb: fix crash when inbound policy is unset 2021-11-02 20:18:58 -07:00
Olaoluwa Osuntokun
b99157efbe
Merge pull request #5905 from guggero/itest-fixes
itest: fix two flakes
2021-11-02 14:59:37 -07:00
Oliver Gugger
eb2be7c7c0
lntest: count unconfirmed balance as well
It looks like in some cases (apparently mostly on Windows) a previous
sub test sometimes leaves some unconfirmed balance in the wallet. That
balance is confirmed in the next test when new coins are sent to the
wallet.
2021-11-02 20:36:45 +01:00
Oliver Gugger
066a83315e
docs: update release notes 2021-11-02 20:36:43 +01:00
Oliver Gugger
2a6f128a43
itest: wait for channel to be properly closed
It looks like in some cases a channel is still being closed while we
already try to create a sweep output. In that case the pending closed
channel is still counted as anchor channel and a reserve output is
created. To make sure that doesn't happen, we make sure there are no
pending or open channels of any kind around before we create the sweep
transaction.
2021-11-02 20:36:27 +01:00
Oliver Gugger
2ca3eea3f7
itest: fix REST WebSocket ping/pong itest
This commit fixes a flake in the REST itest that was caused by an
invoice being created before the actual subscription client was
registered.
2021-11-02 20:36:26 +01:00
Oliver Gugger
32101db873
Merge pull request #5916 from blastshielddown/docs_5899
lnrpc: add public key detail to signrpc KeyDescriptor [skip ci]
2021-11-02 15:03:14 +01:00
Oliver Gugger
919b31a67b
Merge pull request #5896 from schjonhaug/instructions-for-creating-swift-protoc-definitions
Added instructions on how to build proto definitions for Swift
2021-11-02 15:02:39 +01:00
Michael Rhee
7c18fb64ae lnrpc: add public key detail to signrpc KeyDescriptor [skip ci]
Clarification that KeyDescriptor describes the public key in
raw_key_bytes and the key_loc identifies the private key. Helps
clarify responses from calls like DeriveKey and DeriveNextKey from
WalletKit.

Fixes #5899
2021-11-02 07:57:12 -05:00
Oliver Gugger
97786c72fc
Merge pull request #5878 from halseth/filter-ascii-bbolt-name
kvdb/bolt_compact: filter out non-ASCII from bucket name before printing
2021-11-02 10:22:46 +01:00
Oliver Gugger
e399814aea
Merge pull request #5550 from bottlepay/postgres-run-channeldb
kvdb: run channeldb test suite on postgres
2021-11-02 10:21:12 +01:00
Johan T. Halseth
7162af7656
docs: update release notes 2021-11-02 08:55:25 +01:00
Johan T. Halseth
6be6585643
kvdb/bolt_compact: filter out non-ASCII from bucket name before printing
Printing the raw bucket name lead to weird characters and even sounds
being printed.
2021-11-02 08:54:35 +01:00
Johan T. Halseth
10aaa35db5
kvdb: add loggableKeyName method
Safely logs the bucket key name as hex if it includes special
characters.

Co-authored-by: Oliver Gugger <gugger@gmail.com>
2021-11-02 08:54:35 +01:00
Olaoluwa Osuntokun
40ea494d2a
Merge pull request #5913 from bhandras/invoices_5911
invoices: do not log when invoice is already deleted
2021-11-01 15:31:53 -07:00
Olaoluwa Osuntokun
df6492d4d7
Merge pull request #5917 from bhandras/le_doc_update
docs: update leader election docs [skip ci]
2021-11-01 15:25:58 -07:00
Andras Banki-Horvath
c9533bf6b9
docs: update leader election docs [skip ci] 2021-11-01 16:30:13 +01:00
Andras Banki-Horvath
76065e84d3
invoices: do not log when invoice is already deleted 2021-11-01 16:10:45 +01:00
Joost Jager
d997bbf6b3
channeldb/test: test with postgres 2021-10-29 10:54:44 +02:00
Joost Jager
7c048efa21
kvdb/postgres/test: single instance embedded postgres database
Prepare for parallel tests that use a postgres backend. We don't want a
high number of embedded postgres instances running simultaneously.
2021-10-29 10:54:42 +02:00
Joost Jager
bd291286f7
kvdb/postgres: convert all types of panic data to error
Previously the assumption existed that panic data was already an error.
If that wasn't the case for example because panic("string") was used,
the transaction wasn't unlocked.
2021-10-29 10:54:40 +02:00
Olaoluwa Osuntokun
217019aa8a
build: bump version to 0.14.0-beta.rc1 2021-10-28 17:47:35 -07:00
Olaoluwa Osuntokun
66ca2a994b
Merge pull request #5901 from Roasbeef/dedup-interceptor
Dedup interceptor
2021-10-28 17:44:49 -07:00
Olaoluwa Osuntokun
7b45a47ce3
docs/release-notes: add entry for HTLC interceptor bug fix 2021-10-28 16:53:44 -07:00
Olaoluwa Osuntokun
52146e0970
Merge pull request #5803 from Roasbeef/amp-set-id-index
channeldb+invoices: enable repeated payments to AMP invoices via new HTLC key prefix storage
2021-10-28 16:49:43 -07:00
Roei Erez
fe44aedb25
itest: dedup interceptor packets
Aded a test for the dedup intercepted packets of htlc interceptor.
2021-10-28 16:16:55 -07:00