feat: public inputs

This commit is contained in:
Daniel Tehrani
2023-07-29 16:13:48 -07:00
parent 068623edab
commit cda41a9374
12 changed files with 274 additions and 143 deletions

View File

@@ -8,13 +8,12 @@ fn shockwave_plus_bench(c: &mut Criterion) {
type F = halo2curves::secp256k1::Fp;
for exp in [12, 15, 18] {
let num_cons = 2usize.pow(exp);
let num_vars = num_cons;
let num_input = 0;
let num_vars = 2usize.pow(exp);
let num_input = 3;
let (r1cs, witness) = R1CS::<F>::produce_synthetic_r1cs(num_cons, num_vars, num_input);
let (r1cs, witness) = R1CS::<F>::produce_synthetic_r1cs(num_vars, num_input);
let mut group = c.benchmark_group(format!("ShockwavePlus num_cons: {}", num_cons));
let mut group = c.benchmark_group(format!("ShockwavePlus num_cons: {}", r1cs.num_cons));
let l = 319;
let num_rows = (((2f64 / l as f64).sqrt() * (num_vars as f64).sqrt()) as usize)
.next_power_of_two()
@@ -23,7 +22,7 @@ fn shockwave_plus_bench(c: &mut Criterion) {
group.bench_function("prove", |b| {
b.iter(|| {
let mut transcript = Transcript::new(b"bench");
ShockwavePlus.prove(&witness, &mut transcript);
ShockwavePlus.prove(&witness, &r1cs.public_input, &mut transcript);
})
});
}