-
Notifications
You must be signed in to change notification settings - Fork 386
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
Stop persisting background shutdown monitor updates #2287
Stop persisting background shutdown monitor updates #2287
Conversation
In d481008 we added logic to apply `ChannelMonitorUpdate`s which were a part of a channel closure async via a background queue to address some startup issues. When we did that we persisted those updates to ensure we replayed them when starting next time. However, there was no reason to - if we persisted and then restarted even without those monitor updates we'd find a monitor without a channel, which we'd tell to broadcast the latest commitment transaction to force-close. Since adding that logic, we've used the same background queue for several purposes.
This makes much clearer at sites generating such events that they will be lost on restart, to reduce risk of bugs creeping in due to lost monitor updates.
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #2287 +/- ##
==========================================
- Coverage 90.94% 90.94% -0.01%
==========================================
Files 104 104
Lines 52760 52750 -10
Branches 52760 52750 -10
==========================================
- Hits 47983 47971 -12
- Misses 4777 4779 +2
☔ View full report in Codecov by Sentry. |
/// Handle a ChannelMonitorUpdate that closes a channel, broadcasting its current latest holder | ||
/// commitment transaction. | ||
ClosingMonitorUpdate((OutPoint, ChannelMonitorUpdate)), | ||
/// Handle a ChannelMonitorUpdate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
/// Handle a ChannelMonitorUpdate | |
/// Handle a ChannelMonitorUpdate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Twice? I can only fix it once, tho :)
Will fix the missing . in #2167. |
In d481008 we added logic to apply
ChannelMonitorUpdate
s whichwere a part of a channel closure async via a background queue to
address some startup issues. When we did that we persisted those
updates to ensure we replayed them when starting next time.
However, there was no reason to - if we persisted and then
restarted even without those monitor updates we'd find a monitor
without a channel, which we'd tell to broadcast the latest
commitment transaction to force-close.
Since adding that logic, we've used the same background queue for
several purposes.
Pointed out (indirectly) by @wpaulino at #2167 (comment)