Skip to content

Commit

Permalink
add print warning msg for light-test in DeciderEthCircuit
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaucube committed Apr 14, 2024
1 parent 0f43dae commit 3d2ea64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions folding-schemes/src/folding/nova/decider_eth_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,9 @@ where
.hash(&crh_params, i.clone(), z_0.clone(), z_i.clone())?;
(u_i.x[0]).enforce_equal(&u_i_x)?;

#[cfg(feature = "light-test")]
println!("[WARNING]: Running with the 'light-test' feature, skipping the big part of the DeciderEthCircuit. Only for testing purposes.");

// The following two checks (and their respective allocations) are disabled for normal
// tests since they take several millions of constraints and would take several minutes
// (and RAM) to run the test. It is active by default, and not active only when
Expand Down
9 changes: 7 additions & 2 deletions solidity-verifiers/src/verifiers/nova_cyclefold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,14 @@ mod tests {
}

let rng = rand::rngs::OsRng;
let start = Instant::now();
let proof = DECIDERETH_FCircuit::prove(
(g16_pk, fs_prover_params.cs_params.clone()),
rng,
nova.clone(),
)
.unwrap();
println!("generated Decider proof: {:?}", start.elapsed());

let verified = DECIDERETH_FCircuit::<FC>::verify(
(g16_vk.clone(), kzg_vk.clone()),
Expand Down Expand Up @@ -413,7 +415,7 @@ mod tests {
let mut rng = rand::rngs::OsRng;
let start = Instant::now();
let (fs_prover_params, kzg_vk) = init_test_prover_params::<FC>();
println!("generated Nova params: {:?}", start.elapsed());
println!("generated Nova folding params: {:?}", start.elapsed());
let f_circuit = FC::new(());

pub type NOVA_FCircuit<FC> =
Expand All @@ -429,7 +431,10 @@ mod tests {
let start = Instant::now();
let (g16_pk, g16_vk) =
Groth16::<Bn254>::circuit_specific_setup(decider_circuit.clone(), &mut rng).unwrap();
println!("generated G16 (Decider) params: {:?}", start.elapsed());
println!(
"generated G16 (Decider circuit) params: {:?}",
start.elapsed()
);
(fs_prover_params, kzg_vk, g16_pk, g16_vk)
}
}

0 comments on commit 3d2ea64

Please sign in to comment.