Commit graph

17327 commits

Author SHA1 Message Date
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
Oliver Gugger
e074a8fab3
chanacceptor: add custom channel commitment type 2024-11-20 15:31:12 +01:00
Oliver Gugger
f9d876e8a3
Merge branch '0-18-4-branch-rc1-9253' into 0-18-4-branch-rc1 2024-11-20 10:44:12 +01:00
ziggie
a4211251bd
docs: add release notes 2024-11-20 10:43:59 +01:00
ziggie
d695383386
rpcserver: add robustness check 2024-11-20 10:42:54 +01:00
ziggie
79d0655a96
multi: introduce an option for resolutions
We don't always need the resolutions in the local force close
summary so we make it an option.
2024-11-20 10:42:54 +01:00
Oliver Gugger
78c8990772
Merge branch '0-18-4-branch-rc1-9272' into 0-18-4-branch-rc1 2024-11-19 12:44:51 +01:00
Olaoluwa Osuntokun
86de1ebdc2
sweep: update storeRecord to include utxo index
In this commit, we complete a recently added feature by ensuring that
even if we go through the RBF loop to create a txn, that we still
populate the `outpointToIndex` map. Unit tests have been updated to
ensure this is always set as expected.
2024-11-19 12:44:51 +01:00
Oliver Gugger
4c9d25cbe7
Merge branch '0-18-4-branch-rc1-9194' into 0-18-4-branch-rc1 2024-11-15 13:09:56 +01:00
Oliver Gugger
04b053e405
docs: move 0.18.4 items, add full list of custom chan PRs 2024-11-15 13:09:35 +01:00
Olaoluwa Osuntokun
e1a25f6c30
sweep: update BudgetInputSet.Budget() to factor in extra budget
In this commit, we update the `Budget()` call to factor in the
`extraBudget` value. Otherwise, when we go to intialize the fee
function, we won't factor in the extra budget, and will determine that
we can't broadcast/bump.
2024-11-15 13:09:10 +01:00
Olaoluwa Osuntokun
6db7d42654
lnwallet: add whoseCommit to FetchLeavesFromCommit
This is useful for additional context to know which commit the
AuxLeafStore is fetching the leaves for.
2024-11-15 13:09:10 +01:00
Olaoluwa Osuntokun
b8035d9db7
sweep: expand NotifyBroadcast to include an outpoint index
In this commit, we expand the `NotifyBroadcast` to include an outpoint
index. This is useful as it indicates the index of a given required tx
out input.
2024-11-15 13:09:09 +01:00
Olaoluwa Osuntokun
83f1c883ba
contractcourt: pass in new aux resolution blob to sweeper in resolvers
With this commit, we update all the resolvers to pass in the new htlc
resolution blobs. Along the way, we remove the old blocking guard on
this resolution logic for HTLCs with blobs.
2024-11-15 13:09:09 +01:00
Olaoluwa Osuntokun
f1a1c033d1
contractcourt: update encode/decode for taproot aux data
When we read/write the aux data, we need to make sure we always set the
new fields for aux HTLCs.
2024-11-15 13:09:09 +01:00
Olaoluwa Osuntokun
6914e6a4a5
contractcourt: add HtlcBlobs to taprootBriefcase
In this commit, we add the set of HtlcBlobs to the taprootBriefcase
struct. This new field will store all the resolution blobs for a given
HTLC. We also add some new property based tests along the way for
adequate test coverage.
2024-11-15 13:09:09 +01:00
Olaoluwa Osuntokun
413fdaf3fb
input: add new Preimage method to input.Input
In this commit, we add a new method to obtain an option of a preimage to
the input.Input struct. This is useful for callers that have an Input,
and want to optionally obtain the preimage.
2024-11-15 13:09:09 +01:00
Olaoluwa Osuntokun
e3eef0adff
lnwallet: populate resolution blob for incoming+outgoing HTLC resolutions
In this commit, we populate the resolution blobs for the incoming and
outgoing HTLCs. We take care to populate the AuxSigDesc with the correct
information, as we need to pass along the second-level aux signature and
also sign desc along with it.
2024-11-15 13:09:09 +01:00
Olaoluwa Osuntokun
84aacc6c39
channel: add ResolutionBlob to Incoming+Outgoing HtlcResolution
Similar to the other blobs we have for the commitment output force close
resolution, these blobs will be used to ensure that we have everything
needed to sweep aux HTLCs.
2024-11-15 13:09:08 +01:00
Olaoluwa Osuntokun
57617dc4f7
channel: always specify ChanType in ResolutionReq 2024-11-15 13:09:08 +01:00
Olaoluwa Osuntokun
a5beb340e4
lnwallet: expand attributes in ResolutionReq
In this commit, we add some additional attributes to the ResolutionReq
struct. These will be used to make sure that we can properly handle all
the HTLC variants, on chain.

