Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions crates/nargo/src/cli/prove_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,22 @@ pub fn solve_witness<P: AsRef<Path>>(

let backend = crate::backends::ConcreteBackend;
let solver_res = backend.solve(&mut solved_witness, compiled_program.circuit.gates.clone());
// (over)writes verifier.toml
export_public_inputs(rv, &solved_witness, &witness_map, abi, &program_dir)
.map_err(CliError::from)?;

match solver_res {
GateResolution::UnsupportedOpcode(opcode) => return Err(CliError::Generic(format!(
GateResolution::UnsupportedOpcode(opcode) => return Err(CliError::Generic(format!(
"backend does not currently support the {} opcode. ACVM does not currently fall back to arithmetic gates.",
opcode
))),
GateResolution::UnsatisfiedConstrain => return Err(CliError::Generic(
))),
GateResolution::UnsatisfiedConstrain => return Err(CliError::Generic(
"could not satisfy all constraints".to_string()
)),
GateResolution::Resolved => (),
_ => unreachable!(),
}
)),
GateResolution::Resolved => (),
_ => unreachable!(),
}

// (over)writes verifier.toml
export_public_inputs(rv, &solved_witness, &witness_map, abi, &program_dir)
.map_err(CliError::from)?;

Ok(solved_witness)
}
Expand Down