Skip to content

Commit

Permalink
avoid calls to pp.digest in prove methods
Browse files Browse the repository at this point in the history
  • Loading branch information
srinathsetty committed May 3, 2024
1 parent 9d0edf2 commit 53af1d3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ where
return Err(NovaError::InvalidStepCircuitIO);
}

Ok(PublicParams {
let pp = PublicParams {
F_arity_primary,
F_arity_secondary,
ro_consts_primary,
Expand All @@ -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.
Expand Down

0 comments on commit 53af1d3

Please sign in to comment.