The `AuxSigDesc` will be used to communicate if an HTLC needs to go to
the second level or not. It contains the second-level sig information
needed to finalize a broadcast to the second level.
2024-11-15 13:09:07 +01:00
Oliver Gugger
31ace742a5
Merge branch '0-18-4-branch-rc1-9084' into 0-18-4-branch-rc1 2024-11-13 12:52:32 +01:00
Matt Morehouse
2c25f38a5a
discovery: remove check for incorrect number of timestamps
The check is no longer required, as it is now done during decoding.
2024-11-13 12:52:32 +01:00
Matt Morehouse
c8033e1725
lnwire: fail decoding on incorrect number of timestamps
Currently if an incorrect number of timestamps is given, we fail later
on in the GossipSyncer. It makes more sense to fail right away, since we
already do that for incorrect SCID formats (e.g., unsorted or duplicate
SCIDs). There is already a matching check in Encode for incorrect number
of timestamps, so adding this check to Decode makes things symmetric.
2024-11-13 12:52:32 +01:00
Oliver Gugger
9bf48a7e9a
Merge branch '0-18-4-branch-rc1-9082' into 0-18-4-branch-rc1 2024-11-13 12:50:57 +01:00
Matt Morehouse
a4414fbbb9
lnwire: manually compare Timestamps in fuzz test
We can't use require.Equal because it considers nil slices and empty
slices to be not equal.
2024-11-13 12:50:56 +01:00
Oliver Gugger
af08c42d58
Merge branch '0-18-4-branch-rc1-9062' into 0-18-4-branch-rc1 2024-11-08 08:52:31 +01:00
Olaoluwa Osuntokun
b2b5ec052b
contractcourt: use the sweeper for HTLC offered remote timeout resolution
In this commit, we bring the timeout resolver more in line with the
success resolver by using the sweeper to handle the HTLC offered remote
timeout outputs. These are outputs that we can sweep directly from the
remote party's commitment transaction when they broadcast their version
of the commitment transaction.

With this change, we slim down the scope slightly by only doing this for
anchor channels. Non-anchor channels will continue to use the
utxonursery for this output type for now.
2024-11-08 08:52:31 +01:00
Olaoluwa Osuntokun
941590d384
contractcourt: use t.Run in TestHtlcTimeoutResolver
Along the way we refactor the test to eliminate some unnecessary line
length.
2024-11-08 08:52:30 +01:00
Oliver Gugger
906fa0b7b8
Merge branch '0-18-4-branch-rc1-9223' into 0-18-4-branch-rc1 2024-10-30 14:16:37 +01:00
Boris Nagaev
593afee12d
itest: coop_close_with_external_delivery with p2tr
Customize the itest with the type of external delivery address. Test with P2TR
address type in addition to P2WKPH.
2024-10-30 14:16:37 +01:00
Boris Nagaev
552d182594
lnwallet: fix closechannel for P2TR external addr
If the delivery address is P2TR, function InternalKeyForAddr checks its
existance in the wallet to return internal key for it in case it is a custom
taproot channel. It used to return the error returned by wallet.AddressInfo.
The error is now ignored if it is ErrAddressNotFound error. This fixes
"lncli closechannel --delivery_addr <external p2tr address" case.
2024-10-30 14:16:36 +01:00