Skip to content

Ignore .tmp files when loading ChannelMonitors in persister #1332

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

Merged

Conversation

TheBlueMatt
Copy link
Collaborator

If we are in the middle of persisting an update to a
ChannelMonitor when we shutdown (or crash), we'll start up with
a .tmp file lying around. We should ignore it, as failure to
return from the update call should have prevented the
ChannelManager from taking any irrevocable action based on the
update.

We're somewhat protected from any filesystem inconsistency behavior
as the ChannelManager will refuse to load if we're outright
missing ChannelMonitors.

Fixes #1330.

@TheBlueMatt TheBlueMatt added this to the 0.0.105 milestone Feb 23, 2022
If we are in the middle of persisting an update to a
`ChannelMonitor` when we shutdown (or crash), we'll start up with
a .tmp file lying around. We should ignore it, as failure to
return from the update call should have prevented the
`ChannelManager` from taking any irrevocable action based on the
update.

We're somewhat protected from any filesystem inconsistency behavior
as the `ChannelManager` will refuse to load if we're outright
missing `ChannelMonitor`s.

Fixes lightningdevkit#1330.
@TheBlueMatt TheBlueMatt force-pushed the 2022-02-persister-ignore-tmp branch from 6998b8f to a2a90ee Compare February 24, 2022 19:09
@TheBlueMatt
Copy link
Collaborator Author

Allowed fuzz failures until we fix the honggfuzz-rs issue.

@TheBlueMatt TheBlueMatt merged commit 78174f3 into lightningdevkit:main Feb 26, 2022
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.

lightning-persister refuses to load if we previously crashed during persistence
3 participants