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

Commit

Permalink
handle unresolved brillig data when stalled correctly (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
vezenovm authored Apr 18, 2023
1 parent 1547d44 commit ea5b5db
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions acvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,13 @@ pub trait PartialWitnessGenerator {
// We push those opcodes not solvable to the back as
// it could be because the opcodes are out of order, i.e. this assignment
// relies on a later opcodes' results
unresolved_opcodes.push(match solved_oracle_data {
Some(oracle_data) => Opcode::Oracle(oracle_data),
None => opcode.clone(),
});
unresolved_opcodes.push(match solved_brillig_data {
Some(brillig) => Opcode::Brillig(brillig),
None => opcode.clone(),
})
if let Some(oracle_data) = solved_oracle_data {
unresolved_opcodes.push(Opcode::Oracle(oracle_data));
} else if let Some(brillig) = solved_brillig_data {
unresolved_opcodes.push(Opcode::Brillig(brillig));
} else {
unresolved_opcodes.push(opcode.clone());
}
}
Err(OpcodeResolutionError::OpcodeNotSolvable(_)) => {
unreachable!("ICE - Result should have been converted to GateResolution")
Expand Down

0 comments on commit ea5b5db

Please sign in to comment.