Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
fix: initialize recursive proof output to zero (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
guipublic authored Sep 4, 2023
1 parent 448de07 commit 5453074
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions acvm/src/pwg/blackbox/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use acir::{
circuit::opcodes::{BlackBoxFuncCall, FunctionInput},
native_types::{Witness, WitnessMap},
FieldElement,
};
use blackbox_solver::{blake2s, keccak256, sha256};

use super::{OpcodeNotSolvable, OpcodeResolutionError};
use super::{insert_value, OpcodeNotSolvable, OpcodeResolutionError};
use crate::BlackBoxFunctionSolver;

mod fixed_base_scalar_mul;
Expand Down Expand Up @@ -150,6 +151,13 @@ pub(crate) fn solve(
BlackBoxFuncCall::FixedBaseScalarMul { input, outputs } => {
fixed_base_scalar_mul(backend, initial_witness, *input, *outputs)
}
BlackBoxFuncCall::RecursiveAggregation { .. } => Ok(()),
BlackBoxFuncCall::RecursiveAggregation { output_aggregation_object, .. } => {
// Solve the output of the recursive aggregation to zero to prevent missing assignment errors
// The correct value will be computed by the backend
for witness in output_aggregation_object {
insert_value(witness, FieldElement::zero(), initial_witness)?;
}
Ok(())
}
}
}

0 comments on commit 5453074

Please sign in to comment.