-
Notifications
You must be signed in to change notification settings - Fork 144
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
Incorrect progress bar when importing compressed snapshots #3005
Comments
Probably introduced in #2893 |
David, am I correct in remembering you wanted to remove progress bars altogether? |
@lemmih Am I correct to assume that we actually want to decompress it first and then show progress based on decompressed size? |
Nope, that would take up a lot of space. We want to process the data immediately as it is being uncompressed. The progress bar can display how much of the compressed file we've consumed. |
They should be changed to use the logging framework instead of printing terminal codes. Let's fix this bug first. |
I did not ask the question I meant to ask, the question here is: how do we come by the uncompressed file size? I'll figure this out. |
Looks like the best way is to parse zstd frame header in hopes that it stored the original file size, which is optional. |
Yeah, unfortunately this is not re-exported by |
Describe the bug
To Reproduce Steps to reproduce the behavior:
mainnet
data:forest-cli db clean
forest --encrypt-keystore false --halt-after-import --auto-download-snapshot
forest
appears to freeze after the progress bar hits 100%.(Note, the same can be observed using a calibnet snapshot, but the effect is less noticeable.)
Expected behaviour
The progress bar is configured such that 100% is the size of the compressed snapshot but, when running, it counts the decompressed bytes. Since our compression factor is roughly 2x, when the progress bar hits 100%, only about half of the compressed snapshot has been consumed.
The progress bar should show how much of the snapshot file we've consumed.
Environment (please complete the following information):
rustc --version
): rustc 1.70.0 (90c541806 2023-05-31)main
/3e06cd98709ff2ef6ec11d9e943482acc686edf8Other information and links
The text was updated successfully, but these errors were encountered: