Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: throw -> throw_or_abort in sol gen #388

Merged
merged 4 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ template <typename OuterComposer> class RecursiveCircuit {
}
auto native_result = native_verifier.verify_proof(recursive_proof);
if (native_result == false) {
throw std::runtime_error("Native verification failed");
throw_or_abort("Native verification failed");
}
}

Expand Down Expand Up @@ -122,13 +122,13 @@ template <typename OuterComposer> class RecursiveCircuit {
P, circuit_output.verification_key->reference_string->get_precomputed_g2_lines(), 2);

if (inner_proof_result != barretenberg::fq12::one()) {
throw std::runtime_error("inner proof result != 1");
throw_or_abort("inner proof result != 1");
}

circuit_output.aggregation_state.add_proof_outputs_as_public_inputs();

if (outer_composer.failed()) {
throw std::runtime_error("outer composer failed");
throw_or_abort("outer composer failed");
}

return outer_composer;
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/barretenberg/solidity_helpers/proof_gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ template <typename Composer, typename Circuit> void generate_proof(std::string s
auto verifier = composer.create_ultra_with_keccak_verifier();

if (!verifier.verify_proof(proof)) {
throw std::runtime_error("Verification failed");
throw_or_abort("Verification failed");
}

std::string proof_bytes = bytes_to_hex_string(proof.proof_data);
Expand Down