Skip to content

Commit

Permalink
chore: Public inputs in unit tests with proving were incorrectly set (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanmon authored Nov 29, 2024
1 parent 9d70728 commit 0311bf3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ void validate_trace(std::vector<Row>&& trace,

AvmVerifier verifier = composer.create_verifier(circuit_builder);

std::vector<std::vector<FF>> public_inputs_as_vec{};
// TODO: Copy public inputs
// At the current development stage (new public inputs for whole tx), we are not handling public related inputs
// except calldata and returndata.
std::vector<std::vector<FF>> public_inputs_as_vec{ {}, {}, {}, {}, calldata, returndata };
// TODO: Copy all public inputs
// bb::avm_trace::copy_public_inputs_columns(public_inputs_with_end_gas, calldata, returndata);

bool verified = verifier.verify_proof(proof, { public_inputs_as_vec });
Expand Down
4 changes: 2 additions & 2 deletions barretenberg/cpp/src/barretenberg/vm/avm/trace/execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void show_trace_info(const auto& trace)
100 * nonzero_elements / total_elements,
"%)");
const size_t non_zero_columns = [&]() {
bool column_is_nonzero[trace.front().SIZE];
std::vector<bool> column_is_nonzero(trace.front().SIZE, false);
for (auto const& row : trace) {
const auto row_vec = row.as_vector();
for (size_t col = 0; col < row.SIZE; col++) {
Expand All @@ -134,7 +134,7 @@ void show_trace_info(const auto& trace)
}
}
}
return static_cast<size_t>(std::count(column_is_nonzero, column_is_nonzero + trace.front().SIZE, true));
return static_cast<size_t>(std::count(column_is_nonzero.begin(), column_is_nonzero.end(), true));
}();
vinfo("Number of non-zero columns: ",
non_zero_columns,
Expand Down

1 comment on commit 0311bf3

@AztecBot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.

Benchmark suite Current: 0311bf3 Previous: 10754db Ratio
wasmconstruct_proof_ultrahonk_power_of_2/20 16499.810913 ms/iter 15184.186199 ms/iter 1.09

This comment was automatically generated by workflow using github-action-benchmark.

CC: @ludamad @codygunton

Please sign in to comment.