From 53af1d39a83a39fe693d160de18c6cf808784822 Mon Sep 17 00:00:00 2001 From: Srinath Setty Date: Fri, 3 May 2024 16:57:28 -0700 Subject: [PATCH] avoid calls to pp.digest in prove methods --- src/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a999f127..0d6c3dc7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -185,7 +185,7 @@ where return Err(NovaError::InvalidStepCircuitIO); } - Ok(PublicParams { + let pp = PublicParams { F_arity_primary, F_arity_secondary, ro_consts_primary, @@ -200,7 +200,12 @@ where augmented_circuit_params_secondary, digest: OnceCell::new(), _p: Default::default(), - }) + }; + + // call pp.digest() so the digest is computed here rather than in RecursiveSNARK methods + let _ = pp.digest(); + + Ok(pp) } /// Retrieve the digest of the public parameters.