Commit graph

13899 commits

Author SHA1 Message Date
Elle Mouton
2294e11b7a
docs: update release notes 2022-10-13 11:30:27 +02:00
Elle Mouton
105c44df9b
watchtower: use more efficient session query on startup
In this commit, the functions used to fetch candidate sessions and
towers on creation of the watchtower Client are changed to make use of
the more efficient lookup functions. Previously, all sessions were
listed from the DB and then these were used to collect the active
towers which in certain situations lead to some users getting the
"tower not found" error on start up. With this commit, we instead first
list all Towers in the DB and then we fetch the sessions for each of
those towers.
2022-10-13 11:30:27 +02:00
Elle Mouton
ecd2eb965a
watchtower: make use of the new tower-to-session index
In this commit, the towerID-to-sessionID index added in the previous
commit is put to use in order to make session lookup more efficient in
certain places. In the process, 2 TODO's are also removed from the code.
2022-10-13 11:30:27 +02:00
Elle Mouton
354a3b16bd
watchtower/wtdb: add new towerID-to-sessionID index
This commit adds a new towerID-to-sessionID index to the wtclient DB.
The commit also contains the necessary migration required in order to
build the index for an existing client.
This index will greatly improve the lookup of sessions for a given tower
ID.
2022-10-13 11:30:27 +02:00
Elle Mouton
c60ecaccbf
watchtower: always populate Tower in ClientSession
In this commit, we make sure to always populate the Tower member of a
ClientSession. This is done for consistency.
2022-10-13 11:30:27 +02:00
Elle Mouton
e150bb83d1
watchtower/wtdb: check tower exists on session create
Before creating a new session, first check that the TowerID that the
ClientSession is referencing refers to an existing tower. This is done
to prevent the situation where RemoveTower is called right before
CreateClientSession is called which would, before this commit, lead to
the session being created with a tower ID that does not refer to any
existing tower.
2022-10-13 11:30:26 +02:00
Elle Mouton
5dabf7cb3e
watchtower/wtdb: update tests to use require package
In this commit, all the tests in the wtdb package are updated in order
to make use of the `require` package where appropriate.
2022-10-13 11:30:26 +02:00
Elle Mouton
f815c88ee4
watchtower: fix formatting
In order to make upcoming commits in the PR easier to parse, this commit
makes some basic formatting changes to some of the watchtower files.
2022-10-13 11:30:22 +02:00
Eng Zer Jun
5c5997935d
chanbackup: replace defer cleanup with t.Cleanup
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-10-13 17:01:35 +08:00
Eng Zer Jun
cac8f54a45
chainntnfs: replace defer cleanup with t.Cleanup
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-10-13 17:01:35 +08:00
Eng Zer Jun
b796b747ed
brontide: replace defer cleanup with t.Cleanup
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-10-13 17:01:35 +08:00
Eng Zer Jun
1dcc7d74e6
autopilot: replace defer cleanup with t.Cleanup
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-10-13 17:01:31 +08:00
Oliver Gugger
4b827179bb
Merge pull request #5561 from guggero/database-migration-lndinit
kvdb: refactor as preparation for DB migration command in lndinit
2022-10-13 10:59:38 +02:00
Oliver Gugger
4e42ef0ab2
docs: add release notes 2022-10-13 09:45:07 +02:00
Oliver Gugger
696758a660
lncfg: export database namespace names
For the data migration tool we need to know what database namespaces
there are so we can loop over them.
2022-10-13 09:45:07 +02:00
Oliver Gugger
fc2d652261
channeldb: check for tombstone before opening DB
To avoid running a channel DB that was successfully migrated to another
system by accident, we check if there is a tombstone marker before we
open the DB for use.
2022-10-13 09:45:07 +02:00
Oliver Gugger
7e76326b97
channeldb: export DB migration related functions
We'll need to know whether a database was migrated to the latest version
in our upcoming data migration tool. To be able to determine the current
version of a DB and the total number of migrations in existence, we need
to export some of the functions in channeldb.
We also add some helper functions for adding tombstone and other markers
to a database.
2022-10-13 09:45:07 +02:00
Oliver Gugger
28c8e8b6dd
channeldb: remove unused tx argument 2022-10-13 09:37:53 +02:00
Oliver Gugger
ee9d6f21bd
etcd: add SequenceKey function 2022-10-13 09:37:52 +02:00
Oliver Gugger
d576184fdb
etcd: extract NewEtcdClient into exported function
In order for us to be able to re-use the code for initializing an etcd
client connection, we extract and export the NewEtcdClient function.
2022-10-13 09:37:52 +02:00
Oliver Gugger
98f359c5b7
etcd: fix typos 2022-10-13 09:37:52 +02:00
Oliver Gugger
b51b1e2f73
Merge pull request #6931 from morehouse/refactor_funding_manager
funding: create waitForPeerOnline helper
2022-10-13 09:37:01 +02:00
Matt Morehouse
00e26c1bc9
docs: update release notes 2022-10-11 12:05:36 -05:00
Matt Morehouse
768854aac9
funding: create waitForPeerOnline helper
Simplifies and deduplicates the code.
2022-10-11 11:59:01 -05:00
Oliver Gugger
b387e2c718
Merge pull request #6832 from kklash/switch-test-resource-cleanup
htlcswitch: clean up test resources and temporary files
2022-10-11 15:55:57 +02:00
Oliver Gugger
ff35647db3
Merge pull request #7019 from guggero/golang-1-19-2
build: bump Golang version to v1.19.2
2022-10-11 13:35:50 +02:00
Oliver Gugger
59a5f53cfe
Merge pull request #7018 from guggero/remote-signing-release-notes
docs: update remote signing update hint to v0.15.3-beta [skip ci]
2022-10-11 11:13:16 +02:00
Oliver Gugger
43521633ce
docs: update release notes 2022-10-11 09:56:04 +02:00
Oliver Gugger
f02528f304
multi: bump Golang version to v1.19.2 2022-10-11 09:49:30 +02:00
Oliver Gugger
299152e631
docs: update remote signing update hint to v0.15.3-beta [skip ci]
This commit bumps the recommended version to upgrade to for remote
signing setups.
2022-10-11 09:42:43 +02:00
Oliver Gugger
079537514c
Merge pull request #7012 from sputn1ck/sputn1ck_pgp_key
scripts: add sputn1ck  pgp key
2022-10-11 09:08:38 +02:00
sputn1ck
d16fcf12aa
scripts: add sputn1ck pgp key
[skip ci]
2022-10-11 09:00:46 +02:00
Oliver Gugger
ccbc578bd9
Merge pull request #7011 from ffranr/add_pgp_signing_key
scripts: add ffranr PGP signing key
2022-10-11 08:57:54 +02:00
Olaoluwa Osuntokun
2ac0fcb769
Merge pull request #6957 from Roasbeef/co-op-close-fee-estimation
lnwallet/chancloser: properly compute initial fee of cop close txn
2022-10-10 15:39:24 -07:00
Olaoluwa Osuntokun
30eb6770e5
lnwallet/chancloser: fix loop variable shadowing in TestMaxFeeBailOut 2022-10-10 14:50:51 -07:00
Olaoluwa Osuntokun
2482de9cab
lnwallet/chancloser: properly compute initial fee of cop close txn
In this commit, we modify the way we compute the starting ideal fee for
the co-op close transaction. Before thsi commit, channel.CalcFee was
used, which'll compute the fee based on the commitment transaction
itself, rathern than the co-op close transaction. As the co-op close
transaction is potentailly bigger (two P2TR outputs) than the commitment
transaction, this can cause us to under estimate the fee, which can
result in the fee rate being too low to propagate.

