From 0c7b5e298ef6185855710efefe1f6277ee9cdc6b Mon Sep 17 00:00:00 2001 From: Cody Gunton Date: Fri, 16 Jun 2023 11:00:52 -0400 Subject: [PATCH] fix: cleanup of include statements and dependencies (https://github.com/AztecProtocol/barretenberg/pull/527) Ensure honk does not depend on plonk anymore. Remove use of the stdlib composer headers used for forward declaration outside stdlib. Co-authored-by: maramihali , codygunton --- .../benchmark/honk_bench/honk.bench.cpp | 11 +- .../dsl/acir_format/acir_format.cpp | 1 - .../dsl/acir_format/acir_format.hpp | 1 - .../dsl/acir_format/acir_format.test.cpp | 1 - .../cpp/src/barretenberg/honk/CMakeLists.txt | 2 +- .../standard_honk_composer_helper.cpp | 1 - .../standard_honk_composer_helper.hpp | 1 - .../ultra_honk_composer_helper.hpp | 2 - .../honk/composer/standard_honk_composer.hpp | 2 - .../composer/standard_honk_composer.test.cpp | 8 +- .../honk/composer/ultra_honk_composer.hpp | 2 - .../src/barretenberg/honk/flavor/standard.hpp | 1 - .../honk/flavor/standard_grumpkin.hpp | 1 - .../src/barretenberg/honk/flavor/ultra.hpp | 1 - .../honk/flavor/ultra_grumpkin.hpp | 1 - .../src/barretenberg/honk/oracle/oracle.hpp | 274 ------------------ .../honk/pcs/commitment_key.test.hpp | 1 - .../stdlib/primitives/composers/composers.hpp | 3 - .../primitives/composers/composers_fwd.hpp | 4 +- 19 files changed, 13 insertions(+), 305 deletions(-) delete mode 100644 circuits/cpp/barretenberg/cpp/src/barretenberg/honk/oracle/oracle.hpp diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/honk.bench.cpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/honk.bench.cpp index 3df61bba907..831b7c16c1f 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/honk.bench.cpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/honk.bench.cpp @@ -1,11 +1,12 @@ #include "barretenberg/ecc/curves/bn254/fr.hpp" #include #include +#include "barretenberg/honk/composer/standard_honk_composer.hpp" #include "barretenberg/stdlib/primitives/field/field.hpp" -#include "barretenberg/stdlib/primitives/composers/composers.hpp" -#include "barretenberg/stdlib/primitives/composers/composers_fwd.hpp" +#include "barretenberg/stdlib/primitives/witness/witness.hpp" using namespace benchmark; +using namespace proof_system::plonk::stdlib; namespace standard_honk_bench { @@ -18,9 +19,9 @@ constexpr size_t NUM_REPETITIONS = 5; void generate_test_circuit(auto& composer, size_t num_gates) { - plonk::stdlib::field_t a(plonk::stdlib::witness_t(&composer, barretenberg::fr::random_element())); - plonk::stdlib::field_t b(plonk::stdlib::witness_t(&composer, barretenberg::fr::random_element())); - plonk::stdlib::field_t c(&composer); + field_t a(witness_t(&composer, barretenberg::fr::random_element())); + field_t b(witness_t(&composer, barretenberg::fr::random_element())); + field_t c(&composer); for (size_t i = 0; i < (num_gates / 4) - 4; ++i) { c = a + b; c = a * c; diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_format.cpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_format.cpp index 41374f841e1..9a7ca427671 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_format.cpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_format.cpp @@ -1,6 +1,5 @@ #include "acir_format.hpp" #include "barretenberg/common/log.hpp" -#include "barretenberg/stdlib/primitives/composers/composers.hpp" namespace acir_format { diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_format.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_format.hpp index 40bbe871e3a..6e6857d83ad 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_format.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_format.hpp @@ -13,7 +13,6 @@ #include "pedersen.hpp" #include "hash_to_field.hpp" #include "barretenberg/dsl/types.hpp" -#include "barretenberg/stdlib/primitives/composers/composers_fwd.hpp" namespace acir_format { diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_format.test.cpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_format.test.cpp index 43954df2cd9..545cab88b5f 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_format.test.cpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_format.test.cpp @@ -5,7 +5,6 @@ #include "barretenberg/common/streams.hpp" #include "barretenberg/serialize/test_helper.hpp" #include "ecdsa_secp256k1.hpp" -#include "barretenberg/stdlib/primitives/composers/composers.hpp" TEST(acir_format, test_a_single_constraint_no_pub_inputs) { diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/CMakeLists.txt b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/CMakeLists.txt index 529a54878bf..1e687ab04b8 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/CMakeLists.txt +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/CMakeLists.txt @@ -1,5 +1,5 @@ # TODO(Cody): Remove plonk dependency -barretenberg_module(honk numeric ecc srs proof_system transcript plonk) +barretenberg_module(honk numeric ecc srs proof_system transcript) if(TESTING) # TODO: Re-enable all these warnings once PoC is finished diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/composer_helper/standard_honk_composer_helper.cpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/composer_helper/standard_honk_composer_helper.cpp index ee99db17a03..23779d1dcf8 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/composer_helper/standard_honk_composer_helper.cpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/composer_helper/standard_honk_composer_helper.cpp @@ -1,5 +1,4 @@ #include "standard_honk_composer_helper.hpp" -#include "barretenberg/plonk/proof_system/proving_key/proving_key.hpp" #include "barretenberg/polynomials/polynomial.hpp" #include "barretenberg/honk/pcs/commitment_key.hpp" #include "barretenberg/numeric/bitop/get_msb.hpp" diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/composer_helper/standard_honk_composer_helper.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/composer_helper/standard_honk_composer_helper.hpp index bf5b0953228..dd5b878bf0c 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/composer_helper/standard_honk_composer_helper.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/composer_helper/standard_honk_composer_helper.hpp @@ -5,7 +5,6 @@ #include "barretenberg/honk/proof_system/prover.hpp" #include "barretenberg/honk/proof_system/verifier.hpp" #include "barretenberg/proof_system/circuit_constructors/standard_circuit_constructor.hpp" -#include "barretenberg/plonk/proof_system/verifier/verifier.hpp" #include "barretenberg/proof_system/composer/composer_helper_lib.hpp" #include "barretenberg/proof_system/composer/permutation_helper.hpp" diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/composer_helper/ultra_honk_composer_helper.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/composer_helper/ultra_honk_composer_helper.hpp index 2aed24e6440..00096d5222a 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/composer_helper/ultra_honk_composer_helper.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/composer_helper/ultra_honk_composer_helper.hpp @@ -1,9 +1,7 @@ #pragma once #include "barretenberg/proof_system/composer/composer_helper_lib.hpp" -#include "barretenberg/plonk/composer/composer_helper/composer_helper_lib.hpp" #include "barretenberg/srs/factories/file_crs_factory.hpp" -#include "barretenberg/plonk/proof_system/proving_key/proving_key.hpp" #include "barretenberg/honk/proof_system/ultra_prover.hpp" #include "barretenberg/honk/proof_system/ultra_verifier.hpp" diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/standard_honk_composer.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/standard_honk_composer.hpp index ff9467cf249..3a8c52927db 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/standard_honk_composer.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/standard_honk_composer.hpp @@ -191,8 +191,6 @@ template class StandardHonkComposer_ { const std::string& err() const { return circuit_constructor.err(); }; void failure(std::string msg) { circuit_constructor.failure(msg); } }; -template class StandardHonkComposer_; -template class StandardHonkComposer_; using StandardHonkComposer = StandardHonkComposer_; using StandardGrumpkinHonkComposer = StandardHonkComposer_; } // namespace proof_system::honk diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/standard_honk_composer.test.cpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/standard_honk_composer.test.cpp index 913c4197e5e..7f6a8bdb1c4 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/standard_honk_composer.test.cpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/standard_honk_composer.test.cpp @@ -320,7 +320,7 @@ TEST_F(StandardHonkComposerTests, BaseCase) composer.circuit_constructor.add_variable(a); auto prover = composer.create_prover(); - plonk::proof proof = prover.construct_proof(); + auto proof = prover.construct_proof(); auto verifier = composer.create_verifier(); bool verified = verifier.verify_proof(proof); ASSERT_TRUE(verified); @@ -350,7 +350,7 @@ TEST_F(StandardHonkComposerTests, TwoGates) auto prover = composer.create_prover(); - plonk::proof proof = prover.construct_proof(); + auto proof = prover.construct_proof(); auto verifier = composer.create_verifier(); bool verified = verifier.verify_proof(proof); EXPECT_EQ(verified, expect_verified); @@ -383,7 +383,7 @@ TEST_F(StandardHonkComposerTests, SumcheckEvaluations) composer.create_add_gate({ d_idx, c_idx, a_idx, fr::one(), fr::neg_one(), fr::neg_one(), fr::zero() }); } auto prover = composer.create_prover(); - plonk::proof proof = prover.construct_proof(); + auto proof = prover.construct_proof(); auto verifier = composer.create_verifier(); bool verified = verifier.verify_proof(proof); @@ -399,7 +399,7 @@ TEST(StandardGrumpkinHonkComposer, BaseCase) composer.circuit_constructor.add_variable(a); auto prover = composer.create_prover(); - plonk::proof proof = prover.construct_proof(); + auto proof = prover.construct_proof(); auto verifier = composer.create_verifier(); bool verified = verifier.verify_proof(proof); ASSERT_TRUE(verified); diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/ultra_honk_composer.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/ultra_honk_composer.hpp index e70e37f63d4..c37dc4da089 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/ultra_honk_composer.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/composer/ultra_honk_composer.hpp @@ -293,8 +293,6 @@ template class UltraHonkComposer_ { const std::string& err() const { return circuit_constructor.err(); }; void failure(std::string msg) { circuit_constructor.failure(msg); } }; -template class UltraHonkComposer_; -template class UltraHonkComposer_; using UltraHonkComposer = UltraHonkComposer_; using UltraGrumpkinHonkComposer = UltraHonkComposer_; diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/standard.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/standard.hpp index 02a7a8a6964..5c89e78368c 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/standard.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/standard.hpp @@ -13,7 +13,6 @@ #include "barretenberg/honk/sumcheck/relations/arithmetic_relation.hpp" #include "barretenberg/honk/sumcheck/relations/permutation_relation.hpp" #include "barretenberg/honk/transcript/transcript.hpp" -#include "barretenberg/plonk/proof_system/proving_key/proving_key.hpp" #include "barretenberg/polynomials/evaluation_domain.hpp" #include "barretenberg/polynomials/polynomial.hpp" #include "barretenberg/proof_system/circuit_constructors/standard_circuit_constructor.hpp" diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/standard_grumpkin.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/standard_grumpkin.hpp index 331fecaa9ad..704559bf805 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/standard_grumpkin.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/standard_grumpkin.hpp @@ -13,7 +13,6 @@ #include "barretenberg/honk/sumcheck/relations/arithmetic_relation.hpp" #include "barretenberg/honk/sumcheck/relations/permutation_relation.hpp" #include "barretenberg/honk/transcript/transcript.hpp" -#include "barretenberg/plonk/proof_system/proving_key/proving_key.hpp" #include "barretenberg/polynomials/evaluation_domain.hpp" #include "barretenberg/polynomials/polynomial.hpp" #include "barretenberg/proof_system/circuit_constructors/standard_circuit_constructor.hpp" diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/ultra.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/ultra.hpp index 6005b809a27..8760e0a28f1 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/ultra.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/ultra.hpp @@ -11,7 +11,6 @@ #include "barretenberg/honk/sumcheck/polynomials/univariate.hpp" #include "barretenberg/ecc/curves/bn254/g1.hpp" #include "barretenberg/honk/transcript/transcript.hpp" -#include "barretenberg/plonk/proof_system/proving_key/proving_key.hpp" #include "barretenberg/polynomials/evaluation_domain.hpp" #include "barretenberg/polynomials/polynomial.hpp" #include "barretenberg/proof_system/circuit_constructors/ultra_circuit_constructor.hpp" diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/ultra_grumpkin.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/ultra_grumpkin.hpp index eb263996274..ed257d535c2 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/ultra_grumpkin.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/flavor/ultra_grumpkin.hpp @@ -11,7 +11,6 @@ #include "barretenberg/honk/sumcheck/polynomials/univariate.hpp" #include "barretenberg/ecc/curves/bn254/g1.hpp" #include "barretenberg/honk/transcript/transcript.hpp" -#include "barretenberg/plonk/proof_system/proving_key/proving_key.hpp" #include "barretenberg/polynomials/evaluation_domain.hpp" #include "barretenberg/polynomials/polynomial.hpp" #include "barretenberg/proof_system/circuit_constructors/ultra_circuit_constructor.hpp" diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/oracle/oracle.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/oracle/oracle.hpp deleted file mode 100644 index 52beed5d120..00000000000 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/oracle/oracle.hpp +++ /dev/null @@ -1,274 +0,0 @@ -#pragma once - -#include -#include - -namespace proof_system::honk { - -template struct Oracle { - size_t consumed{ 0 }; - using Transcript = TranscriptType; - - using Fr = typename TranscriptType::Fr; - Oracle(Transcript*){}; - - /** - * @brief commit data to the current challenge buffer - * - * @tparam T template parameter pack! List of types we're inputting - * @param args data we want to add to the transcript - * - * @details Method is deliberately generic. T can be an array of types or a list of parameters. The only - condition - * is that T (or its inner types if T is an array) have valid serialization functions `read/write` - * - * e.g. all of these are valid uses of `append_data` - * - * ``` - * Fr a = something_old; - * Fr b = something_new(); - * append_data(a, b); - * append_data({a, b}); - * G1& c = something_borrowed(); - * std::string d = "something new"; - * append_data({a, b}, c, d); - * ``` - * - */ - template void consume(const T&...) { ++consumed; } - - /** - * @brief use the current value of `current_round_challenge_inputs` to generate a challenge via the Fiat-Shamir - * heuristic - * - * @return Fr the generated challenge - */ - Fr generate_challenge() { return Fr(consumed + 2); } -}; -// /** -// * @brief Oracle class wraps a Transcript and exposes an interface to generate plonk/honk challenges -// * -// * @tparam TranscriptType the transcript class being prametrised -// * -// * @details The purpose of the Oracle is to allow the proof system to generate and retrieve challenges without having -// to -// * keep track of a manifest (like in old Plonk) -// * -// * Conceptually there are two "categories" of challenges in our proof system: -// * -// * 1. Challenges specific to the plonk circuit arithmetisation (alpha, gamma, beta, eta) -// * 2. Challenges local to a modular component used to parametrise a specific proof system (e.g. commitment scheme -// * challenges, sumcheck challenges) -// * -// * Oracle exposes methods to explicitly create/recover challenges of the former type -// * -// * The latter type of challenge uses the Oracle in a more idiomatic manner, where the following assumption is made: -// * -// * 1. If a modular component gneerates/uses challenges, those challenges can remain local to the module and will not -// * leak across the module boundary. -// * -// * e.g. challenges generated as part of the IPA commitment scheme should *not* be required elsewhere in the proof -// system -// * (e.g. the identity tester module) -// * -// * The interface to produce "local" challenges is via: -// * -// * consume(...input data) -// * followed by -// * generate_challenge() -// * generate_challenges() -// * -// * ### HANDLING TRANSCRIPT DATA ### -// * -// * Oracle handles transcript data in a deterministic and generic manner. -// * When challenges are generated, input data is pushed into a uint8_t buffer. -// * -// * This buffer can be retrieved via `export_transcript` -// * -// * Converting this transcript data to/from MEANINGFUL information is done via PROOF classes. -// * e.g. see `proof_systems/standard_plonk/standard_proof.hpp` -// * -// * Proof classes contain explicit member variables describing the data that goes into/from a transcript. -// * Serialization functions (read/write) are used to convert the uint8_t buffer produced by Oracle into a Proof -// object. -// * -// * The serialize functions are the point at which we should check that the transcript is correctly produced -// * e.g. all commitments are valid commitments -// * -// * The end result is that we do not have a manifest like in old plonk. The round structure of the proof system is -// * derived via the order in which data is added into the transcript. This can then be explicitly checked by a -// * proof-system-specific Proof class. -// */ -// template class Oracle { -// public: -// using Transcript = TranscriptType; -// using Fr = typename Transcript::Fr; -// Oracle(Transcript* _transcript) -// : transcript(_transcript) -// {} - -// template Fr generate_initialisation_challenge(const T&... args) -// { -// consume(args...); -// initialisation_challenge = generate_challenge(); -// return get_initialisation_challenge(); -// } - -// template std::array generate_permutation_challenges(const T&... args) -// { -// consume(args...); -// auto res = generate_challenges<2>(); -// beta = res[0]; -// gamma = res[1]; -// return get_permutation_challenges(); -// } - -// template Fr generate_plookup_challenge(const T&... args) -// { -// consume(args...); -// eta = generate_challenge(); -// return get_plookup_challenge(); -// } - -// template Fr generate_identity_separator_challenge(const T&... args) -// { -// consume(args...); -// alpha = generate_challenge(); -// return get_identity_separator_challenge(); -// } - -// /** -// * @brief commit data to the current challenge buffer -// * -// * @tparam T template parameter pack! List of types we're inputting -// * @param args data we want to add to the transcript -// * -// * @details Method is deliberately generic. T can be an array of types or a list of parameters. The only -// condition -// * is that T (or its inner types if T is an array) have valid serialization functions `read/write` -// * -// * e.g. all of these are valid uses of `append_data` -// * -// * ``` -// * Fr a = something_old; -// * Fr b = something_new(); -// * append_data(a, b); -// * append_data({a, b}); -// * G1& c = something_borrowed(); -// * std::string d = "something new"; -// * append_data({a, b}, c, d); -// * ``` -// * -// */ -// template void consume(const T&... args) { (_append_to_buffer(args), ...); } - -// /** -// * @brief use the current value of `current_round_challenge_inputs` to generate a challenge via the Fiat-Shamir -// * heuristic -// * -// * @return Fr the generated challenge -// */ -// Fr generate_challenge() -// { -// ASSERT(current_round_challenge_inputs.size() > 0); -// const Fr result = transcript->generate_challenge(current_round_challenge_inputs); -// current_round_challenge_inputs.clear(); -// return result; -// } - -// /** -// * @brief like generate_challenge but multiple challenges can be generated + returned -// * -// * @tparam num_challenges -// * @return std::array -// */ -// template std::array generate_challenges() -// { -// ASSERT(current_round_challenge_inputs.size() > 0); -// const auto result = transcript->template generate_challenges(current_round_challenge_inputs); -// current_round_challenge_inputs.clear(); -// return result; -// } - -// /** -// * @brief Set the opening points object -// * -// * Opening points are one area where the Oracle abstraction is a bit leaky (TODO: find a fix??) -// * -// * When the IdentityTester::evaluate_identity is called, the number of challenges (and rounds) will be -// * entirely defined by IdentityTester and is not fixed by the higher-level circuit arithmetisation. -// * (e.g. quotient testing needs 1 challenge, identity testing needs logn challenges) -// * -// * However the challenges generated are *not* local to the IdentityTester module, because they represent the -// points -// * that we need to open our polynomials at! -// * -// * The current pattern is as follows: -// * -// * 1. The IdentityTester::evaluate_identity uses the generic `generate_challenge`/`generate_challenges` methods -// to -// * produce challenges -// * 2. IdentityTester::evaluate_identity *returns* the list of opening points -// * 3. Prover/Verifier class will then call `oracle.set_opening_points` on the return data. -// * -// * @param _opening_points -// */ -// void set_opening_points(const std::vector& _opening_points) { opening_points = _opening_points; } - -// std::vector export_transcript() { return transcript->export_transcript(); } - -// Fr get_initialisation_challenge() const { return initialisation_challenge; } -// Fr get_plookup_challenge() const { return eta; } -// std::array get_permutation_challenges() const { return { beta, gamma }; } -// Fr get_identity_separator_challenge() const { return alpha; } -// std::vector get_opening_points() const { return opening_points; } -// Fr get_beta() const { return beta; } -// Fr get_gamma() const { return gamma; } - -// virtual consteval Fr get_identity_permutation_coset_generator() const { return Fr::coset_generator(0); } - -// private: -// template void _append_to_buffer(const T& value) -// { -// using serialize::write; -// // when writing into the buffer that we use to generate the fiat-shamir challenge, -// // we first want to flatten our data structures. -// // e.g. if T is a vector of size 2, calling write(buf, val) will append the vector size "2" into -// // the buffer. We don't want this as it increases the size of the fiat-shamir hash with redundant -// information. -// // TODO ADD! -// // if constexpr (T_is_nested_container) -// // { -// // auto flattened = std::ranges::views::join(value); -// // _append_to_buffer(buf, flattened); -// // } -// write(current_round_challenge_inputs, value); -// } -// template void _append_to_buffer(const T& value) -// { -// using serialize::write; -// for (const auto& param : value) { -// write(current_round_challenge_inputs, param); -// } -// } - -// // TODO make private but allow tests to fiddle with values -// public: -// Transcript* transcript; - -// Fr initialisation_challenge = 0; -// Fr eta = 0; -// Fr beta = 0; -// Fr gamma = 0; -// Fr alpha = 0; -// Fr nu = 0; -// Fr u = 0; -// std::vector opening_points = {}; - -// std::vector public_inputs = {}; - -// std::vector current_round_challenge_inputs = {}; - -// Fr public_input_delta = 1; // TODO FIX -// }; -} // namespace proof_system::honk \ No newline at end of file diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/pcs/commitment_key.test.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/pcs/commitment_key.test.hpp index a9403645bc6..6a481d1679c 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/pcs/commitment_key.test.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/honk/pcs/commitment_key.test.hpp @@ -12,7 +12,6 @@ #include "barretenberg/srs/factories/file_crs_factory.hpp" #include "barretenberg/ecc/curves/bn254/g1.hpp" -#include "../oracle/oracle.hpp" #include "../../transcript/transcript_wrappers.hpp" #include "claim.hpp" diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/stdlib/primitives/composers/composers.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/stdlib/primitives/composers/composers.hpp index 6ab1223240b..c1522e0ac8f 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/stdlib/primitives/composers/composers.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/stdlib/primitives/composers/composers.hpp @@ -1,9 +1,6 @@ /** * @brief Contains all the headers required to adequately compile the types defined in composers_fwd.hpp and instantiate * templates. - * - * @details This should be the ONLY file related to composer/circuit construct included in source files not part of the - * proof systems. */ #pragma once #include "barretenberg/plonk/composer/standard_plonk_composer.hpp" diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/stdlib/primitives/composers/composers_fwd.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/stdlib/primitives/composers/composers_fwd.hpp index 3d5570a276e..1fb6e8d3892 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/stdlib/primitives/composers/composers_fwd.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/stdlib/primitives/composers/composers_fwd.hpp @@ -1,10 +1,10 @@ /** * @brief Defines particular composer and circuit constructor types expected to be used for proof or circuit -construction (outside the proof_system and honk folder) and contains macros for explicit instantiation. +construction in stdlib and contains macros for explicit instantiation. * * @details This file is designed to be included in header files to instruct the compiler that these classes exist and * their instantiation will eventually take place. Given it has no dependencies, it causes no additional compilation or - * propagation. This should be the ONLY file related to these types included in files out side the proof system. + * propagation. */ #pragma once