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

chore(bb): minor fixes #11557

Merged
merged 1 commit into from
Jan 28, 2025
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
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
Loading