From 7f386b8888d4c0c503b4eb76de0a8a8aff2ea479 Mon Sep 17 00:00:00 2001 From: ledwards2225 Date: Wed, 12 Apr 2023 21:22:18 +0000 Subject: [PATCH] cleanup --- .../barretenberg/honk/composer/ultra_honk_composer.test.cpp | 6 ++---- .../honk/sumcheck/relations/relation_correctness.test.cpp | 4 ++-- .../proof_system/composer/permutation_helper.hpp | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) 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 1664ec5520..6d8f1a26ef 100644 --- a/cpp/src/barretenberg/honk/composer/ultra_honk_composer.test.cpp +++ b/cpp/src/barretenberg/honk/composer/ultra_honk_composer.test.cpp @@ -41,17 +41,16 @@ std::vector add_variables(auto& composer, std::vector variables) */ // NOTE: Currently only checking witness polynomials (wires, sorted lists) and table polys. The permutation polys // are computed differently between plonk and honk and we do not enforce non-zero selectors in Honk so the final -// element will disagree. +// element in the selectors will disagree. void verify_consistency(honk::UltraProver& honk_prover, plonk::UltraProver& plonk_prover) { - // Check that all lagrange polys agree (except for sigmas/ids which are constructed differently for Honk) + // Check that all lagrange polys agree auto& honk_store = honk_prover.key->polynomial_store; auto& plonk_store = plonk_prover.key->polynomial_store; for (auto& entry : honk_store) { std::string key = entry.first; bool is_sorted_table = (key.find("s_") != std::string::npos); bool is_table = (key.find("table_value_") != std::string::npos); - // bool is_not_selector = (key.find("sigma") == std::string::npos) && (key.find("id") == std::string::npos); if (plonk_store.contains(key) && (is_sorted_table || is_table)) { ASSERT_EQ(honk_store.get(key), plonk_store.get(key)); } @@ -155,7 +154,6 @@ TEST(UltraHonkComposer, create_gates_from_plookup_accumulators) 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/sumcheck/relations/relation_correctness.test.cpp b/cpp/src/barretenberg/honk/sumcheck/relations/relation_correctness.test.cpp index f73df218fb..f5556a31da 100644 --- a/cpp/src/barretenberg/honk/sumcheck/relations/relation_correctness.test.cpp +++ b/cpp/src/barretenberg/honk/sumcheck/relations/relation_correctness.test.cpp @@ -19,7 +19,7 @@ using namespace proof_system::honk; namespace test_honk_relations { /** - * @brief Test the correctness of the Standard Honk rleations + * @brief Test the correctness of the Standard Honk relations * * @details Check that the constraints encoded by the relations are satisfied by the polynomials produced by the * Standard Honk Composer for a real circuit. @@ -124,7 +124,7 @@ TEST(RelationCorrectness, StandardRelationCorrectness) } /** - * @brief Test the correctness of the Ultra Honk rleations + * @brief Test the correctness of the Ultra Honk relations * * @details Check that the constraints encoded by the relations are satisfied by the polynomials produced by the * Ultra Honk Composer for a real circuit. diff --git a/cpp/src/barretenberg/proof_system/composer/permutation_helper.hpp b/cpp/src/barretenberg/proof_system/composer/permutation_helper.hpp index b5f74894cd..ef70eb9a18 100644 --- a/cpp/src/barretenberg/proof_system/composer/permutation_helper.hpp +++ b/cpp/src/barretenberg/proof_system/composer/permutation_helper.hpp @@ -258,8 +258,8 @@ void compute_honk_style_permutation_lagrange_polynomials_from_mapping( current_permutation_poly[i] = -barretenberg::fr(current_mapping.row_index + 1 + num_gates * current_mapping.column_index); } else if (current_mapping.is_tag) { - // TODO(luke): enough to simply make these disjoint from non-tag values? - current_permutation_poly[i] = barretenberg::fr::zero(); + // Set evaluations to (arbitrary) values disjoint from non-tag values + current_permutation_poly[i] = num_gates * program_width + current_mapping.row_index; } else { // For the regular permutation we simply point to the next location by setting the evaluation to its // index