Commit graph

16199 commits

Author SHA1 Message Date
Elle Mouton
cbf08940ca
wtdb: let DeleteCommitedUpdates move session to terminal
In this commit, we adjust the DeleteCommitmentUpdate method so that it
marks a session as Terminal (if there are updates to delete) since once
we have deleted a commitment update from a session - the session is no
longer useable.
2024-02-20 14:44:11 +02:00
Elle Mouton
5cb8c8df7e
wtdb: rename CSessionInactive to CSessionTerminal
Since we will now change this to mean that the session should not ever
be activated again.
2024-02-20 14:44:11 +02:00
Elle Mouton
26432359ad
lnrpc+lncli: add DeactivateTower to rpc 2024-02-20 14:44:11 +02:00
Elle Mouton
beb9b2eeb8
wtclient: add DeactivateTower method
This commit adds the DeactiateTower method to the wtclient.ClientManager
interface along with its implementation. A test is also added for the
new method.
2024-02-20 14:44:09 +02:00
Elle Mouton
4548e72f79
wtdb: add a DeactivateTower method
This new method sets the tower's status to inactive so that it is not
loaded at startup as a candidate tower. We also ensure that a tower's
status is set to active if the CreateTower is called when the tower
already exists.
2024-02-20 09:02:36 +02:00
Elle Mouton
0bb1816fff
watchtower: add filter function to ListTowers
And then only load active towers on client start up.
2024-02-20 08:58:46 +02:00
Elle Mouton
ffd355c6c4
wtdb: add TowerStatus to Tower
This is added as a TLV record meaning that all the towers currently on
disk that don't have this new field will be seen as Active.
2024-02-20 08:58:46 +02:00
Elle Mouton
1ae802812c
watchtower: update DeleteCommittedUpdate to delete all
This commit updates the DeleteCommittedUpdate DB method to delete all of
a given session's committed updates instead of just one at a time. The
reason for this is that in an upcoming commit, we will introduce a
"Terminal" session state - once we have deleted a committed update for a
session it should be considered "Terminal" and there is never a case
where we would only want to delete one committed update and not the
rest. So we want these two actions (deleting committed updates of a
session and setting it's status to terminal) to be atomic.
2024-02-20 08:58:45 +02:00
Keagan McClelland
fb8de14798 lnwallet+funding+lnd: trim unused parameters, from lnwallet.Config
chainreg: remove unused GenDefaultBtcConstraints

lnwallet+funding+lnd: remove DefaultDustLimit from lnwallet.Config
2024-02-19 17:06:21 -08:00
Keagan McClelland
c6ecb10865 chainreg+lnd: remove ChannelConstraints from PartialChainControl 2024-02-19 17:06:21 -08:00
Andras Banki-Horvath
bcc6a3f517
docs: update release notes for 0.18.0 2024-02-19 20:47:25 +01:00
Andras Banki-Horvath
f5abc94bdf
mod: bump kvdb to v1.4.5 2024-02-19 20:47:25 +01:00
Andras Banki-Horvath
7d56d5385d
invoices: parametrize invoice(registry) tests with InvoiceDB constructor
This commit extracts the InvoiceDB construction from all invoice and
registry tests such that we can later on run subtests with multiple
backends without needing to use tags.
2024-02-19 20:47:25 +01:00
Andras Banki-Horvath
0e2b39ed44
invoices: fix linter issues after the move 2024-02-19 20:47:24 +01:00
Andras Banki-Horvath
5e746b4d2c
invoices: move InvoiceDB tests unrelated to kvdb to invoices package 2024-02-19 20:47:24 +01:00
Andras Banki-Horvath
6b0931af82
invoices: move UpdateInvoice implementation to the invoices package
With the introducation of the `InvoiceUpdater` interface we are now
able to move the non-kv parts of `UpdateInvoice` completely under
the invoices package. This is a preprequisite for being able to use
the same code-base for the sql InvoiceDB implementation of
UpdateInvoice.
2024-02-19 20:47:24 +01:00
Andras Banki-Horvath
ecbfc46312
invoices+channeldb: add InvoiceUpdater interface and the KV impl
This commit introduces the InvoiceUpdater interface which is meant
to abstract and assist the in-memory invoice update procedure with
the accompanying database updates. These abstract updater steps will
enable further refactoring later while also ensuring that a full
SQL implementation of the InvoiceDB interface will be possible.
2024-02-19 20:47:24 +01:00
Andras Banki-Horvath
998156930f
invoices: refactor updateInvoiceAmpState to return new state
With this commit updateInvoiceAmpState becomes getUpdatedInvoiceAmpState
which will only return the new AMP state but that needs to be applied at
the call site. This is a part of a larger refactor to gather all
mutations of an invoice update to be later applied by the invoice
updater.
2024-02-19 20:47:24 +01:00
Andras Banki-Horvath
08df7f4175
invoices: change cancelSingleHtlc to be purely used for validation
This change moves the HTLC state change out of the cancelSingleHtlc
function. This is part of the larger refactor of collecting all changes
to be later applied by the invoice updater.
2024-02-19 20:47:23 +01:00
Andras Banki-Horvath
87044b815c
invoices: rename updateInvoiceState to getUpdatedInvoiceState
This commit turns updateInvoiceState "const" by moving preimage update
out of the function while also removing it to getUpdatedInvoiceState.
2024-02-19 20:47:23 +01:00
Andras Banki-Horvath
342eb4eac2
invoices: refactor updateHtlc to return new state
With this refactor updateHtlc is renamed to getUpdatedHtlcState and
changed such that it won't change the HTLC's state and resolve time but
instead returns whether the change is needed. This change is part of a
multi-commit refactor to ensure that all changes to the invoice will be
tracked individually.
2024-02-19 20:47:23 +01:00
Andras Banki-Horvath
ef5a31733e
channeldb: do not change the update descriptor when cancelling htlcs 2024-02-19 20:47:23 +01:00
Andras Banki-Horvath
7298b2d190
channeldb: extract AMP state updates to updateInvoiceAmpState() 2024-02-19 20:47:23 +01:00
Andras Banki-Horvath
4bf6b52158
channeldb: fetch the invoice before calling into updateInvoice 2024-02-19 20:47:22 +01:00
Andras Banki-Horvath
eb4198b970
channeldb: extract store update methods when updaing an invoice
This commit is a small refactor to move all actual DB updates after
an invoice state is update to separate methods. This is a small
preliminary change before we completely decouple DB updates from
in-memory invocie update.
2024-02-19 20:47:22 +01:00
Oliver Gugger
a3bf2c70e5
Merge pull request #8486 from joaothallis/fix/link-typo
docs: fix typo and links
2024-02-19 02:43:11 -06:00
João Thallis
805c1c0d59
docs: fix contribution guide links [skip ci] 2024-02-17 21:48:01 -03:00
joao
1e7f0d42ad
docs: fix makefile typo [skip ci] 2024-02-17 21:47:38 -03:00
Olaoluwa Osuntokun
7a3101710c
Merge pull request #8430 from bhandras/update-pr-stats
github: bump pull-resquest-stats to v2.11.0
2024-02-14 17:52:11 -08:00
Oliver Gugger
f008a97082
Merge pull request #8479 from tdb3/master
lnrpc: Clarify payment_addr and payment_secret
2024-02-14 03:49:47 -06:00
tdb3
3288490df3
lnrpc: Clarify payment_addr and payment_secret
Fix #7438, adding clarification statements in lnrpc proto files.
Originally proposed by daredevil3435 in PR #7873 and PR #7885.
2024-02-13 19:04:18 -05:00
Oliver Gugger
4855faf162
Merge pull request #8471 from morehouse/codeowners
.github: add morehouse to CODEOWNERS
2024-02-12 02:24:22 -06:00
Matt Morehouse
7a0390fe59
.github: add morehouse to CODEOWNERS 2024-02-09 10:27:17 -06:00
Oliver Gugger
17f5798726
Merge pull request #8466 from weiliy/docs-fix-mining-address
docs: preserve MINING_ADDRESS across docker-compose sessions
2024-02-08 02:41:20 -06:00
Weili Y
d740e95c08
docs: preserve MINING_ADDRESS across docker-compose sessions
Export MINING_ADDRESS before docker-compose up to ensure it's retained for
subsequent operations, fixing block generation errors due to missing mining
addresses.
2024-02-07 20:24:24 +08:00
Yong
9651ee6372
Merge pull request #8452 from ProofOfKeags/refactor/contractcourt/naming-consistency
contractcourt: homogenize naming convention
2024-02-07 18:54:55 +08:00
Keagan McClelland
0f245bf237 contractcourt: rename breacharbiter*.go to breach_arbitrator
This is just to finish the cleaning things up to make them more
consistent.
2024-02-06 13:32:51 -07:00
Keagan McClelland
bc3feba267 contractcourt+lnrpc+lnd: s/BreachArbiter/BreachArbitrator
Since we have two other examples of XArbitrator, we rename
BreachArbiter to BreachArbitrator to keep things consistent.
The aim is to reduce the amount of lore you need to know to
intuit where things are or what they do.
2024-02-06 13:32:47 -07:00
Olaoluwa Osuntokun
771d1f0a9c
Merge pull request #8338 from lightningnetwork/coop-close-v2-wire-messages
lnwire: add new closing_complete and closing_sig messages
2024-02-05 17:08:36 -08:00
Olaoluwa Osuntokun
ba3c0c497a
.github: codeowners additions 2024-02-05 16:30:31 -08:00
Olaoluwa Osuntokun
5953eaa9d8
lnwire: add fuzz tests for ClosingComplete+ClosingSigs 2024-02-05 16:30:26 -08:00
Olaoluwa Osuntokun
3d88017b38
lnwire: add new closing_complete and closing_sig messages
These two messages will be used to implement the new and improved co-op
closing protocol. This PR also show cases how to use the new
`tlv.OptionalRecord` type to define and handle TLV level parsing.

I think we can make one additional helper function to clean up some of
the boiler plate for the encode/decode.
2024-02-05 16:30:23 -08:00
Olaoluwa Osuntokun
34fd35bc63
lnwire: add Record() method to lnwire.Sig
We'll use this later on to re-use the normal primitive record to create
a series of new TLV types for the new co-op close protocol.
2024-02-05 16:30:16 -08:00
Yong
63e698ec49
Merge pull request #8432 from yyforyongyu/fix-timestamp-precision
invoice+payment: fix timestamp precision for queries
2024-02-05 18:28:39 +08:00
Oliver Gugger
4584f7e39c
Merge pull request #8457 from mohamedawnallah/lnddir-option-overwrite-docs
docs: mention that `--lnddir` option overwrites all other directory options [skip ci]
2024-02-05 03:36:05 -06:00
Mohamed Awnallah
043834c698
config.go: mention that --lnddir option overwrites all other directory options [skip ci] 2024-02-05 11:30:09 +02:00
Oliver Gugger
e9bc9ad510
Merge pull request #8456 from Roasbeef/record-zero-fn
tlv: add new Zero method on RecordT
2024-02-05 02:48:38 -06:00
yyforyongyu
4da9582862
docs: add release notes for precision fix 2024-02-05 15:26:54 +08:00
yyforyongyu
605211823d
multi: fix timestamp filters for payment query
This commit fixes the timestamp precision to always compare the dates
using unix seconds for payments.
2024-02-05 15:26:49 +08:00
yyforyongyu
18333e8c7d
multi: fix timestamp filters for invoice query
This commit fixes the timestamp precision to always compare the dates
using unix seconds for invoices.
2024-02-05 15:26:43 +08:00