From 4180c77d4baea9933504a2a718ce86d419049f2b Mon Sep 17 00:00:00 2001 From: maramihali Date: Thu, 10 Aug 2023 10:12:31 +0000 Subject: [PATCH] resolve pr comments --- .../barretenberg/cpp/src/barretenberg/ecc/curves/bn254/fq.hpp | 1 + .../barretenberg/cpp/src/barretenberg/ecc/curves/bn254/fr.hpp | 1 + .../cpp/barretenberg/cpp/src/barretenberg/ecc/fields/field.hpp | 3 ++- .../barretenberg/plonk/proof_system/verifier/verifier.test.cpp | 1 - .../cpp/src/barretenberg/polynomials/polynomial.hpp | 1 - .../cpp/src/barretenberg/polynomials/polynomial_arithmetic.hpp | 3 ++- 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/ecc/curves/bn254/fq.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/ecc/curves/bn254/fq.hpp index 85a98824681..d18104be9a7 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/ecc/curves/bn254/fq.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/ecc/curves/bn254/fq.hpp @@ -57,6 +57,7 @@ class Bn254FqParams { 0x180a96573d3d9f8ULL, 0xf8b21270ddbb927ULL, 0x1d9598e8a7e39857ULL, 0x2ba010aa41eb7786ULL, }; static constexpr char schema_name[] = "fq"; + static constexpr bool has_high_2adicity = false; }; typedef field fq; diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/ecc/curves/bn254/fr.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/ecc/curves/bn254/fr.hpp index e12af7ef1fa..b24ad5a3680 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/ecc/curves/bn254/fr.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/ecc/curves/bn254/fr.hpp @@ -62,6 +62,7 @@ class Bn254FrParams { 0x1d9598e8a7e39857ULL, 0x2ba010aa41eb7786ULL, 0x39aa886bdbf356b5ULL, 0x47b5002d75fb35e5ULL, }; static constexpr char schema_name[] = "fr"; + static constexpr bool has_high_2adicity = true; }; typedef field fr; diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/ecc/fields/field.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/ecc/fields/field.hpp index cb0160bd086..914793614e3 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/ecc/fields/field.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/ecc/fields/field.hpp @@ -22,8 +22,9 @@ #endif namespace barretenberg { -template struct alignas(32) field { +template struct alignas(32) field { public: + using Params = Params_; typedef uint8_t const* in_buf; typedef uint8_t const* vec_in_buf; typedef uint8_t* out_buf; diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/plonk/proof_system/verifier/verifier.test.cpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/plonk/proof_system/verifier/verifier.test.cpp index f76f3ea49fe..660a685bda1 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/plonk/proof_system/verifier/verifier.test.cpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/plonk/proof_system/verifier/verifier.test.cpp @@ -1,4 +1,3 @@ -#include "verifier.hpp" #include "../../../transcript/transcript.hpp" #include "../prover/prover.hpp" #include "../utils/permutation.hpp" diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/polynomials/polynomial.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/polynomials/polynomial.hpp index f3863555943..a12f79be787 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/polynomials/polynomial.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/polynomials/polynomial.hpp @@ -10,7 +10,6 @@ #include namespace barretenberg { template class Polynomial { - public: /** * Implements requirements of `std::ranges::contiguous_range` and `std::ranges::sized_range` diff --git a/circuits/cpp/barretenberg/cpp/src/barretenberg/polynomials/polynomial_arithmetic.hpp b/circuits/cpp/barretenberg/cpp/src/barretenberg/polynomials/polynomial_arithmetic.hpp index 56ce9ec1a39..8e4338ba251 100644 --- a/circuits/cpp/barretenberg/cpp/src/barretenberg/polynomials/polynomial_arithmetic.hpp +++ b/circuits/cpp/barretenberg/cpp/src/barretenberg/polynomials/polynomial_arithmetic.hpp @@ -5,7 +5,8 @@ namespace barretenberg { namespace polynomial_arithmetic { template -concept SupportsFFT = std::same_as; +concept SupportsFFT = T::Params::has_high_2adicity; + template struct LagrangeEvaluations { Fr vanishing_poly; Fr l_start;