Commit Graph

19561 Commits

Author SHA1 Message Date
ziggie
223b091ab7 paymentsdb: add missing comments for variables 2025-08-13 12:43:07 +02:00
ziggie
3b55871818 multi: move PaymentCreationInfo to payment pkg 2025-08-13 12:19:54 +02:00
ziggie
0801f4009f multi: move FailureReason to payment package 2025-08-13 12:19:54 +02:00
ziggie
dac1eaa7cf mulit: move payment query code to separate file
We also rename the struct since it is now in its own package
there is no need to prefix it.
2025-08-13 12:19:54 +02:00
ziggie
d0ab2f58b0 multi: move payment related code into own package
This commit moves most of the code into its own package. It is
the smallest code move possible without moving import cycles and
keeping the changes to the code base as small as possible during
refactor.
2025-08-13 12:19:52 +02:00
ziggie
49417f4937 channeldb: move helper function to codec.go
This method is not only used by the payment logic so we need to
move it to a generalized place because in the following commits
we move payment related code into its own package.
2025-08-13 12:18:20 +02:00
ziggie
f4faad590e channeldb: export pagination method
We export some methods related to the pagination logic be the
kv store implemenation of the payment data will live in another
package.
2025-08-13 12:18:19 +02:00
Yong
c6a9116e3a Merge pull request #9844 from ziggie1984/refactor-payments-code-03
Refactor Payment PR 3
2025-08-13 06:05:01 -04:00
Olaoluwa Osuntokun
8810793e61 Merge pull request #9871 from GeorgeTsagk/htlc-noop-add
Add `NoopAdd` HTLCs
2025-08-12 11:56:04 -07:00
ziggie
4e0af2f495 channeldb: rename storedPaymentSeq 2025-08-11 16:44:15 +02:00
ziggie
a4b1569647 channeldb: rename currPaymentSeq 2025-08-11 16:44:15 +02:00
ziggie
6bae3c98b3 channeldb: rename paymentSeqMx 2025-08-11 16:44:14 +02:00
ziggie
88da582526 mulit: use kvdb.Backend for the kv payment db
Instead of the ChannelState struct we now use the kv backend
interface for the payment kv database.
2025-08-11 16:44:14 +02:00
ziggie
3aec40293d paymentsdb: add subsystem logging for payments package 2025-08-11 16:44:14 +02:00
ziggie
18afd4442d multi: introduce new paymentsDB package
We introduce a new package paymentsDB and start by moving the
payment specifc errors from the channeldb package to the
paymentsDB package. We also fix linter issues which showed up
due to changing this code part.
2025-08-11 16:44:14 +02:00
ziggie
db2c50a599 channeldb: add context to query method
We add a context for the query method because the query method
is part of the paymentDB interface and for the SQL case
we will need the context for this method because the native
SQL drivers demand one. So we add it for the kv implementation
here as well so we can then make use of the new interface type.
2025-08-11 16:44:13 +02:00
Yong
f3e1f2f351 Merge pull request #10141 from ziggie1984/fix-stuck-payment
fix stuck payment
2025-08-11 19:44:12 +08:00
Oliver Gugger
d11d699443 Merge pull request #10147 from hieblmi/update-hieblmi-key
scripts: update hieblmi pgp key
2025-08-11 04:52:22 -06:00
Slyghtning
1ce64eb45f scripts: update hieblmi pgp key 2025-08-11 11:47:40 +02:00
Oliver Gugger
72e9ad8e65 Merge pull request #10144 from jtobin/jt/aux-error
server: don't mention aux controllers in error message
2025-08-11 00:42:12 -06:00
Jared Tobin
5688935354 server: don't mention aux stuff in error [skip ci]
This error is returned when one attempts to use taproot overlay channels
without the necessary auxiliary funding controller being supplied. In
practice, when running lnd via litd, the latter will always supply
'tapd' as the aux funding controller, but a standalone lnd has no
knowledge of that.

