Skip to content

Commit

Permalink
Add cout for verification_key struct (#295)
Browse files Browse the repository at this point in the history
* Cout for verification key struct

* Try fix build
  • Loading branch information
spalladino authored and codygunton committed Apr 6, 2023
1 parent 98a0d80 commit fa617dc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once
#include <map>
#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"
Expand Down Expand Up @@ -113,4 +114,15 @@ template <typename B> 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<uint32_t>(key.circuit_size) << "\n"
<< "key.num_public_inputs: " << static_cast<uint32_t>(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
13 changes: 1 addition & 12 deletions cpp/src/barretenberg/stdlib/hash/blake3s/blake3s.test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "blake3s.hpp"
#include "blake3s_plookup.hpp"
#include "barretenberg/crypto/blake3s/blake3s.hpp"
#include "barretenberg/common/streams.hpp"
#include <gtest/gtest.h>
#include "barretenberg/plonk/composer/turbo_composer.hpp"
#include "barretenberg/plonk/composer/ultra_composer.hpp"
Expand All @@ -14,18 +15,6 @@ typedef stdlib::byte_array<plonk::UltraComposer> byte_array_plookup;
typedef stdlib::public_witness_t<Composer> public_witness_t;
typedef stdlib::public_witness_t<plonk::UltraComposer> public_witness_t_plookup;

namespace std {
inline std::ostream& operator<<(std::ostream& os, std::vector<uint8_t> 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();
Expand Down
12 changes: 0 additions & 12 deletions cpp/src/barretenberg/stdlib/hash/keccak/keccak.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ namespace {
auto& engine = numeric::random::get_debug_engine();
}

namespace std {
inline std::ostream& operator<<(std::ostream& os, std::vector<uint8_t> 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();
Expand Down

0 comments on commit fa617dc

Please sign in to comment.