-
Notifications
You must be signed in to change notification settings - Fork 108
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
feat(scanner): Restart scanning where left #8080
Conversation
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.
A few comments and doubts i have.
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.
Most of this looks good, but I think we need to count our keys and heights carefully. This might need some unit tests to be sure.
Let's do a video review and talk through the database reading loop?
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.
Looking good now, let me know if you want help with the height we start fetching blocks.
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.
Thanks for working through this, let's see how it goes!
Motivation
We want the scanner to have the ability of resume the scanning where it was left after a restart.
Close #8022
PR Author Checklist
Check before marking the PR as ready for review:
Solution
I am pushing for a solution that involves adding a control empty result entry to the database for each key every X blocks. This is because a very probable scenario is that the key do not have any real transaction close to sapling (all new accounts).
Testing
The functionality is tested by adding an acceptance test that needs a cache state close to tip.
Review
@teor2345 had been working with me in this.
Reviewer Checklist
Check before approving the PR:
PR blockers can be dealt with in new tickets or PRs.
And check the PR Author checklist is complete.
Follow Up Work
This PR does not include the cases of new keys/deleted keys in the config that are part of #8022
It will be done in a separated PR.