Commit Graph

12166 Commits

Author SHA1 Message Date
Oliver Gugger
493262e253
itest: fix flake in update_channel_status itest
This commit fixes a flake in the channel status update itest that
occurred if Carol got a channel edge update for a channel before it
heard of the channel in the first place. To avoid that, we wait for
Carol to sync her graph before sending out channel edge or policy
updates.

As always when we touch itest code, we bring the formatting and use of
the require library up to date.
2021-09-29 17:50:01 +02:00
Oliver Gugger
6240851f93
channeldb: optimize memory usage of initial cache fill
With this commit we use an optimized version of the node iteration that
causes fewer memory allocations by only loading the part of the graph
node that we actually need to know for the cache.
2021-09-29 17:00:06 +02:00
Oliver Gugger
a5202a89e6
docs: add release notes 2021-09-29 17:00:05 +02:00
Oliver Gugger
a95a3728b5
lnd+channeldb: pre-allocate cache size
To avoid the channel map needing to be re-grown while we fill the cache
initially, we might as well pre-allocate it with a somewhat sane value
to decrease the number of grow events.
2021-09-29 17:00:05 +02:00
Oliver Gugger
bf27d05aa8
routing+server: use cached graph interface 2021-09-29 17:00:05 +02:00
Oliver Gugger
1d1c42f9ba
multi: use minimal policy in cache 2021-09-29 17:00:04 +02:00
Oliver Gugger
15d3f62d5e
multi: use cache for source channels 2021-09-29 17:00:04 +02:00
Joost Jager
369c09be61
channeldb+routing: add in-memory graph
Adds an in-memory channel graph cache for faster pathfinding.

Original PoC by: Joost Jager
Co-Authored by: Oliver Gugger
2021-09-29 17:00:04 +02:00
Oliver Gugger
d6fa912188
multi: further decouple graph
To further separate the channel graph from the channel state, we
refactor the AddrsForNode method to use the graphs's public methods
instead of directly accessing any buckets. This makes sure that we can
have the channel state cached with just its buckets while not using a
kvdb level cache for the graph.
At the same time we refactor the graph's test to also be less dependent
upon the channel state DB.
2021-09-29 17:00:03 +02:00
Andras Banki-Horvath
11cf4216e4
multi: move all channelstate operations to ChannelStateDB 2021-09-29 17:00:03 +02:00
Oliver Gugger
ddea833d31
multi: extract address source into interface
As a preparation to have the method for querying the addresses of a node
separate from the channel state, we extract that method out into its own
interface.
2021-09-29 17:00:03 +02:00
Oliver Gugger
c1f686f860
channeldb+funding: move opening channel state to DB
The funding manager doesn't need to know the details of the underlying
storage of the opening channel state, so we move the actual store and
retrieval into the channel database.
2021-09-29 17:00:02 +02:00
Andras Banki-Horvath
60cccf8409
multi: carve out LinkNodeDB from channeldb.DB for cleaner separation 2021-09-29 17:00:02 +02:00
Andras Banki-Horvath
292b8e1ce6
channeldb: fix dangerous type casting hack 2021-09-29 17:00:02 +02:00
Andras Banki-Horvath
639faeed6d
channeldb: use kvdb.Backend instead of channeldb.DB for the Graph 2021-09-29 17:00:01 +02:00
Oliver Gugger
3385d38414
Merge pull request #5766 from JssDWt/update-csharp-grpc-docs-grpc.net.client
Update C# grpc docs to use Grpc.Net.Client
2021-09-29 12:02:03 +02:00
Olaoluwa Osuntokun
7f3c59033b
Merge pull request #5527 from ErikEk/isset-validateconfig
config: sync-freelist being ignored
2021-09-28 20:35:57 -07:00
Olaoluwa Osuntokun
884cc0d191
Merge pull request #5768 from priyanshiiit/lookupInvoice
lnd: adds NOT_FOUND status code for LookupInvoice
2021-09-28 14:33:29 -07:00
Oliver Gugger
410606b082
Merge pull request #5797 from guggero/fix-nil-channel
rpcserver: fix nil issue with historical channels
2021-09-28 11:02:12 +02:00
Olaoluwa Osuntokun
42ce27f663
Merge pull request #5745 from Roasbeef/contract-court-move
multi: move breach arbiter and utxo nursery into contractcourt package
2021-09-27 21:33:51 -07:00
Olaoluwa Osuntokun
7bde1662e2
multi: move breach arbiter and utxo nursery into contractcourt package
In this commit, we take an initial step towards converting the existing
breach arbiter and utxo nursery logic into contract resolvers by moving
the files as is, into the `contractcourt` pacakge.

