Skip to content

Commit

Permalink
test(avm): Enable AVM unit tests in CI (#3463)
Browse files Browse the repository at this point in the history
Resolves #3461
  • Loading branch information
jeanmon authored Nov 29, 2023
1 parent d251703 commit 051dda9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions barretenberg/cpp/scripts/bb-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ TESTS=(
transcript_tests
translator_vm_tests
ultra_honk_tests
vm_tests
)
TESTS_STR="${TESTS[@]}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace proof_system {
*/
void log_avmMini_trace(std::vector<Row> const& trace, size_t beg, size_t end)
{
info("Built circuit with ", trace.size(), " trace");
info("Built circuit with ", trace.size(), " rows");

for (size_t i = beg; i < end; i++) {
info("================================================================================");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ TEST_F(AvmMiniTests, basic)
trace_builder.returnOP(1, 8);

auto trace = trace_builder.finalize();
proof_system::log_avmMini_trace(trace, 0, 7);
circuit_builder.set_trace(std::move(trace));

ASSERT_TRUE(circuit_builder.check_circuit());
Expand All @@ -55,6 +54,10 @@ TEST_F(AvmMiniTests, basic)
bool verified = verifier.verify_proof(proof);

ASSERT_TRUE(verified);

if (!verified) {
proof_system::log_avmMini_trace(circuit_builder.rows, 0, 10);
}
}

} // namespace example_relation_honk_composer
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,14 @@ TEST_F(FibTests, powdre2e)
auto composer = FibComposer();

bool circuit_gud = circuit_builder.check_circuit();
info("circuit gud");
ASSERT_TRUE(circuit_gud);

auto prover = composer.create_prover(circuit_builder);
auto proof = prover.construct_proof();
info(proof);

auto verifier = composer.create_verifier(circuit_builder);
bool verified = verifier.verify_proof(proof);
ASSERT_TRUE(verified);

info("We verified a proof!");
ASSERT_TRUE(verified) << proof;
}

} // namespace example_relation_honk_composer

0 comments on commit 051dda9

Please sign in to comment.