Commit Graph

17355 Commits

Author SHA1 Message Date
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
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
be5238ed21 Merge branch '0-18-5-branch-rc1-9242' into 0-18-5-branch-rc1 2025-01-28 18:27:29 +01:00
8b9885cfc9 docs: update release-notes for 0.18.5 2025-01-28 18:22:12 +01:00
29b683d256 github workflow: save postgres log to zip file 2025-01-28 18:22:12 +01:00
150672d518 Makefile: log to file instead of console 2025-01-28 18:22:12 +01:00
de283a6392 Makefile: tune params for db-instance for postgres itests 2025-01-28 18:22:11 +01:00
2c034699b1 sqldb: improve serialization error handling 2025-01-28 18:22:11 +01:00
008dc65a6b graph/db: handle previously-unhandled errors 2025-01-28 18:22:11 +01:00
e0cff36ccf batch: handle serialization errors correctly 2025-01-28 18:22:11 +01:00
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
93c792ce05 log: add sub-logger for kvdb/sqlbase 2025-01-28 18:22:10 +01:00
52bfb14975 Reapply "kvdb/postgres: remove global application level lock"
This reverts commit 67419a7c0c.
2025-01-28 18:22:10 +01:00
db71709a07 go.mod: use local kvdb to reapply removal of global postgres lock 2025-01-28 18:22:10 +01:00
3489a3bf8a go.mod: update btcwallet to latest to eliminate waddrmgr deadlock 2025-01-28 18:22:06 +01:00
4ee2c20ddb Merge branch '0-18-5-branch-rc1-8805' into 0-18-5-branch-rc1 2025-01-28 18:21:05 +01:00
f49021240f localchans: do error if an edge policy is missing 2025-01-28 18:18:17 +01:00
ebd570bddd docs: update release notes 2025-01-28 18:18:16 +01:00
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
b45deab379 localchans: add policy when missing 2025-01-28 18:18:16 +01:00
454e94f556 localchans: add test for createEdge and manager 2025-01-28 18:18:16 +01:00
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
9609aa332e lncli: add create_missing_edge 2025-01-28 17:56:03 +01:00
61a5bbb5eb lnrpc: add create_missing_edge flag 2025-01-28 17:56:00 +01:00
ddeb835168 Merge pull request #9367 from lightningnetwork/0-18-4-branch-rc3
release: create branch for v0.18.4-beta
v0.18.4-beta
2024-12-17 21:17:09 +01:00
74d15d1fbc build: bump version to v0.18.4-beta 2024-12-17 21:15:07 +01:00
88cbec291c Merge branch '0-18-4-branch-rc3-9357' into 0-18-4-branch-rc3 2024-12-16 12:51:50 +01:00
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
3c0810963f Merge pull request #9335 from lightningnetwork/0-18-4-branch-rc2
release: create branch for v0.18.4-beta.rc2
v0.18.4-beta.rc2
2024-12-11 13:33:04 +01:00
3447484a66 Merge branch '0-18-4-branch-rc2-9316' into 0-18-4-branch-rc2 2024-12-10 22:29:38 +01:00
71eb1ae57d docs: add release-notes for 18.4 2024-12-10 22:29:29 +01:00
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
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
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
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
0b90d3c3c2 input: export NUMS key parser. 2024-12-10 20:24:01 +01:00
f312064bfb build: bump version to v0.18.4-beta.rc2 2024-12-05 21:49:08 +01:00
b63ac70113 Merge branch '0-18-4-branch-rc2-9333' into 0-18-4-branch-rc2 2024-12-05 21:47:45 +01:00
72b4a1cb34 multi: thread through and use AuxTrafficShaper 2024-12-05 21:46:27 +01:00
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
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
f5ad1ee438 Merge branch '0-18-4-branch-rc2-9324' into 0-18-4-branch-rc2 2024-12-05 21:41:27 +01:00
ae227ce2c6 docs: add release-notes 2024-12-05 21:41:13 +01:00
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
c1129bb086 Merge pull request #9183 from lightningnetwork/0-18-4-branch-rc1
release: create branch for v0.18.4-beta.rc1
v0.18.4-beta.rc1
2024-11-21 20:19:40 +01:00
9246d5c51c Merge branch '0-18-4-branch-rc1-9288' into 0-18-4-branch-rc1 2024-11-20 15:31:13 +01:00
117a145b97 docs: add release notes 2024-11-20 15:31:12 +01:00
e074a8fab3 chanacceptor: add custom channel commitment type 2024-11-20 15:31:12 +01:00
f9d876e8a3 Merge branch '0-18-4-branch-rc1-9253' into 0-18-4-branch-rc1 2024-11-20 10:44:12 +01:00
a4211251bd docs: add release notes 2024-11-20 10:43:59 +01:00