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

Load persisted rust-dlc ChainMonitor whenever possible #1551

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

luckysori
Copy link
Contributor

Fixes #1547.

If we cannot load it because the deserialisation fails, we introduce a workaround that ensures that we can overwrite it and move on with the DlcManager initialisation.

This is generally not safe, but it unblocks us for the time being. We should nevertheless remove the workaround as soon as most users have updated to this patch.

@luckysori luckysori requested review from bonomat and holzeis November 3, 2023 08:39
@luckysori luckysori self-assigned this Nov 3, 2023
Copy link
Contributor

@holzeis holzeis left a comment

Choose a reason for hiding this comment

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

LGTM 👍

// FIXME: We need to do this to ensure that we can upgrade `Node`s from LDK 0.0.114 to 0.0.116.
// We should remove this workaround as soon as possible.
if let Err(e) = storage.get_chain_monitor() {
tracing::error!("Failed to load DLC ChainMonitor from storage: {e:#}");
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 shouldn't this rather be a warning, since we are able to recover from it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want to be scared every time we see this message, because we really should remove the workaround ASAP.

@luckysori luckysori force-pushed the chore/upgrade-to-rust-lightning-116 branch 2 times, most recently from 8ef9415 to 247a892 Compare November 3, 2023 11:07
@luckysori luckysori force-pushed the fix/load-persisted-dlc-chain-monitor branch from 9efb91e to 83c7e7c Compare November 3, 2023 11:09

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
If we cannnot load it because the deserialisation fails, we introduce
a workaround that ensures that we can overwrite it and move on with
the `DlcManager` initialisation.

This is generally not safe, but it unblocks us for the time being. We
should nevertheless remove the workaround as soon as most users have
updated to this patch.
@luckysori luckysori force-pushed the fix/load-persisted-dlc-chain-monitor branch from 83c7e7c to a94abfa Compare November 3, 2023 11:30
Base automatically changed from chore/upgrade-to-rust-lightning-116 to main November 3, 2023 11:57
@luckysori luckysori added this pull request to the merge queue Nov 3, 2023
Merged via the queue into main with commit 118f472 Nov 3, 2023
@luckysori luckysori deleted the fix/load-persisted-dlc-chain-monitor branch November 3, 2023 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants