Merge pull request #551 from zcash/sapling-prover-regression-mitigation
Sapling prover regression mitigation
This commit is contained in:
commit
7a1e9fd580
|
@ -8,7 +8,7 @@ and this library adheres to Rust's notion of
|
|||
## [Unreleased]
|
||||
### Changed
|
||||
- MSRV is now 1.56.1.
|
||||
- Bumped dependencies to `ff 0.12`, `group 0.12`, `bellman 0.12`,
|
||||
- Bumped dependencies to `ff 0.12`, `group 0.12`, `bellman 0.13`,
|
||||
`bls12_381 0.7`, `jubjub 0.9`.
|
||||
- `zcash_proofs::sapling::SaplingVerificationContext::new` now takes a
|
||||
`zip216_enabled` boolean; this is used to control how RedJubjub signatures are
|
||||
|
|
|
@ -15,7 +15,7 @@ edition = "2018"
|
|||
all-features = true
|
||||
|
||||
[dependencies]
|
||||
bellman = { version = "0.12", default-features = false, features = ["groth16"] }
|
||||
bellman = { version = "0.13", default-features = false, features = ["groth16"] }
|
||||
blake2b_simd = "1"
|
||||
bls12_381 = "0.7"
|
||||
byteorder = "1"
|
||||
|
@ -33,6 +33,9 @@ zcash_primitives = { version = "0.5", path = "../zcash_primitives" }
|
|||
criterion = "0.3"
|
||||
rand_xorshift = "0.3"
|
||||
|
||||
[target.'cfg(unix)'.dev-dependencies]
|
||||
pprof = { version = "0.8", features = ["criterion", "flamegraph"] } # MSRV 1.56
|
||||
|
||||
[features]
|
||||
default = ["local-prover", "multicore"]
|
||||
bundled-prover = ["wagyu-zcash-parameters"]
|
||||
|
|
|
@ -11,6 +11,9 @@ use rand_xorshift::XorShiftRng;
|
|||
use zcash_primitives::sapling::{Diversifier, ProofGenerationKey, ValueCommitment};
|
||||
use zcash_proofs::circuit::sapling::Spend;
|
||||
|
||||
#[cfg(unix)]
|
||||
use pprof::criterion::{Output, PProfProfiler};
|
||||
|
||||
const TREE_DEPTH: usize = 32;
|
||||
|
||||
fn criterion_benchmark(c: &mut Criterion) {
|
||||
|
@ -33,7 +36,7 @@ fn criterion_benchmark(c: &mut Criterion) {
|
|||
)
|
||||
.unwrap();
|
||||
|
||||
c.bench_function("sapling", |b| {
|
||||
c.bench_function("sapling-spend-prove", |b| {
|
||||
let value_commitment = ValueCommitment {
|
||||
value: 1,
|
||||
randomness: jubjub::Fr::random(&mut rng),
|
||||
|
@ -85,8 +88,18 @@ fn criterion_benchmark(c: &mut Criterion) {
|
|||
});
|
||||
}
|
||||
|
||||
criterion_group!(
|
||||
#[cfg(unix)]
|
||||
criterion_group! {
|
||||
name = benches;
|
||||
config = Criterion::default()
|
||||
.sample_size(10)
|
||||
.with_profiler(PProfProfiler::new(100, Output::Flamegraph(None)));
|
||||
targets = criterion_benchmark
|
||||
}
|
||||
#[cfg(windows)]
|
||||
criterion_group! {
|
||||
name = benches;
|
||||
config = Criterion::default().sample_size(10);
|
||||
targets = criterion_benchmark);
|
||||
targets = criterion_benchmark
|
||||
}
|
||||
criterion_main!(benches);
|
||||
|
|
Loading…
Reference in New Issue