Skip to content

Commit

Permalink
Revert TLV type change for original_funding_outpoint
Browse files Browse the repository at this point in the history
The (de)serialisation for `ChannelTransactionParameters` changed
between 0.0.114 and 0.0.116. This type had already been modified by us
when adding the `original_funding_outpoint` field. When first
introduced, we chose a type value of 14.

After the update, we chose to reduce it down to 12 since the type 12
was no longer being used after changes between 0.0.114 and 0.0.116.
Unfortunately, this unnecessarily broke channels created before the
update.

Eventually we will need to settle on a way to handle these possible
conflicts with upstream. Tibo already suggested a few options:

- Use much larger numbers for `rust-dlc` custom fields.
- Move LDK values around as we rebase on top of new changes.
- Add a subdomain for `rust-dlc` custom fields.
  • Loading branch information
luckysori authored and Tibo-lg committed Nov 8, 2023
1 parent 37a2e5f commit 43a472c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lightning/src/ln/chan_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ impl Writeable for ChannelTransactionParameters {
(8, self.funding_outpoint, option),
(10, legacy_deserialization_prevention_marker, option),
(11, self.channel_type_features, required),
(12, self.original_funding_outpoint, option),
(14, self.original_funding_outpoint, option),
});
Ok(())
}
Expand All @@ -962,7 +962,7 @@ impl Readable for ChannelTransactionParameters {
(8, funding_outpoint, option),
(10, _legacy_deserialization_prevention_marker, option),
(11, channel_type_features, option),
(12, original_funding_outpoint, option),
(14, original_funding_outpoint, option),
});

let mut additional_features = ChannelTypeFeatures::empty();
Expand Down

0 comments on commit 43a472c

Please sign in to comment.