diff --git a/src/proof/nova.rs b/src/proof/nova.rs index 231b1cf8e1..d654e5d556 100644 --- a/src/proof/nova.rs +++ b/src/proof/nova.rs @@ -14,7 +14,7 @@ use nova::{ traits::{ circuit::{StepCircuit, TrivialTestCircuit}, commitment::CommitmentEngineTrait, - Group, + Group, snark::RelaxedR1CSSNARKTrait, }, CompressedSNARK, ProverKey, RecursiveSNARK, VerifierKey, }; @@ -108,8 +108,12 @@ pub type EE1 = nova::provider::ipa_pc::EvaluationEngine>; pub type EE2 = nova::provider::ipa_pc::EvaluationEngine>; /// Type alias for the Relaxed R1CS Spartan SNARK using G1 group elements, EE1. +// NOTE: this is not a SNARK that uses computational commitments, +// that SNARK would be found at nova::spartan::ppsnark::RelaxedR1CSSNARK, pub type SS1 = nova::spartan::snark::RelaxedR1CSSNARK, EE1>; /// Type alias for the Relaxed R1CS Spartan SNARK using G2 group elements, EE2. +// NOTE: this is not a SNARK that uses computational commitments, +// that SNARK would be found at nova::spartan::ppsnark::RelaxedR1CSSNARK, pub type SS2 = nova::spartan::snark::RelaxedR1CSSNARK, EE2>; /// Type alias for a MultiFrame with S1 field elements. @@ -188,7 +192,10 @@ where { let (circuit_primary, circuit_secondary) = C1::circuits(num_iters_per_step, lang); - let pp = nova::PublicParams::setup(&circuit_primary, &circuit_secondary); + let commitment_size_hint1 = as RelaxedR1CSSNARKTrait>>::commitment_key_floor(); + let commitment_size_hint2 = as RelaxedR1CSSNARKTrait>>::commitment_key_floor(); + + let pp = nova::PublicParams::setup(&circuit_primary, &circuit_secondary, Some(commitment_size_hint1),Some(commitment_size_hint2)); let (pk, vk) = CompressedSNARK::setup(&pp).unwrap(); PublicParams { pp, pk, vk } }