mirror of https://github.com/zcash/halo2.git
No-ops on best_multiexp and best_fft when #[cfg(feature=counter)]
Co-authored-by: Andrija <akinovak@gmail.com>
This commit is contained in:
parent
6a8f28ce31
commit
1ab16c319a
|
@ -165,6 +165,8 @@ pub fn best_multiexp<C: CurveAffine>(coeffs: &[C::Scalar], bases: &[C]) -> C::Cu
|
||||||
.entry(coeffs.len())
|
.entry(coeffs.len())
|
||||||
.and_modify(|cnt| *cnt += 1)
|
.and_modify(|cnt| *cnt += 1)
|
||||||
.or_insert(1);
|
.or_insert(1);
|
||||||
|
|
||||||
|
return C::Curve::generator();
|
||||||
}
|
}
|
||||||
|
|
||||||
assert_eq!(coeffs.len(), bases.len());
|
assert_eq!(coeffs.len(), bases.len());
|
||||||
|
@ -215,6 +217,8 @@ pub fn best_fft<Scalar: Field, G: FftGroup<Scalar>>(a: &mut [G], omega: Scalar,
|
||||||
.entry(a.len())
|
.entry(a.len())
|
||||||
.and_modify(|cnt| *cnt += 1)
|
.and_modify(|cnt| *cnt += 1)
|
||||||
.or_insert(1);
|
.or_insert(1);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn bitreverse(mut n: usize, l: usize) -> usize {
|
fn bitreverse(mut n: usize, l: usize) -> usize {
|
||||||
|
|
|
@ -210,6 +210,7 @@ where
|
||||||
_marker: std::marker::PhantomData,
|
_marker: std::marker::PhantomData,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(not(feature = "counter"))]
|
||||||
// Synthesize the circuit to obtain URS
|
// Synthesize the circuit to obtain URS
|
||||||
ConcreteCircuit::FloorPlanner::synthesize(
|
ConcreteCircuit::FloorPlanner::synthesize(
|
||||||
&mut assembly,
|
&mut assembly,
|
||||||
|
@ -271,6 +272,7 @@ where
|
||||||
_marker: std::marker::PhantomData,
|
_marker: std::marker::PhantomData,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(not(feature = "counter"))]
|
||||||
// Synthesize the circuit to obtain URS
|
// Synthesize the circuit to obtain URS
|
||||||
ConcreteCircuit::FloorPlanner::synthesize(
|
ConcreteCircuit::FloorPlanner::synthesize(
|
||||||
&mut assembly,
|
&mut assembly,
|
||||||
|
|
|
@ -290,6 +290,7 @@ pub fn create_proof<
|
||||||
_marker: std::marker::PhantomData,
|
_marker: std::marker::PhantomData,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(not(feature = "counter"))]
|
||||||
// Synthesize the circuit to obtain the witness and other information.
|
// Synthesize the circuit to obtain the witness and other information.
|
||||||
ConcreteCircuit::FloorPlanner::synthesize(
|
ConcreteCircuit::FloorPlanner::synthesize(
|
||||||
&mut witness,
|
&mut witness,
|
||||||
|
@ -741,6 +742,8 @@ pub fn create_proof<
|
||||||
// reset counters at the end of the proving
|
// reset counters at the end of the proving
|
||||||
*MSM_COUNTER.lock().unwrap() = BTreeMap::new();
|
*MSM_COUNTER.lock().unwrap() = BTreeMap::new();
|
||||||
*FFT_COUNTER.lock().unwrap() = BTreeMap::new();
|
*FFT_COUNTER.lock().unwrap() = BTreeMap::new();
|
||||||
|
|
||||||
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
multiopen::create_proof(params, rng, transcript, instances).map_err(|_| Error::Opening)
|
multiopen::create_proof(params, rng, transcript, instances).map_err(|_| Error::Opening)
|
||||||
|
|
Loading…
Reference in New Issue