To remedy this, we now compute a fee estimate from scratch, based on the
delivery fees of the two parties.

We also add a bug fix in the chancloser unit tests that wasn't caught
due to loop variable shadowing.

The wallet import itest has been updated as well, since we'll now pay
600 extra saothis to close the channel, since we're accounting for the
added weight of the P2TR outputs.

Fixes #6953
2022-10-10 14:50:45 -07:00
Robyn
8ab914dae5
scripts: add ffranr PGP signing key [skip ci] 2022-10-10 19:08:28 +01:00
kklash
63428de6e5 htlcswitch: clean up test resources and temporary files
The htlcswitch tests were creating temporary database files
but failing to clean them up.

We fix this by making it obvious when temporary db files are
created, and cleaning up those resources where necessary in
the tests.
2022-10-10 10:32:39 -07:00
Olaoluwa Osuntokun
406fc86f38
Merge pull request #7004 from Roasbeef/witness-limit-hot-fix
build: update to version of btcd with wire parsing bug fix
2022-10-09 19:34:03 -07:00
Olaoluwa Osuntokun
1c884846e7
docs/release-notes: shift prior 0.15.2 release to 0.15.3
We also add an entry for the _new_ 0.15.2 hot fix release.
2022-10-09 18:39:40 -07:00
Olaoluwa Osuntokun
b3dc56fd9e
build: update to version of btcd with wire parsing bug fix
Fixes https://github.com/lightningnetwork/lnd/issues/7002
2022-10-09 18:39:34 -07:00
Oliver Gugger
6ab6ba91bb
Merge pull request #6969 from tongokongo/master
Clarification sample-lnd.conf
2022-10-07 15:09:50 +02:00
Elle Mouton
eeed3e6f39
funding: fix formatting of comments of InitFundingMsg 2022-10-07 14:57:05 +02:00
Elle Mouton
fba6cae44b
docs: update release notes 2022-10-07 14:57:05 +02:00
Roei Erez
c2ad6444a7
lncli: add remote reserve flag to openchannel 2022-10-07 14:57:05 +02:00
Roei Erez
b6a24b52fe
lnrpc+rpcserver: add remote reserve to openchannel request 2022-10-07 14:57:05 +02:00
Roei Erez
6467b0ee12
funding: enable configurable channel reserve
In this commit, the channel reserve of an initiated channel is made to
be optionally configurable.
2022-10-07 14:57:05 +02:00
Elle Mouton
10f0eddd51
multi: verify channel constraints on funding request
In this commit, the sanity checks in the CommitConstraints method is
moved out into a helper function called VerifyConstraints. This is done
so that the sanity checks can be performed more easily else where in the
code base. The new helper method is then called in the
handleInitFundingMsg method of the funding manager before the
OpenChannelMessage is sent.
2022-10-07 14:57:05 +02:00
Olaoluwa Osuntokun
ffa8ba8dfc
Merge pull request #6998 from Crypt-iQ/6990_zeroconftimeout_noitest
funding: ignore maxWaitNumBlocksFundingConf for zero conf channels
2022-10-06 17:51:25 -07:00
Olaoluwa Osuntokun
b2c78d9488
Merge pull request #6993 from lightningnetwork/pr-stats-please-work
build: add PR stats to github workflow
2022-10-06 17:44:09 -07:00