Commit Graph

16515 Commits

Author SHA1 Message Date
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
03dceca835 multi: add incoming htlc amount to interceptor 2024-05-15 16:47:47 +01:00
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
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
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
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
5c3f7bec0f lnwire: add encoding/decoding unit tests for UpdateFulfillHTLC message 2024-05-15 16:47:10 +01:00
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
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
b93d2885e3 lnwire: add encoding/decoding unit tests for UpdateAddHtlc message 2024-05-15 16:47:09 +01:00
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
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
795aff5f42 lnwire: add unit tests for ExtraOpaqueData.PackRecords 2024-05-15 16:47:08 +01:00
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
8b1d9c9248 htlcswitch: add missing method doc 2024-05-14 11:57:17 +01:00
043f6963e8 multi: improve comment grammar 2024-05-14 11:57:16 +01:00
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
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
33f2db1c25 multi: thread thru the AuxLeafStore everywhere 2024-05-01 11:19:55 +02:00
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
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
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
0bf20500a7 channeldb: convert RevocationLog to use RecordT 2024-05-01 11:19:19 +02:00
f3655da070 channeldb: convert HTLCEntry to use tlv.RecordT 2024-05-01 11:19:15 +02:00
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
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
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
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
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
51c2a1a9eb mod: bump tlv to v1.2.5 2024-05-01 10:13:09 +02:00
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
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
26ce8ee729 lnwallet: add initial unit tests for musig2+tapscript root chans 2024-04-30 16:39:21 +02:00
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
9466224805 lnwallet: update internal funding flow w/ tapscript root
This isn't hooked up yet to the funding manager, but with this commit, we can now start to write internal unit tests that handle musig2 channels with a tapscript root.
2024-04-30 16:39:20 +02:00
a4a7d11e88 multi: update GenTaprootFundingScript to pass tapscript root
In most cases, we won't yet be passing a root. The option usage helps us keep the control flow mostly unchanged.
2024-04-30 16:39:20 +02:00
8a0c25b5d6 lnwallet/chanfunding: add optional tapscript root 2024-04-30 16:39:20 +02:00
159f853bb2 input: add new tapscript root func op to GenTaprootFundingScript
This'll allow us to create a funding output that uses musig2, but uses a tapscript tweak rather than a normal BIP 86 tweak.
2024-04-30 16:39:20 +02:00
89cf4c274f channeldb: add optional TapscriptRoot field + feature bit 2024-04-30 16:39:18 +02:00
1f110dcb24 channeldb: consolidate root bucket TLVs into new struct
In this commit, we consolidate the root bucket TLVs into a new struct.
This makes it easier to see all the new TLV fields at a glance. We also
convert TLV usage to use the new type param based APis.
2024-04-30 16:37:43 +02:00
bb0fb862f5 lnwallet/chanfunding: rename assembler.go to interface.go
In this commit, we rename the files as assembler.go houses the primary
interfaces/abstractions of the package. In the rest of the codebase,
this file is near uniformly called interface.go, so we rename the file
to make the repo more digestible at a scan.
2024-04-29 21:36:31 +02:00
7fb233326e Merge pull request #8674 from yyforyongyu/sweeper-remove-and-docs
sweep: add docs and remove dead code
2024-04-23 11:12:24 -06:00
e855421095 docs: update release notes 2024-04-23 23:19:41 +08:00
83024585bb sweep: add README 2024-04-23 23:17:44 +08:00
2b74a34301 Merge pull request #8678 from hieblmi/add-hieblmi-to-verify-install
Add hieblmi to verify install script
2024-04-23 06:16:43 -06:00
ffaf4da1da release: add hieblmi to verify install script 2024-04-23 10:03:23 +02:00
9c5124e117 sweep: remove unused param Fee 2024-04-23 04:44:00 +08:00
54aaeea491 sweep: remove dead code and dead tests 2024-04-23 04:44:00 +08:00
7af195768a Merge pull request #8667 from lightningnetwork/elle-new-sweeper
Merge new sweeper branch to master
2024-04-22 11:20:49 -07:00
73fd389e9a Merge pull request #8627 from feelancer21/inbound-fees-reject
lnrpc: rejects positive inbound fees by default
2024-04-22 01:56:02 -06:00