-
Notifications
You must be signed in to change notification settings - Fork 251
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
Measure scan progress from wallet birthday, not the fully scanned height #944
Conversation
Not to go into SDK 2.0 Release Candidate, at least pending my imminent phone call with Kris. |
10f1508
to
19299a1
Compare
The motivation for this change is that the current approach looks exponential, which gives the impression to users during recovery from seed or after long periods offline, of very little progress. Here are some snapshots from my mainnet node:
|
Update: Per phone call with Kris and str4d’s notes above in this PR, current implementation does not satisfy Criterion 3, because under the (probably common and important use case) that the user hasn’t let their wallet sync in months or years, it would show no visible progress for a long time (like at least minutes, potentially hours). So I’m reversing the above decision to exclude this change to progress measure for 2.0. |
19299a1
to
f56c5d8
Compare
With this PR, I see the following progress state instead (from the same wallet sync state as the last snapshot above):
|
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.
ACK f56c5d8. Output appears to be more comprehensible for the catching-up-to-chain-tip use case.
"SELECT MAX(sapling_commitment_tree_size) | ||
FROM blocks | ||
WHERE height <= :fully_scanned_height", | ||
named_params![":fully_scanned_height": u32::from(fully_scanned_height)], | ||
WHERE height <= :start_height", |
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: now that start_height = birthday_height
there's an off-by-one here, because the birthday height is one of the blocks that gets scanned, not the base block.
Non-blocking, the error in the output is minimal, and it isn't worth re-running CI.
Output 10k blocks later:
|
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.
Post-hoc ACK
No description provided.