Commit graph

17510 commits

Author SHA1 Message Date
Matt Morehouse
532fe05b63
discovery: remove check for incorrect number of timestamps
The check is no longer required, as it is now done during decoding.
2024-09-10 14:52:16 -05:00
Matt Morehouse
c1a6d3ac31
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-09-10 14:36:30 -05:00
Oliver Gugger
779903af9d
Merge pull request #9080 from ziggie1984/ziggie-pgp
scripts: add gpg key for ziggie [skip ci]
2024-09-10 11:50:59 -06:00
ziggie
82d99f3ebf
scripts: add gpg key for ziggie [skip ci] 2024-09-10 19:40:13 +02:00
Matt Morehouse
475cd6e344
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-09-10 11:41:31 -05:00
Oliver Gugger
65046561c4
Merge pull request #9079 from ziggie1984/remove-unsupported-nolint-directive
chanfunding: remove unsupported linter directive.
2024-09-10 09:01:50 -06:00
ziggie
6f26f2a5b3
chanfunding: remove unsupported linter directive.
Remove unsupported linter and also change ifelse clause to
switch statement.
2024-09-10 16:32:59 +02:00
Oliver Gugger
556c664984
Merge pull request #9078 from yyforyongyu/itest-log
Makefile: add `-test.v` for `make itest`
2024-09-10 08:04:52 -06:00
yyforyongyu
db332db025
Makefile: add -test.v for make itest 2024-09-10 17:21:03 +08:00
Keagan McClelland
27ff5f085a
lnwallet: remove unused function PayDescsFromRemoteLogUpdates
This function is no longer used as of the last commit and it is the
last remaining leak of the PaymentDescriptor type through the public
API.
2024-09-09 20:59:41 -06:00
Keagan McClelland
dc60f78f7f
htlcswitch: remove PaymentDescriptor conversion from reforwardSettleFails
This is part of a systematic removal of PaymentDescriptor from the mechanics
of the htlcswitch package.
2024-09-09 20:59:41 -06:00
Keagan McClelland
957557a937
htlcswitch+lnwallet: remove PaymentDescriptor from ReceiveRevocation returns
This is part of a systematic removal of PaymentDescriptor from the public
API of the lnwallet package. This marks the last change needed before we
make the PaymentDescriptor structure private.
2024-09-09 20:59:22 -06:00
Keagan McClelland
1ae5705954
htlcswitch: remove PaymentDescriptor from processRemoteSettleFails call signature
This is part of a systematic removal of PaymentDescriptor from the mechanics
of the htlcswitch package.
2024-09-09 17:15:31 -06:00
Keagan McClelland
aa38041240
htlcswitch: remove PaymentDescriptor from processRemoteAdds call signature
This is part of a systematic removal of PaymentDescriptor from the mechanics
of the htlcswitch package.
2024-09-09 17:15:30 -06:00
Keagan McClelland
d881809a4d
htlcswitch: remove PaymentDescriptor from hodlHtlc
This is part of a systematic removal of PaymentDescriptor from the
mechanics of the htlcswitch package.
2024-09-09 16:53:11 -06:00
Keagan McClelland
a0818a0d16
htlcswitch: remove PaymentDescriptor from the processExitHop's call signature
This is part of a systematic removal of PaymentDescriptor from the mechanics
of the htlcswitch package.
2024-09-09 16:53:10 -06:00
Keagan McClelland
07647fe53a
htlcswitch: remove PaymentDescriptor from settleHTLC's call signature
This is done as part of a systematic removal of PaymentDescriptor from
the mechanics of the htlcswitch package.
2024-09-09 16:53:10 -06:00
Keagan McClelland
877d29c717
htlcswitch: remove PaymentDescriptor from sendHTLCError's call signature
This is done as part of a systematic removal of PaymentDescriptor from
the mechanics of the htlcswitch package.
2024-09-09 16:53:10 -06:00
Keagan McClelland
0fb29b2598
channeldb: add convenience functions for generating Source/Dest Refs 2024-09-09 16:53:10 -06:00
Keagan McClelland
1e2bf3e0b3
lnwallet: add function to convert paymentDescriptor to LogUpdate
Here we add a function that is capable of recovering LogUpdates from
paymentDescriptors and we refactor the lnwallet code to use this
rather than doing JIT inline construction of the LogUpdates.
2024-09-09 16:53:08 -06:00
Keagan McClelland
721a0c5edc
lnwire+htlcswitch: change NewInvalidBlinding to use array instead of slice 2024-09-09 16:26:41 -06:00
Keagan McClelland
5505b6daff
htlcswitch: change sendMalformedHTLCError to take array instead of slice 2024-09-09 16:26:41 -06:00
Keagan McClelland
5deb4c253a
htlcswitch+lnwallet: fix OnionBlob to 1366 bytes 2024-09-09 16:26:41 -06:00
Keagan McClelland
df3c6b72ab
lnwallet: track ChannelID on PaymentDescriptor
In this commit we track the ChannelID on the PaymentDescriptor.
This will be useful in upcoming commits that need to be able to
reconstruct lnwire.Message values from PaymentDescriptors as the
Messages that are exchanged to update channel state all include
the ChannelID.
2024-09-09 16:26:41 -06:00
Keagan McClelland
a89e24f487
lnwallet: add ChannelID method to LightningChannel
In this commit we introduce a convenience method to LightningChannel
to allow us to quickly grab the channel id. This will be important
in upcoming commits where we need to remember the ChannelID to
reconstruct update messages.
2024-09-09 16:26:41 -06:00
CharlieZKSmith
7af85d44fd commands: update interactive input in create command description 2024-09-09 09:03:18 -07:00
Oliver Gugger
a895b1c6ca
Merge pull request #9051 from calvinrzachman/export-routing-interface
routing: export dbMPPayment interface
2024-09-09 05:15:38 -06:00
Oliver Gugger
31a6f87c4d
Merge pull request #9049 from lightningnetwork/extract-part2-from-staging-branch
[custom channels 2/5]: Extract PART2 from mega staging branch
2024-09-05 12:08:36 -06:00
George Tsagkarelis
427d41dc1e
itest: add interceptor and first hop data tests 2024-09-05 18:00:53 +02:00
Oliver Gugger
81c8331f82
lnrpc: add first hop custom data to route 2024-09-05 18:00:53 +02:00
George Tsagkarelis
aa17543d23
routing: use first hop records on path finding 2024-09-05 18:00:53 +02:00
Oliver Gugger
4804cbf139
channeldb+routing: persist first hop custom data for route 2024-09-05 18:00:53 +02:00
George Tsagkarelis
c39143052e
lnd: use impl cfg TlvTrafficShaper 2024-09-05 18:00:52 +02:00
Olaoluwa Osuntokun
f04fa54622
routing: skip amtInRange for custom HTLCs
We might be trying to send an invoice amount that's greater than the size of the channel, but once you factor in the custom channel logic, an actual HTLC can be sent over the channel to pay that larger payment.