This commit is primarily move only, though we had to massage some
interfaces and config names along the way to make things compile and the
tests run properly.
2021-09-27 19:10:31 -07:00
Oliver Gugger
e067dc73b7
rpcserver: fix nil issue with historical channels [skip ci]
Fixes #5796.
Some historical channels might not have the forwarding packages
recorded. And since the error might be silenced, the historical channel
might be nil.
2021-09-27 22:26:03 +02:00
Oliver Gugger
be2566cf26
Merge pull request #5053 from guggero/verify-count
verify-install: add keys to repo, pin signatures to keys
2021-09-27 18:28:05 +02:00
Oliver Gugger
421add062c
docs: add release notes 2021-09-27 15:49:12 +02:00
Oliver Gugger
d7d1574095
scripts: verify version in manifest
To make a downgrade attack harder, we also check that the version string
is contained in the manifest, on the same line as the hash.
2021-09-27 15:49:12 +02:00
Oliver Gugger
5bafff2cf2
scripts: allow packaged release archive to be verified
Instead of only allowing to verify installed/unpacked binaries, we also
allow a single binary or packaged release archive to be verified.
2021-09-27 15:49:11 +02:00
Oliver Gugger
5afed8ab62
docker: add keys to docker image
Because the PGP keys are no longer downloaded from Keybase but are used
from the repo directly, we also have to copy them to the Docker image so
we can run the script without needing to supply them through a volume.
2021-09-27 15:49:11 +02:00
Oliver Gugger
6d0368a189
scripts: pin signatures to keys
With this commit we add a new restriction that checks that the
username in the signature file (manifest-<username>-<version>.sig) actually
does have a signing key and that the signature was created with that key.
The signature is only counted towards the minimum of 5 signatures if
that check is successful.
The changes in this commit were inspired by @kixunil in #5048.
2021-09-27 15:49:11 +02:00
Oliver Gugger
0984638a74
scripts: make sure signature files have unique names
To fix a simple attack where the same file would be uploaded multiple
times under the same name, we make sure we only count unique file names.
2021-09-27 15:49:10 +02:00
positiveblue
c8987ec2c5
scripts: add positiveblue key to verify script 2021-09-27 15:49:10 +02:00
Oliver Gugger
f6c66ca980
scripts: add signing keys to repo
Instead of importing the keys from Keybase, we add all the signing keys
to the repository. In addition to having the key file present each key's
ID must also be added to the verification script. This acts as a double
check that the correct key is added and makes a key change more
explicit.
2021-09-27 15:49:08 +02:00
Conner Fromknecht
af3fa69d05
docs: update release verification scripts for v0.12.1-beta 2021-09-27 15:48:20 +02:00
Conner Fromknecht
50d27e8050
docs: remove unnecessary docker pull from release verification
Docker will automatically pull the image if it isn't found locally.
2021-09-27 15:48:20 +02:00
Conner Fromknecht
fc4a16b672
scripts/verify-install.sh: pass expected version as argument
This removes a vulnerability brought up by @Kixunil where both the lnd
and lncli binaries are executed to obtain their version before they have
been verified against the release. A malicious binary could have already
compromised the user's system before any of the checks had been
performed.

