From 1d5fb94cdbce8cd956fe9e86fda61c12f6b25b51 Mon Sep 17 00:00:00 2001 From: ljedrz Date: Mon, 1 Jul 2024 21:50:28 +0200 Subject: [PATCH] perf: don't re-synthesize credits.aleo Signed-off-by: ljedrz --- synthesizer/process/src/stack/execute.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/synthesizer/process/src/stack/execute.rs b/synthesizer/process/src/stack/execute.rs index 521619599e..66673f6130 100644 --- a/synthesizer/process/src/stack/execute.rs +++ b/synthesizer/process/src/stack/execute.rs @@ -432,8 +432,9 @@ impl StackExecute for Stack { if matches!(registers.call_stack(), CallStack::Synthesize(..)) || matches!(registers.call_stack(), CallStack::Execute(..)) { - // If the proving key does not exist, then synthesize it. - if !self.contains_proving_key(function.name()) { + // If the proving key does not exist, then synthesize it. This is not needed for `credits.aleo`. + if self.program_id() != &ProgramID::from_str("credits.aleo")? && !self.contains_proving_key(function.name()) + { // Add the circuit key to the mapping. self.synthesize_from_assignment(function.name(), &assignment)?; lap!(timer, "Synthesize the {} circuit key", function.name());