Commit Graph

16531 Commits

Author SHA1 Message Date
George Tsagkarelis
53e9f288ed routing: use first hop records on path finding 2024-05-22 17:28:22 +02:00
George Tsagkarelis
a584b7585d lnd: use impl cfg TlvTrafficShaper 2024-05-22 17:28:22 +02:00
George Tsagkarelis
37cbfea912 routing: add TlvTrafficShaper to bandwidth hints 2024-05-22 17:28:22 +02:00
George Tsagkarelis
ec7dc031c9 htlcswitch: expose custom channel blob from link 2024-05-22 17:28:22 +02:00
George Tsagkarelis
3c6d49775e lnwallet: expose commitment blob from channel 2024-05-22 17:28:21 +02:00
Oliver Gugger
966f41f0c7 Merge pull request #8660 from GeorgeTsagk/interceptor-wire-records
Enhance `update_add_htlc` with remote peer's custom records
2024-05-22 17:27:50 +02:00
George Tsagkarelis
1b1969b9a3 itest: add interceptor wire records access test 2024-05-22 14:56:43 +02:00
George Tsagkarelis
a5fcf33082 lnrpc: add wire records fields to SendPayment & HtlcInterceptor 2024-05-22 14:45:43 +02:00
George Tsagkarelis
25b4066b17 multi: use wire records on payment and intercept flows 2024-05-22 14:44:18 +02:00
Oliver Gugger
b009db329f Merge pull request #8509 from GeorgeTsagk/scid-alias-rpcs
Add more RPCs for scid aliases
2024-05-20 20:05:39 +02:00
George Tsagkarelis
d9a59c67c3 docs: update release notes 2024-05-20 18:50:36 +02:00
George Tsagkarelis
49f7207576 itest: add dynamic scid alias routing test 2024-05-20 18:50:36 +02:00
George Tsagkarelis
7ace55582b aliasmgr: add alias lifecycle test 2024-05-20 18:50:36 +02:00
George Tsagkarelis
9d90485eeb routerrpc: add XAddLocalChanAliases & XDeleteLocalChanAliases 2024-05-20 18:50:36 +02:00
George Tsagkarelis
5c1b568d3d multi: refresh htlcswitch aliases on aliasmgr update 2024-05-20 18:50:36 +02:00
George Tsagkarelis
cc12fb3204 aliasmgr: add delete local alias method 2024-05-20 12:03:43 +02:00
Oliver Gugger
a908c579b4 Merge pull request #8633 from ffranr/8619-rpc+htlcswitch-add-htlc-transformation-capabilities-to-the-interceptor
rpc+htlcswitch: add htlc transformation capabilities to the interceptor
2024-05-16 16:42:32 +02:00
Oliver Gugger
03dceca835 multi: add incoming htlc amount to interceptor 2024-05-15 16:47:47 +01:00
ffranr
8025296bc1 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-05-15 16:47:47 +01:00
ffranr
bd5de434ab 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-05-15 16:47:47 +01:00
ffranr
31ee27435a 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-05-15 16:47:10 +01:00
ffranr
406fbe243e lnwire: specify random fields for UpdateFulfillHTLC message in fuzz test
This commit defines random fields for the `UpdateFulfillHTLC` message
as part of the encode/decode unit tests.
2024-05-15 16:47:10 +01:00
ffranr
5c3f7bec0f lnwire: add encoding/decoding unit tests for UpdateFulfillHTLC message 2024-05-15 16:47:10 +01:00
ffranr
d247cc9498 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-05-15 16:47:10 +01:00
ffranr
6fa2db0663 lnwire: rand CustomRecords for UpdateAddHTLC encode/decode fuzz test
This commit adds a random `CustomRecords` field to the `UpdateAddHTLC`
message encode/decode unit test.
2024-05-15 16:47:09 +01:00
ffranr
b93d2885e3 lnwire: add encoding/decoding unit tests for UpdateAddHtlc message 2024-05-15 16:47:09 +01:00
ffranr
2b3618c14d 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-05-15 16:47:09 +01:00
ffranr
41a5b9abf8 lnwire: add ExtraOpaqueData helper functions and methods
- Add instance constructor `NewExtraOpaqueDataFromTlvTypeMap`.
- Add method `Copy`.
- Add method `RecordProducers`.
2024-05-15 16:47:08 +01:00
ffranr
795aff5f42 lnwire: add unit tests for ExtraOpaqueData.PackRecords 2024-05-15 16:47:08 +01:00
ffranr
71c32511dd lnwire: add type CustomRecords
This commit introduces the `CustomRecords` type in the `lnwire` package,
designed to hold arbitrary byte slices. Each entry in this map can
associate with TLV type values that are greater than or equal to 65536.
2024-05-15 16:47:08 +01:00
ffranr
8b1d9c9248 htlcswitch: add missing method doc 2024-05-14 11:57:17 +01:00
ffranr
043f6963e8 multi: improve comment grammar 2024-05-14 11:57:16 +01:00
Oliver Gugger
81970eac6a Merge pull request #8684 from lightningnetwork/aux-leaf-fetcher
[2/?]: lnwallet+channeldb: add new AuxLeafStore for dynamic aux leaves
2024-05-01 15:51:11 +02:00
Oliver Gugger
72f7b80c28 lnwallet: thread thru input.AuxTapleaf to all relevant areas
In this commit, we start to thread thru the new aux tap leaf structures to all relevant areas. This includes: commitment outputs, resolution creation, breach handling, and also HTLC scripts.
2024-05-01 11:19:55 +02:00
Oliver Gugger
33f2db1c25 multi: thread thru the AuxLeafStore everywhere 2024-05-01 11:19:55 +02:00
Olaoluwa Osuntokun
2ac360a1b6 lnwallet: add TLV blob to PaymentDescriptor + htlc add
In this commit, we add a TLV blob to the PaymentDescriptor struct. We also now thread through this value from the UpdateAddHTLC message to the PaymentDescriptor mapping, and the other way around.
2024-05-01 11:19:55 +02:00
Olaoluwa Osuntokun
2cf38540e0 channeldb: add HtlcIndex to HTLCEntry
This may be useful for custom channel types that base everything off the index (a global value) rather than the output index (can change with each state).
2024-05-01 11:19:53 +02:00
Olaoluwa Osuntokun
d5f595e641 channeldb: add custom blobs to RevocationLog+HTLCEntry
This'll be useful for custom channel types that want to store extra information that'll be useful to help handle channel revocation cases.
2024-05-01 11:19:20 +02:00
Olaoluwa Osuntokun
0bf20500a7 channeldb: convert RevocationLog to use RecordT 2024-05-01 11:19:19 +02:00
Olaoluwa Osuntokun
f3655da070 channeldb: convert HTLCEntry to use tlv.RecordT 2024-05-01 11:19:15 +02:00
Olaoluwa Osuntokun
258dd5c96e lnwallet+channeldb: add new AuxLeafStore for dynamic aux leaves
In this commit, we add a new AuxLeafStore which can be used to dynamically fetch the latest aux leaves for a given state. This is useful for custom channel types that will store some extra information in the form of a custom blob, then will use that information to derive the new leaf tapscript leaves that may be attached to reach state.
2024-05-01 10:13:10 +02:00
Olaoluwa Osuntokun
fc44ff4bff input: add some utility type definitions for aux leaves
In this commit, we add some useful type definitions for the aux leaf.
2024-05-01 10:13:10 +02:00
Olaoluwa Osuntokun
12acbac16a lnwallet: add custom tlv blob to internal commitment struct
In this commit, we also add the custom TLV blob to the internal commitment struct that we use within the in-memory commitment linked list.