This commit it split out from the doc changes so that it can easily be
cherry-picked to master/0.13.0.
2021-09-27 15:48:19 +02:00
Oliver Gugger
4c8bf9c28d
scripts: extract functions
As a preparation to make the script easier to understand, we extract
some of the sub tasks into functions.
2021-09-27 15:48:19 +02:00
Oliver Gugger
f60a1ba0ce
Merge pull request #5699 from guggero/lncli-deletepayment
lncli: add deletepayments command
2021-09-27 13:41:41 +02:00
Oliver Gugger
57d203c9f1
docs: add release notes 2021-09-27 12:34:53 +02:00
Oliver Gugger
348405994c
cmd/lncli: add deletepayments command
To give the CLI user the option to delete a single or multiple payments
in one command, we expose the DeletePayment and DeleteAllPayments
RPCs to the command line as well. Due to the similarity of the two RPCs
we combine them into a single command with multiple flags.

To make the command a bit more safe to run without arguments, we
consciously switch the logic of the RPC flag "failed_payments_only"
which is false by default into a "--include_non_failed" in the CLI which
is false by thefault. So a user running the command without knowing what
they are doing are only deleting failed payments by default, not all of
the payments.
2021-09-27 12:34:53 +02:00
Oliver Gugger
23d7065655
Merge pull request #5790 from arshbot/add-arshbot-verify
scripts: add arshbot key to verify script
2021-09-27 12:28:58 +02:00
ErikEk
d5463818a8 bbolt sync-freelist ignored 2021-09-27 06:49:56 +01:00
Harsha Goli
5d1bcaeb61
scripts: add arshbot key to verify script 2021-09-26 21:57:04 -04:00
Olaoluwa Osuntokun
3800cd9433
build: update kvdb to kvdb/v1.1.0 [skip ci]
Updates to the latest version that adds a tag after the recent postgres
support.
2021-09-24 16:12:05 -07:00
Olaoluwa Osuntokun
fbb1d159e0
Merge pull request #4364 from yyforyongyu/clean-forward-states
multi: clean up forwarding state from closed channels
2021-09-24 15:52:46 -07:00
Olaoluwa Osuntokun
e62bd65c7a
Merge pull request #5785 from guggero/deprecated-ssh-terminal
mod+lncli: remove deprecated package [skip ci]
2021-09-24 15:32:17 -07:00
Olaoluwa Osuntokun
9094fcddfa
Merge pull request #5784 from benthecarman/patch-1
Fix incorrect link in java gRPC docs
2021-09-24 15:31:38 -07:00
benthecarman
7a5467d6fe
Fix incorrect link in java gRPC docs [skip ci] 2021-09-24 02:38:52 -05:00
Oliver Gugger
765d043cc0
mod+lncli: remove deprecated package [skip ci]
The use of golang.org/x/crypto/ssh/terminal was marked as deprecated
since that code was moved to its own repo golang.org/x/term.
With this commit we use the new package name directly, which was already
pulled in under its new name anyway.
2021-09-24 09:22:47 +02:00
Oliver Gugger
1d103f1f55
cmd/lncli: group all Mission Control cmds into own file
Having one file per sub command seems a bit too excessive and isn't
really implemented for any of the other commands. So we just group the
Mission Control commands into their own file for now.
2021-09-23 16:59:41 +02:00
Oliver Gugger
28c25d7e9c
cmd/lncli: group Mission Control cmds into own category
To make the "Payments" category a bit less overloaded and to move the
Mission Control configuration commands away from the "root" category, we
create the new "Mission Control" category that we move the commands
into. We do this in a single commit so the next one where we move them
into the same file can be a pure code move without any additional
changes.
2021-09-23 16:59:41 +02:00
Oliver Gugger
da418ef46b
cmd/lncli: move all payment related cmds to single file
With this commit we move all commands that can be found within the
"Payments" category into its own file called cmd_payments.go. The only
exception are the Mission Control related commands which we are going to
move to their own category and file in the next commit.
2021-09-23 16:59:40 +02:00