From e657c446cf96deab508c5d86ba83b42e2af02477 Mon Sep 17 00:00:00 2001 From: iakovenkos Date: Fri, 4 Jul 2025 16:56:45 +0000 Subject: [PATCH] remove templates from ECCVM, Translator, and from rec Protogalaxy tests --- .../cpp/src/barretenberg/flavor/flavor.hpp | 4 +- .../barretenberg/flavor/flavor_concepts.hpp | 11 ++- .../eccvm_verifier/ecc_bools_relation.cpp | 4 +- .../eccvm_verifier/ecc_lookup_relation.cpp | 4 +- .../eccvm_verifier/ecc_msm_relation.cpp | 4 +- .../ecc_point_table_relation.cpp | 4 +- .../ecc_relation_consistency.test.cpp | 8 +-- .../eccvm_verifier/ecc_set_relation.cpp | 8 +-- .../ecc_transcript_relation.cpp | 4 +- .../eccvm_verifier/ecc_wnaf_relation.cpp | 4 +- .../eccvm_verifier/eccvm_recursive_flavor.hpp | 7 +- .../eccvm_recursive_verifier.cpp | 28 +++----- .../eccvm_recursive_verifier.hpp | 31 ++++---- .../eccvm_recursive_verifier.test.cpp | 72 +++++++++---------- .../goblin_recursive_verifier.hpp | 9 +-- .../circuit_builders/circuit_builders_fwd.hpp | 4 +- .../protogalaxy_recursive_verifier.test.cpp | 50 ++++++------- ...translator_decomposition_relation_mega.cpp | 16 ----- ...ranslator_decomposition_relation_ultra.cpp | 3 +- ...slator_delta_range_constraint_relation.cpp | 7 +- .../translator_extra_relations.cpp | 20 ++---- .../translator_non_native_field_relation.cpp | 8 +-- .../translator_permutation_relation.cpp | 8 +-- .../translator_recursive_flavor.hpp | 6 +- .../translator_recursive_verifier.cpp | 39 +++++----- .../translator_recursive_verifier.hpp | 31 ++++---- .../translator_recursive_verifier.test.cpp | 41 +++++------ 27 files changed, 173 insertions(+), 262 deletions(-) delete mode 100644 barretenberg/cpp/src/barretenberg/stdlib/translator_vm_verifier/translator_decomposition_relation_mega.cpp diff --git a/barretenberg/cpp/src/barretenberg/flavor/flavor.hpp b/barretenberg/cpp/src/barretenberg/flavor/flavor.hpp index 7aaf67a26d32..5913c74d88a2 100644 --- a/barretenberg/cpp/src/barretenberg/flavor/flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/flavor/flavor.hpp @@ -448,14 +448,14 @@ class UltraKeccakZKFlavor; class MegaFlavor; class MegaZKFlavor; class TranslatorFlavor; +class ECCVMRecursiveFlavor; +class TranslatorRecursiveFlavor; template class UltraRecursiveFlavor_; template class UltraZKRecursiveFlavor_; template class UltraRollupRecursiveFlavor_; template class MegaRecursiveFlavor_; template class MegaZKRecursiveFlavor_; -template class TranslatorRecursiveFlavor_; -template class ECCVMRecursiveFlavor_; template class AvmRecursiveFlavor_; namespace avm2 { diff --git a/barretenberg/cpp/src/barretenberg/flavor/flavor_concepts.hpp b/barretenberg/cpp/src/barretenberg/flavor/flavor_concepts.hpp index 1c16d6e2eba2..456e404e0d5f 100644 --- a/barretenberg/cpp/src/barretenberg/flavor/flavor_concepts.hpp +++ b/barretenberg/cpp/src/barretenberg/flavor/flavor_concepts.hpp @@ -37,7 +37,7 @@ concept HasDataBus = IsMegaFlavor; // hence requiring an adjustment to the round univariates via the RowDisablingPolynomial. // This is not the case for Translator, where randomness resides in different parts of the trace and the locations will // be reflected via Translator relations. -template concept UseRowDisablingPolynomial = !IsAnyOf, TranslatorRecursiveFlavor_>; +template concept UseRowDisablingPolynomial = !IsAnyOf; template concept HasIPAAccumulator = IsAnyOf>; @@ -52,17 +52,16 @@ concept IsRecursiveFlavor = IsAnyOf, MegaZKRecursiveFlavor_, MegaZKRecursiveFlavor_, - TranslatorRecursiveFlavor_, - TranslatorRecursiveFlavor_, - ECCVMRecursiveFlavor_, + TranslatorRecursiveFlavor, + ECCVMRecursiveFlavor, AvmRecursiveFlavor_, AvmRecursiveFlavor_, avm2::AvmRecursiveFlavor_, avm2::AvmRecursiveFlavor_>; // These concepts are relevant for Sumcheck, where the logic is different for BN254 and Grumpkin Flavors -template concept IsGrumpkinFlavor = IsAnyOf>; -template concept IsECCVMRecursiveFlavor = IsAnyOf>; +template concept IsGrumpkinFlavor = IsAnyOf; +template concept IsECCVMRecursiveFlavor = IsAnyOf; #ifdef STARKNET_GARAGA_FLAVORS template concept IsFoldingFlavor = IsAnyOf>; -template class ECCVMBoolsRelationImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(ECCVMBoolsRelationImpl, ECCVMRecursiveFlavor_); -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(ECCVMBoolsRelationImpl, ECCVMRecursiveFlavor_); +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(ECCVMBoolsRelationImpl, ECCVMRecursiveFlavor); } // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_lookup_relation.cpp b/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_lookup_relation.cpp index 410334e7f6ba..03393798f147 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_lookup_relation.cpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_lookup_relation.cpp @@ -11,7 +11,5 @@ namespace bb { template class ECCVMLookupRelationImpl>; -template class ECCVMLookupRelationImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(ECCVMLookupRelationImpl, ECCVMRecursiveFlavor_); -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(ECCVMLookupRelationImpl, ECCVMRecursiveFlavor_); +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(ECCVMLookupRelationImpl, ECCVMRecursiveFlavor); } // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_msm_relation.cpp b/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_msm_relation.cpp index 6d2ad2b44fc4..69aba707b3a6 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_msm_relation.cpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_msm_relation.cpp @@ -11,7 +11,5 @@ namespace bb { template class ECCVMMSMRelationImpl>; -template class ECCVMMSMRelationImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(ECCVMMSMRelationImpl, ECCVMRecursiveFlavor_); -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(ECCVMMSMRelationImpl, ECCVMRecursiveFlavor_); +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(ECCVMMSMRelationImpl, ECCVMRecursiveFlavor); } // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_point_table_relation.cpp b/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_point_table_relation.cpp index ac1b9b3423d1..b5dff8ae3db3 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_point_table_relation.cpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_point_table_relation.cpp @@ -11,7 +11,5 @@ namespace bb { template class ECCVMPointTableRelationImpl>; -template class ECCVMPointTableRelationImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(ECCVMPointTableRelationImpl, ECCVMRecursiveFlavor_); -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(ECCVMPointTableRelationImpl, ECCVMRecursiveFlavor_); +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(ECCVMPointTableRelationImpl, ECCVMRecursiveFlavor); } // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_relation_consistency.test.cpp b/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_relation_consistency.test.cpp index 6fb8c20f1039..912942f224c7 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_relation_consistency.test.cpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/ecc_relation_consistency.test.cpp @@ -18,9 +18,9 @@ class EccRelationsConsistency : public testing::Test { template