-
Notifications
You must be signed in to change notification settings - Fork 0
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
Switch dependencies to accelerated versions #1
base: risczero
Are you sure you want to change the base?
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.
Left a few suggestions. Overall, this is small patch and we can definitely do this. Is there a reason to use sha2
at v0.10.8
instead of v0.9.9
?
Another note. I've been calling the branch risczero
instead of risc0
. I'd re-target this just to be consistent.
Cargo.toml
Outdated
[patch.crates-io] | ||
sha2 = { git = "https://github.com/risc0/RustCrypto-hashes", tag = "sha2-v0.10.8-risczero.0" } | ||
|
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 at cargo tree -i -p sha2
it looks like ed25519-zebra
uses v0.9.9
. As a result, I don't think this patch would effect it. We should also try to avoid having two versions of sha2 from being used in the tree. Using v0.9.9 above would help with that.
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.
Sidenote: we should really have a tool that can tell devs whether or not the patches are being used. We could probably base it on cargo tree
, to check that no unaccelerated versions of sha2
, k256
, or curve25519-dalek
appear in the tree 🤔
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.
So that dep is just used for tests, which is why I figured it was fine to leave as is. Let me know if you think otherwise!
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.
Ah, indeed! I'd go ahead and leave out the patch entirely then and let the tests use the software implementation.
[patch.crates-io] | |
sha2 = { git = "https://github.com/risc0/RustCrypto-hashes", tag = "sha2-v0.10.8-risczero.0" } |
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.
So it works fine with this, but should be fine to remove this patch (I think it gets ignored anyway in upstream usages)
I also pushed the version tags from the upstream repo so that we have them here as well. |
So the reason was is that the non
I'll do that now! |
It looks like |
Addr in dms, the downstream deps of the non |
Co-authored-by: Victor Graf <victor@subgraf.dev>
Some additions I think might be helpful, notably: - Update `k256` to use tagged release - Puts acceleration in table with example usages of each - noting this could include risc0/ed25519-consensus#1 if we decide to tag those changes (currently used in blobstream0) - Documentation around the nuances of updating to patch (as there are many footguns) - Updates old patch tags to use the consistent `-risczero.X` format Pointing at #2639
risc0 branch created at the 2.1.0 tag