diff --git a/cpp/src/barretenberg/honk/composer/composer_helper/ultra_honk_composer_helper.cpp b/cpp/src/barretenberg/honk/composer/composer_helper/ultra_honk_composer_helper.cpp index 6adafef13f..87916d9d4c 100644 --- a/cpp/src/barretenberg/honk/composer/composer_helper/ultra_honk_composer_helper.cpp +++ b/cpp/src/barretenberg/honk/composer/composer_helper/ultra_honk_composer_helper.cpp @@ -51,22 +51,10 @@ void UltraHonkComposerHelper::compute_witness(CircuitConstru circuit_constructor.w_4.emplace_back(circuit_constructor.zero_idx); } - info("circuit_constructor.w_l.size() = ", circuit_constructor.w_l.size()); - info("filled_gates = ", filled_gates); - info("total_num_gates = ", total_num_gates); - info("subgroup_size = ", subgroup_size); - info("circuit_constructor.w_l[2786] = ", circuit_constructor.w_l[2786]); - // info("circuit_constructor.w_l.end() = ", circuit_constructor.w_l.end()); - // TODO(luke): subgroup size was already computed above but compute_witness_base computes it again. If we pass in // NUM_RANDOMIZED_GATES (as in the other split composers) the resulting sizes can differ. Reconcile this. wire_polynomials = compute_witness_base(circuit_constructor, total_num_gates, NUM_RANDOMIZED_GATES); - info("circuit_constructor.w_l.size() = ", circuit_constructor.w_l.size()); - info("circuit_constructor.w_l[2786] = ", circuit_constructor.w_l[2786]); - info("circuit_constructor.w_l[4095] = ", circuit_constructor.w_l[4095]); - // info("circuit_constructor.w_l.end() = ", circuit_constructor.w_l.end()); - polynomial s_1(subgroup_size); polynomial s_2(subgroup_size); polynomial s_3(subgroup_size); diff --git a/cpp/src/barretenberg/honk/composer/ultra_honk_composer.test.cpp b/cpp/src/barretenberg/honk/composer/ultra_honk_composer.test.cpp index 142562ac98..29f7b26c55 100644 --- a/cpp/src/barretenberg/honk/composer/ultra_honk_composer.test.cpp +++ b/cpp/src/barretenberg/honk/composer/ultra_honk_composer.test.cpp @@ -71,7 +71,6 @@ void check_consistency(honk::UltraProver& honk_prover, plonk::UltraProver& plonk for (auto& entry : honk_store) { std::string key = entry.first; if (plonk_store.contains(key)) { - // info(key); bool polys_equal = (honk_store.get(key) == plonk_store.get(key)); if (polys_equal) { @@ -80,9 +79,6 @@ void check_consistency(honk::UltraProver& honk_prover, plonk::UltraProver& plonk if (!polys_equal) { info("UNEQUAL: ", key); } - // bool size_equal = (honk_store.get(key).size() == plonk_store.get(key).size()); - // if(size_equal) { info("Size Equal: ", key); } - // if(!size_equal) { info("Size UNEQUAL: ", key); } } } @@ -880,6 +876,7 @@ TEST(UltraHonkComposer, rom) auto honk_prover = honk_composer.create_prover(); auto plonk_prover = plonk_composer.create_prover(); + check_consistency(honk_prover, plonk_prover); verify_consistency(honk_prover, plonk_prover); } diff --git a/cpp/src/barretenberg/honk/proof_system/prover.hpp b/cpp/src/barretenberg/honk/proof_system/prover.hpp index 9d47244ce6..2a0e4de314 100644 --- a/cpp/src/barretenberg/honk/proof_system/prover.hpp +++ b/cpp/src/barretenberg/honk/proof_system/prover.hpp @@ -27,10 +27,11 @@ #include "barretenberg/honk/proof_system/work_queue.hpp" namespace proof_system::honk { -template class Prover { - using Fr = barretenberg::fr; - using Polynomial = Polynomial; +using Fr = barretenberg::fr; +using Polynomial = Polynomial; + +template class Prover { public: Prover(std::vector&& wire_polys, std::shared_ptr input_key = nullptr); diff --git a/cpp/src/barretenberg/honk/proof_system/ultra_prover.cpp b/cpp/src/barretenberg/honk/proof_system/ultra_prover.cpp index 2070829c40..1c3f2f6923 100644 --- a/cpp/src/barretenberg/honk/proof_system/ultra_prover.cpp +++ b/cpp/src/barretenberg/honk/proof_system/ultra_prover.cpp @@ -24,11 +24,6 @@ namespace proof_system::honk { -using Fr = barretenberg::fr; -using Commitment = barretenberg::g1::affine_element; -using Polynomial = barretenberg::Polynomial; -using POLYNOMIAL = proof_system::honk::StandardArithmetization::POLYNOMIAL; - /** * Create UltraHonkProver from proving key, witness and manifest. * diff --git a/cpp/src/barretenberg/honk/proof_system/ultra_prover.hpp b/cpp/src/barretenberg/honk/proof_system/ultra_prover.hpp index df80838f64..1372ae6f34 100644 --- a/cpp/src/barretenberg/honk/proof_system/ultra_prover.hpp +++ b/cpp/src/barretenberg/honk/proof_system/ultra_prover.hpp @@ -27,14 +27,14 @@ namespace proof_system::honk { -// using Fr = barretenberg::fr; -// using Polynomial = Polynomial; - -// TODO(luke): UltraHonkProver is probably bad name but this allows use of UltraProver elsewhere. Resolve. +// TODO(luke): UltraHonkProver is bad name but this allows use of UltraProver elsewhere (consistent with +// StandardProver). Resolve. template class UltraHonkProver { using Fr = barretenberg::fr; - using Polynomial = Polynomial; + using Polynomial = barretenberg::Polynomial; + using Commitment = barretenberg::g1::affine_element; + using POLYNOMIAL = proof_system::honk::StandardArithmetization::POLYNOMIAL; public: UltraHonkProver(std::vector&& wire_polys, diff --git a/cpp/src/barretenberg/honk/proof_system/verifier.hpp b/cpp/src/barretenberg/honk/proof_system/verifier.hpp index d26f85819e..ed4fe608a1 100644 --- a/cpp/src/barretenberg/honk/proof_system/verifier.hpp +++ b/cpp/src/barretenberg/honk/proof_system/verifier.hpp @@ -15,9 +15,6 @@ namespace proof_system::honk { template class Verifier { - using Fr = barretenberg::fr; - using Polynomial = Polynomial; - public: Verifier(std::shared_ptr verifier_key = nullptr); Verifier(Verifier&& other); diff --git a/cpp/src/barretenberg/plonk/composer/composer_base.cpp b/cpp/src/barretenberg/plonk/composer/composer_base.cpp index 6b70ce47dc..46e404a57e 100644 --- a/cpp/src/barretenberg/plonk/composer/composer_base.cpp +++ b/cpp/src/barretenberg/plonk/composer/composer_base.cpp @@ -404,10 +404,6 @@ template void ComposerBase::compute_witness_base(const si fr::__copy(get_variable(w_4[i - public_inputs.size()]), w_4_lagrange.at(i)); } - info("Normal: public_inputs.size() = ", public_inputs.size()); - info("Normal: w_l[1] = ", w_l[1]); - info("Normal: w_1_lagrange[1] = ", w_1_lagrange[1]); - circuit_proving_key->polynomial_store.put("w_1_lagrange", std::move(w_1_lagrange)); circuit_proving_key->polynomial_store.put("w_2_lagrange", std::move(w_2_lagrange)); circuit_proving_key->polynomial_store.put("w_3_lagrange", std::move(w_3_lagrange)); @@ -415,9 +411,6 @@ template void ComposerBase::compute_witness_base(const si circuit_proving_key->polynomial_store.put("w_4_lagrange", std::move(w_4_lagrange)); } - info("Normal: polynomial_store.get(w_1_lagrange)[1] = ", - circuit_proving_key->polynomial_store.get("w_1_lagrange")[1]); - computed_witness = true; } diff --git a/cpp/src/barretenberg/plonk/composer/ultra_composer.cpp b/cpp/src/barretenberg/plonk/composer/ultra_composer.cpp index 179a80eb8f..597b2ddea0 100644 --- a/cpp/src/barretenberg/plonk/composer/ultra_composer.cpp +++ b/cpp/src/barretenberg/plonk/composer/ultra_composer.cpp @@ -719,20 +719,9 @@ void UltraComposer::compute_witness() w_4.emplace_back(zero_idx); } - // info("w_l.size() = ", w_l.size()); - // info("filled_gates = ", filled_gates); - // info("total_num_gates = ", total_num_gates); - // info("subgroup_size = ", subgroup_size); - // info("w_l[2786] = ", w_l[2786]); - // info("w_l[4095] = ", w_l[4095]); - // Create and store polynomials which interpolate the wire values (variable values pointed-to by the `w_`s). ComposerBase::compute_witness_base(total_num_gates); - // info("w_l.size() = ", w_l.size()); - // info("w_l[2786] = ", w_l[2786]); - // info("w_l[4095] = ", w_l[4095]); - polynomial s_1(subgroup_size); polynomial s_2(subgroup_size); polynomial s_3(subgroup_size); diff --git a/cpp/src/barretenberg/proof_system/composer/composer_helper_lib.hpp b/cpp/src/barretenberg/proof_system/composer/composer_helper_lib.hpp index df7f731406..c31dfe13b9 100644 --- a/cpp/src/barretenberg/proof_system/composer/composer_helper_lib.hpp +++ b/cpp/src/barretenberg/proof_system/composer/composer_helper_lib.hpp @@ -114,18 +114,6 @@ std::vector compute_witness_base(const CircuitConstruc const size_t subgroup_size = circuit_constructor.get_circuit_subgroup_size(num_constraints + number_of_randomized_gates); - // // TODO(luke): - // for (size_t i = num_gates; i < subgroup_size; ++i) { - // circuit_constructor.w_l.emplace_back(circuit_constructor.zero_idx); - // circuit_constructor.w_r.emplace_back(circuit_constructor.zero_idx); - // circuit_constructor.w_o.emplace_back(circuit_constructor.zero_idx); - // } - // if (program_width > 3) { - // for (size_t i = num_gates; i < subgroup_size; ++i) { - // circuit_constructor.w_4.emplace_back(circuit_constructor.zero_idx); - // } - // } - // construct a view over all the wire's variable indices // w[j][i] is the index of the variable in the j-th wire, at gate i // Each array should be of size `num_gates` @@ -136,10 +124,6 @@ std::vector compute_witness_base(const CircuitConstruc if constexpr (program_width > 3) { w[3] = circuit_constructor.w_4; } - - info("New: num_public_inputs = ", num_public_inputs); - info("New: w_l[1] = ", circuit_constructor.w_l[1]); - std::vector wires; // Note: randomness is added to 3 of the last 4 positions in plonk/proof_system/prover/prover.cpp // StandardProverBase::execute_preamble_round(). @@ -161,12 +145,8 @@ std::vector compute_witness_base(const CircuitConstruc for (size_t i = 0; i < num_gates; ++i) { w_lagrange[num_public_inputs + i] = circuit_constructor.get_variable(w[j][i]); } - if (j == 0) { - info("New: w_lagrange[1] = ", w_lagrange[1]); - } wires.push_back(std::move(w_lagrange)); } - info("New: wires[0][1] = ", wires[0][1]); return wires; } } // namespace proof_system diff --git a/cpp/src/barretenberg/proof_system/composer/permutation_helper.hpp b/cpp/src/barretenberg/proof_system/composer/permutation_helper.hpp index 957f496f2e..c84f6e0edc 100644 --- a/cpp/src/barretenberg/proof_system/composer/permutation_helper.hpp +++ b/cpp/src/barretenberg/proof_system/composer/permutation_helper.hpp @@ -524,7 +524,7 @@ void compute_honk_generalized_sigma_permutations(const CircuitConstructor& circu auto mapping = compute_permutation_mapping(circuit_constructor, key); // Compute Plonk-style sigma and ID polynomials from the corresponding mappings - // TODO(luke): Change these to Honk style! + // TODO(luke): Change these to Honk style! (The only difference is we don't need any fancy coset logic) compute_plonk_permutation_lagrange_polynomials_from_mapping("sigma", mapping.sigmas, key); compute_plonk_permutation_lagrange_polynomials_from_mapping("id", mapping.ids, key); }