The previous message sort of reads like the lnd user has forgotten to
set some available option or flag, but nothing or the sort actually
exists. The update makes it clearer that the feature isn't available in
the standalone build.
2025-08-08 16:10:53 -02:30
George Tsagkarelis
97bbbf14f9 docs: update release notes for NoOp HTLCs 2025-08-08 20:03:30 +02:00
George Tsagkarelis
47d1365fde lnwallet: add table-driven test for evaluateNoOpHtlc helper 2025-08-08 20:03:30 +02:00
George Tsagkarelis
4a34f78fba lnwallet: add noop case to retransmit test
To make sure we don't cause force-closures because of commit sig
mismatches, we add a test case to verify that the retransmitted HTLC
matches the original HTLC.
2025-08-08 20:03:30 +02:00
George Tsagkarelis
e0486697df lnwallet: add noop HTLC tests
Adds some simple tests to check the noop HTLC logic of the lightning
channel.
2025-08-08 20:03:30 +02:00
George Tsagkarelis
a5a15f6401 lnwallet: detect and handle noop HTLCs
We update the lightning channel state machine in some key areas. If the
noop TLV is set in the update_add_htlc custom records then we change the
entry type to noop. When settling the HTLC if the type is noop we credit
the satoshi amount back to the sender.
2025-08-08 20:03:30 +02:00
George Tsagkarelis
aacefb9055 lnwallet: add IsAdd helper to AuxHtlcDescriptor
We also add the IsAdd helper to the AuxHtlcDescriptor, as external
software using the aux framework might want to know which type of HTLC
this is.
2025-08-08 20:03:29 +02:00
George Tsagkarelis
138b716519 lnwallet: add noop updateType to paymendDescriptor
We add a new update type to the payment descriptor to describe this new
type of htlc. This type of HTLC will only end up being set if explicitly
signalled by external software.
2025-08-08 20:03:27 +02:00
ziggie
dc7bea147a docs: add release-notes 2025-08-08 10:46:26 +02:00
Elle
a3793b2523 Merge pull request #10129 from ellemouton/graphPerf9
[8] graph/db: use batch loading for various graph SQL methods
2025-08-08 10:22:51 +02:00
ziggie
79e1cf0db7 routing: make sure attempts are always resolved after a timeout
We check the context of the payment lifecycle at the beginning of
the `resumepayment` loop. This will make sure we have always the
latest state of the payment before deciding on the next steps in
the function `decideNextStep`.
2025-08-08 09:23:07 +02:00
Oliver Gugger
e00a072bab Merge pull request #10139 from ziggie1984/update-golang-version
update Golang version to v1.23.12 to fix potential SQL bug
2025-08-07 23:58:15 -06:00
ziggie
ab6f1fcab8 docs: add release notes 2025-08-07 16:53:45 +02:00
ziggie
87844cd5b4 multi: bump Golang version to v1.23.12 2025-08-07 16:53:45 +02:00
Oliver Gugger
2269859d98 Merge pull request #10138 from sputn1ck/update_sputn1ck_key
scripts: update sputn1ck pgp key
2025-08-07 05:33:35 -06:00
sputn1ck
960a3517ad scripts: update sputn1ck pgp key
This comit updates the pgp key for sputn1ck with
a new expiration date.

[skip ci]
2025-08-07 12:30:42 +02:00
Oliver Gugger
8a2128ba41 Merge pull request #9806 from guggero/formatting-list-initializations
docs: document formatting for slice definitions
2025-08-07 01:49:54 -06:00
Elle Mouton
522e200c0e graph/db: add missing counter increment 2025-08-07 08:12:40 +02:00
Elle Mouton
8de33fa601 graph/db: batch fetching for FetchChanInfos 2025-08-07 08:12:40 +02:00
Elle Mouton
594c842aeb graph/db: batch loading for DisconnectBlockAtHeight 2025-08-07 08:12:40 +02:00
Elle Mouton
69bcf47dca graph/db: use batch loading for PruneGraph 2025-08-07 08:12:40 +02:00
Elle Mouton
556af8e221 graph/db: use batch fetching for DeleteChannelEdges 2025-08-07 08:12:40 +02:00
Elle Mouton
ebe6a8af9f graph/db: use batch loading for ChanUpdatesInHorizon
The following performance gains were measured using the new benchmark
test.

```
name                                      old time/op  new time/op  delta
ChanUpdatesInHorizon-native-sqlite-10     18.5s ± 3%    2.0s ± 5%  -89.11%  (p=0.000 n=9+9)
ChanUpdatesInHorizon-native-postgres-10   59.0s ± 3%    0.8s ±10%  -98.65%  (p=0.000 n=10+9)
```
2025-08-07 08:12:40 +02:00
Elle Mouton
ce3401ee5d graph/db: refactor buildNode to not take a pointer
Since the type returned from the DB is not a pointer. This will be
useful later on.
2025-08-07 08:04:20 +02:00
Elle Mouton
f51adaf31f graph/db: refactor makeZombiePubkeys
Let the helper method only take the params it needs so that we dont need
to construct an entire models.ChannelEdgeInfo object to pass to it. This
will be useful later on.
2025-08-07 08:04:20 +02:00
Elle Mouton
4cc5cfef2a graph/db: add ChanUpdatesInHorizon benchmark 2025-08-07 08:04:19 +02:00
Oliver Gugger
e5359f2f5b Merge pull request #10135 from guggero/update-19-3-release-notes
docs: move v0.19.3 items to correct file
2025-08-06 09:20:47 -06:00
Oliver Gugger
02d48d1d81 Merge pull request #10132 from ffranr/update-ffranr-signing-key
scripts: update ffranr release signing key
2025-08-06 07:14:48 -06:00
Oliver Gugger
74b327ba9c Merge pull request #10127 from ellemouton/graphPerf8
[7] graph/db+autopilot: improve efficiency of autopilot methods that use the ForEachNode/ForEachChannel pattern
2025-08-06 07:05:25 -06:00
Oliver Gugger
513cdb36a5 Merge pull request #10131 from ziggie1984/remove-positiveblue-pgp-key
scripts: remove expired pgp key
2025-08-06 07:04:24 -06:00