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.
Is this intended? Without other context, it seems like this is bad.
There was a problem hiding this comment.
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.
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.
…quirement (#3634) This PR updates our supported precompile patches. It: * Updates the docs and examples to reflect precompile versions we already released, but did not document. * Updates the docs to include new precompile versions, to be released shortly (see below) * Removes the build-time check for the RISC0_FEATURE_bigint2 env var which was used when bigint2 required the `unstable` feature flag. * Removes the information about stability from the docs, as all listed precompile patches no longer require unstable (on `main`). This PR is follow-up to the release of `rsa` and `blst` patch versions in the following PRs: 1. risc0/RustCrypto-RSA#8 2. risc0/blst#14 --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.