As a result, we'll skip over this check if a have a custom HTLC.
2024-09-05 18:00:52 +02:00
George Tsagkarelis
5b4de5f0d4
routing: add TlvTrafficShaper to bandwidth hints 2024-09-05 18:00:52 +02:00
George Tsagkarelis
5dcda25881
htlcswitch: expose custom channel blob from link 2024-09-05 18:00:49 +02:00
George Tsagkarelis
5cb68a59c5
lnwallet: expose commitment blob from channel 2024-09-05 11:18:17 +02:00
Oliver Gugger
afdceab400
lnrpc: add first hop custom records to RPC payment info 2024-09-05 11:18:16 +02:00
Oliver Gugger
1b31835230
channeldb+routing: persist first hop custom records
With this commit we make sure the first hop custom records aren't lost
on restart/resume of a payment, so we persist it as part of the
PaymentCreationInfo struct.
2024-09-05 11:18:16 +02:00
George Tsagkarelis
42e358e3d3
lnrpc: add wire records fields to payment+interceptor RPCs 2024-09-05 11:18:16 +02:00
George Tsagkarelis
878f964a33
multi: use wire records on payment and intercept flows 2024-09-05 11:18:16 +02:00
Oliver Gugger
aa86020b84
lnwallet: extract diskCommit, remove unused error return value 2024-09-05 11:18:16 +02:00
ffranr
ccea257c92
itest: add itest for field modification HTLC interception response
Implement an integration test where an HTLC is intercepted and the
interception response modifies fields in the resultant p2p message.
2024-09-05 11:18:16 +02:00
ffranr
fb14d8c96e
routerrpc: extend HTLC forward interceptor resp with modification fields
This commit extends the forward HTLC intercept response with fields that
can be used in conjunction with a `ResumeModified` action to modify the
intercepted HTLC p2p message.
2024-09-05 11:18:15 +02:00
ffranr
abca4b8234
htlcswitch: add resume modified HTLC action to switch
Introduce `ResumeModified` action to resume standard behavior of a p2p
message with optional modifications as specified by the client during
interception.
2024-09-05 11:18:15 +02:00
ffranr
8d1059f41c
lnwire: add custom records field to type UpdateFulfillHtlc
- Introduce the field `CustomRecords` to the type `UpdateFulfillHtlc`.
- Encode and decode the new field into the `ExtraData` field of the
`update_fulfill_htlc` wire message.
- Empty `ExtraData` field is set to `nil`.
2024-09-05 11:18:15 +02:00
ffranr
81f6a8060f
lnwire: add custom records field to type UpdateAddHtlc
- Introduce the field `CustomRecords` to the type `UpdateAddHtlc`.
- Encode and decode the new field into the `ExtraData` field of
  the `update_add_htlc` wire message.
2024-09-05 11:18:15 +02:00
ffranr
af50694643
lnwire: add ExtraOpaqueData helper functions and methods
Introduces a couple of new helper functions for both the ExtraOpaqueData
and CustomRecords types along with new methods on the ExtraOpaqueData.
2024-09-05 11:18:15 +02:00
ffranr
17c0a70b07
lnwire: add unit tests for ExtraOpaqueData.PackRecords 2024-09-05 10:29:42 +02:00
George Tsagkarelis
705e567357
itest: add dynamic scid alias routing test 2024-09-05 10:29:42 +02:00