fetch values for input verification from synthesized circuit
This commit is contained in:
parent
e8409bb70b
commit
e5bc2c197f
@ -247,6 +247,14 @@ impl<E: Engine, C: Circuit<E>, S: SynthesisDriver> MultiVerifier<E, C, S> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn get_k_map(&self) -> Vec<usize> {
|
||||||
|
return self.k_map.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn get_n(&self) -> usize {
|
||||||
|
return self.n;
|
||||||
|
}
|
||||||
|
|
||||||
pub fn check_all(self) -> bool {
|
pub fn check_all(self) -> bool {
|
||||||
self.batch.check_all()
|
self.batch.check_all()
|
||||||
}
|
}
|
||||||
|
@ -622,6 +622,19 @@ fn test_inputs_into_sonic_mimc() {
|
|||||||
println!("done in {:?}", start.elapsed());
|
println!("done in {:?}", start.elapsed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
let mut verifier = MultiVerifier::<Bn256, _, Basic>::new(AdaptorCircuit(circuit.clone()), &srs).unwrap();
|
||||||
|
println!("verifying 1 proof with advice");
|
||||||
|
let start = Instant::now();
|
||||||
|
{
|
||||||
|
for _ in 0..1 {
|
||||||
|
verifier.add_proof_with_advice(&proof, &[image], &advice);
|
||||||
|
}
|
||||||
|
assert_eq!(verifier.check_all(), true); // TODO
|
||||||
|
}
|
||||||
|
println!("done in {:?}", start.elapsed());
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
let mut verifier = MultiVerifier::<Bn256, _, Basic>::new(AdaptorCircuit(circuit.clone()), &srs).unwrap();
|
let mut verifier = MultiVerifier::<Bn256, _, Basic>::new(AdaptorCircuit(circuit.clone()), &srs).unwrap();
|
||||||
println!("verifying 100 proofs with advice");
|
println!("verifying 100 proofs with advice");
|
||||||
|
Loading…
Reference in New Issue
Block a user