-
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
Download sprout parameters in zcash_proofs #459
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
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.
@teor2345 asked me to take a look. It seems good.
I think it would improve usability to delete downloaded files on errors, so that the user won't need to manually delete them. But it's not a big deal.
Sounds like a good idea, I'll see if I can make it happen today. I was concerned we could accidentally delete files we haven't created. But now that we're handling existing and downloaded files separately, we can just do the deletes for downloaded files. |
This is fixed now. Tested using: RUSTFLAGS="--cfg always_download" cargo run --release --features=download-params --example download-sprout-and-sapling-params |
I also checked the code with clippy using: cargo clippy --all-features --no-deps --lib --examples |
This avoids confusion between sprout and sapling downloads, while maintaining backward compatibility.
This is more efficient, because TCP adjusts its transfer speed in the first ~20 seconds of each new connection.
Also return the downloaded file paths.
Also make expected and actual sizes and hashes easier to compare.
ec79b5d
to
6d75718
Compare
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.
utACK with comments/questions
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.
utACK
Co-authored-by: Kris Nuttycombe <[email protected]>
Thanks for the review, everything should be rebased and fixed now. I ran |
I forgot to test with and without features, I pushed some minor fixes. |
Codecov Report
@@ Coverage Diff @@
## main #459 +/- ##
==========================================
- Coverage 51.51% 51.11% -0.40%
==========================================
Files 91 94 +3
Lines 8500 8897 +397
==========================================
+ Hits 4379 4548 +169
- Misses 4121 4349 +228
Continue to review full report at Codecov.
|
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.
The use of constants that are not always compiled-in is blocking.
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.
utACK
Motivation
Zebra wants to use
zcash_proofs
to download both Sprout and Sapling parameters.Changes
Add sprout:
download_sprout_parameters
function.Functionality changes:
Interface changes:
download_sapling_parameters
and deprecatedownload_parameters
. This avoids confusion between sprout and sapling downloads, while maintaining backward compatibility.load_parameters
.Bug fixes:
download_params
->directories
. This makes suredownload_parameters
will work if it's the only feature specified.Tweaks: