Skip to content

Commit

Permalink
Merge e22ae09 into 5c32747
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanmon authored Nov 29, 2024
2 parents 5c32747 + e22ae09 commit 32166b9
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

0 comments on commit 32166b9

Please sign in to comment.