This'll be useful to ensure that we're tracking the current blob for our in memory commitment for when we need to write it to disk.
2024-05-01 10:13:10 +02:00
Olaoluwa Osuntokun
5733bbb55c lnwallet: export the HtlcView struct
We'll need this later on to ensure we can always interact with the new aux blobs at all stages of commitment transaction construction.
2024-05-01 10:13:09 +02:00
Olaoluwa Osuntokun
cbaa0c780d channeldb: new custom blob nested TLV
In this commit, for each channel, we'll now start to store an optional custom blob. This can be used to store extra information for custom channels in an opauqe manner.
2024-05-01 10:13:09 +02:00
Oliver Gugger
51c2a1a9eb mod: bump tlv to v1.2.5 2024-05-01 10:13:09 +02:00
Olaoluwa Osuntokun
6cf449168c input+lnwallet: update taproot scripts to accept optional aux leaf
In this commit, we update all the taproot scripts to also accept an
optional aux leaf. This aux leaf can be used to add more redemption
paths for advanced channels, or just as an extra commitment space.
2024-05-01 10:13:09 +02:00
Oliver Gugger
bb44793cbd Merge pull request #8683 from lightningnetwork/funding-tapcript
[1/?]: multi: add ability to fund+use musig2 channels that commit to a tapscript root
2024-04-30 18:12:16 +02:00
Olaoluwa Osuntokun
26ce8ee729 lnwallet: add initial unit tests for musig2+tapscript root chans 2024-04-30 16:39:21 +02:00
Olaoluwa Osuntokun
66fa0a20c1 lnwallet+peer: add tapscript root awareness to musig2 sessions
With this commit, the channel is now aware of if it's a musig2 channel, that also has a tapscript root. We'll need to always pass in the tapscript root each time we: make the funding output, sign a new state, and also verify a new state.
2024-04-30 16:39:21 +02:00