diff --git a/crates/nargo/src/cli/prove_cmd.rs b/crates/nargo/src/cli/prove_cmd.rs index f6d68f841f8..3ba3f58dfc7 100644 --- a/crates/nargo/src/cli/prove_cmd.rs +++ b/crates/nargo/src/cli/prove_cmd.rs @@ -142,21 +142,22 @@ pub fn solve_witness>( 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) }