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

Persist rescan progress. #4425

Merged
merged 1 commit into from Apr 14, 2021

Conversation

roeierez
Copy link
Contributor

This PR follows up to neutrino PR: lightninglabs/neutrino#198 and handles the use case where
old channels unable to finish their re-scan on mobile devices waisting lots of bandwidth on every restart.
While there is a mechanism of "SpendHint" cache to persist the rescan progress, it is only get updated at the end of the process.
This PR adds additional updates along the way in a similar way to how btcwallet does for the initial rescan.

@roeierez roeierez force-pushed the persist-rescan-progress branch 3 times, most recently from c920e38 to cbd8fa8 Compare June 30, 2020 15:31
@Roasbeef Roasbeef added database Related to the database/storage of LND enhancement Improvements to existing features / behaviour neutrino Lightweight neutrino backend-type labels Jul 1, 2020
@halseth halseth self-requested a review July 15, 2020 12:36
chainntnfs/neutrinonotify/neutrino.go Outdated Show resolved Hide resolved
chainntnfs/neutrinonotify/neutrino.go Outdated Show resolved Hide resolved
@Roasbeef
Copy link
Member

Still relevant?

@Roasbeef Roasbeef added the P1 MUST be fixed or reviewed label Jan 28, 2021
@Roasbeef Roasbeef added this to the 0.13.0 milestone Jan 28, 2021
@Roasbeef Roasbeef added this to In progress in v0.13.0-beta via automation Jan 28, 2021
@Roasbeef Roasbeef moved this from In progress to Blocked in v0.13.0-beta Jan 28, 2021
@halseth
Copy link
Contributor

halseth commented Feb 25, 2021

ping @roeierez

@Roasbeef
Copy link
Member

Roasbeef commented Mar 5, 2021

IIRC @cfromknecht we were hesitant to include this due to some spooky interaction at a distance w.r.t the spend hints themselves? The functionality is already in neutrino, and this PR would just make that useable for lnd users.

@Roasbeef
Copy link
Member

@cfromknecht ping

@Roasbeef
Copy link
Member

@roeierez do you have the bandwidth to revive this PR? I take it Breez is already running this in production, correct?

@roeierez
Copy link
Contributor Author

@roeierez do you have the bandwidth to revive this PR? I take it Breez is already running this in production, correct?

@Roasbeef I believe I have now. We run this PR in Production within Breez mobile since it was opened.

Adding persistency to neutrino re-scan progress. In case the re-scan
failed in the middle or the node was restarted before the re-scan
has been completed this fix will start from the last point instead
of the beginning.
On long re-scan , such as old channels on mobile devices this is
crucial.
@roeierez
Copy link
Contributor Author

Rebased.

Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

LGTM 🥟

@Roasbeef Roasbeef requested a review from halseth March 31, 2021 20:24
@Roasbeef Roasbeef enabled auto-merge April 11, 2021 23:43
@Roasbeef Roasbeef moved this from Blocked to Reviewer approved in v0.13.0-beta Apr 11, 2021
@Roasbeef
Copy link
Member

ping @halseth

Copy link
Contributor

@halseth halseth left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Roasbeef Roasbeef disabled auto-merge April 14, 2021 19:43
@Roasbeef Roasbeef merged commit 70b7c35 into lightningnetwork:master Apr 14, 2021
v0.13.0-beta automation moved this from Reviewer approved to Done Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Related to the database/storage of LND enhancement Improvements to existing features / behaviour neutrino Lightweight neutrino backend-type P1 MUST be fixed or reviewed v0.13
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants