Skip to content

Commit

Permalink
chore(bb): minor fixes (#11557)
Browse files Browse the repository at this point in the history
No need to copy param.

No verification speed change for AVM.
  • Loading branch information
fcarreiro authored Jan 28, 2025
1 parent ff6db73 commit f77b11e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions barretenberg/cpp/src/barretenberg/bb/api_client_ivc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ acir_format::WitnessVector witness_map_to_witness_vector(std::map<std::string, s
return wv;
}

std::vector<uint8_t> decompress(uint8_t* bytes, size_t size)
std::vector<uint8_t> decompress(const void* bytes, size_t size)
{
std::vector<uint8_t> content;
// initial size guess
Expand Down Expand Up @@ -103,17 +103,13 @@ class ClientIVCAPI : public API {
}

if (input_type == "runtime_stack") {
std::vector<std::string> gzipped_bincodes;
std::vector<std::string> witness_data;
gzipped_bincodes = unpack_from_file<std::vector<std::string>>(bytecode_path);
witness_data = unpack_from_file<std::vector<std::string>>(witness_path);
std::vector<std::string> gzipped_bincodes = unpack_from_file<std::vector<std::string>>(bytecode_path);
std::vector<std::string> witness_data = unpack_from_file<std::vector<std::string>>(witness_path);
for (auto [bincode, wit] : zip_view(gzipped_bincodes, witness_data)) {
// TODO(#7371) there is a lot of copying going on in bincode, we should make sure this writes as a
// buffer in the future
std::vector<uint8_t> constraint_buf =
decompress(reinterpret_cast<uint8_t*>(bincode.data()), bincode.size()); // NOLINT
std::vector<uint8_t> witness_buf =
decompress(reinterpret_cast<uint8_t*>(wit.data()), wit.size()); // NOLINT
std::vector<uint8_t> constraint_buf = decompress(bincode.data(), bincode.size()); // NOLINT
std::vector<uint8_t> witness_buf = decompress(wit.data(), wit.size()); // NOLINT

AcirFormat constraints = circuit_buf_to_acir_format(constraint_buf, /*honk_recursion=*/0);
WitnessVector witness = witness_buf_to_witness_data(witness_buf);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ template <typename Flavor> class SumcheckVerifierRound {
* method computes the evaluation of \f$ \tilde{F} \f$ taking these values as arguments.
*
*/
FF compute_full_relation_purported_value(ClaimedEvaluations purported_evaluations,
FF compute_full_relation_purported_value(const ClaimedEvaluations& purported_evaluations,
const bb::RelationParameters<FF>& relation_parameters,
const bb::GateSeparatorPolynomial<FF>& gate_sparators,
const RelationSeparator alpha)
Expand Down

0 comments on commit f77b11e

Please sign in to comment.