-
Notifications
You must be signed in to change notification settings - Fork 80
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
Periodically archive fully resolved channel monitors #307
Merged
tnull
merged 4 commits into
lightningdevkit:main
from
tnull:2024-06-archive-fully-resolved-monitors
Jun 14, 2024
Merged
Periodically archive fully resolved channel monitors #307
tnull
merged 4 commits into
lightningdevkit:main
from
tnull:2024-06-archive-fully-resolved-monitors
Jun 14, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tnull
force-pushed
the
2024-06-archive-fully-resolved-monitors
branch
2 times, most recently
from
June 11, 2024 10:35
e04aaa8
to
2daeb98
Compare
jbesraa
reviewed
Jun 11, 2024
tnull
force-pushed
the
2024-06-archive-fully-resolved-monitors
branch
3 times, most recently
from
June 11, 2024 11:04
a81cff5
to
27623e0
Compare
jbesraa
approved these changes
Jun 11, 2024
Previously, LDK was very conservative and kept channel monitors around ~forever or until the user manually decided to prune them. Recently it introduced the `ChainMonitor::archive_fully_resolved_monitors` method, which we now call periodically: every time a wallet sync succeeds, we check whether the latest archival height is 6 blocks in the past and call `archive_fully_resolved_monitors`. As this is not permanently persisted, we will always try to archive any pruned monitors when the first background sync after fresh initialization succeeds, ensuring we call it regularly also on short-lived sessions, e.g, on mobile.
... which we previously omitted.
.. which we previously omitted.
tnull
force-pushed
the
2024-06-archive-fully-resolved-monitors
branch
from
June 11, 2024 18:55
27623e0
to
accd3c8
Compare
Rebased to resolve minor conflict after #141 landed. |
G8XSU
reviewed
Jun 11, 2024
G8XSU
approved these changes
Jun 13, 2024
Lgtm!, |
This was referenced Jun 14, 2024
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #300.
Previously, LDK was very conservative and kept channel monitors around ~forever or until the user manually decided to prune them. Recently it introduced the
ChainMonitor::archive_fully_resolved_monitors
method, which we now call periodically: every time a wallet sync succeeds, we check whether the latest archival height is 6 blocks in the past andcall
archive_fully_resolved_monitors
.As this is not permanently persisted, we will always try to archive any pruned monitors when the first background sync after fresh initialization succeeds, ensuring we call it regularly also on
short-lived sessions, e.g, on mobile.
In the second and third commit, we fix previous omissions of
sync_wallets
: we now update the timestamps read byNodeStatus
and also have it update the fee rate cache.