Skip to content

Commit

Permalink
chore(avm): do not use commit_sparse (#11447)
Browse files Browse the repository at this point in the history
Experiments in vm1 showed that we are at 90% median column fullness. I'm switching us to use the normal `commit` method which makes sense now that we are using tight polynomials (with virtual size). We could later use `commit` or `commit_sparse` depending on the runtime sparcity of a column (which we know), see: https://github.com/AztecProtocol/aztec-packages/blob/master/barretenberg/cpp/src/barretenberg/vm2/constraining/README.md

For now we use `commit` since the performance is almost the same for our current situation but the memory footprint is lower.
  • Loading branch information
fcarreiro authored Jan 23, 2025
1 parent cd9cad9 commit 9796e1e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void AvmProver::execute_wire_commitments_round()
auto wire_polys = prover_polynomials.get_wires();
auto labels = commitment_labels.get_wires();
for (size_t idx = 0; idx < wire_polys.size(); ++idx) {
transcript->send_to_verifier(labels[idx], commitment_key->commit_sparse(wire_polys[idx]));
transcript->send_to_verifier(labels[idx], commitment_key->commit(wire_polys[idx]));
}
}

Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/src/barretenberg/vm2/generated/prover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void AvmProver::execute_wire_commitments_round()
auto wire_polys = prover_polynomials.get_wires();
auto labels = commitment_labels.get_wires();
for (size_t idx = 0; idx < wire_polys.size(); ++idx) {
transcript->send_to_verifier(labels[idx], commitment_key->commit_sparse(wire_polys[idx]));
transcript->send_to_verifier(labels[idx], commitment_key->commit(wire_polys[idx]));
}
}

Expand Down
2 changes: 1 addition & 1 deletion bb-pilcom/bb-pil-backend/templates/prover.cpp.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void AvmProver::execute_wire_commitments_round()
auto wire_polys = prover_polynomials.get_wires();
auto labels = commitment_labels.get_wires();
for (size_t idx = 0; idx < wire_polys.size(); ++idx) {
transcript->send_to_verifier(labels[idx], commitment_key->commit_sparse(wire_polys[idx]));
transcript->send_to_verifier(labels[idx], commitment_key->commit(wire_polys[idx]));
}
}

Expand Down

1 comment on commit 9796e1e

@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: 9796e1e Previous: 436c3c6 Ratio
wasmconstruct_proof_ultrahonk_power_of_2/20 14677.794882999999 ms/iter 13509.475802 ms/iter 1.09

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

CC: @ludamad @codygunton

Please sign in to comment.