diff --git a/cpp/src/barretenberg/plonk/proof_system/verification_key/verification_key.hpp b/cpp/src/barretenberg/plonk/proof_system/verification_key/verification_key.hpp index 07fd32c044..0668c23d35 100644 --- a/cpp/src/barretenberg/plonk/proof_system/verification_key/verification_key.hpp +++ b/cpp/src/barretenberg/plonk/proof_system/verification_key/verification_key.hpp @@ -1,5 +1,6 @@ #pragma once #include +#include "barretenberg/common/streams.hpp" #include "barretenberg/srs/reference_string/reference_string.hpp" #include "barretenberg/srs/reference_string/env_reference_string.hpp" #include "barretenberg/ecc/curves/bn254/fr.hpp" @@ -113,4 +114,15 @@ template inline void write(B& buf, verification_key const& key) write(buf, key.recursive_proof_public_input_indices); } +inline std::ostream& operator<<(std::ostream& os, verification_key const& key) +{ + return os + << "key.composer_type: " << key.composer_type << "\n" + << "key.circuit_size: " << static_cast(key.circuit_size) << "\n" + << "key.num_public_inputs: " << static_cast(key.num_public_inputs) << "\n" + << "key.commitments: " << key.commitments << "\n" + << "key.contains_recursive_proof: " << key.contains_recursive_proof << "\n" + << "key.recursive_proof_public_input_indices: " << key.recursive_proof_public_input_indices << "\n"; +}; + } // namespace proof_system::plonk diff --git a/cpp/src/barretenberg/stdlib/hash/blake3s/blake3s.test.cpp b/cpp/src/barretenberg/stdlib/hash/blake3s/blake3s.test.cpp index 583bd87db4..bda929ee23 100644 --- a/cpp/src/barretenberg/stdlib/hash/blake3s/blake3s.test.cpp +++ b/cpp/src/barretenberg/stdlib/hash/blake3s/blake3s.test.cpp @@ -1,6 +1,7 @@ #include "blake3s.hpp" #include "blake3s_plookup.hpp" #include "barretenberg/crypto/blake3s/blake3s.hpp" +#include "barretenberg/common/streams.hpp" #include #include "barretenberg/plonk/composer/turbo_composer.hpp" #include "barretenberg/plonk/composer/ultra_composer.hpp" @@ -14,18 +15,6 @@ typedef stdlib::byte_array byte_array_plookup; typedef stdlib::public_witness_t public_witness_t; typedef stdlib::public_witness_t public_witness_t_plookup; -namespace std { -inline std::ostream& operator<<(std::ostream& os, std::vector const& t) -{ - os << "[ "; - for (auto e : t) { - os << std::setfill('0') << std::hex << std::setw(2) << (int)e << " "; - } - os << "]"; - return os; -} -} // namespace std - TEST(stdlib_blake3s, test_single_block) { Composer composer = Composer(); diff --git a/cpp/src/barretenberg/stdlib/hash/keccak/keccak.test.cpp b/cpp/src/barretenberg/stdlib/hash/keccak/keccak.test.cpp index 589d14dd0e..62f54e5283 100644 --- a/cpp/src/barretenberg/stdlib/hash/keccak/keccak.test.cpp +++ b/cpp/src/barretenberg/stdlib/hash/keccak/keccak.test.cpp @@ -18,18 +18,6 @@ namespace { auto& engine = numeric::random::get_debug_engine(); } -namespace std { -inline std::ostream& operator<<(std::ostream& os, std::vector const& t) -{ - os << "[ "; - for (auto e : t) { - os << std::setfill('0') << std::hex << std::setw(2) << (int)e << " "; - } - os << "]"; - return os; -} -} // namespace std - TEST(stdlib_keccak, keccak_format_input_table) { Composer composer = Composer();