Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
nulltea committed Sep 21, 2023
1 parent abb736e commit 2f4ee62
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 234 deletions.
230 changes: 0 additions & 230 deletions lightclient-circuits/config/aggregation.json

This file was deleted.

6 changes: 4 additions & 2 deletions lightclient-circuits/src/aggregation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl AppCircuit for AggregationCircuit {
snark: &Self::Witness,
) -> Result<impl crate::util::PinnableCircuit<Fr>, halo2_proofs::plonk::Error> {
let lookup_bits = params.k() as usize - 1;
let circuit = AggregationCircuit::new::<SHPLONK>(
let mut circuit = AggregationCircuit::new::<SHPLONK>(
stage,
pinning.map(|p| p.break_points),
lookup_bits,
Expand All @@ -49,7 +49,9 @@ impl AppCircuit for AggregationCircuit {
);

match stage {
CircuitBuilderStage::Prover => {}
CircuitBuilderStage::Prover => {
circuit.expose_previous_instances(false);
}
_ => {
circuit.config(params.k(), Some(10));
set_var("LOOKUP_BITS", lookup_bits.to_string());
Expand Down
7 changes: 5 additions & 2 deletions lightclient-circuits/src/committee_update_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,12 @@ mod tests {
.unwrap();

// TODO: Figure out what the first 12 elements of the instances are.
let instances = agg_circuit.instance();
let instances = agg_circuit.instances();
let num_instances = agg_circuit.num_instance();

println!("num_instances: {:?}", num_instances);
println!("instances: {:?}", instances);

let proof = gen_evm_proof_shplonk(&params, &pk, agg_circuit, instances.clone());
println!("proof size: {}", proof.len());
let deployment_code = AggregationCircuit::gen_evm_verifier_shplonk(
Expand All @@ -407,6 +410,6 @@ mod tests {
)
.unwrap();
println!("deployment_code size: {}", deployment_code.len());
evm_verify(deployment_code, vec![instances], proof);
evm_verify(deployment_code, instances, proof);
}
}

0 comments on commit 2f4ee62

Please sign in to comment.