-
Notifications
You must be signed in to change notification settings - Fork 1
ZKVM-1459: Update patch to 0.3.16 #14
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
base: risc0
Are you sure you want to change the base?
Conversation
Since blst itself does not call the function in question, blst users are not affected by this problem. It only impacts the alt_bn128 field in sppark on ARM.
Shave off redundant instructions and ensure pair-loads/stores are 128-bit aligned.
It's deemed to be benign in real-life applications. Or in other words in order to trigger an actual problem one would need to explicitly implement an unusually specific test case.
ptype##_mult_w##SZ is used in blst_p[12]_unchecked_mult, where "unchecked" means that there is no expectation that input point is in-group.
Infinity points are considered incompatible with sound applications, but tend to appear in synthetic tests.
- reject empty vectors; - avoid unnecessary vector copying; Fixes supranational#261.
bindings/rust/Cargo.toml
Outdated
| [patch.crates-io] | ||
| blst = { path = "." } |
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.
Is this intended? Without other context, it seems like this is bad.
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.
Good question. I added it to address an issue that risc0-zkvm is used as a dev-dependency in the the tests that are added to this crate. risc0-zkvm transitively depends on blst, and without this patch statement running cargo test fails with the following
error: failed to select a version for `blst`.
... required by package `risc0-groth16-sys v0.1.0`
... which satisfies dependency `risc0-groth16-sys = "^0.1.0"` of package `risc0-groth16 v3.0.1`
... which satisfies dependency `risc0-groth16 = "^3.0.1"` of package `risc0-zkvm v3.0.1`
... which satisfies dependency `risc0-zkvm = "^3.0"` of package `blst v0.3.16 (/home/victor/risc0/patches/blst/bindings/rust)`
versions that meet the requirements `^0.3.15` are: 0.3.16, 0.3.15
package `blst` links to the native library `blst`, but it conflicts with a previous package which links to `blst` as well:
package `blst v0.3.16 (/home/victor/risc0/patches/blst/bindings/rust)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the `links = "blst"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.
failed to select a version for `blst` which could resolve this conflict
I'll do some more thinking and poke around to see if I can figure out another way to do this, because it does seem like a hacky solution.
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.
We don't need this anymore since I was able to get the library tests running under cargo risczero guest test. This includes a super-set of what was added as tests using a guest to wrap the test functionality. I removed those in 21045fa. Running it also shook out an alignment issue in the constants, which I address in 1ac51e3
…y miller loop test" This reverts commit 1ac51e3.
This PR merges in the upstream commits up to v0.3.16.
This PR should be merged into the
risc0branch as a rebase, preserving this constituent commits instead of squashing them. Once this is done, a tag forv0.3.16-risczero.0can be pushed as new releases of this patch.