diff --git a/barretenberg/cpp/src/barretenberg/proof_system/arithmetization/arithmetization.hpp b/barretenberg/cpp/src/barretenberg/proof_system/arithmetization/arithmetization.hpp index ae5b8d172d2f..6697cee6aae7 100644 --- a/barretenberg/cpp/src/barretenberg/proof_system/arithmetization/arithmetization.hpp +++ b/barretenberg/cpp/src/barretenberg/proof_system/arithmetization/arithmetization.hpp @@ -104,6 +104,12 @@ template class Ultra { "q_elliptic", "q_aux", "table_type" }; }; +/** + * @brief Ultra Honk arithmetization + * @details Extends the conventional Ultra arithmetization with a new selector related to databus lookups + * + * @tparam FF_ + */ template class UltraHonk : public Ultra { public: static constexpr size_t NUM_SELECTORS = 12; @@ -115,12 +121,6 @@ template class UltraHonk : public Ultra { UltraHonk() : Ultra(NUM_SELECTORS) {} - - // // Note: These are needed for Plonk only (for poly storage in a std::map). Must be in same order as above struct. - // inline static const std::vector selector_names = { "q_m", "q_c", "q_1", "q_2", - // "q_3", "q_4", "q_arith", "q_sort", - // "q_elliptic", "q_aux", "table_type", "q_busread" - // }; }; class GoblinTranslator { diff --git a/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/goblin_ultra_circuit_builder.hpp b/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/goblin_ultra_circuit_builder.hpp index 0e29557b81fe..1b7c6e6eb158 100644 --- a/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/goblin_ultra_circuit_builder.hpp +++ b/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/goblin_ultra_circuit_builder.hpp @@ -77,6 +77,10 @@ template class GoblinUltraCircuitBuilder_ : public UltraCircuitBui void finalize_circuit(); void add_gates_to_ensure_all_polys_are_non_zero(); + /** + * @brief Utility for adding zeros to selectors which are not part of the conventional Ultra arithmetization + * + */ void pad_additional_selectors() override { q_busread.emplace_back(0); }; size_t get_num_constant_gates() const override { return 0; } diff --git a/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp b/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp index 6ce3c73891d0..3d36484a288a 100644 --- a/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp +++ b/barretenberg/cpp/src/barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp @@ -641,6 +641,12 @@ class UltraCircuitBuilder_ : public CircuitBuilderBase& in) override; diff --git a/barretenberg/cpp/src/barretenberg/stdlib/primitives/circuit_builders/circuit_builders.hpp b/barretenberg/cpp/src/barretenberg/stdlib/primitives/circuit_builders/circuit_builders.hpp index e1fbb2b65f28..d748baa72a89 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/primitives/circuit_builders/circuit_builders.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/primitives/circuit_builders/circuit_builders.hpp @@ -8,10 +8,8 @@ #include "barretenberg/proof_system/circuit_builder/ultra_circuit_builder.hpp" template -concept HasPlookup = proof_system::IsAnyOf; +concept HasPlookup = + proof_system::IsAnyOf; template concept IsGoblinBuilder = proof_system::IsAnyOf; @@ -19,19 +17,16 @@ concept IsGoblinBuilder = proof_system::IsAnyOf; \ template class stdlib_type; \ - template class stdlib_type; \ template class stdlib_type; #define INSTANTIATE_STDLIB_TYPE_VA(stdlib_type, ...) \ template class stdlib_type; \ template class stdlib_type; \ - template class stdlib_type; \ template class stdlib_type; #define INSTANTIATE_STDLIB_BASIC_TYPE(stdlib_type) template class stdlib_type; @@ -41,15 +36,12 @@ concept IsGoblinBuilder = proof_system::IsAnyOf; \ - template class stdlib_type; \ template class stdlib_type; #define INSTANTIATE_STDLIB_ULTRA_TYPE_VA(stdlib_type, ...) \ template class stdlib_type; \ - template class stdlib_type; \ template class stdlib_type; diff --git a/barretenberg/cpp/src/barretenberg/stdlib/primitives/circuit_builders/circuit_builders_fwd.hpp b/barretenberg/cpp/src/barretenberg/stdlib/primitives/circuit_builders/circuit_builders_fwd.hpp index 093351cae5ca..5b46b4c25d5c 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/primitives/circuit_builders/circuit_builders_fwd.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/primitives/circuit_builders/circuit_builders_fwd.hpp @@ -23,7 +23,6 @@ template struct alignas(32) field; } // namespace barretenberg namespace arithmetization { template class Ultra; -template class UltraHonk; } // namespace arithmetization namespace proof_system { template class StandardCircuitBuilder_; @@ -32,8 +31,6 @@ using StandardGrumpkinCircuitBuilder = StandardCircuitBuilder_ class UltraCircuitBuilder_; using UltraCircuitBuilder = UltraCircuitBuilder_>>; -using UltraHonkCircuitBuilder = - UltraCircuitBuilder_>>; template class GoblinUltraCircuitBuilder_; using GoblinUltraCircuitBuilder = GoblinUltraCircuitBuilder_>; } // namespace proof_system @@ -41,18 +38,15 @@ using GoblinUltraCircuitBuilder = GoblinUltraCircuitBuilder_; \ extern template class stdlib_type; \ - extern template class stdlib_type; \ extern template class stdlib_type; #define EXTERN_STDLIB_METHOD(stdlib_method) \ extern template stdlib_method(proof_system::StandardCircuitBuilder); \ extern template stdlib_method(proof_system::UltraCircuitBuilder); \ - extern template stdlib_method(proof_system::UltraHonkCircuitBuilder); \ extern template stdlib_method(proof_system::GoblinUltraCircuitBuilder); #define EXTERN_STDLIB_TYPE_VA(stdlib_type, ...) \ extern template class stdlib_type; \ - extern template class stdlib_type; \ extern template class stdlib_type; \ extern template class stdlib_type; @@ -63,15 +57,12 @@ using GoblinUltraCircuitBuilder = GoblinUltraCircuitBuilder_; \ - extern template class stdlib_type; \ extern template class stdlib_type; #define EXTERN_STDLIB_ULTRA_TYPE_VA(stdlib_type, ...) \ extern template class stdlib_type; \ - extern template class stdlib_type; \ extern template class stdlib_type; #define EXTERN_STDLIB_ULTRA_METHOD(stdlib_method) \ extern template stdlib_method(proof_system::UltraCircuitBuilder); \ - extern template stdlib_method(proof_system::UltraHonkCircuitBuilder); \ extern template stdlib_method(proof_system::GoblinUltraCircuitBuilder);