Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rust-lightning dependency #164

Merged

Conversation

luckysori
Copy link
Collaborator

@luckysori luckysori commented Nov 1, 2023

The backwards-compatibility problem is associated with the recent upgrade to rust-lightning:0.0.116.

@luckysori luckysori added the ln label Nov 1, 2023
@luckysori luckysori self-assigned this Nov 1, 2023
@luckysori luckysori force-pushed the fix/ldk-116-upgrade-and-channel-keys-id branch 2 times, most recently from 927ee99 to d1e08a0 Compare November 1, 2023 14:14
@luckysori luckysori changed the base branch from feature/ln-dlc-channels to chore/update-to-tip November 1, 2023 14:15
@luckysori luckysori changed the title Backwards compatibility fixes Backwards-compatibility fixes Nov 1, 2023
@luckysori luckysori force-pushed the chore/update-to-tip branch from d39cbf8 to 6be0604 Compare November 3, 2023 11:05
@luckysori luckysori force-pushed the fix/ldk-116-upgrade-and-channel-keys-id branch from d1e08a0 to 4e104b4 Compare November 3, 2023 11:05
@luckysori luckysori changed the base branch from chore/update-to-tip to feature/ln-dlc-channels November 6, 2023 01:22
@luckysori luckysori force-pushed the fix/ldk-116-upgrade-and-channel-keys-id branch from 4e104b4 to 15bb7cb Compare November 6, 2023 01:25
@luckysori
Copy link
Collaborator Author

@Tibo-lg: This PR syncs up our branch with split-tx-experiment in LDK now.

@@ -316,6 +316,11 @@ where
SubChannelState::OffChainClosed => {
s.is_offer = true;
s.update_idx -= 1;

// We do this to give older channels a chance to upgrade to the new version which
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I'm not a big fan of this. It feels hacky and error prone. I'd like to have a way to handle upgrading at de-serialization time. Not sure what the best way is to be honest, but for example LDK uses the ReadableArgs trait for when deserialization requires external data.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it was supposed to be hacky in this case.

We don't have to merge this here anyway. I will just update the PR and we can just keep depending on this patch in 10101.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you think it's time to take backward compatibility issues seriously, it's probably worth taking the time to find a proper solution (though it's also hard to say how many more breaking changes will be required to reach a stable implementation).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you on needing to figure out how to do this properly as soon as possible. But we can probably live with this quick fix for now.

@luckysori luckysori force-pushed the fix/ldk-116-upgrade-and-channel-keys-id branch from 15bb7cb to 34db518 Compare November 7, 2023 02:46
@luckysori luckysori requested a review from Tibo-lg November 7, 2023 02:46
@luckysori luckysori changed the title Backwards-compatibility fixes Backwards-compatibility fix Nov 7, 2023
Copy link
Contributor

@Tibo-lg Tibo-lg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can drop the first commit.

@@ -453,7 +453,14 @@ pub fn read_option_cb<R: ::std::io::Read, T, F>(
where
F: Fn(&mut R) -> Result<T, DecodeError>,
{
let prefix: u8 = Readable::read(reader)?;
let prefix: u8 = match Readable::read(reader) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it'd be better to have a different option type that allows the field not being present?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe! I thought this patch wouldn't be controversial, but it's fair to say that we don't need it since we dropped the other one. I'll remove this one too!

@luckysori luckysori force-pushed the fix/ldk-116-upgrade-and-channel-keys-id branch from 34db518 to 2400398 Compare November 8, 2023 04:13
@luckysori luckysori force-pushed the fix/ldk-116-upgrade-and-channel-keys-id branch from 2400398 to d335349 Compare November 20, 2023 01:36
@luckysori luckysori requested a review from Tibo-lg November 20, 2023 01:36
@Tibo-lg Tibo-lg changed the title Backwards-compatibility fix Update rust-lightning dependency Nov 20, 2023
@luckysori luckysori merged commit 0f9ce7c into feature/ln-dlc-channels Nov 20, 2023
192 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants