From 43a472c1fa5bb044a54c15ddccee42fb20ee649d Mon Sep 17 00:00:00 2001 From: Lucas Soriano del Pino Date: Wed, 1 Nov 2023 20:13:42 +1100 Subject: [PATCH] Revert TLV type change for original_funding_outpoint 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. --- lightning/src/ln/chan_utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightning/src/ln/chan_utils.rs b/lightning/src/ln/chan_utils.rs index 6f15f86f65d..ff812bbb259 100644 --- a/lightning/src/ln/chan_utils.rs +++ b/lightning/src/ln/chan_utils.rs @@ -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(()) } @@ -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();