Commit graph

17358 commits

Author SHA1 Message Date
ziggie
3c354cc350
invoicerpc: add clarifying comment. 2025-01-30 08:36:56 +01:00
ziggie
8ce00a8e79
invoices: remove obsolete code for AMP invoices.
We always fetch the HTLCs for the specific setID, so there is no
need to keep this code. In earlier versions we would call the
UpdateInvoice method with `nil` for the setID therefore we had
to lookup the AMPState. However this was error prune because in
case one partial payment times-out the AMPState would change to
cancelled and that could lead to not resolve HTLCs.
2025-01-30 08:36:56 +01:00
ziggie
728f8fc482
invoices: enhance the unit test suite.
The invoiceregistry test suite also includes unit tests for
multi part payment especially also including payments to AMP
invoices.
2025-01-30 08:36:56 +01:00
ziggie
a863534f41
multi: introduce new traffic shaper method.
We introduce a new specific fail resolution error when the
external HTLC interceptor denies the incoming HTLC. Moreover
we introduce a new traffic shaper method which moves the
implementation of asset HTLC to the external layers.
Moreover itests are adopted to reflect this new change.
2025-01-30 08:36:56 +01:00
ziggie
768882dc9a
invoices: treat replayed HTLCs beforehand.
We make sure that HTLCs which have already been decided upon
are resolved before before allowing the external interceptor to
potentially cancel them back. This makes the implementation for
the external HTLC interceptor more streamlined.
2025-01-30 08:36:55 +01:00
Oliver Gugger
be5238ed21
Merge branch '0-18-5-branch-rc1-9242' into 0-18-5-branch-rc1 2025-01-28 18:27:29 +01:00
Alex Akselrod
8b9885cfc9
docs: update release-notes for 0.18.5 2025-01-28 18:22:12 +01:00
Alex Akselrod
29b683d256
github workflow: save postgres log to zip file 2025-01-28 18:22:12 +01:00
Alex Akselrod
150672d518
Makefile: log to file instead of console 2025-01-28 18:22:12 +01:00
Alex Akselrod
de283a6392
Makefile: tune params for db-instance for postgres itests 2025-01-28 18:22:11 +01:00
Alex Akselrod
2c034699b1
sqldb: improve serialization error handling 2025-01-28 18:22:11 +01:00
Alex Akselrod
008dc65a6b
graph/db: handle previously-unhandled errors 2025-01-28 18:22:11 +01:00
Alex Akselrod
e0cff36ccf
batch: handle serialization errors correctly 2025-01-28 18:22:11 +01:00
Alex Akselrod
05de72c669
itest: fix flake in multi-hop payments
To make this itest work reliably with multiple parallel SQL
transactions, we need to count both the settle and final HTLC
events. Otherwise, sometimes the final events from earlier
forwards are counted before the forward events from later
forwards, causing a miscount of the settle events. If we
expect both the settle and final event for each forward,
we don't miscount.
2025-01-28 18:22:11 +01:00
Alex Akselrod
93c792ce05
log: add sub-logger for kvdb/sqlbase 2025-01-28 18:22:10 +01:00
Alex Akselrod
52bfb14975
Reapply "kvdb/postgres: remove global application level lock"
This reverts commit 67419a7c0c.
2025-01-28 18:22:10 +01:00
Alex Akselrod
db71709a07
go.mod: use local kvdb to reapply removal of global postgres lock 2025-01-28 18:22:10 +01:00
Alex Akselrod
3489a3bf8a
go.mod: update btcwallet to latest to eliminate waddrmgr deadlock 2025-01-28 18:22:06 +01:00
Oliver Gugger
4ee2c20ddb
Merge branch '0-18-5-branch-rc1-8805' into 0-18-5-branch-rc1 2025-01-28 18:21:05 +01:00
Jesse de Wit
f49021240f
localchans: do error if an edge policy is missing 2025-01-28 18:18:17 +01:00
Jesse de Wit
ebd570bddd
docs: update release notes 2025-01-28 18:18:16 +01:00
Jesse de Wit
ac0d29580e
channeldb: skip nil scheduler options
This is a robustness option to ensure LND doesn't crash when this
function is accidentally called with `AddChannelEdge(edge, nil)`.
2025-01-28 18:18:16 +01:00
Jesse de Wit
b45deab379
localchans: add policy when missing 2025-01-28 18:18:16 +01:00
Jesse de Wit
454e94f556
localchans: add test for createEdge and manager 2025-01-28 18:18:16 +01:00
Jesse de Wit
8cc78b371d
localchans: recreate missing edge if not found
If a node contains a channel, but doesn't have a corresponding edge in
the graph database, updating the channel policy would fail. In this
commit the edge is recreated if the channel exists. This ensures a node
can recover from a missing edge in the graph database by calling
updatechanpolicy.
2025-01-28 18:18:11 +01:00
Jesse de Wit
9609aa332e
lncli: add create_missing_edge 2025-01-28 17:56:03 +01:00
Jesse de Wit
61a5bbb5eb
lnrpc: add create_missing_edge flag 2025-01-28 17:56:00 +01:00
Oliver Gugger
ddeb835168
Merge pull request #9367 from lightningnetwork/0-18-4-branch-rc3
release: create branch for v0.18.4-beta
2024-12-17 21:17:09 +01:00
Oliver Gugger
74d15d1fbc
build: bump version to v0.18.4-beta 2024-12-17 21:15:07 +01:00
Oliver Gugger
88cbec291c
Merge branch '0-18-4-branch-rc3-9357' into 0-18-4-branch-rc3 2024-12-16 12:51:50 +01:00
George Tsagkarelis
d30cba1089
contractcourt: include custom records on replayed htlc
When notifying the invoice registry for an exit hop htlc we also want to
include its custom records. The channelLink, the other caller of this
method, already populates this field. So we make sure the contest
resolver does so too.
2024-12-16 12:51:49 +01:00
Oliver Gugger
3c0810963f
Merge pull request #9335 from lightningnetwork/0-18-4-branch-rc2
release: create branch for v0.18.4-beta.rc2
2024-12-11 13:33:04 +01:00
Oliver Gugger
3447484a66
Merge branch '0-18-4-branch-rc2-9316' into 0-18-4-branch-rc2 2024-12-10 22:29:38 +01:00
ziggie
71eb1ae57d
docs: add release-notes for 18.4 2024-12-10 22:29:29 +01:00
ziggie
4c61411802
routing: bugfix for mc reporting of blinded paths
When reporting an error  or a success case of a payment to a
blinded paths, the amounts to forward for intermediate hops
are set to 0 so we need to use the receiver amount instead.
2024-12-10 22:29:29 +01:00
ziggie
a1e5dfc266
routing: add pathfinding test
We add a test where we add duplicate hops in a route and verify
that the pathfinding engine can handle this edge case.
2024-12-10 20:27:25 +01:00
ziggie
c579a6bf2f
routing: improve lasthoppaylaod size calculation
Fixes a bug and makes the function more robust. Before
we would always return the encrypted data size of last hop
of the last path. Now we return the greatest last hop payload
not always the one of the last path.
2024-12-10 20:27:25 +01:00
ziggie
eb93eb7ee9
routing: Use NUMS point for blinded paths
To be able to do MPP payment to multiple blinded routes we need
to add a constant dummy hop as a final hop to every blined path.
This is used when sending or querying a blinded path, to let the
pathfinder be able to send MPP payments over different blinded
routes. For this dummy final hop we use a NUMS key so that we
are sure no other node can use this blinded pubkey either in a
normal or blinded route.
Moreover this helps us handling the mission control data for
blinded paths correctly because we always consider the blinded
pubkey pairs which are registered with mission control when
a payment to a blinded path fails.
2024-12-10 20:27:24 +01:00
ziggie
0b90d3c3c2
input: export NUMS key parser. 2024-12-10 20:24:01 +01:00
Oliver Gugger
f312064bfb
build: bump version to v0.18.4-beta.rc2 2024-12-05 21:49:08 +01:00
Oliver Gugger
b63ac70113
Merge branch '0-18-4-branch-rc2-9333' into 0-18-4-branch-rc2 2024-12-05 21:47:45 +01:00
Oliver Gugger
72b4a1cb34
multi: thread through and use AuxTrafficShaper 2024-12-05 21:46:27 +01:00
Oliver Gugger
662049681d
htlcswitch: thread through packet's inbound wire records
For calculating the available auxiliary bandwidth of a channel, we need
access to the inbound custom wire records of the HTLC packet, which
might contain auxiliary information about the worth of the HTLC packet
apart from the BTC value being transported.
2024-12-05 21:44:58 +01:00
Oliver Gugger
699e2b74f6
multi: move routing.TlvTrafficShaper => htlcswitch.AuxTrafficShaper
With this commit we move the traffic shaper definition from the routing
package to the HTLC switch package as a preparation for being able to
use it there as well.
At the same time we rename it to AuxTrafficShaper to be more in line
with the other auxiliary components.
2024-12-05 21:44:56 +01:00
Oliver Gugger
f5ad1ee438
Merge branch '0-18-4-branch-rc2-9324' into 0-18-4-branch-rc2 2024-12-05 21:41:27 +01:00
ziggie
ae227ce2c6
docs: add release-notes 2024-12-05 21:41:13 +01:00
ziggie
7e228f22a8
contractcourt: refactor start up of arbitrators
We decouple the state machine of the channel arbitrator from
the start-up process so that we can startup the whole daemon
reliably.
2024-12-05 21:40:31 +01:00
Oliver Gugger
c1129bb086
Merge pull request #9183 from lightningnetwork/0-18-4-branch-rc1
release: create branch for v0.18.4-beta.rc1
2024-11-21 20:19:40 +01:00
Oliver Gugger
9246d5c51c
Merge branch '0-18-4-branch-rc1-9288' into 0-18-4-branch-rc1 2024-11-20 15:31:13 +01:00
Oliver Gugger
117a145b97
docs: add release notes 2024-11-20 15:31:12 +01:00