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

test(avm): Enable AVM unit tests in CI #3463

Merged
merged 2 commits into from
Nov 29, 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
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