Commit Graph

17198 Commits

Author SHA1 Message Date
Oliver Gugger
a518f7dfbc Merge pull request #9084 from morehouse/detect_invalid_timestamp_field
lnwire: detect invalid timestamp field
2024-09-11 03:31:01 -06:00
Oliver Gugger
a6f0ec9f00 Merge pull request #9077 from rhg4d9ow35/fix-issue-8897
commands: update interactive input in create command description
2024-09-11 03:28:29 -06:00
Oliver Gugger
a6e65d49cc Merge pull request #9086 from morehouse/fix_fuzz_probability
routing: skip fuzzing when capacity is 0
2024-09-11 02:34:11 -06:00
CharlieZKSmith
000e3381b1 docs: add release notes 2024-09-10 21:46:02 -07:00
Matt Morehouse
8373cca43c routing: skip fuzzing when capacity is 0
probabilityFormula() is expected to return an error if capacity is 0, so
we should exclude that case from fuzzing.

Previously it was attempted to avoid this case by seeding the corpus
with an input that had capacity 1. That is not an effective solution
since the fuzzer can still generate an input with capacity 0.
2024-09-10 15:17:39 -05:00
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
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
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
George Tsagkarelis
70f82bc4ff routerrpc: add XAddLocalChanAliases & XDeleteLocalChanAliases 2024-09-05 10:29:42 +02:00
Oliver Gugger
604bd81100 aliasmgr: export alias start and end ranges
Because we restrict custom SCID aliases to be in a specific range, we
export the range start and end values so a user of the RPCs we're going
to add in the next commits can adjust their values to fit within the
range.
2024-09-05 08:44:33 +02:00
Oliver Gugger
466f550ddb aliasmgr: avoid collision when requesting alias
With the new RPC calls that we are going to add in the next commits, it
will be possible for users to add (local only, non-gossipped) SCID
aliases for channels. Since those will be in the same range as the ones
given out by RequestAlias, we need to make sure that when we generate a
new one that it doesn't collide with an already existing one.
2024-09-05 08:44:33 +02:00
Oliver Gugger
80dfaeb16d aliasmgr: add map type alias 2024-09-05 08:44:33 +02:00
George Tsagkarelis
ea92d0aecc multi: refresh htlcswitch aliases on aliasmgr update 2024-09-05 08:44:32 +02:00
George Tsagkarelis
e31cdc4db3 aliasmgr: add delete local alias method 2024-09-05 08:44:32 +02:00
Olaoluwa Osuntokun
6747fc13b4 Merge pull request #9063 from guggero/update-sqldb
mod: bump sqldb to latest version
2024-09-04 13:18:21 -07:00
Oliver Gugger
6900fb54e2 Merge pull request #9064 from longhutianjie/master
bug: fix json tag
2024-09-04 05:43:01 -06:00
longhutianjie
26dd72d93a bug: fix json tag 2024-09-04 18:03:15 +08:00
Oliver Gugger
cb85e6f8ba mod: bump sqldb to latest version 2024-09-04 09:33:27 +02:00
Oliver Gugger
258cf81240 Merge pull request #9050 from bhandras/native-sql-invoice-fixes
invoices+sqldb: small fixes to address some inconsistencies between KV and native SQL invoice DB implementations
2024-09-04 01:30:52 -06:00
Olaoluwa Osuntokun
ce27e4e62c Merge pull request #9046 from Roasbeef/taproot-chan-sync-bug-fix
lnwallet: ensure we re-sign retransmitted commits for taproot channels
2024-09-03 17:25:19 -07:00