From 7409b1fc08539906ec10920a78a8a3bab4fece37 Mon Sep 17 00:00:00 2001 From: jeanmon Date: Wed, 7 Aug 2024 08:09:10 +0000 Subject: [PATCH 01/21] 7790: Port cpp changes --- .../cpp/src/barretenberg/flavor/flavor.hpp | 5 +- .../eccvm_verifier/eccvm_recursive_flavor.hpp | 1 - .../ultra_recursive_flavor.hpp | 1 - .../cpp/src/barretenberg/vm/CMakeLists.txt | 2 +- .../vm/avm/recursion/avm_recursive_flavor.hpp | 180 +++++ .../avm/recursion/avm_recursive_verifier.cpp | 733 ++++++++++++++++++ .../avm/recursion/avm_recursive_verifier.hpp | 39 + .../recursion/avm_recursive_verifier.test.cpp | 127 +++ 8 files changed, 1084 insertions(+), 4 deletions(-) create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp diff --git a/barretenberg/cpp/src/barretenberg/flavor/flavor.hpp b/barretenberg/cpp/src/barretenberg/flavor/flavor.hpp index 69a3a9dabb4..2d38473aac0 100644 --- a/barretenberg/cpp/src/barretenberg/flavor/flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/flavor/flavor.hpp @@ -382,10 +382,12 @@ class ECCVMFlavor; class UltraKeccakFlavor; class MegaFlavor; class TranslatorFlavor; +class AvmFlavor; template class UltraRecursiveFlavor_; template class MegaRecursiveFlavor_; template class TranslatorRecursiveFlavor_; template class ECCVMRecursiveFlavor_; +template class AvmRecursiveFlavor_; } // namespace bb // Forward declare plonk flavors @@ -437,7 +439,8 @@ MegaRecursiveFlavor_, TranslatorRecursiveFlavor_, TranslatorRecursiveFlavor_, TranslatorRecursiveFlavor_, -ECCVMRecursiveFlavor_>; +ECCVMRecursiveFlavor_, +AvmRecursiveFlavor_>; template concept IsECCVMRecursiveFlavor = IsAnyOf>; diff --git a/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/eccvm_recursive_flavor.hpp b/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/eccvm_recursive_flavor.hpp index 7f22b00333c..eaddea77f9d 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/eccvm_recursive_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/eccvm_recursive_flavor.hpp @@ -66,7 +66,6 @@ template class ECCVMRecursiveFlavor_ { // define the containers for storing the contributions from each relation in Sumcheck using TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values()); - public: /** * @brief A field element for each entity of the flavor. These entities represent the prover polynomials * evaluated at one point. diff --git a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_recursive_flavor.hpp b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_recursive_flavor.hpp index 0faaaf60cba..f084391ca92 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_recursive_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_recursive_flavor.hpp @@ -93,7 +93,6 @@ template class UltraRecursiveFlavor_ { // define the container for storing the univariate contribution from each relation in Sumcheck using TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values()); - public: /** * @brief The verification key is responsible for storing the commitments to the precomputed (non-witnessk) * polynomials used by the verifier. diff --git a/barretenberg/cpp/src/barretenberg/vm/CMakeLists.txt b/barretenberg/cpp/src/barretenberg/vm/CMakeLists.txt index fc3a02d77dc..d013afc5816 100644 --- a/barretenberg/cpp/src/barretenberg/vm/CMakeLists.txt +++ b/barretenberg/cpp/src/barretenberg/vm/CMakeLists.txt @@ -1,3 +1,3 @@ if(NOT DISABLE_AZTEC_VM) - barretenberg_module(vm sumcheck) + barretenberg_module(vm sumcheck stdlib_honk_recursion) endif() \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp new file mode 100644 index 00000000000..83957f8fbde --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp @@ -0,0 +1,180 @@ +// Notes: +// We want the recursive verifier for this proof to be an ultra honk type proof +// that will be aggregated in the rolup circuits +// +// We also want noir to be able to absorb these proofs + +#pragma once +#include "barretenberg/commitment_schemes/kzg/kzg.hpp" +#include "barretenberg/flavor/flavor.hpp" +#include "barretenberg/flavor/flavor_macros.hpp" +// TODO(md): uni or multivariate polynomials required? +// #include "barretenberg/polynomials/univariate.hpp" +#include "barretenberg/stdlib/honk_recursion/transcript/transcript.hpp" +#include "barretenberg/stdlib/primitives/curves/bn254.hpp" +#include "barretenberg/stdlib/primitives/field/field.hpp" +#include "barretenberg/stdlib_circuit_builders/ultra_circuit_builder.hpp" + +// Include relation files +#include "barretenberg/relations/generated/avm/alu.hpp" +#include "barretenberg/relations/generated/avm/binary.hpp" +#include "barretenberg/relations/generated/avm/conversion.hpp" +#include "barretenberg/relations/generated/avm/gas.hpp" +#include "barretenberg/relations/generated/avm/incl_main_tag_err.hpp" +#include "barretenberg/relations/generated/avm/incl_mem_tag_err.hpp" +#include "barretenberg/relations/generated/avm/keccakf1600.hpp" +#include "barretenberg/relations/generated/avm/kernel.hpp" +#include "barretenberg/relations/generated/avm/kernel_output_lookup.hpp" +#include "barretenberg/relations/generated/avm/lookup_byte_lengths.hpp" +#include "barretenberg/relations/generated/avm/lookup_byte_operations.hpp" +#include "barretenberg/relations/generated/avm/lookup_div_u16_0.hpp" +#include "barretenberg/relations/generated/avm/lookup_div_u16_1.hpp" +#include "barretenberg/relations/generated/avm/lookup_div_u16_2.hpp" +#include "barretenberg/relations/generated/avm/lookup_div_u16_3.hpp" +#include "barretenberg/relations/generated/avm/lookup_div_u16_4.hpp" +#include "barretenberg/relations/generated/avm/lookup_div_u16_5.hpp" +#include "barretenberg/relations/generated/avm/lookup_div_u16_6.hpp" +#include "barretenberg/relations/generated/avm/lookup_div_u16_7.hpp" +#include "barretenberg/relations/generated/avm/lookup_into_kernel.hpp" +#include "barretenberg/relations/generated/avm/lookup_mem_rng_chk_hi.hpp" +#include "barretenberg/relations/generated/avm/lookup_mem_rng_chk_lo.hpp" +#include "barretenberg/relations/generated/avm/lookup_mem_rng_chk_mid.hpp" +#include "barretenberg/relations/generated/avm/lookup_opcode_gas.hpp" +#include "barretenberg/relations/generated/avm/lookup_pow_2_0.hpp" +#include "barretenberg/relations/generated/avm/lookup_pow_2_1.hpp" +#include "barretenberg/relations/generated/avm/lookup_u16_0.hpp" +#include "barretenberg/relations/generated/avm/lookup_u16_1.hpp" +#include "barretenberg/relations/generated/avm/lookup_u16_10.hpp" +#include "barretenberg/relations/generated/avm/lookup_u16_11.hpp" +#include "barretenberg/relations/generated/avm/lookup_u16_12.hpp" +#include "barretenberg/relations/generated/avm/lookup_u16_13.hpp" +#include "barretenberg/relations/generated/avm/lookup_u16_14.hpp" +#include "barretenberg/relations/generated/avm/lookup_u16_2.hpp" +#include "barretenberg/relations/generated/avm/lookup_u16_3.hpp" +#include "barretenberg/relations/generated/avm/lookup_u16_4.hpp" +#include "barretenberg/relations/generated/avm/lookup_u16_5.hpp" +#include "barretenberg/relations/generated/avm/lookup_u16_6.hpp" +#include "barretenberg/relations/generated/avm/lookup_u16_7.hpp" +#include "barretenberg/relations/generated/avm/lookup_u16_8.hpp" +#include "barretenberg/relations/generated/avm/lookup_u16_9.hpp" +#include "barretenberg/relations/generated/avm/lookup_u8_0.hpp" +#include "barretenberg/relations/generated/avm/lookup_u8_1.hpp" +#include "barretenberg/relations/generated/avm/main.hpp" +#include "barretenberg/relations/generated/avm/mem.hpp" +#include "barretenberg/relations/generated/avm/pedersen.hpp" +#include "barretenberg/relations/generated/avm/perm_main_alu.hpp" +#include "barretenberg/relations/generated/avm/perm_main_bin.hpp" +#include "barretenberg/relations/generated/avm/perm_main_conv.hpp" +#include "barretenberg/relations/generated/avm/perm_main_mem_a.hpp" +#include "barretenberg/relations/generated/avm/perm_main_mem_b.hpp" +#include "barretenberg/relations/generated/avm/perm_main_mem_c.hpp" +#include "barretenberg/relations/generated/avm/perm_main_mem_d.hpp" +#include "barretenberg/relations/generated/avm/perm_main_mem_ind_addr_a.hpp" +#include "barretenberg/relations/generated/avm/perm_main_mem_ind_addr_b.hpp" +#include "barretenberg/relations/generated/avm/perm_main_mem_ind_addr_c.hpp" +#include "barretenberg/relations/generated/avm/perm_main_mem_ind_addr_d.hpp" +#include "barretenberg/relations/generated/avm/perm_main_pedersen.hpp" +#include "barretenberg/relations/generated/avm/perm_main_pos2_perm.hpp" +#include "barretenberg/relations/generated/avm/poseidon2.hpp" +#include "barretenberg/relations/generated/avm/powers.hpp" +#include "barretenberg/relations/generated/avm/range_check_da_gas_hi.hpp" +#include "barretenberg/relations/generated/avm/range_check_da_gas_lo.hpp" +#include "barretenberg/relations/generated/avm/range_check_l2_gas_hi.hpp" +#include "barretenberg/relations/generated/avm/range_check_l2_gas_lo.hpp" +#include "barretenberg/relations/generated/avm/sha256.hpp" + +#include "barretenberg/vm/generated/avm_flavor.hpp" + +#include "barretenberg/commitment_schemes/commitment_key.hpp" +#include "barretenberg/ecc/curves/bn254/g1.hpp" +#include "barretenberg/polynomials/barycentric.hpp" +#include "barretenberg/polynomials/evaluation_domain.hpp" +#include "barretenberg/polynomials/polynomial.hpp" +#include "barretenberg/polynomials/univariate.hpp" + +namespace bb { + +template class AvmRecursiveFlavor_ { + + public: + // much of the types end up being the same but derived from the circuit builer types + using CircuitBuilder = BuilderType; + using Curve = stdlib::bn254; + using PCS = KZG; + using GroupElement = typename Curve::Element; + using Commitment = typename Curve::AffineElement; + using FF = typename Curve::ScalarField; + using BF = typename Curve::BaseField; + + using NativeFlavor = AvmFlavor; + using NativeVerificationKey = typename NativeFlavor::VerificationKey; + + using VerifierCommitmentKey = bb::VerifierCommitmentKey; + + using Relations = AvmFlavor::Relations_; + + static constexpr size_t NUM_WIRES = NativeFlavor::NUM_WIRES; + static constexpr size_t NUM_ALL_ENTITIES = NativeFlavor::NUM_ALL_ENTITIES; + static constexpr size_t NUM_PRECOMPUTED_ENTITIES = NativeFlavor::NUM_PRECOMPUTED_ENTITIES; + static constexpr size_t NUM_WITNESS_ENTITIES = NativeFlavor::NUM_WITNESS_ENTITIES; + + // TODO(md): can be inherited? + static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length(); + static constexpr size_t MAX_TOTAL_RELATION_LENGTH = compute_max_total_relation_length(); + + // TODO(md): need? + // BATCHED_RELATION_PARTIAL_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta` + // random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation + // length = 3 + static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1; + static constexpr size_t BATCHED_RELATION_TOTAL_LENGTH = MAX_TOTAL_RELATION_LENGTH + 1; + static constexpr size_t NUM_RELATIONS = std::tuple_size_v; + + // static constexpr size_t NUM_SUBRELATIONS = compute_number_of_subrelations(); + using RelationSeparator = FF; + + // TODO(md): inherited? + // define the containers for storing the contributions from each relation in Sumcheck + using TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values()); + + /** + * @brief A field element for each entity of the flavor. These entities represent the prover polynomials + * evaluated at one point. + */ + class AllValues : public AvmFlavor::AllEntities { + public: + using Base = AvmFlavor::AllEntities; + using Base::Base; + }; + + class VerificationKey : public VerificationKey_, VerifierCommitmentKey> { + public: + VerificationKey(const size_t circuit_size, const size_t num_public_inputs) + { + this->circuit_size = circuit_size; + this->log_circuit_size = numeric::get_msb(circuit_size); + this->num_public_inputs = num_public_inputs; + } + + VerificationKey(CircuitBuilder* builder, const std::shared_ptr& native_key) + { + this->pcs_verification_key = native_key->pcs_verification_key; + this->circuit_size = native_key->circuit_size; + this->log_circuit_size = numeric::get_msb(this->circuit_size); + // this->num_public_inputs = native_key->num_public_inputs; + // this->pub_inputs_offset = native_key->pub_inputs_offset; + + for (auto [native_comm, comm] : zip_view(native_key->get_all(), this->get_all())) { + comm = Commitment::from_witness(builder, native_comm); + } + } + }; + + using WitnessCommitments = AvmFlavor::WitnessEntities; + using CommitmentLabels = AvmFlavor::CommitmentLabels; + // Note(md): template types differ here + using VerifierCommitments = AvmFlavor::VerifierCommitments_; + using Transcript = bb::BaseTranscript>; +}; + +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp new file mode 100644 index 00000000000..4ab4aee1507 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp @@ -0,0 +1,733 @@ +#include "./avm_recursive_verifier.hpp" +#include "barretenberg/commitment_schemes/zeromorph/zeromorph.hpp" +#include "barretenberg/numeric/bitop/get_msb.hpp" +#include "barretenberg/stdlib/primitives/field/field.hpp" +#include "barretenberg/transcript/transcript.hpp" +#include "barretenberg/vm/recursion/avm_recursive_verifier.hpp" + +namespace bb { + +template +AvmRecursiveVerifier_::AvmRecursiveVerifier_( + Builder* builder, const std::shared_ptr& native_verification_key) + : key(std::make_shared(builder, native_verification_key)) + , builder(builder) +{} + +template +AvmRecursiveVerifier_::AvmRecursiveVerifier_(Builder* builder, const std::shared_ptr& vkey) + : key(vkey) + , builder(builder) +{} + +template void AvmRecursiveVerifier_::verify_proof(const HonkProof& proof) +{ + // TODO(md): enable zeromorph + // using Curve = typename Flavor::Curve; + // using Zeromorph = ZeroMorphVerifier_; + // using PCS = typename Flavor::PCS; + + // TODO(md): Questionable assignments + // using Curve = typename Flavor::Curve; + + using VerifierCommitments = typename Flavor::VerifierCommitments; + using CommitmentLabels = typename Flavor::CommitmentLabels; + using RelationParams = ::bb::RelationParameters; + using Transcript = typename Flavor::Transcript; + + StdlibProof stdlib_proof = bb::convert_proof_to_witness(builder, proof); + info("converted proof to witness"); + transcript = std::make_shared(stdlib_proof); + + info("made transcript"); + + RelationParams relation_parameters; + VerifierCommitments commitments{ key }; + CommitmentLabels commitment_labels; + + const auto circuit_size = transcript->template receive_from_prover("circuit_size"); + // TODO: assert the same as the key circuit size? + info("got circuit size from prover: ", circuit_size); + + // TODO(md): emply the same updates on a new branch when doing the normal avm verifier!!! + // for (auto [comm, label] : zip_view(commitments.get_wires(), commitment_labels.get_wires())) { + // comm = transcript->template receive_from_prover(label); + + // // Note(md): inherited from eccvm recursion + // // TODO(https://github.com/AztecProtocol/barretenberg/issues/1017): This is a hack to ensure zero commitments + // // are still on curve as the transcript doesn't currently support a point at infinity representation for + // // cycle_group + // if (!comm.get_value().on_curve()) { + // comm.set_point_at_infinity(true); + // } + // } + + commitments.kernel_kernel_inputs = + transcript->template receive_from_prover(commitment_labels.kernel_kernel_inputs); + commitments.kernel_kernel_value_out = + transcript->template receive_from_prover(commitment_labels.kernel_kernel_value_out); + commitments.kernel_kernel_side_effect_out = + transcript->template receive_from_prover(commitment_labels.kernel_kernel_side_effect_out); + commitments.kernel_kernel_metadata_out = + transcript->template receive_from_prover(commitment_labels.kernel_kernel_metadata_out); + commitments.alu_a_hi = transcript->template receive_from_prover(commitment_labels.alu_a_hi); + commitments.alu_a_lo = transcript->template receive_from_prover(commitment_labels.alu_a_lo); + commitments.alu_b_hi = transcript->template receive_from_prover(commitment_labels.alu_b_hi); + commitments.alu_b_lo = transcript->template receive_from_prover(commitment_labels.alu_b_lo); + commitments.alu_borrow = transcript->template receive_from_prover(commitment_labels.alu_borrow); + commitments.alu_cf = transcript->template receive_from_prover(commitment_labels.alu_cf); + commitments.alu_clk = transcript->template receive_from_prover(commitment_labels.alu_clk); + commitments.alu_cmp_rng_ctr = + transcript->template receive_from_prover(commitment_labels.alu_cmp_rng_ctr); + commitments.alu_div_u16_r0 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r0); + commitments.alu_div_u16_r1 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r1); + commitments.alu_div_u16_r2 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r2); + commitments.alu_div_u16_r3 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r3); + commitments.alu_div_u16_r4 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r4); + commitments.alu_div_u16_r5 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r5); + commitments.alu_div_u16_r6 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r6); + commitments.alu_div_u16_r7 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r7); + commitments.alu_divisor_hi = transcript->template receive_from_prover(commitment_labels.alu_divisor_hi); + commitments.alu_divisor_lo = transcript->template receive_from_prover(commitment_labels.alu_divisor_lo); + commitments.alu_ff_tag = transcript->template receive_from_prover(commitment_labels.alu_ff_tag); + commitments.alu_ia = transcript->template receive_from_prover(commitment_labels.alu_ia); + commitments.alu_ib = transcript->template receive_from_prover(commitment_labels.alu_ib); + commitments.alu_ic = transcript->template receive_from_prover(commitment_labels.alu_ic); + commitments.alu_in_tag = transcript->template receive_from_prover(commitment_labels.alu_in_tag); + commitments.alu_op_add = transcript->template receive_from_prover(commitment_labels.alu_op_add); + commitments.alu_op_cast = transcript->template receive_from_prover(commitment_labels.alu_op_cast); + commitments.alu_op_cast_prev = + transcript->template receive_from_prover(commitment_labels.alu_op_cast_prev); + commitments.alu_op_div = transcript->template receive_from_prover(commitment_labels.alu_op_div); + commitments.alu_op_div_a_lt_b = + transcript->template receive_from_prover(commitment_labels.alu_op_div_a_lt_b); + commitments.alu_op_div_std = transcript->template receive_from_prover(commitment_labels.alu_op_div_std); + commitments.alu_op_eq = transcript->template receive_from_prover(commitment_labels.alu_op_eq); + commitments.alu_op_eq_diff_inv = + transcript->template receive_from_prover(commitment_labels.alu_op_eq_diff_inv); + commitments.alu_op_lt = transcript->template receive_from_prover(commitment_labels.alu_op_lt); + commitments.alu_op_lte = transcript->template receive_from_prover(commitment_labels.alu_op_lte); + commitments.alu_op_mul = transcript->template receive_from_prover(commitment_labels.alu_op_mul); + commitments.alu_op_not = transcript->template receive_from_prover(commitment_labels.alu_op_not); + commitments.alu_op_shl = transcript->template receive_from_prover(commitment_labels.alu_op_shl); + commitments.alu_op_shr = transcript->template receive_from_prover(commitment_labels.alu_op_shr); + commitments.alu_op_sub = transcript->template receive_from_prover(commitment_labels.alu_op_sub); + commitments.alu_p_a_borrow = transcript->template receive_from_prover(commitment_labels.alu_p_a_borrow); + commitments.alu_p_b_borrow = transcript->template receive_from_prover(commitment_labels.alu_p_b_borrow); + commitments.alu_p_sub_a_hi = transcript->template receive_from_prover(commitment_labels.alu_p_sub_a_hi); + commitments.alu_p_sub_a_lo = transcript->template receive_from_prover(commitment_labels.alu_p_sub_a_lo); + commitments.alu_p_sub_b_hi = transcript->template receive_from_prover(commitment_labels.alu_p_sub_b_hi); + commitments.alu_p_sub_b_lo = transcript->template receive_from_prover(commitment_labels.alu_p_sub_b_lo); + commitments.alu_partial_prod_hi = + transcript->template receive_from_prover(commitment_labels.alu_partial_prod_hi); + commitments.alu_partial_prod_lo = + transcript->template receive_from_prover(commitment_labels.alu_partial_prod_lo); + commitments.alu_quotient_hi = + transcript->template receive_from_prover(commitment_labels.alu_quotient_hi); + commitments.alu_quotient_lo = + transcript->template receive_from_prover(commitment_labels.alu_quotient_lo); + commitments.alu_remainder = transcript->template receive_from_prover(commitment_labels.alu_remainder); + commitments.alu_res_hi = transcript->template receive_from_prover(commitment_labels.alu_res_hi); + commitments.alu_res_lo = transcript->template receive_from_prover(commitment_labels.alu_res_lo); + commitments.alu_sel_alu = transcript->template receive_from_prover(commitment_labels.alu_sel_alu); + commitments.alu_sel_cmp = transcript->template receive_from_prover(commitment_labels.alu_sel_cmp); + commitments.alu_sel_div_rng_chk = + transcript->template receive_from_prover(commitment_labels.alu_sel_div_rng_chk); + commitments.alu_sel_rng_chk = + transcript->template receive_from_prover(commitment_labels.alu_sel_rng_chk); + commitments.alu_sel_rng_chk_lookup = + transcript->template receive_from_prover(commitment_labels.alu_sel_rng_chk_lookup); + commitments.alu_sel_shift_which = + transcript->template receive_from_prover(commitment_labels.alu_sel_shift_which); + commitments.alu_shift_lt_bit_len = + transcript->template receive_from_prover(commitment_labels.alu_shift_lt_bit_len); + commitments.alu_t_sub_s_bits = + transcript->template receive_from_prover(commitment_labels.alu_t_sub_s_bits); + commitments.alu_two_pow_s = transcript->template receive_from_prover(commitment_labels.alu_two_pow_s); + commitments.alu_two_pow_t_sub_s = + transcript->template receive_from_prover(commitment_labels.alu_two_pow_t_sub_s); + commitments.alu_u128_tag = transcript->template receive_from_prover(commitment_labels.alu_u128_tag); + commitments.alu_u16_r0 = transcript->template receive_from_prover(commitment_labels.alu_u16_r0); + commitments.alu_u16_r1 = transcript->template receive_from_prover(commitment_labels.alu_u16_r1); + commitments.alu_u16_r10 = transcript->template receive_from_prover(commitment_labels.alu_u16_r10); + commitments.alu_u16_r11 = transcript->template receive_from_prover(commitment_labels.alu_u16_r11); + commitments.alu_u16_r12 = transcript->template receive_from_prover(commitment_labels.alu_u16_r12); + commitments.alu_u16_r13 = transcript->template receive_from_prover(commitment_labels.alu_u16_r13); + commitments.alu_u16_r14 = transcript->template receive_from_prover(commitment_labels.alu_u16_r14); + commitments.alu_u16_r2 = transcript->template receive_from_prover(commitment_labels.alu_u16_r2); + commitments.alu_u16_r3 = transcript->template receive_from_prover(commitment_labels.alu_u16_r3); + commitments.alu_u16_r4 = transcript->template receive_from_prover(commitment_labels.alu_u16_r4); + commitments.alu_u16_r5 = transcript->template receive_from_prover(commitment_labels.alu_u16_r5); + commitments.alu_u16_r6 = transcript->template receive_from_prover(commitment_labels.alu_u16_r6); + commitments.alu_u16_r7 = transcript->template receive_from_prover(commitment_labels.alu_u16_r7); + commitments.alu_u16_r8 = transcript->template receive_from_prover(commitment_labels.alu_u16_r8); + commitments.alu_u16_r9 = transcript->template receive_from_prover(commitment_labels.alu_u16_r9); + commitments.alu_u16_tag = transcript->template receive_from_prover(commitment_labels.alu_u16_tag); + commitments.alu_u32_tag = transcript->template receive_from_prover(commitment_labels.alu_u32_tag); + commitments.alu_u64_tag = transcript->template receive_from_prover(commitment_labels.alu_u64_tag); + commitments.alu_u8_r0 = transcript->template receive_from_prover(commitment_labels.alu_u8_r0); + commitments.alu_u8_r1 = transcript->template receive_from_prover(commitment_labels.alu_u8_r1); + commitments.alu_u8_tag = transcript->template receive_from_prover(commitment_labels.alu_u8_tag); + commitments.binary_acc_ia = transcript->template receive_from_prover(commitment_labels.binary_acc_ia); + commitments.binary_acc_ib = transcript->template receive_from_prover(commitment_labels.binary_acc_ib); + commitments.binary_acc_ic = transcript->template receive_from_prover(commitment_labels.binary_acc_ic); + commitments.binary_clk = transcript->template receive_from_prover(commitment_labels.binary_clk); + commitments.binary_ia_bytes = + transcript->template receive_from_prover(commitment_labels.binary_ia_bytes); + commitments.binary_ib_bytes = + transcript->template receive_from_prover(commitment_labels.binary_ib_bytes); + commitments.binary_ic_bytes = + transcript->template receive_from_prover(commitment_labels.binary_ic_bytes); + commitments.binary_in_tag = transcript->template receive_from_prover(commitment_labels.binary_in_tag); + commitments.binary_mem_tag_ctr = + transcript->template receive_from_prover(commitment_labels.binary_mem_tag_ctr); + commitments.binary_mem_tag_ctr_inv = + transcript->template receive_from_prover(commitment_labels.binary_mem_tag_ctr_inv); + commitments.binary_op_id = transcript->template receive_from_prover(commitment_labels.binary_op_id); + commitments.binary_sel_bin = transcript->template receive_from_prover(commitment_labels.binary_sel_bin); + commitments.binary_start = transcript->template receive_from_prover(commitment_labels.binary_start); + commitments.byte_lookup_sel_bin = + transcript->template receive_from_prover(commitment_labels.byte_lookup_sel_bin); + commitments.byte_lookup_table_byte_lengths = + transcript->template receive_from_prover(commitment_labels.byte_lookup_table_byte_lengths); + commitments.byte_lookup_table_in_tags = + transcript->template receive_from_prover(commitment_labels.byte_lookup_table_in_tags); + commitments.byte_lookup_table_input_a = + transcript->template receive_from_prover(commitment_labels.byte_lookup_table_input_a); + commitments.byte_lookup_table_input_b = + transcript->template receive_from_prover(commitment_labels.byte_lookup_table_input_b); + commitments.byte_lookup_table_op_id = + transcript->template receive_from_prover(commitment_labels.byte_lookup_table_op_id); + commitments.byte_lookup_table_output = + transcript->template receive_from_prover(commitment_labels.byte_lookup_table_output); + commitments.conversion_clk = transcript->template receive_from_prover(commitment_labels.conversion_clk); + commitments.conversion_input = + transcript->template receive_from_prover(commitment_labels.conversion_input); + commitments.conversion_num_limbs = + transcript->template receive_from_prover(commitment_labels.conversion_num_limbs); + commitments.conversion_radix = + transcript->template receive_from_prover(commitment_labels.conversion_radix); + commitments.conversion_sel_to_radix_le = + transcript->template receive_from_prover(commitment_labels.conversion_sel_to_radix_le); + commitments.gas_da_gas_fixed_table = + transcript->template receive_from_prover(commitment_labels.gas_da_gas_fixed_table); + commitments.gas_l2_gas_fixed_table = + transcript->template receive_from_prover(commitment_labels.gas_l2_gas_fixed_table); + commitments.gas_sel_gas_cost = + transcript->template receive_from_prover(commitment_labels.gas_sel_gas_cost); + commitments.keccakf1600_clk = + transcript->template receive_from_prover(commitment_labels.keccakf1600_clk); + commitments.keccakf1600_input = + transcript->template receive_from_prover(commitment_labels.keccakf1600_input); + commitments.keccakf1600_output = + transcript->template receive_from_prover(commitment_labels.keccakf1600_output); + commitments.keccakf1600_sel_keccakf1600 = + transcript->template receive_from_prover(commitment_labels.keccakf1600_sel_keccakf1600); + commitments.kernel_emit_l2_to_l1_msg_write_offset = + transcript->template receive_from_prover(commitment_labels.kernel_emit_l2_to_l1_msg_write_offset); + commitments.kernel_emit_note_hash_write_offset = + transcript->template receive_from_prover(commitment_labels.kernel_emit_note_hash_write_offset); + commitments.kernel_emit_nullifier_write_offset = + transcript->template receive_from_prover(commitment_labels.kernel_emit_nullifier_write_offset); + commitments.kernel_emit_unencrypted_log_write_offset = transcript->template receive_from_prover( + commitment_labels.kernel_emit_unencrypted_log_write_offset); + commitments.kernel_kernel_in_offset = + transcript->template receive_from_prover(commitment_labels.kernel_kernel_in_offset); + commitments.kernel_kernel_out_offset = + transcript->template receive_from_prover(commitment_labels.kernel_kernel_out_offset); + commitments.kernel_l1_to_l2_msg_exists_write_offset = + transcript->template receive_from_prover(commitment_labels.kernel_l1_to_l2_msg_exists_write_offset); + commitments.kernel_note_hash_exist_write_offset = + transcript->template receive_from_prover(commitment_labels.kernel_note_hash_exist_write_offset); + commitments.kernel_nullifier_exists_write_offset = + transcript->template receive_from_prover(commitment_labels.kernel_nullifier_exists_write_offset); + commitments.kernel_nullifier_non_exists_write_offset = transcript->template receive_from_prover( + commitment_labels.kernel_nullifier_non_exists_write_offset); + commitments.kernel_q_public_input_kernel_add_to_table = transcript->template receive_from_prover( + commitment_labels.kernel_q_public_input_kernel_add_to_table); + commitments.kernel_q_public_input_kernel_out_add_to_table = transcript->template receive_from_prover( + commitment_labels.kernel_q_public_input_kernel_out_add_to_table); + commitments.kernel_side_effect_counter = + transcript->template receive_from_prover(commitment_labels.kernel_side_effect_counter); + commitments.kernel_sload_write_offset = + transcript->template receive_from_prover(commitment_labels.kernel_sload_write_offset); + commitments.kernel_sstore_write_offset = + transcript->template receive_from_prover(commitment_labels.kernel_sstore_write_offset); + commitments.main_abs_da_rem_gas_hi = + transcript->template receive_from_prover(commitment_labels.main_abs_da_rem_gas_hi); + commitments.main_abs_da_rem_gas_lo = + transcript->template receive_from_prover(commitment_labels.main_abs_da_rem_gas_lo); + commitments.main_abs_l2_rem_gas_hi = + transcript->template receive_from_prover(commitment_labels.main_abs_l2_rem_gas_hi); + commitments.main_abs_l2_rem_gas_lo = + transcript->template receive_from_prover(commitment_labels.main_abs_l2_rem_gas_lo); + commitments.main_alu_in_tag = + transcript->template receive_from_prover(commitment_labels.main_alu_in_tag); + commitments.main_bin_op_id = transcript->template receive_from_prover(commitment_labels.main_bin_op_id); + commitments.main_call_ptr = transcript->template receive_from_prover(commitment_labels.main_call_ptr); + commitments.main_da_gas_op_cost = + transcript->template receive_from_prover(commitment_labels.main_da_gas_op_cost); + commitments.main_da_gas_remaining = + transcript->template receive_from_prover(commitment_labels.main_da_gas_remaining); + commitments.main_da_out_of_gas = + transcript->template receive_from_prover(commitment_labels.main_da_out_of_gas); + commitments.main_ia = transcript->template receive_from_prover(commitment_labels.main_ia); + commitments.main_ib = transcript->template receive_from_prover(commitment_labels.main_ib); + commitments.main_ic = transcript->template receive_from_prover(commitment_labels.main_ic); + commitments.main_id = transcript->template receive_from_prover(commitment_labels.main_id); + commitments.main_id_zero = transcript->template receive_from_prover(commitment_labels.main_id_zero); + commitments.main_ind_addr_a = + transcript->template receive_from_prover(commitment_labels.main_ind_addr_a); + commitments.main_ind_addr_b = + transcript->template receive_from_prover(commitment_labels.main_ind_addr_b); + commitments.main_ind_addr_c = + transcript->template receive_from_prover(commitment_labels.main_ind_addr_c); + commitments.main_ind_addr_d = + transcript->template receive_from_prover(commitment_labels.main_ind_addr_d); + commitments.main_internal_return_ptr = + transcript->template receive_from_prover(commitment_labels.main_internal_return_ptr); + commitments.main_inv = transcript->template receive_from_prover(commitment_labels.main_inv); + commitments.main_l2_gas_op_cost = + transcript->template receive_from_prover(commitment_labels.main_l2_gas_op_cost); + commitments.main_l2_gas_remaining = + transcript->template receive_from_prover(commitment_labels.main_l2_gas_remaining); + commitments.main_l2_out_of_gas = + transcript->template receive_from_prover(commitment_labels.main_l2_out_of_gas); + commitments.main_mem_addr_a = + transcript->template receive_from_prover(commitment_labels.main_mem_addr_a); + commitments.main_mem_addr_b = + transcript->template receive_from_prover(commitment_labels.main_mem_addr_b); + commitments.main_mem_addr_c = + transcript->template receive_from_prover(commitment_labels.main_mem_addr_c); + commitments.main_mem_addr_d = + transcript->template receive_from_prover(commitment_labels.main_mem_addr_d); + commitments.main_op_err = transcript->template receive_from_prover(commitment_labels.main_op_err); + commitments.main_opcode_val = + transcript->template receive_from_prover(commitment_labels.main_opcode_val); + commitments.main_pc = transcript->template receive_from_prover(commitment_labels.main_pc); + commitments.main_r_in_tag = transcript->template receive_from_prover(commitment_labels.main_r_in_tag); + commitments.main_rwa = transcript->template receive_from_prover(commitment_labels.main_rwa); + commitments.main_rwb = transcript->template receive_from_prover(commitment_labels.main_rwb); + commitments.main_rwc = transcript->template receive_from_prover(commitment_labels.main_rwc); + commitments.main_rwd = transcript->template receive_from_prover(commitment_labels.main_rwd); + commitments.main_sel_alu = transcript->template receive_from_prover(commitment_labels.main_sel_alu); + commitments.main_sel_bin = transcript->template receive_from_prover(commitment_labels.main_sel_bin); + commitments.main_sel_gas_accounting_active = + transcript->template receive_from_prover(commitment_labels.main_sel_gas_accounting_active); + commitments.main_sel_last = transcript->template receive_from_prover(commitment_labels.main_sel_last); + commitments.main_sel_mem_op_a = + transcript->template receive_from_prover(commitment_labels.main_sel_mem_op_a); + commitments.main_sel_mem_op_activate_gas = + transcript->template receive_from_prover(commitment_labels.main_sel_mem_op_activate_gas); + commitments.main_sel_mem_op_b = + transcript->template receive_from_prover(commitment_labels.main_sel_mem_op_b); + commitments.main_sel_mem_op_c = + transcript->template receive_from_prover(commitment_labels.main_sel_mem_op_c); + commitments.main_sel_mem_op_d = + transcript->template receive_from_prover(commitment_labels.main_sel_mem_op_d); + commitments.main_sel_mov_ia_to_ic = + transcript->template receive_from_prover(commitment_labels.main_sel_mov_ia_to_ic); + commitments.main_sel_mov_ib_to_ic = + transcript->template receive_from_prover(commitment_labels.main_sel_mov_ib_to_ic); + commitments.main_sel_op_add = + transcript->template receive_from_prover(commitment_labels.main_sel_op_add); + commitments.main_sel_op_address = + transcript->template receive_from_prover(commitment_labels.main_sel_op_address); + commitments.main_sel_op_and = + transcript->template receive_from_prover(commitment_labels.main_sel_op_and); + commitments.main_sel_op_block_number = + transcript->template receive_from_prover(commitment_labels.main_sel_op_block_number); + commitments.main_sel_op_cast = + transcript->template receive_from_prover(commitment_labels.main_sel_op_cast); + commitments.main_sel_op_chain_id = + transcript->template receive_from_prover(commitment_labels.main_sel_op_chain_id); + commitments.main_sel_op_cmov = + transcript->template receive_from_prover(commitment_labels.main_sel_op_cmov); + commitments.main_sel_op_coinbase = + transcript->template receive_from_prover(commitment_labels.main_sel_op_coinbase); + commitments.main_sel_op_dagasleft = + transcript->template receive_from_prover(commitment_labels.main_sel_op_dagasleft); + commitments.main_sel_op_div = + transcript->template receive_from_prover(commitment_labels.main_sel_op_div); + commitments.main_sel_op_emit_l2_to_l1_msg = + transcript->template receive_from_prover(commitment_labels.main_sel_op_emit_l2_to_l1_msg); + commitments.main_sel_op_emit_note_hash = + transcript->template receive_from_prover(commitment_labels.main_sel_op_emit_note_hash); + commitments.main_sel_op_emit_nullifier = + transcript->template receive_from_prover(commitment_labels.main_sel_op_emit_nullifier); + commitments.main_sel_op_emit_unencrypted_log = + transcript->template receive_from_prover(commitment_labels.main_sel_op_emit_unencrypted_log); + commitments.main_sel_op_eq = transcript->template receive_from_prover(commitment_labels.main_sel_op_eq); + commitments.main_sel_op_external_call = + transcript->template receive_from_prover(commitment_labels.main_sel_op_external_call); + commitments.main_sel_op_fdiv = + transcript->template receive_from_prover(commitment_labels.main_sel_op_fdiv); + commitments.main_sel_op_fee_per_da_gas = + transcript->template receive_from_prover(commitment_labels.main_sel_op_fee_per_da_gas); + commitments.main_sel_op_fee_per_l2_gas = + transcript->template receive_from_prover(commitment_labels.main_sel_op_fee_per_l2_gas); + commitments.main_sel_op_get_contract_instance = + transcript->template receive_from_prover(commitment_labels.main_sel_op_get_contract_instance); + commitments.main_sel_op_halt = + transcript->template receive_from_prover(commitment_labels.main_sel_op_halt); + commitments.main_sel_op_internal_call = + transcript->template receive_from_prover(commitment_labels.main_sel_op_internal_call); + commitments.main_sel_op_internal_return = + transcript->template receive_from_prover(commitment_labels.main_sel_op_internal_return); + commitments.main_sel_op_jump = + transcript->template receive_from_prover(commitment_labels.main_sel_op_jump); + commitments.main_sel_op_jumpi = + transcript->template receive_from_prover(commitment_labels.main_sel_op_jumpi); + commitments.main_sel_op_keccak = + transcript->template receive_from_prover(commitment_labels.main_sel_op_keccak); + commitments.main_sel_op_l1_to_l2_msg_exists = + transcript->template receive_from_prover(commitment_labels.main_sel_op_l1_to_l2_msg_exists); + commitments.main_sel_op_l2gasleft = + transcript->template receive_from_prover(commitment_labels.main_sel_op_l2gasleft); + commitments.main_sel_op_lt = transcript->template receive_from_prover(commitment_labels.main_sel_op_lt); + commitments.main_sel_op_lte = + transcript->template receive_from_prover(commitment_labels.main_sel_op_lte); + commitments.main_sel_op_mov = + transcript->template receive_from_prover(commitment_labels.main_sel_op_mov); + commitments.main_sel_op_mul = + transcript->template receive_from_prover(commitment_labels.main_sel_op_mul); + commitments.main_sel_op_not = + transcript->template receive_from_prover(commitment_labels.main_sel_op_not); + commitments.main_sel_op_note_hash_exists = + transcript->template receive_from_prover(commitment_labels.main_sel_op_note_hash_exists); + commitments.main_sel_op_nullifier_exists = + transcript->template receive_from_prover(commitment_labels.main_sel_op_nullifier_exists); + commitments.main_sel_op_or = transcript->template receive_from_prover(commitment_labels.main_sel_op_or); + commitments.main_sel_op_pedersen = + transcript->template receive_from_prover(commitment_labels.main_sel_op_pedersen); + commitments.main_sel_op_poseidon2 = + transcript->template receive_from_prover(commitment_labels.main_sel_op_poseidon2); + commitments.main_sel_op_radix_le = + transcript->template receive_from_prover(commitment_labels.main_sel_op_radix_le); + commitments.main_sel_op_sender = + transcript->template receive_from_prover(commitment_labels.main_sel_op_sender); + commitments.main_sel_op_sha256 = + transcript->template receive_from_prover(commitment_labels.main_sel_op_sha256); + commitments.main_sel_op_shl = + transcript->template receive_from_prover(commitment_labels.main_sel_op_shl); + commitments.main_sel_op_shr = + transcript->template receive_from_prover(commitment_labels.main_sel_op_shr); + commitments.main_sel_op_sload = + transcript->template receive_from_prover(commitment_labels.main_sel_op_sload); + commitments.main_sel_op_sstore = + transcript->template receive_from_prover(commitment_labels.main_sel_op_sstore); + commitments.main_sel_op_storage_address = + transcript->template receive_from_prover(commitment_labels.main_sel_op_storage_address); + commitments.main_sel_op_sub = + transcript->template receive_from_prover(commitment_labels.main_sel_op_sub); + commitments.main_sel_op_timestamp = + transcript->template receive_from_prover(commitment_labels.main_sel_op_timestamp); + commitments.main_sel_op_transaction_fee = + transcript->template receive_from_prover(commitment_labels.main_sel_op_transaction_fee); + commitments.main_sel_op_version = + transcript->template receive_from_prover(commitment_labels.main_sel_op_version); + commitments.main_sel_op_xor = + transcript->template receive_from_prover(commitment_labels.main_sel_op_xor); + commitments.main_sel_q_kernel_lookup = + transcript->template receive_from_prover(commitment_labels.main_sel_q_kernel_lookup); + commitments.main_sel_q_kernel_output_lookup = + transcript->template receive_from_prover(commitment_labels.main_sel_q_kernel_output_lookup); + commitments.main_sel_resolve_ind_addr_a = + transcript->template receive_from_prover(commitment_labels.main_sel_resolve_ind_addr_a); + commitments.main_sel_resolve_ind_addr_b = + transcript->template receive_from_prover(commitment_labels.main_sel_resolve_ind_addr_b); + commitments.main_sel_resolve_ind_addr_c = + transcript->template receive_from_prover(commitment_labels.main_sel_resolve_ind_addr_c); + commitments.main_sel_resolve_ind_addr_d = + transcript->template receive_from_prover(commitment_labels.main_sel_resolve_ind_addr_d); + commitments.main_sel_rng_16 = + transcript->template receive_from_prover(commitment_labels.main_sel_rng_16); + commitments.main_sel_rng_8 = transcript->template receive_from_prover(commitment_labels.main_sel_rng_8); + commitments.main_space_id = transcript->template receive_from_prover(commitment_labels.main_space_id); + commitments.main_tag_err = transcript->template receive_from_prover(commitment_labels.main_tag_err); + commitments.main_w_in_tag = transcript->template receive_from_prover(commitment_labels.main_w_in_tag); + commitments.mem_addr = transcript->template receive_from_prover(commitment_labels.mem_addr); + commitments.mem_clk = transcript->template receive_from_prover(commitment_labels.mem_clk); + commitments.mem_diff_hi = transcript->template receive_from_prover(commitment_labels.mem_diff_hi); + commitments.mem_diff_lo = transcript->template receive_from_prover(commitment_labels.mem_diff_lo); + commitments.mem_diff_mid = transcript->template receive_from_prover(commitment_labels.mem_diff_mid); + commitments.mem_glob_addr = transcript->template receive_from_prover(commitment_labels.mem_glob_addr); + commitments.mem_last = transcript->template receive_from_prover(commitment_labels.mem_last); + commitments.mem_lastAccess = transcript->template receive_from_prover(commitment_labels.mem_lastAccess); + commitments.mem_one_min_inv = + transcript->template receive_from_prover(commitment_labels.mem_one_min_inv); + commitments.mem_r_in_tag = transcript->template receive_from_prover(commitment_labels.mem_r_in_tag); + commitments.mem_rw = transcript->template receive_from_prover(commitment_labels.mem_rw); + commitments.mem_sel_mem = transcript->template receive_from_prover(commitment_labels.mem_sel_mem); + commitments.mem_sel_mov_ia_to_ic = + transcript->template receive_from_prover(commitment_labels.mem_sel_mov_ia_to_ic); + commitments.mem_sel_mov_ib_to_ic = + transcript->template receive_from_prover(commitment_labels.mem_sel_mov_ib_to_ic); + commitments.mem_sel_op_a = transcript->template receive_from_prover(commitment_labels.mem_sel_op_a); + commitments.mem_sel_op_b = transcript->template receive_from_prover(commitment_labels.mem_sel_op_b); + commitments.mem_sel_op_c = transcript->template receive_from_prover(commitment_labels.mem_sel_op_c); + commitments.mem_sel_op_cmov = + transcript->template receive_from_prover(commitment_labels.mem_sel_op_cmov); + commitments.mem_sel_op_d = transcript->template receive_from_prover(commitment_labels.mem_sel_op_d); + commitments.mem_sel_resolve_ind_addr_a = + transcript->template receive_from_prover(commitment_labels.mem_sel_resolve_ind_addr_a); + commitments.mem_sel_resolve_ind_addr_b = + transcript->template receive_from_prover(commitment_labels.mem_sel_resolve_ind_addr_b); + commitments.mem_sel_resolve_ind_addr_c = + transcript->template receive_from_prover(commitment_labels.mem_sel_resolve_ind_addr_c); + commitments.mem_sel_resolve_ind_addr_d = + transcript->template receive_from_prover(commitment_labels.mem_sel_resolve_ind_addr_d); + commitments.mem_sel_rng_chk = + transcript->template receive_from_prover(commitment_labels.mem_sel_rng_chk); + commitments.mem_skip_check_tag = + transcript->template receive_from_prover(commitment_labels.mem_skip_check_tag); + commitments.mem_space_id = transcript->template receive_from_prover(commitment_labels.mem_space_id); + commitments.mem_tag = transcript->template receive_from_prover(commitment_labels.mem_tag); + commitments.mem_tag_err = transcript->template receive_from_prover(commitment_labels.mem_tag_err); + commitments.mem_tsp = transcript->template receive_from_prover(commitment_labels.mem_tsp); + commitments.mem_val = transcript->template receive_from_prover(commitment_labels.mem_val); + commitments.mem_w_in_tag = transcript->template receive_from_prover(commitment_labels.mem_w_in_tag); + commitments.pedersen_clk = transcript->template receive_from_prover(commitment_labels.pedersen_clk); + commitments.pedersen_input = transcript->template receive_from_prover(commitment_labels.pedersen_input); + commitments.pedersen_output = + transcript->template receive_from_prover(commitment_labels.pedersen_output); + commitments.pedersen_sel_pedersen = + transcript->template receive_from_prover(commitment_labels.pedersen_sel_pedersen); + commitments.poseidon2_clk = transcript->template receive_from_prover(commitment_labels.poseidon2_clk); + commitments.poseidon2_input = + transcript->template receive_from_prover(commitment_labels.poseidon2_input); + commitments.poseidon2_output = + transcript->template receive_from_prover(commitment_labels.poseidon2_output); + commitments.poseidon2_sel_poseidon_perm = + transcript->template receive_from_prover(commitment_labels.poseidon2_sel_poseidon_perm); + commitments.powers_power_of_2 = + transcript->template receive_from_prover(commitment_labels.powers_power_of_2); + commitments.sha256_clk = transcript->template receive_from_prover(commitment_labels.sha256_clk); + commitments.sha256_input = transcript->template receive_from_prover(commitment_labels.sha256_input); + commitments.sha256_output = transcript->template receive_from_prover(commitment_labels.sha256_output); + commitments.sha256_sel_sha256_compression = + transcript->template receive_from_prover(commitment_labels.sha256_sel_sha256_compression); + commitments.sha256_state = transcript->template receive_from_prover(commitment_labels.sha256_state); + commitments.lookup_byte_lengths_counts = + transcript->template receive_from_prover(commitment_labels.lookup_byte_lengths_counts); + commitments.lookup_byte_operations_counts = + transcript->template receive_from_prover(commitment_labels.lookup_byte_operations_counts); + commitments.lookup_opcode_gas_counts = + transcript->template receive_from_prover(commitment_labels.lookup_opcode_gas_counts); + commitments.range_check_l2_gas_hi_counts = + transcript->template receive_from_prover(commitment_labels.range_check_l2_gas_hi_counts); + commitments.range_check_l2_gas_lo_counts = + transcript->template receive_from_prover(commitment_labels.range_check_l2_gas_lo_counts); + commitments.range_check_da_gas_hi_counts = + transcript->template receive_from_prover(commitment_labels.range_check_da_gas_hi_counts); + commitments.range_check_da_gas_lo_counts = + transcript->template receive_from_prover(commitment_labels.range_check_da_gas_lo_counts); + commitments.kernel_output_lookup_counts = + transcript->template receive_from_prover(commitment_labels.kernel_output_lookup_counts); + commitments.lookup_into_kernel_counts = + transcript->template receive_from_prover(commitment_labels.lookup_into_kernel_counts); + commitments.incl_main_tag_err_counts = + transcript->template receive_from_prover(commitment_labels.incl_main_tag_err_counts); + commitments.incl_mem_tag_err_counts = + transcript->template receive_from_prover(commitment_labels.incl_mem_tag_err_counts); + commitments.lookup_mem_rng_chk_lo_counts = + transcript->template receive_from_prover(commitment_labels.lookup_mem_rng_chk_lo_counts); + commitments.lookup_mem_rng_chk_mid_counts = + transcript->template receive_from_prover(commitment_labels.lookup_mem_rng_chk_mid_counts); + commitments.lookup_mem_rng_chk_hi_counts = + transcript->template receive_from_prover(commitment_labels.lookup_mem_rng_chk_hi_counts); + commitments.lookup_pow_2_0_counts = + transcript->template receive_from_prover(commitment_labels.lookup_pow_2_0_counts); + commitments.lookup_pow_2_1_counts = + transcript->template receive_from_prover(commitment_labels.lookup_pow_2_1_counts); + commitments.lookup_u8_0_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u8_0_counts); + commitments.lookup_u8_1_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u8_1_counts); + commitments.lookup_u16_0_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u16_0_counts); + commitments.lookup_u16_1_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u16_1_counts); + commitments.lookup_u16_2_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u16_2_counts); + commitments.lookup_u16_3_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u16_3_counts); + commitments.lookup_u16_4_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u16_4_counts); + commitments.lookup_u16_5_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u16_5_counts); + commitments.lookup_u16_6_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u16_6_counts); + commitments.lookup_u16_7_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u16_7_counts); + commitments.lookup_u16_8_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u16_8_counts); + commitments.lookup_u16_9_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u16_9_counts); + commitments.lookup_u16_10_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u16_10_counts); + commitments.lookup_u16_11_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u16_11_counts); + commitments.lookup_u16_12_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u16_12_counts); + commitments.lookup_u16_13_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u16_13_counts); + commitments.lookup_u16_14_counts = + transcript->template receive_from_prover(commitment_labels.lookup_u16_14_counts); + commitments.lookup_div_u16_0_counts = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_0_counts); + commitments.lookup_div_u16_1_counts = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_1_counts); + commitments.lookup_div_u16_2_counts = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_2_counts); + commitments.lookup_div_u16_3_counts = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_3_counts); + commitments.lookup_div_u16_4_counts = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_4_counts); + commitments.lookup_div_u16_5_counts = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_5_counts); + commitments.lookup_div_u16_6_counts = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_6_counts); + commitments.lookup_div_u16_7_counts = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_7_counts); + + auto [beta, gamm] = transcript->template get_challenges("beta", "gamma"); + relation_parameters.beta = beta; + relation_parameters.gamma = gamm; + info("recursive beta / gamma ", beta, " | ", gamm); + + commitments.perm_main_alu = transcript->template receive_from_prover(commitment_labels.perm_main_alu); + commitments.perm_main_bin = transcript->template receive_from_prover(commitment_labels.perm_main_bin); + commitments.perm_main_conv = transcript->template receive_from_prover(commitment_labels.perm_main_conv); + commitments.perm_main_pos2_perm = + transcript->template receive_from_prover(commitment_labels.perm_main_pos2_perm); + commitments.perm_main_pedersen = + transcript->template receive_from_prover(commitment_labels.perm_main_pedersen); + commitments.perm_main_mem_a = + transcript->template receive_from_prover(commitment_labels.perm_main_mem_a); + commitments.perm_main_mem_b = + transcript->template receive_from_prover(commitment_labels.perm_main_mem_b); + commitments.perm_main_mem_c = + transcript->template receive_from_prover(commitment_labels.perm_main_mem_c); + commitments.perm_main_mem_d = + transcript->template receive_from_prover(commitment_labels.perm_main_mem_d); + commitments.perm_main_mem_ind_addr_a = + transcript->template receive_from_prover(commitment_labels.perm_main_mem_ind_addr_a); + commitments.perm_main_mem_ind_addr_b = + transcript->template receive_from_prover(commitment_labels.perm_main_mem_ind_addr_b); + commitments.perm_main_mem_ind_addr_c = + transcript->template receive_from_prover(commitment_labels.perm_main_mem_ind_addr_c); + commitments.perm_main_mem_ind_addr_d = + transcript->template receive_from_prover(commitment_labels.perm_main_mem_ind_addr_d); + commitments.lookup_byte_lengths = + transcript->template receive_from_prover(commitment_labels.lookup_byte_lengths); + commitments.lookup_byte_operations = + transcript->template receive_from_prover(commitment_labels.lookup_byte_operations); + commitments.lookup_opcode_gas = + transcript->template receive_from_prover(commitment_labels.lookup_opcode_gas); + commitments.range_check_l2_gas_hi = + transcript->template receive_from_prover(commitment_labels.range_check_l2_gas_hi); + commitments.range_check_l2_gas_lo = + transcript->template receive_from_prover(commitment_labels.range_check_l2_gas_lo); + commitments.range_check_da_gas_hi = + transcript->template receive_from_prover(commitment_labels.range_check_da_gas_hi); + commitments.range_check_da_gas_lo = + transcript->template receive_from_prover(commitment_labels.range_check_da_gas_lo); + commitments.kernel_output_lookup = + transcript->template receive_from_prover(commitment_labels.kernel_output_lookup); + commitments.lookup_into_kernel = + transcript->template receive_from_prover(commitment_labels.lookup_into_kernel); + commitments.incl_main_tag_err = + transcript->template receive_from_prover(commitment_labels.incl_main_tag_err); + commitments.incl_mem_tag_err = + transcript->template receive_from_prover(commitment_labels.incl_mem_tag_err); + commitments.lookup_mem_rng_chk_lo = + transcript->template receive_from_prover(commitment_labels.lookup_mem_rng_chk_lo); + commitments.lookup_mem_rng_chk_mid = + transcript->template receive_from_prover(commitment_labels.lookup_mem_rng_chk_mid); + commitments.lookup_mem_rng_chk_hi = + transcript->template receive_from_prover(commitment_labels.lookup_mem_rng_chk_hi); + commitments.lookup_pow_2_0 = transcript->template receive_from_prover(commitment_labels.lookup_pow_2_0); + commitments.lookup_pow_2_1 = transcript->template receive_from_prover(commitment_labels.lookup_pow_2_1); + commitments.lookup_u8_0 = transcript->template receive_from_prover(commitment_labels.lookup_u8_0); + commitments.lookup_u8_1 = transcript->template receive_from_prover(commitment_labels.lookup_u8_1); + commitments.lookup_u16_0 = transcript->template receive_from_prover(commitment_labels.lookup_u16_0); + commitments.lookup_u16_1 = transcript->template receive_from_prover(commitment_labels.lookup_u16_1); + commitments.lookup_u16_2 = transcript->template receive_from_prover(commitment_labels.lookup_u16_2); + commitments.lookup_u16_3 = transcript->template receive_from_prover(commitment_labels.lookup_u16_3); + commitments.lookup_u16_4 = transcript->template receive_from_prover(commitment_labels.lookup_u16_4); + commitments.lookup_u16_5 = transcript->template receive_from_prover(commitment_labels.lookup_u16_5); + commitments.lookup_u16_6 = transcript->template receive_from_prover(commitment_labels.lookup_u16_6); + commitments.lookup_u16_7 = transcript->template receive_from_prover(commitment_labels.lookup_u16_7); + commitments.lookup_u16_8 = transcript->template receive_from_prover(commitment_labels.lookup_u16_8); + commitments.lookup_u16_9 = transcript->template receive_from_prover(commitment_labels.lookup_u16_9); + commitments.lookup_u16_10 = transcript->template receive_from_prover(commitment_labels.lookup_u16_10); + commitments.lookup_u16_11 = transcript->template receive_from_prover(commitment_labels.lookup_u16_11); + commitments.lookup_u16_12 = transcript->template receive_from_prover(commitment_labels.lookup_u16_12); + commitments.lookup_u16_13 = transcript->template receive_from_prover(commitment_labels.lookup_u16_13); + commitments.lookup_u16_14 = transcript->template receive_from_prover(commitment_labels.lookup_u16_14); + commitments.lookup_div_u16_0 = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_0); + commitments.lookup_div_u16_1 = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_1); + commitments.lookup_div_u16_2 = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_2); + commitments.lookup_div_u16_3 = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_3); + commitments.lookup_div_u16_4 = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_4); + commitments.lookup_div_u16_5 = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_5); + commitments.lookup_div_u16_6 = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_6); + commitments.lookup_div_u16_7 = + transcript->template receive_from_prover(commitment_labels.lookup_div_u16_7); + + info("got commitments from prover"); + + // TODO(md): do we not need to hash the counts columns until the sumcheck rounds? + + // unconstrained + const size_t log_circuit_size = numeric::get_msb(static_cast(circuit_size.get_value())); + auto sumcheck = SumcheckVerifier(log_circuit_size, transcript); + + FF alpha = transcript->template get_challenge("Sumcheck:alpha"); + info("rec: sumcheck alpha: ", alpha); + + info("got sumcheck alpha"); + + // TODO(md): do we want this to be an unrolled for loop? + auto gate_challenges = std::vector(log_circuit_size); + for (size_t idx = 0; idx < log_circuit_size; idx++) { + gate_challenges[idx] = transcript->template get_challenge("Sumcheck:gate_challenge_" + std::to_string(idx)); + info(gate_challenges[idx]); + } + + auto [multivariate_challenge, claimed_evaluations, sumcheck_verified] = + sumcheck.verify(relation_parameters, alpha, gate_challenges); + + info("verified sumcheck: ", (sumcheck_verified.has_value() && sumcheck_verified.value())); + + // TODO(md): when calling `get_commitments` do the values get constrained in their origin? check that the zip_view + // does in fact use the verifier type to get it? + // TODO: will probably need to disable zeromorph for the meantime as we are not able to verify it natively at the + // moment + + // info() + // auto multivariate_to_univariate_opening_claim = Zeromorph::verify(commitments.get_unshifted(), + // commitments.get_to_be_shifted(), + // claimed_evaluations.get_unshifted(), + // claimed_evaluations.get_shifted(), + // multivatiate_challenge, + // key->pcs_verification_key->get_g1_identity(), + // transcript); + + // auto pairing_points = PCS::reduce_verify(multivariate_to_univariate_opening_claim, transcript); + + // info("pairing points size ", pairing_points.size()); + + // TODO(md): call assert true on the builder type to lay down the positive boolean constraint? +} + +template class AvmRecursiveVerifier_>; +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp new file mode 100644 index 00000000000..501296477e0 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp @@ -0,0 +1,39 @@ +#pragma once +#include "barretenberg/honk/proof_system/types/proof.hpp" +#include "barretenberg/stdlib/honk_recursion/transcript/transcript.hpp" +#include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" +#include "barretenberg/sumcheck/sumcheck.hpp" +#include "barretenberg/vm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class AvmRecursiveVerifier_ { + using FF = typename Flavor::FF; + using BF = typename Flavor::BF; + using Curve = typename Flavor::Curve; + using Commitment = typename Flavor::Commitment; + using CommitmentLabels = typename Flavor::CommitmentLabels; + using RelationSeparator = typename Flavor::RelationSeparator; + + using VerificationKey = typename Flavor::VerificationKey; + + using NativeVerificationKey = typename Flavor::NativeVerificationKey; + using VerifierCommitmentKey = typename Flavor::VerifierCommitmentKey; + using Builder = typename Flavor::CircuitBuilder; + using PCS = typename Flavor::PCS; + using Transcript = bb::BaseTranscript>; + using VerifierCommitments = typename Flavor::VerifierCommitments; + + public: + explicit AvmRecursiveVerifier_(Builder* builder, + const std::shared_ptr& native_verification_key); + explicit AvmRecursiveVerifier_(Builder* builder, const std::shared_ptr& vkey); + + void verify_proof(const HonkProof& proof); + + std::shared_ptr key; + std::map commitments; + + Builder* builder; + std::shared_ptr transcript; +}; +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp new file mode 100644 index 00000000000..9b7fa75841e --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp @@ -0,0 +1,127 @@ +// As this adds the honk_stdlib_recursion module to the cmake lists, we probably +// want to make vm recursion its own module + +// TMEPTEPTMEPTMEPTETMP +#include "barretenberg/circuit_checker/circuit_checker.hpp" + +#include "barretenberg/numeric/random/engine.hpp" +#include "barretenberg/stdlib/primitives/circuit_builders/circuit_builders_fwd.hpp" +#include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" +#include "barretenberg/sumcheck/instance/prover_instance.hpp" +#include "barretenberg/ultra_honk/ultra_prover.hpp" +#include "barretenberg/ultra_honk/ultra_verifier.hpp" +#include "barretenberg/vm/avm_trace/avm_common.hpp" +#include "barretenberg/vm/avm_trace/avm_helper.hpp" +#include "barretenberg/vm/avm_trace/avm_trace.hpp" +#include "barretenberg/vm/generated/avm_circuit_builder.hpp" +#include "barretenberg/vm/generated/avm_composer.hpp" +#include "barretenberg/vm/recursion/avm_recursive_flavor.hpp" +#include "barretenberg/vm/recursion/avm_recursive_verifier.hpp" +#include "barretenberg/vm/tests/helpers.test.hpp" +#include + +namespace tests_avm { + +using namespace bb; +using namespace bb::avm_trace; + +namespace { +auto& engine = bb::numeric::get_debug_randomness(); +} + +class AvmRecursiveTests : public ::testing::Test { + public: + using RecursiveFlavor = AvmRecursiveFlavor_; + + using InnerFlavor = typename RecursiveFlavor::NativeFlavor; + using InnerBuilder = AvmCircuitBuilder; + using InnerProver = AvmProver; + using InnerVerifier = AvmVerifier; + using InnerG1 = InnerFlavor::Commitment; + using InnerFF = InnerFlavor::FF; + using InnerBF = InnerFlavor::BF; + + using Transcript = InnerFlavor::Transcript; + + // Note: removed templating from eccvm one + using RecursiveVerifier = AvmRecursiveVerifier_; + + using OuterBuilder = typename RecursiveFlavor::CircuitBuilder; + using OuterProver = UltraProver_; + using OuterVerifier = UltraVerifier_; + using OuterProverInstance = ProverInstance_; + + static void SetUpTestSuite() { bb::srs::init_crs_factory("../srs_db/ignition"); } + + // Generate an extremely simple avm trace + // - no public inputs etc + + static AvmCircuitBuilder generate_avm_circuit() + { + AvmTraceBuilder trace_builder(generate_base_public_inputs()); + AvmCircuitBuilder builder; + + trace_builder.op_set(0, 1, 1, AvmMemoryTag::U8); + trace_builder.op_set(0, 1, 2, AvmMemoryTag::U8); + trace_builder.op_add(0, 1, 2, 3, AvmMemoryTag::U8); + trace_builder.return_op(0, 0, 0); + auto trace = trace_builder.finalize(); + + builder.set_trace(std::move(trace)); + builder.check_circuit(); + + return builder; + } +}; + +TEST_F(AvmRecursiveTests, recursion) +{ + + AvmCircuitBuilder circuit_builder = generate_avm_circuit(); + AvmComposer composer = AvmComposer(); + AvmProver prover = composer.create_prover(circuit_builder); + AvmVerifier verifier = composer.create_verifier(circuit_builder); + + HonkProof proof = prover.construct_proof(); + + // NOTE(md): got to do something about these public inputs + auto public_inputs = generate_base_public_inputs(); + std::vector> public_inputs_vec = bb::avm_trace::copy_public_inputs_columns(public_inputs); + + bool verified = verifier.verify_proof(proof, public_inputs_vec); + info("proof verified: ", verified); + ASSERT_TRUE(verified); + + // Create the outer verifier, to verify the proof + const std::shared_ptr verification_key = verifier.key; + // Verification key contains the commitments to things listed in the verifiercommitments class + // info((*verification_key).main_clk); + + info("got verification key"); + + OuterBuilder outer_circuit; + RecursiveVerifier recursive_verifier{ &outer_circuit, verification_key }; + + info("make recursive verifier"); + + // Note(md): no inputs are provided here - so the verifier is under-constrained in respect to public inputs + // If we return the pairing points then potentially they can be recursively verified nicely?? - but it is not clear + // how aggregation will work unless we make sure the avm has the same circuit size as other things + recursive_verifier.verify_proof(proof); + + info("Recursive verifier: num gates = ", outer_circuit.num_gates); + info("Outer circuit failed? ", outer_circuit.failed()); + CircuitChecker::check(outer_circuit); + + // Make a proof of the verifiers + auto ultra_instance = std::make_shared(outer_circuit); + OuterProver ultra_prover(ultra_instance); + auto ultra_verification_key = std::make_shared(ultra_instance->proving_key); + OuterVerifier ultra_verifier(ultra_verification_key); + + auto recursion_proof = ultra_prover.construct_proof(); + bool recursion_verified = ultra_verifier.verify_proof(recursion_proof); + + info("verified recursive proof, ", recursion_verified); +} +} // namespace tests_avm From 2b4a8a78a8afc559dcf2294ad7a88eb8eceb46bc Mon Sep 17 00:00:00 2001 From: jeanmon Date: Wed, 7 Aug 2024 12:19:54 +0000 Subject: [PATCH 02/21] 7790: port codegen part --- .../avm/generated/relations/alu_recursive.hpp | 12 ++ .../generated/relations/binary_recursive.hpp | 12 ++ .../relations/conversion_recursive.hpp | 12 ++ .../relations/incl_main_tag_err_recursive.hpp | 12 ++ .../relations/incl_mem_tag_err_recursive.hpp | 12 ++ .../relations/keccakf1600_recursive.hpp | 12 ++ .../kernel_output_lookup_recursive.hpp | 12 ++ .../generated/relations/kernel_recursive.hpp | 12 ++ .../lookup_byte_lengths_recursive.hpp | 12 ++ .../lookup_byte_operations_recursive.hpp | 12 ++ .../relations/lookup_cd_value_recursive.hpp | 12 ++ .../relations/lookup_div_u16_0_recursive.hpp | 12 ++ .../relations/lookup_div_u16_1_recursive.hpp | 12 ++ .../relations/lookup_div_u16_2_recursive.hpp | 12 ++ .../relations/lookup_div_u16_3_recursive.hpp | 12 ++ .../relations/lookup_div_u16_4_recursive.hpp | 12 ++ .../relations/lookup_div_u16_5_recursive.hpp | 12 ++ .../relations/lookup_div_u16_6_recursive.hpp | 12 ++ .../relations/lookup_div_u16_7_recursive.hpp | 12 ++ .../lookup_into_kernel_recursive.hpp | 12 ++ .../lookup_mem_rng_chk_hi_recursive.hpp | 12 ++ .../lookup_mem_rng_chk_lo_recursive.hpp | 12 ++ .../lookup_mem_rng_chk_mid_recursive.hpp | 12 ++ .../relations/lookup_opcode_gas_recursive.hpp | 12 ++ .../relations/lookup_pow_2_0_recursive.hpp | 12 ++ .../relations/lookup_pow_2_1_recursive.hpp | 12 ++ .../relations/lookup_ret_value_recursive.hpp | 12 ++ .../relations/lookup_u16_0_recursive.hpp | 12 ++ .../relations/lookup_u16_10_recursive.hpp | 12 ++ .../relations/lookup_u16_11_recursive.hpp | 12 ++ .../relations/lookup_u16_12_recursive.hpp | 12 ++ .../relations/lookup_u16_13_recursive.hpp | 12 ++ .../relations/lookup_u16_14_recursive.hpp | 12 ++ .../relations/lookup_u16_1_recursive.hpp | 12 ++ .../relations/lookup_u16_2_recursive.hpp | 12 ++ .../relations/lookup_u16_3_recursive.hpp | 12 ++ .../relations/lookup_u16_4_recursive.hpp | 12 ++ .../relations/lookup_u16_5_recursive.hpp | 12 ++ .../relations/lookup_u16_6_recursive.hpp | 12 ++ .../relations/lookup_u16_7_recursive.hpp | 12 ++ .../relations/lookup_u16_8_recursive.hpp | 12 ++ .../relations/lookup_u16_9_recursive.hpp | 12 ++ .../relations/lookup_u8_0_recursive.hpp | 12 ++ .../relations/lookup_u8_1_recursive.hpp | 12 ++ .../generated/relations/main_recursive.hpp | 12 ++ .../avm/generated/relations/mem_recursive.hpp | 12 ++ .../relations/mem_slice_recursive.hpp | 12 ++ .../relations/pedersen_recursive.hpp | 12 ++ .../relations/perm_main_alu_recursive.hpp | 12 ++ .../relations/perm_main_bin_recursive.hpp | 12 ++ .../relations/perm_main_conv_recursive.hpp | 12 ++ .../relations/perm_main_mem_a_recursive.hpp | 12 ++ .../relations/perm_main_mem_b_recursive.hpp | 12 ++ .../relations/perm_main_mem_c_recursive.hpp | 12 ++ .../relations/perm_main_mem_d_recursive.hpp | 12 ++ .../perm_main_mem_ind_addr_a_recursive.hpp | 12 ++ .../perm_main_mem_ind_addr_b_recursive.hpp | 12 ++ .../perm_main_mem_ind_addr_c_recursive.hpp | 12 ++ .../perm_main_mem_ind_addr_d_recursive.hpp | 12 ++ .../perm_main_pedersen_recursive.hpp | 12 ++ .../perm_main_pos2_perm_recursive.hpp | 12 ++ .../relations/perm_main_slice_recursive.hpp | 12 ++ .../perm_pos_mem_read_a_recursive.hpp | 12 ++ .../perm_pos_mem_read_b_recursive.hpp | 12 ++ .../perm_pos_mem_read_c_recursive.hpp | 12 ++ .../perm_pos_mem_read_d_recursive.hpp | 12 ++ .../perm_pos_mem_write_a_recursive.hpp | 12 ++ .../perm_pos_mem_write_b_recursive.hpp | 12 ++ .../perm_pos_mem_write_c_recursive.hpp | 12 ++ .../perm_pos_mem_write_d_recursive.hpp | 12 ++ .../relations/perm_slice_mem_recursive.hpp | 12 ++ .../relations/poseidon2_recursive.hpp | 12 ++ .../range_check_da_gas_hi_recursive.hpp | 12 ++ .../range_check_da_gas_lo_recursive.hpp | 12 ++ .../range_check_l2_gas_hi_recursive.hpp | 12 ++ .../range_check_l2_gas_lo_recursive.hpp | 12 ++ .../generated/relations/sha256_recursive.hpp | 12 ++ .../vm/avm/recursion/avm_recursive_flavor.hpp | 136 +++++++++--------- .../avm/recursion/avm_recursive_verifier.hpp | 2 +- .../recursion/avm_recursive_verifier.test.cpp | 12 +- .../bb-pil-backend/src/lookup_builder.rs | 27 ++++ .../bb-pil-backend/src/permutation_builder.rs | 27 ++++ .../bb-pil-backend/src/relation_builder.rs | 28 ++++ .../templates/lookup_recursive.hpp.hbs | 12 ++ .../templates/permutation_recursive.hpp.hbs | 12 ++ .../templates/relation_recursive.hpp.hbs | 12 ++ 86 files changed, 1116 insertions(+), 76 deletions(-) create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/alu_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/binary_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/conversion_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_main_tag_err_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_mem_tag_err_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/keccakf1600_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_output_lookup_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_lengths_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_operations_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_cd_value_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_0_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_1_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_2_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_3_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_4_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_5_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_6_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_7_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_into_kernel_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_hi_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_lo_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_mid_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_opcode_gas_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_0_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_1_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_ret_value_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_0_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_10_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_11_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_12_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_13_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_14_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_1_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_2_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_3_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_4_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_5_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_6_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_7_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_8_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_9_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_0_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_1_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/main_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_slice_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/pedersen_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_alu_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_bin_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_conv_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_a_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_b_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_c_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_d_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_a_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_b_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_c_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_d_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pedersen_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pos2_perm_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_slice_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_a_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_b_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_c_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_d_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_a_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_b_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_c_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_d_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_slice_mem_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_hi_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_lo_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_hi_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_lo_recursive.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/sha256_recursive.hpp create mode 100644 bb-pilcom/bb-pil-backend/templates/lookup_recursive.hpp.hbs create mode 100644 bb-pilcom/bb-pil-backend/templates/permutation_recursive.hpp.hbs create mode 100644 bb-pilcom/bb-pil-backend/templates/relation_recursive.hpp.hbs diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/alu_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/alu_recursive.hpp new file mode 100644 index 00000000000..a0313559b33 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/alu_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/alu_recursive.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class Avm_vm::alu_recursiveImpl>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::alu_recursiveImpl, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/binary_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/binary_recursive.hpp new file mode 100644 index 00000000000..15c808bba41 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/binary_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/binary_recursive.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class Avm_vm::binary_recursiveImpl>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::binary_recursiveImpl, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/conversion_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/conversion_recursive.hpp new file mode 100644 index 00000000000..a666ac8ce5e --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/conversion_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/conversion_recursive.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class Avm_vm::conversion_recursiveImpl>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::conversion_recursiveImpl, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_main_tag_err_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_main_tag_err_recursive.hpp new file mode 100644 index 00000000000..9bff05a287f --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_main_tag_err_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/incl_main_tag_err.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class incl_main_tag_err>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(incl_main_tag_err, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_mem_tag_err_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_mem_tag_err_recursive.hpp new file mode 100644 index 00000000000..a6ade3c1ddc --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_mem_tag_err_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/incl_mem_tag_err.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class incl_mem_tag_err>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(incl_mem_tag_err, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/keccakf1600_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/keccakf1600_recursive.hpp new file mode 100644 index 00000000000..a65ba7a8c25 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/keccakf1600_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/keccakf1600_recursive.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class Avm_vm::keccakf1600_recursiveImpl>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::keccakf1600_recursiveImpl, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_output_lookup_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_output_lookup_recursive.hpp new file mode 100644 index 00000000000..bfcf72ba19b --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_output_lookup_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/kernel_output_lookup.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class kernel_output_lookup>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(kernel_output_lookup, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_recursive.hpp new file mode 100644 index 00000000000..5cdcfaecaa6 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/kernel_recursive.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class Avm_vm::kernel_recursiveImpl>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::kernel_recursiveImpl, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_lengths_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_lengths_recursive.hpp new file mode 100644 index 00000000000..e68d6432476 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_lengths_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_byte_lengths.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_byte_lengths>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_byte_lengths, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_operations_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_operations_recursive.hpp new file mode 100644 index 00000000000..c90107d4d51 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_operations_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_byte_operations.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_byte_operations>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_byte_operations, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_cd_value_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_cd_value_recursive.hpp new file mode 100644 index 00000000000..b905bcbcb60 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_cd_value_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_cd_value.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_cd_value>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_cd_value, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_0_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_0_recursive.hpp new file mode 100644 index 00000000000..e6da02c0c62 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_0_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_0.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_div_u16_0>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_0, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_1_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_1_recursive.hpp new file mode 100644 index 00000000000..7e22cfd0b56 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_1_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_1.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_div_u16_1>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_1, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_2_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_2_recursive.hpp new file mode 100644 index 00000000000..38f8e46d8a2 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_2_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_2.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_div_u16_2>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_2, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_3_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_3_recursive.hpp new file mode 100644 index 00000000000..65f419807c4 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_3_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_3.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_div_u16_3>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_3, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_4_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_4_recursive.hpp new file mode 100644 index 00000000000..a45b196cb6e --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_4_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_4.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_div_u16_4>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_4, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_5_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_5_recursive.hpp new file mode 100644 index 00000000000..33713ac3ed7 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_5_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_5.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_div_u16_5>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_5, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_6_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_6_recursive.hpp new file mode 100644 index 00000000000..17c55090ffb --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_6_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_6.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_div_u16_6>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_6, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_7_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_7_recursive.hpp new file mode 100644 index 00000000000..e2a51776a25 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_7_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_7.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_div_u16_7>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_7, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_into_kernel_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_into_kernel_recursive.hpp new file mode 100644 index 00000000000..a90a7f0860f --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_into_kernel_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_into_kernel.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_into_kernel>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_into_kernel, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_hi_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_hi_recursive.hpp new file mode 100644 index 00000000000..06bfff17349 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_hi_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_hi.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_mem_rng_chk_hi>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_mem_rng_chk_hi, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_lo_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_lo_recursive.hpp new file mode 100644 index 00000000000..0a2a017a754 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_lo_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_lo.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_mem_rng_chk_lo>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_mem_rng_chk_lo, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_mid_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_mid_recursive.hpp new file mode 100644 index 00000000000..84bee373e91 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_mid_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_mid.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_mem_rng_chk_mid>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_mem_rng_chk_mid, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_opcode_gas_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_opcode_gas_recursive.hpp new file mode 100644 index 00000000000..f34ab25c563 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_opcode_gas_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_opcode_gas.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_opcode_gas>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_opcode_gas, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_0_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_0_recursive.hpp new file mode 100644 index 00000000000..0bfaf978ecf --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_0_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_pow_2_0.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_pow_2_0>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_pow_2_0, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_1_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_1_recursive.hpp new file mode 100644 index 00000000000..95afe15dfe2 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_1_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_pow_2_1.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_pow_2_1>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_pow_2_1, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_ret_value_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_ret_value_recursive.hpp new file mode 100644 index 00000000000..3c4a3101062 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_ret_value_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_ret_value.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_ret_value>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_ret_value, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_0_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_0_recursive.hpp new file mode 100644 index 00000000000..4b91cd9fd9f --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_0_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_0.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u16_0>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_0, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_10_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_10_recursive.hpp new file mode 100644 index 00000000000..80a9d0e5d7c --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_10_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_10.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u16_10>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_10, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_11_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_11_recursive.hpp new file mode 100644 index 00000000000..2aafb35f24f --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_11_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_11.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u16_11>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_11, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_12_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_12_recursive.hpp new file mode 100644 index 00000000000..f0106e87d15 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_12_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_12.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u16_12>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_12, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_13_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_13_recursive.hpp new file mode 100644 index 00000000000..03efb9ec8ff --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_13_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_13.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u16_13>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_13, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_14_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_14_recursive.hpp new file mode 100644 index 00000000000..8dd82de9f28 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_14_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_14.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u16_14>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_14, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_1_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_1_recursive.hpp new file mode 100644 index 00000000000..5da70d1136a --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_1_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_1.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u16_1>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_1, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_2_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_2_recursive.hpp new file mode 100644 index 00000000000..2a65246cb2c --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_2_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_2.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u16_2>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_2, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_3_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_3_recursive.hpp new file mode 100644 index 00000000000..85eaa6c1aa9 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_3_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_3.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u16_3>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_3, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_4_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_4_recursive.hpp new file mode 100644 index 00000000000..4a58bca76ca --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_4_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_4.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u16_4>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_4, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_5_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_5_recursive.hpp new file mode 100644 index 00000000000..9d5799a896b --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_5_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_5.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u16_5>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_5, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_6_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_6_recursive.hpp new file mode 100644 index 00000000000..febfc33d07d --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_6_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_6.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u16_6>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_6, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_7_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_7_recursive.hpp new file mode 100644 index 00000000000..cf839e1a5ce --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_7_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_7.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u16_7>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_7, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_8_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_8_recursive.hpp new file mode 100644 index 00000000000..af447387297 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_8_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_8.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u16_8>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_8, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_9_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_9_recursive.hpp new file mode 100644 index 00000000000..f5ae7376ebf --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_9_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_9.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u16_9>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_9, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_0_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_0_recursive.hpp new file mode 100644 index 00000000000..71fb1c80d0f --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_0_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u8_0.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u8_0>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u8_0, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_1_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_1_recursive.hpp new file mode 100644 index 00000000000..98a23b3a371 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_1_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u8_1.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class lookup_u8_1>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u8_1, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/main_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/main_recursive.hpp new file mode 100644 index 00000000000..10723902c91 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/main_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/main_recursive.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class Avm_vm::main_recursiveImpl>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::main_recursiveImpl, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_recursive.hpp new file mode 100644 index 00000000000..31dadb6ac1d --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/mem_recursive.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class Avm_vm::mem_recursiveImpl>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::mem_recursiveImpl, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_slice_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_slice_recursive.hpp new file mode 100644 index 00000000000..f879a0074c6 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_slice_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/mem_slice_recursive.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class Avm_vm::mem_slice_recursiveImpl>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::mem_slice_recursiveImpl, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/pedersen_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/pedersen_recursive.hpp new file mode 100644 index 00000000000..ee7edc43821 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/pedersen_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/pedersen_recursive.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class Avm_vm::pedersen_recursiveImpl>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::pedersen_recursiveImpl, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_alu_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_alu_recursive.hpp new file mode 100644 index 00000000000..66e962e3b36 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_alu_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_alu.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_main_alu>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_alu, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_bin_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_bin_recursive.hpp new file mode 100644 index 00000000000..6ce2b9b9870 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_bin_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_bin.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_main_bin>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_bin, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_conv_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_conv_recursive.hpp new file mode 100644 index 00000000000..a89c9a6932a --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_conv_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_conv.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_main_conv>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_conv, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_a_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_a_recursive.hpp new file mode 100644 index 00000000000..701d684c83e --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_a_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_a.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_main_mem_a>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_a, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_b_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_b_recursive.hpp new file mode 100644 index 00000000000..9c520e25125 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_b_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_b.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_main_mem_b>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_b, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_c_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_c_recursive.hpp new file mode 100644 index 00000000000..e9797c57278 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_c_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_c.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_main_mem_c>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_c, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_d_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_d_recursive.hpp new file mode 100644 index 00000000000..7b090cd4a21 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_d_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_d.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_main_mem_d>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_d, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_a_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_a_recursive.hpp new file mode 100644 index 00000000000..42fc58f87c0 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_a_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_a.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_main_mem_ind_addr_a>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_ind_addr_a, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_b_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_b_recursive.hpp new file mode 100644 index 00000000000..aeb3ef4a800 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_b_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_b.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_main_mem_ind_addr_b>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_ind_addr_b, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_c_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_c_recursive.hpp new file mode 100644 index 00000000000..b6ca52b859c --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_c_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_c.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_main_mem_ind_addr_c>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_ind_addr_c, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_d_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_d_recursive.hpp new file mode 100644 index 00000000000..c789eb6c387 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_d_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_d.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_main_mem_ind_addr_d>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_ind_addr_d, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pedersen_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pedersen_recursive.hpp new file mode 100644 index 00000000000..4801112841b --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pedersen_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_pedersen.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_main_pedersen>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_pedersen, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pos2_perm_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pos2_perm_recursive.hpp new file mode 100644 index 00000000000..c3345797fb6 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pos2_perm_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_pos2_perm.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_main_pos2_perm>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_pos2_perm, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_slice_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_slice_recursive.hpp new file mode 100644 index 00000000000..6d957380eb0 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_slice_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_slice.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_main_slice>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_slice, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_a_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_a_recursive.hpp new file mode 100644 index 00000000000..80d9979b0cd --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_a_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_read_a.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_pos_mem_read_a>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_read_a, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_b_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_b_recursive.hpp new file mode 100644 index 00000000000..00b1fa53706 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_b_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_read_b.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_pos_mem_read_b>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_read_b, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_c_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_c_recursive.hpp new file mode 100644 index 00000000000..ec65c9fe2f0 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_c_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_read_c.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_pos_mem_read_c>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_read_c, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_d_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_d_recursive.hpp new file mode 100644 index 00000000000..3e91668cedc --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_d_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_read_d.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_pos_mem_read_d>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_read_d, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_a_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_a_recursive.hpp new file mode 100644 index 00000000000..62a19a32eaf --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_a_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_write_a.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_pos_mem_write_a>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_write_a, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_b_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_b_recursive.hpp new file mode 100644 index 00000000000..7b35ac06f5f --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_b_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_write_b.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_pos_mem_write_b>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_write_b, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_c_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_c_recursive.hpp new file mode 100644 index 00000000000..5120d85110e --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_c_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_write_c.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_pos_mem_write_c>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_write_c, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_d_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_d_recursive.hpp new file mode 100644 index 00000000000..6de0bcb5283 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_d_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_write_d.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_pos_mem_write_d>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_write_d, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_slice_mem_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_slice_mem_recursive.hpp new file mode 100644 index 00000000000..05951e07e93 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_slice_mem_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_slice_mem.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class perm_slice_mem>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_slice_mem, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2_recursive.hpp new file mode 100644 index 00000000000..4a7940daf71 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/poseidon2_recursive.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class Avm_vm::poseidon2_recursiveImpl>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::poseidon2_recursiveImpl, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_hi_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_hi_recursive.hpp new file mode 100644 index 00000000000..66a8b10995a --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_hi_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/range_check_da_gas_hi.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class range_check_da_gas_hi>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(range_check_da_gas_hi, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_lo_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_lo_recursive.hpp new file mode 100644 index 00000000000..17080775f7c --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_lo_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/range_check_da_gas_lo.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class range_check_da_gas_lo>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(range_check_da_gas_lo, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_hi_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_hi_recursive.hpp new file mode 100644 index 00000000000..bc1958d1a32 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_hi_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/range_check_l2_gas_hi.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class range_check_l2_gas_hi>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(range_check_l2_gas_hi, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_lo_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_lo_recursive.hpp new file mode 100644 index 00000000000..dff7690b905 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_lo_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/range_check_l2_gas_lo.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class range_check_l2_gas_lo>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(range_check_l2_gas_lo, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/sha256_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/sha256_recursive.hpp new file mode 100644 index 00000000000..87a6a032133 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/sha256_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/sha256_recursive.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class Avm_vm::sha256_recursiveImpl>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::sha256_recursiveImpl, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp index 83957f8fbde..5954309d8ec 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp @@ -16,74 +16,72 @@ #include "barretenberg/stdlib_circuit_builders/ultra_circuit_builder.hpp" // Include relation files -#include "barretenberg/relations/generated/avm/alu.hpp" -#include "barretenberg/relations/generated/avm/binary.hpp" -#include "barretenberg/relations/generated/avm/conversion.hpp" -#include "barretenberg/relations/generated/avm/gas.hpp" -#include "barretenberg/relations/generated/avm/incl_main_tag_err.hpp" -#include "barretenberg/relations/generated/avm/incl_mem_tag_err.hpp" -#include "barretenberg/relations/generated/avm/keccakf1600.hpp" -#include "barretenberg/relations/generated/avm/kernel.hpp" -#include "barretenberg/relations/generated/avm/kernel_output_lookup.hpp" -#include "barretenberg/relations/generated/avm/lookup_byte_lengths.hpp" -#include "barretenberg/relations/generated/avm/lookup_byte_operations.hpp" -#include "barretenberg/relations/generated/avm/lookup_div_u16_0.hpp" -#include "barretenberg/relations/generated/avm/lookup_div_u16_1.hpp" -#include "barretenberg/relations/generated/avm/lookup_div_u16_2.hpp" -#include "barretenberg/relations/generated/avm/lookup_div_u16_3.hpp" -#include "barretenberg/relations/generated/avm/lookup_div_u16_4.hpp" -#include "barretenberg/relations/generated/avm/lookup_div_u16_5.hpp" -#include "barretenberg/relations/generated/avm/lookup_div_u16_6.hpp" -#include "barretenberg/relations/generated/avm/lookup_div_u16_7.hpp" -#include "barretenberg/relations/generated/avm/lookup_into_kernel.hpp" -#include "barretenberg/relations/generated/avm/lookup_mem_rng_chk_hi.hpp" -#include "barretenberg/relations/generated/avm/lookup_mem_rng_chk_lo.hpp" -#include "barretenberg/relations/generated/avm/lookup_mem_rng_chk_mid.hpp" -#include "barretenberg/relations/generated/avm/lookup_opcode_gas.hpp" -#include "barretenberg/relations/generated/avm/lookup_pow_2_0.hpp" -#include "barretenberg/relations/generated/avm/lookup_pow_2_1.hpp" -#include "barretenberg/relations/generated/avm/lookup_u16_0.hpp" -#include "barretenberg/relations/generated/avm/lookup_u16_1.hpp" -#include "barretenberg/relations/generated/avm/lookup_u16_10.hpp" -#include "barretenberg/relations/generated/avm/lookup_u16_11.hpp" -#include "barretenberg/relations/generated/avm/lookup_u16_12.hpp" -#include "barretenberg/relations/generated/avm/lookup_u16_13.hpp" -#include "barretenberg/relations/generated/avm/lookup_u16_14.hpp" -#include "barretenberg/relations/generated/avm/lookup_u16_2.hpp" -#include "barretenberg/relations/generated/avm/lookup_u16_3.hpp" -#include "barretenberg/relations/generated/avm/lookup_u16_4.hpp" -#include "barretenberg/relations/generated/avm/lookup_u16_5.hpp" -#include "barretenberg/relations/generated/avm/lookup_u16_6.hpp" -#include "barretenberg/relations/generated/avm/lookup_u16_7.hpp" -#include "barretenberg/relations/generated/avm/lookup_u16_8.hpp" -#include "barretenberg/relations/generated/avm/lookup_u16_9.hpp" -#include "barretenberg/relations/generated/avm/lookup_u8_0.hpp" -#include "barretenberg/relations/generated/avm/lookup_u8_1.hpp" -#include "barretenberg/relations/generated/avm/main.hpp" -#include "barretenberg/relations/generated/avm/mem.hpp" -#include "barretenberg/relations/generated/avm/pedersen.hpp" -#include "barretenberg/relations/generated/avm/perm_main_alu.hpp" -#include "barretenberg/relations/generated/avm/perm_main_bin.hpp" -#include "barretenberg/relations/generated/avm/perm_main_conv.hpp" -#include "barretenberg/relations/generated/avm/perm_main_mem_a.hpp" -#include "barretenberg/relations/generated/avm/perm_main_mem_b.hpp" -#include "barretenberg/relations/generated/avm/perm_main_mem_c.hpp" -#include "barretenberg/relations/generated/avm/perm_main_mem_d.hpp" -#include "barretenberg/relations/generated/avm/perm_main_mem_ind_addr_a.hpp" -#include "barretenberg/relations/generated/avm/perm_main_mem_ind_addr_b.hpp" -#include "barretenberg/relations/generated/avm/perm_main_mem_ind_addr_c.hpp" -#include "barretenberg/relations/generated/avm/perm_main_mem_ind_addr_d.hpp" -#include "barretenberg/relations/generated/avm/perm_main_pedersen.hpp" -#include "barretenberg/relations/generated/avm/perm_main_pos2_perm.hpp" -#include "barretenberg/relations/generated/avm/poseidon2.hpp" -#include "barretenberg/relations/generated/avm/powers.hpp" -#include "barretenberg/relations/generated/avm/range_check_da_gas_hi.hpp" -#include "barretenberg/relations/generated/avm/range_check_da_gas_lo.hpp" -#include "barretenberg/relations/generated/avm/range_check_l2_gas_hi.hpp" -#include "barretenberg/relations/generated/avm/range_check_l2_gas_lo.hpp" -#include "barretenberg/relations/generated/avm/sha256.hpp" - -#include "barretenberg/vm/generated/avm_flavor.hpp" +#include "barretenberg/vm/avm/generated/relations/alu.hpp" +#include "barretenberg/vm/avm/generated/relations/binary.hpp" +#include "barretenberg/vm/avm/generated/relations/conversion.hpp" +#include "barretenberg/vm/avm/generated/relations/incl_main_tag_err.hpp" +#include "barretenberg/vm/avm/generated/relations/incl_mem_tag_err.hpp" +#include "barretenberg/vm/avm/generated/relations/keccakf1600.hpp" +#include "barretenberg/vm/avm/generated/relations/kernel.hpp" +#include "barretenberg/vm/avm/generated/relations/kernel_output_lookup.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_byte_lengths.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_byte_operations.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_0.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_1.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_2.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_3.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_4.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_5.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_6.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_7.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_into_kernel.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_hi.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_lo.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_mid.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_opcode_gas.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_pow_2_0.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_pow_2_1.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_0.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_1.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_10.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_11.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_12.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_13.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_14.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_2.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_3.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_4.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_5.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_6.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_7.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_8.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u16_9.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u8_0.hpp" +#include "barretenberg/vm/avm/generated/relations/lookup_u8_1.hpp" +#include "barretenberg/vm/avm/generated/relations/main.hpp" +#include "barretenberg/vm/avm/generated/relations/mem.hpp" +#include "barretenberg/vm/avm/generated/relations/pedersen.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_alu.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_bin.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_conv.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_a.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_b.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_c.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_d.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_a.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_b.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_c.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_d.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_pedersen.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_main_pos2_perm.hpp" +#include "barretenberg/vm/avm/generated/relations/poseidon2.hpp" +#include "barretenberg/vm/avm/generated/relations/range_check_da_gas_hi.hpp" +#include "barretenberg/vm/avm/generated/relations/range_check_da_gas_lo.hpp" +#include "barretenberg/vm/avm/generated/relations/range_check_l2_gas_hi.hpp" +#include "barretenberg/vm/avm/generated/relations/range_check_l2_gas_lo.hpp" +#include "barretenberg/vm/avm/generated/relations/sha256.hpp" + +#include "barretenberg/vm/avm/generated/flavor.hpp" #include "barretenberg/commitment_schemes/commitment_key.hpp" #include "barretenberg/ecc/curves/bn254/g1.hpp" @@ -111,7 +109,7 @@ template class AvmRecursiveFlavor_ { using VerifierCommitmentKey = bb::VerifierCommitmentKey; - using Relations = AvmFlavor::Relations_; + using Relations = AvmFlavor::Relations; static constexpr size_t NUM_WIRES = NativeFlavor::NUM_WIRES; static constexpr size_t NUM_ALL_ENTITIES = NativeFlavor::NUM_ALL_ENTITIES; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp index 501296477e0..7ac3f8c269f 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp @@ -3,7 +3,7 @@ #include "barretenberg/stdlib/honk_recursion/transcript/transcript.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" #include "barretenberg/sumcheck/sumcheck.hpp" -#include "barretenberg/vm/recursion/avm_recursive_flavor.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" namespace bb { template class AvmRecursiveVerifier_ { diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp index 9b7fa75841e..f0c5ad30de2 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp @@ -10,12 +10,12 @@ #include "barretenberg/sumcheck/instance/prover_instance.hpp" #include "barretenberg/ultra_honk/ultra_prover.hpp" #include "barretenberg/ultra_honk/ultra_verifier.hpp" -#include "barretenberg/vm/avm_trace/avm_common.hpp" -#include "barretenberg/vm/avm_trace/avm_helper.hpp" -#include "barretenberg/vm/avm_trace/avm_trace.hpp" -#include "barretenberg/vm/generated/avm_circuit_builder.hpp" -#include "barretenberg/vm/generated/avm_composer.hpp" -#include "barretenberg/vm/recursion/avm_recursive_flavor.hpp" +#include "barretenberg/vm/avm/generated/circuit_builder.hpp" +#include "barretenberg/vm/avm/generated/composer.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" +#include "barretenberg/vm/avm/trace/common.hpp" +#include "barretenberg/vm/avm/trace/helper.hpp" +#include "barretenberg/vm/avm/trace/trace.hpp" #include "barretenberg/vm/recursion/avm_recursive_verifier.hpp" #include "barretenberg/vm/tests/helpers.test.hpp" #include diff --git a/bb-pilcom/bb-pil-backend/src/lookup_builder.rs b/bb-pilcom/bb-pil-backend/src/lookup_builder.rs index b67d8528f81..02fb7de61b8 100644 --- a/bb-pilcom/bb-pil-backend/src/lookup_builder.rs +++ b/bb-pilcom/bb-pil-backend/src/lookup_builder.rs @@ -80,12 +80,34 @@ impl LookupBuilder for BBFiles { ) .unwrap(); + handlebars + .register_template_string( + "lookup_recursive.hpp", + std::str::from_utf8(include_bytes!("../templates/lookup_recursive.hpp.hbs")) + .unwrap(), + ) + .unwrap(); + for lookup in lookups.iter() { let data = create_lookup_settings_data(lookup); let lookup_settings = handlebars.render("lookup.hpp", &data).unwrap(); let file_name = format!("{}.hpp", lookup.name); self.write_file(Some(&self.relations), &file_name, &lookup_settings); + + // Recursive related file + let recursive_data = create_lookup_recursive_settings_data(lookup); + let recursive_settings = handlebars + .render("lookup_recursive.hpp", &recursive_data) + .unwrap(); + + let recursive_file_name = format!("{}_recursive{}", lookup.name, ".hpp".to_owned()); + + self.write_file( + Some(&self.relations), + &recursive_file_name, + &recursive_settings, + ); } lookups @@ -109,6 +131,7 @@ pub fn get_counts_from_lookups(lookups: &[Lookup]) -> Vec { fn create_lookup_settings_data(lookup: &Lookup) -> Json { let columns_per_set = lookup.left.cols.len(); + let counts_poly_name = lookup.counts_poly.to_owned(); // NOTE: https://github.com/AztecProtocol/aztec-packages/issues/3879 // Settings are not flexible enough to combine inverses @@ -175,6 +198,10 @@ fn create_lookup_settings_data(lookup: &Lookup) -> Json { }) } +fn create_lookup_recursive_settings_data(lookup: &Lookup) -> Json { + json!({"lookup_name": lookup.name}) +} + fn get_lookup_side( def: &SelectedExpressions>, ) -> LookupSide { diff --git a/bb-pilcom/bb-pil-backend/src/permutation_builder.rs b/bb-pilcom/bb-pil-backend/src/permutation_builder.rs index 5a77a8a2883..b9912447b71 100644 --- a/bb-pilcom/bb-pil-backend/src/permutation_builder.rs +++ b/bb-pilcom/bb-pil-backend/src/permutation_builder.rs @@ -77,12 +77,35 @@ impl PermutationBuilder for BBFiles { ) .unwrap(); + handlebars + .register_template_string( + "permutation_recursive.hpp", + std::str::from_utf8(include_bytes!("../templates/permutation_recursive.hpp.hbs")) + .unwrap(), + ) + .unwrap(); + for permutation in permutations.iter() { let data = create_permutation_settings_data(permutation); let perm_settings = handlebars.render("permutation.hpp", &data).unwrap(); let file_name = format!("{}.hpp", permutation.name); self.write_file(Some(&self.relations), &file_name, &perm_settings); + + // Recursive related file + let recursive_data = create_perm_recursive_settings_data(permutation); + let recursive_settings = handlebars + .render("permutation_recursive.hpp", &recursive_data) + .unwrap(); + + let recursive_file_name = + format!("{}_recursive{}", permutation.name, ".hpp".to_owned()); + + self.write_file( + Some(&self.relations), + &recursive_file_name, + &recursive_settings, + ); } permutations @@ -142,6 +165,10 @@ fn create_permutation_settings_data(permutation: &Permutation) -> Json { }) } +fn create_perm_recursive_settings_data(permutation: &Permutation) -> Json { + json!({"perm_name": permutation.name}) +} + fn get_perm_side( def: &SelectedExpressions>, ) -> PermutationSide { diff --git a/bb-pilcom/bb-pil-backend/src/relation_builder.rs b/bb-pilcom/bb-pil-backend/src/relation_builder.rs index 513d44c95fe..68f2a379c35 100644 --- a/bb-pilcom/bb-pil-backend/src/relation_builder.rs +++ b/bb-pilcom/bb-pil-backend/src/relation_builder.rs @@ -61,6 +61,8 @@ pub trait RelationBuilder { skippable_if: &Option, alias_polys_in_order: &Vec<(String, u64, String)>, ); + + fn create_recursive_relation(&self, root_name: &str, name: &str); } impl RelationBuilder for BBFiles { @@ -108,6 +110,7 @@ impl RelationBuilder for BBFiles { &skippable_if, &used_alias_defs_in_order, ); + self.create_recursive_relation(file_name, relation_name); } relations.sort(); @@ -172,6 +175,31 @@ impl RelationBuilder for BBFiles { &relation_hpp, ); } + + fn create_recursive_relation(&self, root_name: &str, name: &str) { + let name = &format!("{name}_recursive"); + let data = &json!({ + "root_name": root_name, + "name": name, + }); + + let mut handlebars = Handlebars::new(); + handlebars + .register_template_string( + "relation_recursive.hpp", + std::str::from_utf8(include_bytes!("../templates/relation_recursive.hpp.hbs")) + .unwrap(), + ) + .unwrap(); + + let relation_recursive_hpp = handlebars.render("relation_recursive.hpp", data).unwrap(); + + self.write_file( + Some(&self.relations), + &format!("{}.hpp", snake_case(name)), + &relation_recursive_hpp, + ); + } } /// Group relations per file diff --git a/bb-pilcom/bb-pil-backend/templates/lookup_recursive.hpp.hbs b/bb-pilcom/bb-pil-backend/templates/lookup_recursive.hpp.hbs new file mode 100644 index 00000000000..fd33fcf62e1 --- /dev/null +++ b/bb-pilcom/bb-pil-backend/templates/lookup_recursive.hpp.hbs @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/{{lookup_name}}.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class {{lookup_name}}>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS({{lookup_name}}, AvmRecursiveFlavor_); +} // namespace bb diff --git a/bb-pilcom/bb-pil-backend/templates/permutation_recursive.hpp.hbs b/bb-pilcom/bb-pil-backend/templates/permutation_recursive.hpp.hbs new file mode 100644 index 00000000000..3ff4e144b36 --- /dev/null +++ b/bb-pilcom/bb-pil-backend/templates/permutation_recursive.hpp.hbs @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/{{perm_name}}.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class {{perm_name}}>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS({{perm_name}}, AvmRecursiveFlavor_); +} // namespace bb \ No newline at end of file diff --git a/bb-pilcom/bb-pil-backend/templates/relation_recursive.hpp.hbs b/bb-pilcom/bb-pil-backend/templates/relation_recursive.hpp.hbs new file mode 100644 index 00000000000..564db585730 --- /dev/null +++ b/bb-pilcom/bb-pil-backend/templates/relation_recursive.hpp.hbs @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/{{name}}.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class {{root_name}}_vm::{{name}}Impl>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS({{root_name}}_vm::{{name}}Impl, AvmRecursiveFlavor_); +} // namespace bb From 5947d162e3085a12f98660016248afa5a3d1949b Mon Sep 17 00:00:00 2001 From: jeanmon Date: Wed, 7 Aug 2024 17:53:54 +0000 Subject: [PATCH 03/21] 7790: Fix compilation issues --- .../barretenberg/vm/avm/generated/flavor.cpp | 6 +- .../barretenberg/vm/avm/generated/flavor.hpp | 69 ++-- .../vm/avm/recursion/avm_recursive_flavor.hpp | 2 +- .../avm/recursion/avm_recursive_verifier.cpp | 7 +- .../recursion/avm_recursive_verifier.test.cpp | 10 +- .../bb-pil-backend/templates/flavor.cpp.hbs | 7 - .../bb-pil-backend/templates/flavor.hpp.hbs | 367 +++++++++--------- 7 files changed, 237 insertions(+), 231 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp index e8ca84af006..8fb9bcef6f2 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp @@ -2436,10 +2436,8 @@ AvmFlavor::VerifierCommitments::VerifierCommitments(const std::shared_ptrbyte_lookup_table_input_b; byte_lookup_table_op_id = verification_key->byte_lookup_table_op_id; byte_lookup_table_output = verification_key->byte_lookup_table_output; - gas_base_da_gas_fixed_table = verification_key->gas_base_da_gas_fixed_table; - gas_base_l2_gas_fixed_table = verification_key->gas_base_l2_gas_fixed_table; - gas_dyn_da_gas_fixed_table = verification_key->gas_dyn_da_gas_fixed_table; - gas_dyn_l2_gas_fixed_table = verification_key->gas_dyn_l2_gas_fixed_table; + gas_da_gas_fixed_table = verification_key->gas_da_gas_fixed_table; + gas_l2_gas_fixed_table = verification_key->gas_l2_gas_fixed_table; gas_sel_gas_cost = verification_key->gas_sel_gas_cost; main_clk = verification_key->main_clk; main_sel_first = verification_key->main_sel_first; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp index 376cdd0ff22..d7a5affe0a2 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp @@ -147,7 +147,9 @@ class AvmFlavor { // The total number of witnesses including shifts and derived entities. static constexpr size_t NUM_ALL_WITNESS_ENTITIES = NUM_WITNESS_ENTITIES + NUM_SHIFTED_ENTITIES; - using MainRelations = std::tuple< + // Need to be templated for recursive verifier + template + using MainRelations_ = std::tuple< // Relations Avm_vm::alu, Avm_vm::binary, @@ -163,7 +165,11 @@ class AvmFlavor { Avm_vm::range_check, Avm_vm::sha256>; - using LookupRelations = std::tuple< + using MainRelations = MainRelations_; + + // Need to be templated for recursive verifier + template + using LookupRelations_ = std::tuple< // Lookups incl_main_tag_err_relation, incl_mem_tag_err_relation, @@ -238,7 +244,11 @@ class AvmFlavor { perm_rng_mem_relation, perm_slice_mem_relation>; - using Relations = tuple_cat_t; + using LookupRelations = LookupRelations_; + + // Need to be templated for recursive verifier + template using Relations_ = tuple_cat_t, LookupRelations_>; + using Relations = Relations_; static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length(); @@ -253,7 +263,6 @@ class AvmFlavor { static constexpr bool has_zero_row = true; - private: template class PrecomputedEntities : public PrecomputedEntitiesBase { public: using DataType = DataType_; @@ -311,41 +320,16 @@ class AvmFlavor { auto get_precomputed() { return PrecomputedEntities::get_all(); } }; - public: class ProvingKey : public ProvingKeyAvm_, WitnessEntities, CommitmentKey> { public: // Expose constructors on the base class using Base = ProvingKeyAvm_, WitnessEntities, CommitmentKey>; using Base::Base; - auto get_to_be_shifted() { return AvmFlavor::get_to_be_shifted(*this); } }; - // Note(md): required for instantiation from the proving key - im sure there are other ways to construct this - class VerificationKey : public VerificationKey_, VerifierCommitmentKey> { - public: - VerificationKey() = default; - - VerificationKey(const std::shared_ptr& proving_key) - : VerificationKey_(proving_key->circuit_size, proving_key->num_public_inputs) - { - for (auto [polynomial, commitment] : - zip_view(proving_key->get_precomputed_polynomials(), this->get_all())) { - commitment = proving_key->commitment_key->commit(polynomial); - } - } - - VerificationKey(const size_t circuit_size, - const size_t num_public_inputs, - std::array const& precomputed_cmts) - : VerificationKey_(circuit_size, num_public_inputs) - { - for (auto [vk_cmt, cmt] : zip_view(this->get_all(), precomputed_cmts)) { - vk_cmt = cmt; - } - } - }; + using VerificationKey = VerificationKey_, VerifierCommitmentKey>; class AllValues : public AllEntities { public: @@ -425,14 +409,35 @@ class AvmFlavor { CommitmentLabels(); }; - class VerifierCommitments : public AllEntities { + // Templated for use in recursive verifier + template + class VerifierCommitments_ : public AllEntities { private: using Base = AllEntities; public: - VerifierCommitments(const std::shared_ptr& verification_key); + VerifierCommitments_(const std::shared_ptr& verification_key) + { + this->byte_lookup_sel_bin = verification_key->byte_lookup_sel_bin; + this->byte_lookup_table_byte_lengths = verification_key->byte_lookup_table_byte_lengths; + this->byte_lookup_table_in_tags = verification_key->byte_lookup_table_in_tags; + this->byte_lookup_table_input_a = verification_key->byte_lookup_table_input_a; + this->byte_lookup_table_input_b = verification_key->byte_lookup_table_input_b; + this->byte_lookup_table_op_id = verification_key->byte_lookup_table_op_id; + this->byte_lookup_table_output = verification_key->byte_lookup_table_output; + this->gas_da_gas_fixed_table = verification_key->gas_da_gas_fixed_table; + this->gas_l2_gas_fixed_table = verification_key->gas_l2_gas_fixed_table; + this->gas_sel_gas_cost = verification_key->gas_sel_gas_cost; + this->main_clk = verification_key->main_clk; + this->main_sel_first = verification_key->main_sel_first; + this->main_zeroes = verification_key->main_zeroes; + this->powers_power_of_2 = verification_key->powers_power_of_2; + } }; + // Native version of the verifier commitments + using VerifierCommitments = VerifierCommitments_; + class Transcript : public NativeTranscript { public: uint32_t circuit_size; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp index 5954309d8ec..342c18db1cf 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp @@ -109,7 +109,7 @@ template class AvmRecursiveFlavor_ { using VerifierCommitmentKey = bb::VerifierCommitmentKey; - using Relations = AvmFlavor::Relations; + using Relations = AvmFlavor::Relations_; static constexpr size_t NUM_WIRES = NativeFlavor::NUM_WIRES; static constexpr size_t NUM_ALL_ENTITIES = NativeFlavor::NUM_ALL_ENTITIES; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp index 4ab4aee1507..15426b7e46d 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp @@ -1,9 +1,8 @@ -#include "./avm_recursive_verifier.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp" #include "barretenberg/commitment_schemes/zeromorph/zeromorph.hpp" #include "barretenberg/numeric/bitop/get_msb.hpp" #include "barretenberg/stdlib/primitives/field/field.hpp" #include "barretenberg/transcript/transcript.hpp" -#include "barretenberg/vm/recursion/avm_recursive_verifier.hpp" namespace bb { @@ -494,10 +493,6 @@ template void AvmRecursiveVerifier_::verify_proof(cons commitments.pedersen_sel_pedersen = transcript->template receive_from_prover(commitment_labels.pedersen_sel_pedersen); commitments.poseidon2_clk = transcript->template receive_from_prover(commitment_labels.poseidon2_clk); - commitments.poseidon2_input = - transcript->template receive_from_prover(commitment_labels.poseidon2_input); - commitments.poseidon2_output = - transcript->template receive_from_prover(commitment_labels.poseidon2_output); commitments.poseidon2_sel_poseidon_perm = transcript->template receive_from_prover(commitment_labels.poseidon2_sel_poseidon_perm); commitments.powers_power_of_2 = diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp index f0c5ad30de2..3388d0fba2f 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp @@ -13,11 +13,11 @@ #include "barretenberg/vm/avm/generated/circuit_builder.hpp" #include "barretenberg/vm/avm/generated/composer.hpp" #include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp" +#include "barretenberg/vm/avm/tests/helpers.test.hpp" #include "barretenberg/vm/avm/trace/common.hpp" #include "barretenberg/vm/avm/trace/helper.hpp" #include "barretenberg/vm/avm/trace/trace.hpp" -#include "barretenberg/vm/recursion/avm_recursive_verifier.hpp" -#include "barretenberg/vm/tests/helpers.test.hpp" #include namespace tests_avm { @@ -39,7 +39,6 @@ class AvmRecursiveTests : public ::testing::Test { using InnerVerifier = AvmVerifier; using InnerG1 = InnerFlavor::Commitment; using InnerFF = InnerFlavor::FF; - using InnerBF = InnerFlavor::BF; using Transcript = InnerFlavor::Transcript; @@ -64,7 +63,7 @@ class AvmRecursiveTests : public ::testing::Test { trace_builder.op_set(0, 1, 1, AvmMemoryTag::U8); trace_builder.op_set(0, 1, 2, AvmMemoryTag::U8); trace_builder.op_add(0, 1, 2, 3, AvmMemoryTag::U8); - trace_builder.return_op(0, 0, 0); + trace_builder.op_return(0, 0, 0); auto trace = trace_builder.finalize(); builder.set_trace(std::move(trace)); @@ -86,7 +85,8 @@ TEST_F(AvmRecursiveTests, recursion) // NOTE(md): got to do something about these public inputs auto public_inputs = generate_base_public_inputs(); - std::vector> public_inputs_vec = bb::avm_trace::copy_public_inputs_columns(public_inputs); + std::vector> public_inputs_vec = + bb::avm_trace::copy_public_inputs_columns(public_inputs, {}, {}); bool verified = verifier.verify_proof(proof, public_inputs_vec); info("proof verified: ", verified); diff --git a/bb-pilcom/bb-pil-backend/templates/flavor.cpp.hbs b/bb-pilcom/bb-pil-backend/templates/flavor.cpp.hbs index dc04e8c37d5..e577691c715 100644 --- a/bb-pilcom/bb-pil-backend/templates/flavor.cpp.hbs +++ b/bb-pilcom/bb-pil-backend/templates/flavor.cpp.hbs @@ -46,13 +46,6 @@ namespace bb { {{/each}} }; -{{name}}Flavor::VerifierCommitments::VerifierCommitments(const std::shared_ptr& verification_key) -{ - {{#each fixed as |item|}} - {{item}} = verification_key->{{item}}; - {{/each}} -} - void {{name}}Flavor::Transcript::deserialize_full_transcript() { size_t num_frs_read = 0; circuit_size = deserialize_from_buffer(proof_data, num_frs_read); diff --git a/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs b/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs index 416257d5dcd..454ec932182 100644 --- a/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs +++ b/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs @@ -67,17 +67,27 @@ class {{name}}Flavor { // The total number of witnesses including shifts and derived entities. static constexpr size_t NUM_ALL_WITNESS_ENTITIES = NUM_WITNESS_ENTITIES + NUM_SHIFTED_ENTITIES; - using MainRelations = std::tuple< + // Need to be templated for recursive verifier + template + using MainRelations_ = std::tuple< // Relations {{#each relation_file_names as |item|}}{{#if @index}},{{/if}}{{../name}}_vm::{{item}}{{/each}} >; - using LookupRelations = std::tuple< + using MainRelations = MainRelations_; + + // Need to be templated for recursive verifier + template + using LookupRelations_ = std::tuple< // Lookups {{#each lookups as |item|}}{{#if @index}},{{/if}}{{item}}_relation{{/each}} >; - using Relations = tuple_cat_t; + using LookupRelations = LookupRelations_; + + // Need to be templated for recursive verifier + template using Relations_ = tuple_cat_t, LookupRelations_>; + using Relations = Relations_; static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length(); @@ -92,77 +102,73 @@ class {{name}}Flavor { static constexpr bool has_zero_row = true; - private: - template - class PrecomputedEntities : public PrecomputedEntitiesBase { - public: - using DataType = DataType_; - - DEFINE_FLAVOR_MEMBERS(DataType, PRECOMPUTED_ENTITIES) - - RefVector get_selectors() { return get_all(); } - RefVector get_sigma_polynomials() { return {}; } - RefVector get_id_polynomials() { return {}; } - RefVector get_table_polynomials() { return {}; } - }; - - template - class WireEntities { - public: - DEFINE_FLAVOR_MEMBERS(DataType, WIRE_ENTITIES) - }; - - template - class DerivedWitnessEntities { - public: - DEFINE_FLAVOR_MEMBERS(DataType, DERIVED_WITNESS_ENTITIES) - }; - - template - class ShiftedEntities { - public: - DEFINE_FLAVOR_MEMBERS(DataType, SHIFTED_ENTITIES) - }; - - template - static auto get_to_be_shifted([[maybe_unused]] PrecomputedAndWitnessEntitiesSuperset& entities) { - return RefArray{ TO_BE_SHIFTED(entities) }; - } - - template - class WitnessEntities: public WireEntities, public DerivedWitnessEntities { - public: - DEFINE_COMPOUND_GET_ALL(WireEntities, DerivedWitnessEntities) - auto get_wires() { return WireEntities::get_all(); } - auto get_derived() { return DerivedWitnessEntities::get_all(); } - }; - - template - class AllEntities : public PrecomputedEntities - , public WitnessEntities - , public ShiftedEntities { - public: - DEFINE_COMPOUND_GET_ALL(PrecomputedEntities, WitnessEntities, ShiftedEntities) - - auto get_unshifted() { - return concatenate(PrecomputedEntities::get_all(), WitnessEntities::get_all()); - } - auto get_to_be_shifted() { return {{name}}Flavor::get_to_be_shifted(*this); } - auto get_shifted() { return ShiftedEntities::get_all(); } - auto get_precomputed() { return PrecomputedEntities::get_all(); } - }; + template class PrecomputedEntities : public PrecomputedEntitiesBase { + public: + using DataType = DataType_; + + DEFINE_FLAVOR_MEMBERS(DataType, PRECOMPUTED_ENTITIES) - public: - class ProvingKey : public ProvingKeyAvm_, WitnessEntities, CommitmentKey> { - public: - // Expose constructors on the base class - using Base = ProvingKeyAvm_, WitnessEntities, CommitmentKey>; - using Base::Base; + RefVector get_selectors() { return get_all(); } + RefVector get_sigma_polynomials() { return {}; } + RefVector get_id_polynomials() { return {}; } + RefVector get_table_polynomials() { return {}; } + }; + + template + class WireEntities { + public: + DEFINE_FLAVOR_MEMBERS(DataType, WIRE_ENTITIES) + }; + + template + class DerivedWitnessEntities { + public: + DEFINE_FLAVOR_MEMBERS(DataType, DERIVED_WITNESS_ENTITIES) + }; - auto get_to_be_shifted() { - return {{name}}Flavor::get_to_be_shifted(*this); - } - }; + template + class ShiftedEntities { + public: + DEFINE_FLAVOR_MEMBERS(DataType, SHIFTED_ENTITIES) + }; + + template + static auto get_to_be_shifted([[maybe_unused]] PrecomputedAndWitnessEntitiesSuperset& entities) { + return RefArray{ TO_BE_SHIFTED(entities) }; + } + + template + class WitnessEntities: public WireEntities, public DerivedWitnessEntities { + public: + DEFINE_COMPOUND_GET_ALL(WireEntities, DerivedWitnessEntities) + auto get_wires() { return WireEntities::get_all(); } + auto get_derived() { return DerivedWitnessEntities::get_all(); } + }; + + template + class AllEntities : public PrecomputedEntities + , public WitnessEntities + , public ShiftedEntities { + public: + DEFINE_COMPOUND_GET_ALL(PrecomputedEntities, WitnessEntities, ShiftedEntities) + + auto get_unshifted() { + return concatenate(PrecomputedEntities::get_all(), WitnessEntities::get_all()); + } + auto get_to_be_shifted() { return {{name}}Flavor::get_to_be_shifted(*this); } + auto get_shifted() { return ShiftedEntities::get_all(); } + auto get_precomputed() { return PrecomputedEntities::get_all(); } + }; + + class ProvingKey : public ProvingKeyAvm_, WitnessEntities, CommitmentKey> { + public: + // Expose constructors on the base class + using Base = ProvingKeyAvm_, WitnessEntities, CommitmentKey>; + using Base::Base; + auto get_to_be_shifted() { + return {{name}}Flavor::get_to_be_shifted(*this); + } + }; // Note(md): required for instantiation from the proving key - im sure there are other ways to construct this class VerificationKey : public VerificationKey_, VerifierCommitmentKey> { @@ -189,121 +195,130 @@ class {{name}}Flavor { } }; - {{!-- Used by sumcheck --}} - class AllValues : public AllEntities { - public: - using Base = AllEntities; - using Base::Base; - }; - - {{!-- Used by get_row, logderivs, etc --}} - class AllConstRefValues { - public: - using BaseDataType = const FF; - using DataType = BaseDataType&; - - {{!-- - We define the flavor members here again to avoid having to make this class inherit from AllEntities. - If we did inherit from AllEntities, we have to define a special constructor for AllEntities, and all - the classes that AllEntities inherits from, in cascade. - --}} - DEFINE_FLAVOR_MEMBERS(DataType, ALL_ENTITIES) - - AllConstRefValues(const RefArray& il); - }; - - /** - * @brief A container for the prover polynomials handles. - */ - class ProverPolynomials : public AllEntities { - public: - // Define all operations as default, except copy construction/assignment - ProverPolynomials() = default; - ProverPolynomials& operator=(const ProverPolynomials&) = delete; - ProverPolynomials(const ProverPolynomials& o) = delete; - ProverPolynomials(ProverPolynomials&& o) noexcept = default; - ProverPolynomials& operator=(ProverPolynomials&& o) noexcept = default; - ~ProverPolynomials() = default; - - ProverPolynomials(ProvingKey& proving_key); - - [[nodiscard]] size_t get_polynomial_size() const { return {{witness.0}}.size(); } - /** - * @brief Returns the evaluations of all prover polynomials at one point on the boolean hypercube, which - * represents one row in the execution trace. - */ - [[nodiscard]] AllConstRefValues get_row(size_t row_idx) const; - }; - - class PartiallyEvaluatedMultivariates : public AllEntities { - public: - PartiallyEvaluatedMultivariates() = default; - PartiallyEvaluatedMultivariates(const size_t circuit_size); - }; - - /** - * @brief A container for univariates used during Protogalaxy folding and sumcheck. - * @details During folding and sumcheck, the prover evaluates the relations on these univariates. - */ - template - using ProverUnivariates = AllEntities>; - - /** - * @brief A container for univariates used during Protogalaxy folding and sumcheck with some of the computation - * optimistically ignored - * @details During folding and sumcheck, the prover evaluates the relations on these univariates. - */ - template - using OptimisedProverUnivariates = AllEntities>; - - /** - * @brief A container for univariates produced during the hot loop in sumcheck. - */ - using ExtendedEdges = ProverUnivariates; - - /** - * @brief A container for the witness commitments. - * - */ - using WitnessCommitments = WitnessEntities; - - class CommitmentLabels: public AllEntities { - private: - using Base = AllEntities; + {{!-- Used by sumcheck --}} + class AllValues : public AllEntities { + public: + using Base = AllEntities; + using Base::Base; + }; - public: - CommitmentLabels(); - }; + {{!-- Used by get_row, logderivs, etc --}} + class AllConstRefValues { + public: + using BaseDataType = const FF; + using DataType = BaseDataType&; - class VerifierCommitments : public AllEntities { - private: - using Base = AllEntities; + {{!-- + We define the flavor members here again to avoid having to make this class inherit from AllEntities. + If we did inherit from AllEntities, we have to define a special constructor for AllEntities, and all + the classes that AllEntities inherits from, in cascade. + --}} + DEFINE_FLAVOR_MEMBERS(DataType, ALL_ENTITIES) + AllConstRefValues(const RefArray& il); + }; + + /** + * @brief A container for the prover polynomials handles. + */ + class ProverPolynomials : public AllEntities { + public: + // Define all operations as default, except copy construction/assignment + ProverPolynomials() = default; + ProverPolynomials& operator=(const ProverPolynomials&) = delete; + ProverPolynomials(const ProverPolynomials& o) = delete; + ProverPolynomials(ProverPolynomials&& o) noexcept = default; + ProverPolynomials& operator=(ProverPolynomials&& o) noexcept = default; + ~ProverPolynomials() = default; + + ProverPolynomials(ProvingKey& proving_key); + + [[nodiscard]] size_t get_polynomial_size() const { return {{witness.0}}.size(); } + /** + * @brief Returns the evaluations of all prover polynomials at one point on the boolean hypercube, which + * represents one row in the execution trace. + */ + [[nodiscard]] AllConstRefValues get_row(size_t row_idx) const; + }; + + class PartiallyEvaluatedMultivariates : public AllEntities { public: - VerifierCommitments(const std::shared_ptr& verification_key); - }; + PartiallyEvaluatedMultivariates() = default; + PartiallyEvaluatedMultivariates(const size_t circuit_size); + }; + + /** + * @brief A container for univariates used during Protogalaxy folding and sumcheck. + * @details During folding and sumcheck, the prover evaluates the relations on these univariates. + */ + template + using ProverUnivariates = AllEntities>; + + /** + * @brief A container for univariates used during Protogalaxy folding and sumcheck with some of the computation + * optimistically ignored + * @details During folding and sumcheck, the prover evaluates the relations on these univariates. + */ + template + using OptimisedProverUnivariates = AllEntities>; + + /** + * @brief A container for univariates produced during the hot loop in sumcheck. + */ + using ExtendedEdges = ProverUnivariates; + + /** + * @brief A container for the witness commitments. + * + */ + using WitnessCommitments = WitnessEntities; + + class CommitmentLabels: public AllEntities { + private: + using Base = AllEntities; - class Transcript : public NativeTranscript { public: - uint32_t circuit_size; + CommitmentLabels(); + }; + + // Templated for use in recursive verifier + template + class VerifierCommitments_ : public AllEntities { + private: + using Base = AllEntities; + + public: + VerifierCommitments_(const std::shared_ptr& verification_key) { + {{#each fixed as |item|}} + this->{{item}} = verification_key->{{item}}; + {{/each}} + } + }; + + // Native version of the verifier commitments + using VerifierCommitments = VerifierCommitments_; - std::array commitments; + class Transcript : public NativeTranscript { + public: + uint32_t circuit_size; + + std::array commitments; - std::vector> sumcheck_univariates; - std::array sumcheck_evaluations; - std::vector zm_cq_comms; - Commitment zm_cq_comm; - Commitment zm_pi_comm; + std::vector> sumcheck_univariates; + std::array sumcheck_evaluations; + std::vector zm_cq_comms; + Commitment zm_cq_comm; + Commitment zm_pi_comm; - Transcript() = default; + Transcript() = default; - Transcript(const std::vector& proof) - : NativeTranscript(proof) - {} + Transcript(const std::vector& proof) + : NativeTranscript(proof) + {} - void deserialize_full_transcript(); - void serialize_full_transcript(); - }; + void deserialize_full_transcript(); + void serialize_full_transcript(); + }; }; } // namespace bb From 9a19ae6c234e239ae2ab0c7d02ee0d50a8f29f3b Mon Sep 17 00:00:00 2001 From: jeanmon Date: Wed, 14 Aug 2024 16:49:02 +0000 Subject: [PATCH 04/21] 7790: WIP - debugging assertion in from_witness() --- .../vm/avm/recursion/avm_recursive_flavor.hpp | 5 +- .../avm/recursion/avm_recursive_verifier.cpp | 631 +----------------- 2 files changed, 16 insertions(+), 620 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp index 342c18db1cf..05aac251218 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp @@ -95,7 +95,7 @@ namespace bb { template class AvmRecursiveFlavor_ { public: - // much of the types end up being the same but derived from the circuit builer types + // much of the types end up being the same but derived from the circuit builder types using CircuitBuilder = BuilderType; using Curve = stdlib::bn254; using PCS = KZG; @@ -105,7 +105,7 @@ template class AvmRecursiveFlavor_ { using BF = typename Curve::BaseField; using NativeFlavor = AvmFlavor; - using NativeVerificationKey = typename NativeFlavor::VerificationKey; + using NativeVerificationKey = NativeFlavor::VerificationKey; using VerifierCommitmentKey = bb::VerifierCommitmentKey; @@ -161,7 +161,6 @@ template class AvmRecursiveFlavor_ { this->log_circuit_size = numeric::get_msb(this->circuit_size); // this->num_public_inputs = native_key->num_public_inputs; // this->pub_inputs_offset = native_key->pub_inputs_offset; - for (auto [native_comm, comm] : zip_view(native_key->get_all(), this->get_all())) { comm = Commitment::from_witness(builder, native_comm); } diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp index 15426b7e46d..78ff92419c0 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp @@ -46,11 +46,15 @@ template void AvmRecursiveVerifier_::verify_proof(cons const auto circuit_size = transcript->template receive_from_prover("circuit_size"); // TODO: assert the same as the key circuit size? + // if (circuit_size != key->circuit_size) { + // return false; + // } info("got circuit size from prover: ", circuit_size); - // TODO(md): emply the same updates on a new branch when doing the normal avm verifier!!! - // for (auto [comm, label] : zip_view(commitments.get_wires(), commitment_labels.get_wires())) { - // comm = transcript->template receive_from_prover(label); + // Get commitments to VM wires + for (auto [comm, label] : zip_view(commitments.get_wires(), commitment_labels.get_wires())) { + comm = transcript->template receive_from_prover(label); + } // // Note(md): inherited from eccvm recursion // // TODO(https://github.com/AztecProtocol/barretenberg/issues/1017): This is a hack to ensure zero commitments @@ -61,622 +65,15 @@ template void AvmRecursiveVerifier_::verify_proof(cons // } // } - commitments.kernel_kernel_inputs = - transcript->template receive_from_prover(commitment_labels.kernel_kernel_inputs); - commitments.kernel_kernel_value_out = - transcript->template receive_from_prover(commitment_labels.kernel_kernel_value_out); - commitments.kernel_kernel_side_effect_out = - transcript->template receive_from_prover(commitment_labels.kernel_kernel_side_effect_out); - commitments.kernel_kernel_metadata_out = - transcript->template receive_from_prover(commitment_labels.kernel_kernel_metadata_out); - commitments.alu_a_hi = transcript->template receive_from_prover(commitment_labels.alu_a_hi); - commitments.alu_a_lo = transcript->template receive_from_prover(commitment_labels.alu_a_lo); - commitments.alu_b_hi = transcript->template receive_from_prover(commitment_labels.alu_b_hi); - commitments.alu_b_lo = transcript->template receive_from_prover(commitment_labels.alu_b_lo); - commitments.alu_borrow = transcript->template receive_from_prover(commitment_labels.alu_borrow); - commitments.alu_cf = transcript->template receive_from_prover(commitment_labels.alu_cf); - commitments.alu_clk = transcript->template receive_from_prover(commitment_labels.alu_clk); - commitments.alu_cmp_rng_ctr = - transcript->template receive_from_prover(commitment_labels.alu_cmp_rng_ctr); - commitments.alu_div_u16_r0 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r0); - commitments.alu_div_u16_r1 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r1); - commitments.alu_div_u16_r2 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r2); - commitments.alu_div_u16_r3 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r3); - commitments.alu_div_u16_r4 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r4); - commitments.alu_div_u16_r5 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r5); - commitments.alu_div_u16_r6 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r6); - commitments.alu_div_u16_r7 = transcript->template receive_from_prover(commitment_labels.alu_div_u16_r7); - commitments.alu_divisor_hi = transcript->template receive_from_prover(commitment_labels.alu_divisor_hi); - commitments.alu_divisor_lo = transcript->template receive_from_prover(commitment_labels.alu_divisor_lo); - commitments.alu_ff_tag = transcript->template receive_from_prover(commitment_labels.alu_ff_tag); - commitments.alu_ia = transcript->template receive_from_prover(commitment_labels.alu_ia); - commitments.alu_ib = transcript->template receive_from_prover(commitment_labels.alu_ib); - commitments.alu_ic = transcript->template receive_from_prover(commitment_labels.alu_ic); - commitments.alu_in_tag = transcript->template receive_from_prover(commitment_labels.alu_in_tag); - commitments.alu_op_add = transcript->template receive_from_prover(commitment_labels.alu_op_add); - commitments.alu_op_cast = transcript->template receive_from_prover(commitment_labels.alu_op_cast); - commitments.alu_op_cast_prev = - transcript->template receive_from_prover(commitment_labels.alu_op_cast_prev); - commitments.alu_op_div = transcript->template receive_from_prover(commitment_labels.alu_op_div); - commitments.alu_op_div_a_lt_b = - transcript->template receive_from_prover(commitment_labels.alu_op_div_a_lt_b); - commitments.alu_op_div_std = transcript->template receive_from_prover(commitment_labels.alu_op_div_std); - commitments.alu_op_eq = transcript->template receive_from_prover(commitment_labels.alu_op_eq); - commitments.alu_op_eq_diff_inv = - transcript->template receive_from_prover(commitment_labels.alu_op_eq_diff_inv); - commitments.alu_op_lt = transcript->template receive_from_prover(commitment_labels.alu_op_lt); - commitments.alu_op_lte = transcript->template receive_from_prover(commitment_labels.alu_op_lte); - commitments.alu_op_mul = transcript->template receive_from_prover(commitment_labels.alu_op_mul); - commitments.alu_op_not = transcript->template receive_from_prover(commitment_labels.alu_op_not); - commitments.alu_op_shl = transcript->template receive_from_prover(commitment_labels.alu_op_shl); - commitments.alu_op_shr = transcript->template receive_from_prover(commitment_labels.alu_op_shr); - commitments.alu_op_sub = transcript->template receive_from_prover(commitment_labels.alu_op_sub); - commitments.alu_p_a_borrow = transcript->template receive_from_prover(commitment_labels.alu_p_a_borrow); - commitments.alu_p_b_borrow = transcript->template receive_from_prover(commitment_labels.alu_p_b_borrow); - commitments.alu_p_sub_a_hi = transcript->template receive_from_prover(commitment_labels.alu_p_sub_a_hi); - commitments.alu_p_sub_a_lo = transcript->template receive_from_prover(commitment_labels.alu_p_sub_a_lo); - commitments.alu_p_sub_b_hi = transcript->template receive_from_prover(commitment_labels.alu_p_sub_b_hi); - commitments.alu_p_sub_b_lo = transcript->template receive_from_prover(commitment_labels.alu_p_sub_b_lo); - commitments.alu_partial_prod_hi = - transcript->template receive_from_prover(commitment_labels.alu_partial_prod_hi); - commitments.alu_partial_prod_lo = - transcript->template receive_from_prover(commitment_labels.alu_partial_prod_lo); - commitments.alu_quotient_hi = - transcript->template receive_from_prover(commitment_labels.alu_quotient_hi); - commitments.alu_quotient_lo = - transcript->template receive_from_prover(commitment_labels.alu_quotient_lo); - commitments.alu_remainder = transcript->template receive_from_prover(commitment_labels.alu_remainder); - commitments.alu_res_hi = transcript->template receive_from_prover(commitment_labels.alu_res_hi); - commitments.alu_res_lo = transcript->template receive_from_prover(commitment_labels.alu_res_lo); - commitments.alu_sel_alu = transcript->template receive_from_prover(commitment_labels.alu_sel_alu); - commitments.alu_sel_cmp = transcript->template receive_from_prover(commitment_labels.alu_sel_cmp); - commitments.alu_sel_div_rng_chk = - transcript->template receive_from_prover(commitment_labels.alu_sel_div_rng_chk); - commitments.alu_sel_rng_chk = - transcript->template receive_from_prover(commitment_labels.alu_sel_rng_chk); - commitments.alu_sel_rng_chk_lookup = - transcript->template receive_from_prover(commitment_labels.alu_sel_rng_chk_lookup); - commitments.alu_sel_shift_which = - transcript->template receive_from_prover(commitment_labels.alu_sel_shift_which); - commitments.alu_shift_lt_bit_len = - transcript->template receive_from_prover(commitment_labels.alu_shift_lt_bit_len); - commitments.alu_t_sub_s_bits = - transcript->template receive_from_prover(commitment_labels.alu_t_sub_s_bits); - commitments.alu_two_pow_s = transcript->template receive_from_prover(commitment_labels.alu_two_pow_s); - commitments.alu_two_pow_t_sub_s = - transcript->template receive_from_prover(commitment_labels.alu_two_pow_t_sub_s); - commitments.alu_u128_tag = transcript->template receive_from_prover(commitment_labels.alu_u128_tag); - commitments.alu_u16_r0 = transcript->template receive_from_prover(commitment_labels.alu_u16_r0); - commitments.alu_u16_r1 = transcript->template receive_from_prover(commitment_labels.alu_u16_r1); - commitments.alu_u16_r10 = transcript->template receive_from_prover(commitment_labels.alu_u16_r10); - commitments.alu_u16_r11 = transcript->template receive_from_prover(commitment_labels.alu_u16_r11); - commitments.alu_u16_r12 = transcript->template receive_from_prover(commitment_labels.alu_u16_r12); - commitments.alu_u16_r13 = transcript->template receive_from_prover(commitment_labels.alu_u16_r13); - commitments.alu_u16_r14 = transcript->template receive_from_prover(commitment_labels.alu_u16_r14); - commitments.alu_u16_r2 = transcript->template receive_from_prover(commitment_labels.alu_u16_r2); - commitments.alu_u16_r3 = transcript->template receive_from_prover(commitment_labels.alu_u16_r3); - commitments.alu_u16_r4 = transcript->template receive_from_prover(commitment_labels.alu_u16_r4); - commitments.alu_u16_r5 = transcript->template receive_from_prover(commitment_labels.alu_u16_r5); - commitments.alu_u16_r6 = transcript->template receive_from_prover(commitment_labels.alu_u16_r6); - commitments.alu_u16_r7 = transcript->template receive_from_prover(commitment_labels.alu_u16_r7); - commitments.alu_u16_r8 = transcript->template receive_from_prover(commitment_labels.alu_u16_r8); - commitments.alu_u16_r9 = transcript->template receive_from_prover(commitment_labels.alu_u16_r9); - commitments.alu_u16_tag = transcript->template receive_from_prover(commitment_labels.alu_u16_tag); - commitments.alu_u32_tag = transcript->template receive_from_prover(commitment_labels.alu_u32_tag); - commitments.alu_u64_tag = transcript->template receive_from_prover(commitment_labels.alu_u64_tag); - commitments.alu_u8_r0 = transcript->template receive_from_prover(commitment_labels.alu_u8_r0); - commitments.alu_u8_r1 = transcript->template receive_from_prover(commitment_labels.alu_u8_r1); - commitments.alu_u8_tag = transcript->template receive_from_prover(commitment_labels.alu_u8_tag); - commitments.binary_acc_ia = transcript->template receive_from_prover(commitment_labels.binary_acc_ia); - commitments.binary_acc_ib = transcript->template receive_from_prover(commitment_labels.binary_acc_ib); - commitments.binary_acc_ic = transcript->template receive_from_prover(commitment_labels.binary_acc_ic); - commitments.binary_clk = transcript->template receive_from_prover(commitment_labels.binary_clk); - commitments.binary_ia_bytes = - transcript->template receive_from_prover(commitment_labels.binary_ia_bytes); - commitments.binary_ib_bytes = - transcript->template receive_from_prover(commitment_labels.binary_ib_bytes); - commitments.binary_ic_bytes = - transcript->template receive_from_prover(commitment_labels.binary_ic_bytes); - commitments.binary_in_tag = transcript->template receive_from_prover(commitment_labels.binary_in_tag); - commitments.binary_mem_tag_ctr = - transcript->template receive_from_prover(commitment_labels.binary_mem_tag_ctr); - commitments.binary_mem_tag_ctr_inv = - transcript->template receive_from_prover(commitment_labels.binary_mem_tag_ctr_inv); - commitments.binary_op_id = transcript->template receive_from_prover(commitment_labels.binary_op_id); - commitments.binary_sel_bin = transcript->template receive_from_prover(commitment_labels.binary_sel_bin); - commitments.binary_start = transcript->template receive_from_prover(commitment_labels.binary_start); - commitments.byte_lookup_sel_bin = - transcript->template receive_from_prover(commitment_labels.byte_lookup_sel_bin); - commitments.byte_lookup_table_byte_lengths = - transcript->template receive_from_prover(commitment_labels.byte_lookup_table_byte_lengths); - commitments.byte_lookup_table_in_tags = - transcript->template receive_from_prover(commitment_labels.byte_lookup_table_in_tags); - commitments.byte_lookup_table_input_a = - transcript->template receive_from_prover(commitment_labels.byte_lookup_table_input_a); - commitments.byte_lookup_table_input_b = - transcript->template receive_from_prover(commitment_labels.byte_lookup_table_input_b); - commitments.byte_lookup_table_op_id = - transcript->template receive_from_prover(commitment_labels.byte_lookup_table_op_id); - commitments.byte_lookup_table_output = - transcript->template receive_from_prover(commitment_labels.byte_lookup_table_output); - commitments.conversion_clk = transcript->template receive_from_prover(commitment_labels.conversion_clk); - commitments.conversion_input = - transcript->template receive_from_prover(commitment_labels.conversion_input); - commitments.conversion_num_limbs = - transcript->template receive_from_prover(commitment_labels.conversion_num_limbs); - commitments.conversion_radix = - transcript->template receive_from_prover(commitment_labels.conversion_radix); - commitments.conversion_sel_to_radix_le = - transcript->template receive_from_prover(commitment_labels.conversion_sel_to_radix_le); - commitments.gas_da_gas_fixed_table = - transcript->template receive_from_prover(commitment_labels.gas_da_gas_fixed_table); - commitments.gas_l2_gas_fixed_table = - transcript->template receive_from_prover(commitment_labels.gas_l2_gas_fixed_table); - commitments.gas_sel_gas_cost = - transcript->template receive_from_prover(commitment_labels.gas_sel_gas_cost); - commitments.keccakf1600_clk = - transcript->template receive_from_prover(commitment_labels.keccakf1600_clk); - commitments.keccakf1600_input = - transcript->template receive_from_prover(commitment_labels.keccakf1600_input); - commitments.keccakf1600_output = - transcript->template receive_from_prover(commitment_labels.keccakf1600_output); - commitments.keccakf1600_sel_keccakf1600 = - transcript->template receive_from_prover(commitment_labels.keccakf1600_sel_keccakf1600); - commitments.kernel_emit_l2_to_l1_msg_write_offset = - transcript->template receive_from_prover(commitment_labels.kernel_emit_l2_to_l1_msg_write_offset); - commitments.kernel_emit_note_hash_write_offset = - transcript->template receive_from_prover(commitment_labels.kernel_emit_note_hash_write_offset); - commitments.kernel_emit_nullifier_write_offset = - transcript->template receive_from_prover(commitment_labels.kernel_emit_nullifier_write_offset); - commitments.kernel_emit_unencrypted_log_write_offset = transcript->template receive_from_prover( - commitment_labels.kernel_emit_unencrypted_log_write_offset); - commitments.kernel_kernel_in_offset = - transcript->template receive_from_prover(commitment_labels.kernel_kernel_in_offset); - commitments.kernel_kernel_out_offset = - transcript->template receive_from_prover(commitment_labels.kernel_kernel_out_offset); - commitments.kernel_l1_to_l2_msg_exists_write_offset = - transcript->template receive_from_prover(commitment_labels.kernel_l1_to_l2_msg_exists_write_offset); - commitments.kernel_note_hash_exist_write_offset = - transcript->template receive_from_prover(commitment_labels.kernel_note_hash_exist_write_offset); - commitments.kernel_nullifier_exists_write_offset = - transcript->template receive_from_prover(commitment_labels.kernel_nullifier_exists_write_offset); - commitments.kernel_nullifier_non_exists_write_offset = transcript->template receive_from_prover( - commitment_labels.kernel_nullifier_non_exists_write_offset); - commitments.kernel_q_public_input_kernel_add_to_table = transcript->template receive_from_prover( - commitment_labels.kernel_q_public_input_kernel_add_to_table); - commitments.kernel_q_public_input_kernel_out_add_to_table = transcript->template receive_from_prover( - commitment_labels.kernel_q_public_input_kernel_out_add_to_table); - commitments.kernel_side_effect_counter = - transcript->template receive_from_prover(commitment_labels.kernel_side_effect_counter); - commitments.kernel_sload_write_offset = - transcript->template receive_from_prover(commitment_labels.kernel_sload_write_offset); - commitments.kernel_sstore_write_offset = - transcript->template receive_from_prover(commitment_labels.kernel_sstore_write_offset); - commitments.main_abs_da_rem_gas_hi = - transcript->template receive_from_prover(commitment_labels.main_abs_da_rem_gas_hi); - commitments.main_abs_da_rem_gas_lo = - transcript->template receive_from_prover(commitment_labels.main_abs_da_rem_gas_lo); - commitments.main_abs_l2_rem_gas_hi = - transcript->template receive_from_prover(commitment_labels.main_abs_l2_rem_gas_hi); - commitments.main_abs_l2_rem_gas_lo = - transcript->template receive_from_prover(commitment_labels.main_abs_l2_rem_gas_lo); - commitments.main_alu_in_tag = - transcript->template receive_from_prover(commitment_labels.main_alu_in_tag); - commitments.main_bin_op_id = transcript->template receive_from_prover(commitment_labels.main_bin_op_id); - commitments.main_call_ptr = transcript->template receive_from_prover(commitment_labels.main_call_ptr); - commitments.main_da_gas_op_cost = - transcript->template receive_from_prover(commitment_labels.main_da_gas_op_cost); - commitments.main_da_gas_remaining = - transcript->template receive_from_prover(commitment_labels.main_da_gas_remaining); - commitments.main_da_out_of_gas = - transcript->template receive_from_prover(commitment_labels.main_da_out_of_gas); - commitments.main_ia = transcript->template receive_from_prover(commitment_labels.main_ia); - commitments.main_ib = transcript->template receive_from_prover(commitment_labels.main_ib); - commitments.main_ic = transcript->template receive_from_prover(commitment_labels.main_ic); - commitments.main_id = transcript->template receive_from_prover(commitment_labels.main_id); - commitments.main_id_zero = transcript->template receive_from_prover(commitment_labels.main_id_zero); - commitments.main_ind_addr_a = - transcript->template receive_from_prover(commitment_labels.main_ind_addr_a); - commitments.main_ind_addr_b = - transcript->template receive_from_prover(commitment_labels.main_ind_addr_b); - commitments.main_ind_addr_c = - transcript->template receive_from_prover(commitment_labels.main_ind_addr_c); - commitments.main_ind_addr_d = - transcript->template receive_from_prover(commitment_labels.main_ind_addr_d); - commitments.main_internal_return_ptr = - transcript->template receive_from_prover(commitment_labels.main_internal_return_ptr); - commitments.main_inv = transcript->template receive_from_prover(commitment_labels.main_inv); - commitments.main_l2_gas_op_cost = - transcript->template receive_from_prover(commitment_labels.main_l2_gas_op_cost); - commitments.main_l2_gas_remaining = - transcript->template receive_from_prover(commitment_labels.main_l2_gas_remaining); - commitments.main_l2_out_of_gas = - transcript->template receive_from_prover(commitment_labels.main_l2_out_of_gas); - commitments.main_mem_addr_a = - transcript->template receive_from_prover(commitment_labels.main_mem_addr_a); - commitments.main_mem_addr_b = - transcript->template receive_from_prover(commitment_labels.main_mem_addr_b); - commitments.main_mem_addr_c = - transcript->template receive_from_prover(commitment_labels.main_mem_addr_c); - commitments.main_mem_addr_d = - transcript->template receive_from_prover(commitment_labels.main_mem_addr_d); - commitments.main_op_err = transcript->template receive_from_prover(commitment_labels.main_op_err); - commitments.main_opcode_val = - transcript->template receive_from_prover(commitment_labels.main_opcode_val); - commitments.main_pc = transcript->template receive_from_prover(commitment_labels.main_pc); - commitments.main_r_in_tag = transcript->template receive_from_prover(commitment_labels.main_r_in_tag); - commitments.main_rwa = transcript->template receive_from_prover(commitment_labels.main_rwa); - commitments.main_rwb = transcript->template receive_from_prover(commitment_labels.main_rwb); - commitments.main_rwc = transcript->template receive_from_prover(commitment_labels.main_rwc); - commitments.main_rwd = transcript->template receive_from_prover(commitment_labels.main_rwd); - commitments.main_sel_alu = transcript->template receive_from_prover(commitment_labels.main_sel_alu); - commitments.main_sel_bin = transcript->template receive_from_prover(commitment_labels.main_sel_bin); - commitments.main_sel_gas_accounting_active = - transcript->template receive_from_prover(commitment_labels.main_sel_gas_accounting_active); - commitments.main_sel_last = transcript->template receive_from_prover(commitment_labels.main_sel_last); - commitments.main_sel_mem_op_a = - transcript->template receive_from_prover(commitment_labels.main_sel_mem_op_a); - commitments.main_sel_mem_op_activate_gas = - transcript->template receive_from_prover(commitment_labels.main_sel_mem_op_activate_gas); - commitments.main_sel_mem_op_b = - transcript->template receive_from_prover(commitment_labels.main_sel_mem_op_b); - commitments.main_sel_mem_op_c = - transcript->template receive_from_prover(commitment_labels.main_sel_mem_op_c); - commitments.main_sel_mem_op_d = - transcript->template receive_from_prover(commitment_labels.main_sel_mem_op_d); - commitments.main_sel_mov_ia_to_ic = - transcript->template receive_from_prover(commitment_labels.main_sel_mov_ia_to_ic); - commitments.main_sel_mov_ib_to_ic = - transcript->template receive_from_prover(commitment_labels.main_sel_mov_ib_to_ic); - commitments.main_sel_op_add = - transcript->template receive_from_prover(commitment_labels.main_sel_op_add); - commitments.main_sel_op_address = - transcript->template receive_from_prover(commitment_labels.main_sel_op_address); - commitments.main_sel_op_and = - transcript->template receive_from_prover(commitment_labels.main_sel_op_and); - commitments.main_sel_op_block_number = - transcript->template receive_from_prover(commitment_labels.main_sel_op_block_number); - commitments.main_sel_op_cast = - transcript->template receive_from_prover(commitment_labels.main_sel_op_cast); - commitments.main_sel_op_chain_id = - transcript->template receive_from_prover(commitment_labels.main_sel_op_chain_id); - commitments.main_sel_op_cmov = - transcript->template receive_from_prover(commitment_labels.main_sel_op_cmov); - commitments.main_sel_op_coinbase = - transcript->template receive_from_prover(commitment_labels.main_sel_op_coinbase); - commitments.main_sel_op_dagasleft = - transcript->template receive_from_prover(commitment_labels.main_sel_op_dagasleft); - commitments.main_sel_op_div = - transcript->template receive_from_prover(commitment_labels.main_sel_op_div); - commitments.main_sel_op_emit_l2_to_l1_msg = - transcript->template receive_from_prover(commitment_labels.main_sel_op_emit_l2_to_l1_msg); - commitments.main_sel_op_emit_note_hash = - transcript->template receive_from_prover(commitment_labels.main_sel_op_emit_note_hash); - commitments.main_sel_op_emit_nullifier = - transcript->template receive_from_prover(commitment_labels.main_sel_op_emit_nullifier); - commitments.main_sel_op_emit_unencrypted_log = - transcript->template receive_from_prover(commitment_labels.main_sel_op_emit_unencrypted_log); - commitments.main_sel_op_eq = transcript->template receive_from_prover(commitment_labels.main_sel_op_eq); - commitments.main_sel_op_external_call = - transcript->template receive_from_prover(commitment_labels.main_sel_op_external_call); - commitments.main_sel_op_fdiv = - transcript->template receive_from_prover(commitment_labels.main_sel_op_fdiv); - commitments.main_sel_op_fee_per_da_gas = - transcript->template receive_from_prover(commitment_labels.main_sel_op_fee_per_da_gas); - commitments.main_sel_op_fee_per_l2_gas = - transcript->template receive_from_prover(commitment_labels.main_sel_op_fee_per_l2_gas); - commitments.main_sel_op_get_contract_instance = - transcript->template receive_from_prover(commitment_labels.main_sel_op_get_contract_instance); - commitments.main_sel_op_halt = - transcript->template receive_from_prover(commitment_labels.main_sel_op_halt); - commitments.main_sel_op_internal_call = - transcript->template receive_from_prover(commitment_labels.main_sel_op_internal_call); - commitments.main_sel_op_internal_return = - transcript->template receive_from_prover(commitment_labels.main_sel_op_internal_return); - commitments.main_sel_op_jump = - transcript->template receive_from_prover(commitment_labels.main_sel_op_jump); - commitments.main_sel_op_jumpi = - transcript->template receive_from_prover(commitment_labels.main_sel_op_jumpi); - commitments.main_sel_op_keccak = - transcript->template receive_from_prover(commitment_labels.main_sel_op_keccak); - commitments.main_sel_op_l1_to_l2_msg_exists = - transcript->template receive_from_prover(commitment_labels.main_sel_op_l1_to_l2_msg_exists); - commitments.main_sel_op_l2gasleft = - transcript->template receive_from_prover(commitment_labels.main_sel_op_l2gasleft); - commitments.main_sel_op_lt = transcript->template receive_from_prover(commitment_labels.main_sel_op_lt); - commitments.main_sel_op_lte = - transcript->template receive_from_prover(commitment_labels.main_sel_op_lte); - commitments.main_sel_op_mov = - transcript->template receive_from_prover(commitment_labels.main_sel_op_mov); - commitments.main_sel_op_mul = - transcript->template receive_from_prover(commitment_labels.main_sel_op_mul); - commitments.main_sel_op_not = - transcript->template receive_from_prover(commitment_labels.main_sel_op_not); - commitments.main_sel_op_note_hash_exists = - transcript->template receive_from_prover(commitment_labels.main_sel_op_note_hash_exists); - commitments.main_sel_op_nullifier_exists = - transcript->template receive_from_prover(commitment_labels.main_sel_op_nullifier_exists); - commitments.main_sel_op_or = transcript->template receive_from_prover(commitment_labels.main_sel_op_or); - commitments.main_sel_op_pedersen = - transcript->template receive_from_prover(commitment_labels.main_sel_op_pedersen); - commitments.main_sel_op_poseidon2 = - transcript->template receive_from_prover(commitment_labels.main_sel_op_poseidon2); - commitments.main_sel_op_radix_le = - transcript->template receive_from_prover(commitment_labels.main_sel_op_radix_le); - commitments.main_sel_op_sender = - transcript->template receive_from_prover(commitment_labels.main_sel_op_sender); - commitments.main_sel_op_sha256 = - transcript->template receive_from_prover(commitment_labels.main_sel_op_sha256); - commitments.main_sel_op_shl = - transcript->template receive_from_prover(commitment_labels.main_sel_op_shl); - commitments.main_sel_op_shr = - transcript->template receive_from_prover(commitment_labels.main_sel_op_shr); - commitments.main_sel_op_sload = - transcript->template receive_from_prover(commitment_labels.main_sel_op_sload); - commitments.main_sel_op_sstore = - transcript->template receive_from_prover(commitment_labels.main_sel_op_sstore); - commitments.main_sel_op_storage_address = - transcript->template receive_from_prover(commitment_labels.main_sel_op_storage_address); - commitments.main_sel_op_sub = - transcript->template receive_from_prover(commitment_labels.main_sel_op_sub); - commitments.main_sel_op_timestamp = - transcript->template receive_from_prover(commitment_labels.main_sel_op_timestamp); - commitments.main_sel_op_transaction_fee = - transcript->template receive_from_prover(commitment_labels.main_sel_op_transaction_fee); - commitments.main_sel_op_version = - transcript->template receive_from_prover(commitment_labels.main_sel_op_version); - commitments.main_sel_op_xor = - transcript->template receive_from_prover(commitment_labels.main_sel_op_xor); - commitments.main_sel_q_kernel_lookup = - transcript->template receive_from_prover(commitment_labels.main_sel_q_kernel_lookup); - commitments.main_sel_q_kernel_output_lookup = - transcript->template receive_from_prover(commitment_labels.main_sel_q_kernel_output_lookup); - commitments.main_sel_resolve_ind_addr_a = - transcript->template receive_from_prover(commitment_labels.main_sel_resolve_ind_addr_a); - commitments.main_sel_resolve_ind_addr_b = - transcript->template receive_from_prover(commitment_labels.main_sel_resolve_ind_addr_b); - commitments.main_sel_resolve_ind_addr_c = - transcript->template receive_from_prover(commitment_labels.main_sel_resolve_ind_addr_c); - commitments.main_sel_resolve_ind_addr_d = - transcript->template receive_from_prover(commitment_labels.main_sel_resolve_ind_addr_d); - commitments.main_sel_rng_16 = - transcript->template receive_from_prover(commitment_labels.main_sel_rng_16); - commitments.main_sel_rng_8 = transcript->template receive_from_prover(commitment_labels.main_sel_rng_8); - commitments.main_space_id = transcript->template receive_from_prover(commitment_labels.main_space_id); - commitments.main_tag_err = transcript->template receive_from_prover(commitment_labels.main_tag_err); - commitments.main_w_in_tag = transcript->template receive_from_prover(commitment_labels.main_w_in_tag); - commitments.mem_addr = transcript->template receive_from_prover(commitment_labels.mem_addr); - commitments.mem_clk = transcript->template receive_from_prover(commitment_labels.mem_clk); - commitments.mem_diff_hi = transcript->template receive_from_prover(commitment_labels.mem_diff_hi); - commitments.mem_diff_lo = transcript->template receive_from_prover(commitment_labels.mem_diff_lo); - commitments.mem_diff_mid = transcript->template receive_from_prover(commitment_labels.mem_diff_mid); - commitments.mem_glob_addr = transcript->template receive_from_prover(commitment_labels.mem_glob_addr); - commitments.mem_last = transcript->template receive_from_prover(commitment_labels.mem_last); - commitments.mem_lastAccess = transcript->template receive_from_prover(commitment_labels.mem_lastAccess); - commitments.mem_one_min_inv = - transcript->template receive_from_prover(commitment_labels.mem_one_min_inv); - commitments.mem_r_in_tag = transcript->template receive_from_prover(commitment_labels.mem_r_in_tag); - commitments.mem_rw = transcript->template receive_from_prover(commitment_labels.mem_rw); - commitments.mem_sel_mem = transcript->template receive_from_prover(commitment_labels.mem_sel_mem); - commitments.mem_sel_mov_ia_to_ic = - transcript->template receive_from_prover(commitment_labels.mem_sel_mov_ia_to_ic); - commitments.mem_sel_mov_ib_to_ic = - transcript->template receive_from_prover(commitment_labels.mem_sel_mov_ib_to_ic); - commitments.mem_sel_op_a = transcript->template receive_from_prover(commitment_labels.mem_sel_op_a); - commitments.mem_sel_op_b = transcript->template receive_from_prover(commitment_labels.mem_sel_op_b); - commitments.mem_sel_op_c = transcript->template receive_from_prover(commitment_labels.mem_sel_op_c); - commitments.mem_sel_op_cmov = - transcript->template receive_from_prover(commitment_labels.mem_sel_op_cmov); - commitments.mem_sel_op_d = transcript->template receive_from_prover(commitment_labels.mem_sel_op_d); - commitments.mem_sel_resolve_ind_addr_a = - transcript->template receive_from_prover(commitment_labels.mem_sel_resolve_ind_addr_a); - commitments.mem_sel_resolve_ind_addr_b = - transcript->template receive_from_prover(commitment_labels.mem_sel_resolve_ind_addr_b); - commitments.mem_sel_resolve_ind_addr_c = - transcript->template receive_from_prover(commitment_labels.mem_sel_resolve_ind_addr_c); - commitments.mem_sel_resolve_ind_addr_d = - transcript->template receive_from_prover(commitment_labels.mem_sel_resolve_ind_addr_d); - commitments.mem_sel_rng_chk = - transcript->template receive_from_prover(commitment_labels.mem_sel_rng_chk); - commitments.mem_skip_check_tag = - transcript->template receive_from_prover(commitment_labels.mem_skip_check_tag); - commitments.mem_space_id = transcript->template receive_from_prover(commitment_labels.mem_space_id); - commitments.mem_tag = transcript->template receive_from_prover(commitment_labels.mem_tag); - commitments.mem_tag_err = transcript->template receive_from_prover(commitment_labels.mem_tag_err); - commitments.mem_tsp = transcript->template receive_from_prover(commitment_labels.mem_tsp); - commitments.mem_val = transcript->template receive_from_prover(commitment_labels.mem_val); - commitments.mem_w_in_tag = transcript->template receive_from_prover(commitment_labels.mem_w_in_tag); - commitments.pedersen_clk = transcript->template receive_from_prover(commitment_labels.pedersen_clk); - commitments.pedersen_input = transcript->template receive_from_prover(commitment_labels.pedersen_input); - commitments.pedersen_output = - transcript->template receive_from_prover(commitment_labels.pedersen_output); - commitments.pedersen_sel_pedersen = - transcript->template receive_from_prover(commitment_labels.pedersen_sel_pedersen); - commitments.poseidon2_clk = transcript->template receive_from_prover(commitment_labels.poseidon2_clk); - commitments.poseidon2_sel_poseidon_perm = - transcript->template receive_from_prover(commitment_labels.poseidon2_sel_poseidon_perm); - commitments.powers_power_of_2 = - transcript->template receive_from_prover(commitment_labels.powers_power_of_2); - commitments.sha256_clk = transcript->template receive_from_prover(commitment_labels.sha256_clk); - commitments.sha256_input = transcript->template receive_from_prover(commitment_labels.sha256_input); - commitments.sha256_output = transcript->template receive_from_prover(commitment_labels.sha256_output); - commitments.sha256_sel_sha256_compression = - transcript->template receive_from_prover(commitment_labels.sha256_sel_sha256_compression); - commitments.sha256_state = transcript->template receive_from_prover(commitment_labels.sha256_state); - commitments.lookup_byte_lengths_counts = - transcript->template receive_from_prover(commitment_labels.lookup_byte_lengths_counts); - commitments.lookup_byte_operations_counts = - transcript->template receive_from_prover(commitment_labels.lookup_byte_operations_counts); - commitments.lookup_opcode_gas_counts = - transcript->template receive_from_prover(commitment_labels.lookup_opcode_gas_counts); - commitments.range_check_l2_gas_hi_counts = - transcript->template receive_from_prover(commitment_labels.range_check_l2_gas_hi_counts); - commitments.range_check_l2_gas_lo_counts = - transcript->template receive_from_prover(commitment_labels.range_check_l2_gas_lo_counts); - commitments.range_check_da_gas_hi_counts = - transcript->template receive_from_prover(commitment_labels.range_check_da_gas_hi_counts); - commitments.range_check_da_gas_lo_counts = - transcript->template receive_from_prover(commitment_labels.range_check_da_gas_lo_counts); - commitments.kernel_output_lookup_counts = - transcript->template receive_from_prover(commitment_labels.kernel_output_lookup_counts); - commitments.lookup_into_kernel_counts = - transcript->template receive_from_prover(commitment_labels.lookup_into_kernel_counts); - commitments.incl_main_tag_err_counts = - transcript->template receive_from_prover(commitment_labels.incl_main_tag_err_counts); - commitments.incl_mem_tag_err_counts = - transcript->template receive_from_prover(commitment_labels.incl_mem_tag_err_counts); - commitments.lookup_mem_rng_chk_lo_counts = - transcript->template receive_from_prover(commitment_labels.lookup_mem_rng_chk_lo_counts); - commitments.lookup_mem_rng_chk_mid_counts = - transcript->template receive_from_prover(commitment_labels.lookup_mem_rng_chk_mid_counts); - commitments.lookup_mem_rng_chk_hi_counts = - transcript->template receive_from_prover(commitment_labels.lookup_mem_rng_chk_hi_counts); - commitments.lookup_pow_2_0_counts = - transcript->template receive_from_prover(commitment_labels.lookup_pow_2_0_counts); - commitments.lookup_pow_2_1_counts = - transcript->template receive_from_prover(commitment_labels.lookup_pow_2_1_counts); - commitments.lookup_u8_0_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u8_0_counts); - commitments.lookup_u8_1_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u8_1_counts); - commitments.lookup_u16_0_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u16_0_counts); - commitments.lookup_u16_1_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u16_1_counts); - commitments.lookup_u16_2_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u16_2_counts); - commitments.lookup_u16_3_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u16_3_counts); - commitments.lookup_u16_4_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u16_4_counts); - commitments.lookup_u16_5_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u16_5_counts); - commitments.lookup_u16_6_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u16_6_counts); - commitments.lookup_u16_7_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u16_7_counts); - commitments.lookup_u16_8_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u16_8_counts); - commitments.lookup_u16_9_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u16_9_counts); - commitments.lookup_u16_10_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u16_10_counts); - commitments.lookup_u16_11_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u16_11_counts); - commitments.lookup_u16_12_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u16_12_counts); - commitments.lookup_u16_13_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u16_13_counts); - commitments.lookup_u16_14_counts = - transcript->template receive_from_prover(commitment_labels.lookup_u16_14_counts); - commitments.lookup_div_u16_0_counts = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_0_counts); - commitments.lookup_div_u16_1_counts = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_1_counts); - commitments.lookup_div_u16_2_counts = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_2_counts); - commitments.lookup_div_u16_3_counts = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_3_counts); - commitments.lookup_div_u16_4_counts = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_4_counts); - commitments.lookup_div_u16_5_counts = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_5_counts); - commitments.lookup_div_u16_6_counts = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_6_counts); - commitments.lookup_div_u16_7_counts = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_7_counts); - - auto [beta, gamm] = transcript->template get_challenges("beta", "gamma"); + auto [beta, gamma] = transcript->template get_challenges("beta", "gamma"); relation_parameters.beta = beta; - relation_parameters.gamma = gamm; - info("recursive beta / gamma ", beta, " | ", gamm); + relation_parameters.gamma = gamma; + info("recursive beta / gamma ", beta, " | ", gamma); - commitments.perm_main_alu = transcript->template receive_from_prover(commitment_labels.perm_main_alu); - commitments.perm_main_bin = transcript->template receive_from_prover(commitment_labels.perm_main_bin); - commitments.perm_main_conv = transcript->template receive_from_prover(commitment_labels.perm_main_conv); - commitments.perm_main_pos2_perm = - transcript->template receive_from_prover(commitment_labels.perm_main_pos2_perm); - commitments.perm_main_pedersen = - transcript->template receive_from_prover(commitment_labels.perm_main_pedersen); - commitments.perm_main_mem_a = - transcript->template receive_from_prover(commitment_labels.perm_main_mem_a); - commitments.perm_main_mem_b = - transcript->template receive_from_prover(commitment_labels.perm_main_mem_b); - commitments.perm_main_mem_c = - transcript->template receive_from_prover(commitment_labels.perm_main_mem_c); - commitments.perm_main_mem_d = - transcript->template receive_from_prover(commitment_labels.perm_main_mem_d); - commitments.perm_main_mem_ind_addr_a = - transcript->template receive_from_prover(commitment_labels.perm_main_mem_ind_addr_a); - commitments.perm_main_mem_ind_addr_b = - transcript->template receive_from_prover(commitment_labels.perm_main_mem_ind_addr_b); - commitments.perm_main_mem_ind_addr_c = - transcript->template receive_from_prover(commitment_labels.perm_main_mem_ind_addr_c); - commitments.perm_main_mem_ind_addr_d = - transcript->template receive_from_prover(commitment_labels.perm_main_mem_ind_addr_d); - commitments.lookup_byte_lengths = - transcript->template receive_from_prover(commitment_labels.lookup_byte_lengths); - commitments.lookup_byte_operations = - transcript->template receive_from_prover(commitment_labels.lookup_byte_operations); - commitments.lookup_opcode_gas = - transcript->template receive_from_prover(commitment_labels.lookup_opcode_gas); - commitments.range_check_l2_gas_hi = - transcript->template receive_from_prover(commitment_labels.range_check_l2_gas_hi); - commitments.range_check_l2_gas_lo = - transcript->template receive_from_prover(commitment_labels.range_check_l2_gas_lo); - commitments.range_check_da_gas_hi = - transcript->template receive_from_prover(commitment_labels.range_check_da_gas_hi); - commitments.range_check_da_gas_lo = - transcript->template receive_from_prover(commitment_labels.range_check_da_gas_lo); - commitments.kernel_output_lookup = - transcript->template receive_from_prover(commitment_labels.kernel_output_lookup); - commitments.lookup_into_kernel = - transcript->template receive_from_prover(commitment_labels.lookup_into_kernel); - commitments.incl_main_tag_err = - transcript->template receive_from_prover(commitment_labels.incl_main_tag_err); - commitments.incl_mem_tag_err = - transcript->template receive_from_prover(commitment_labels.incl_mem_tag_err); - commitments.lookup_mem_rng_chk_lo = - transcript->template receive_from_prover(commitment_labels.lookup_mem_rng_chk_lo); - commitments.lookup_mem_rng_chk_mid = - transcript->template receive_from_prover(commitment_labels.lookup_mem_rng_chk_mid); - commitments.lookup_mem_rng_chk_hi = - transcript->template receive_from_prover(commitment_labels.lookup_mem_rng_chk_hi); - commitments.lookup_pow_2_0 = transcript->template receive_from_prover(commitment_labels.lookup_pow_2_0); - commitments.lookup_pow_2_1 = transcript->template receive_from_prover(commitment_labels.lookup_pow_2_1); - commitments.lookup_u8_0 = transcript->template receive_from_prover(commitment_labels.lookup_u8_0); - commitments.lookup_u8_1 = transcript->template receive_from_prover(commitment_labels.lookup_u8_1); - commitments.lookup_u16_0 = transcript->template receive_from_prover(commitment_labels.lookup_u16_0); - commitments.lookup_u16_1 = transcript->template receive_from_prover(commitment_labels.lookup_u16_1); - commitments.lookup_u16_2 = transcript->template receive_from_prover(commitment_labels.lookup_u16_2); - commitments.lookup_u16_3 = transcript->template receive_from_prover(commitment_labels.lookup_u16_3); - commitments.lookup_u16_4 = transcript->template receive_from_prover(commitment_labels.lookup_u16_4); - commitments.lookup_u16_5 = transcript->template receive_from_prover(commitment_labels.lookup_u16_5); - commitments.lookup_u16_6 = transcript->template receive_from_prover(commitment_labels.lookup_u16_6); - commitments.lookup_u16_7 = transcript->template receive_from_prover(commitment_labels.lookup_u16_7); - commitments.lookup_u16_8 = transcript->template receive_from_prover(commitment_labels.lookup_u16_8); - commitments.lookup_u16_9 = transcript->template receive_from_prover(commitment_labels.lookup_u16_9); - commitments.lookup_u16_10 = transcript->template receive_from_prover(commitment_labels.lookup_u16_10); - commitments.lookup_u16_11 = transcript->template receive_from_prover(commitment_labels.lookup_u16_11); - commitments.lookup_u16_12 = transcript->template receive_from_prover(commitment_labels.lookup_u16_12); - commitments.lookup_u16_13 = transcript->template receive_from_prover(commitment_labels.lookup_u16_13); - commitments.lookup_u16_14 = transcript->template receive_from_prover(commitment_labels.lookup_u16_14); - commitments.lookup_div_u16_0 = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_0); - commitments.lookup_div_u16_1 = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_1); - commitments.lookup_div_u16_2 = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_2); - commitments.lookup_div_u16_3 = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_3); - commitments.lookup_div_u16_4 = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_4); - commitments.lookup_div_u16_5 = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_5); - commitments.lookup_div_u16_6 = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_6); - commitments.lookup_div_u16_7 = - transcript->template receive_from_prover(commitment_labels.lookup_div_u16_7); + // Get commitments to inverses + for (auto [label, commitment] : zip_view(commitment_labels.get_derived(), commitments.get_derived())) { + commitment = transcript->template receive_from_prover(label); + } info("got commitments from prover"); From 0e7382fd8f106a3339f495340ac8a2effe86a891 Mon Sep 17 00:00:00 2001 From: jeanmon Date: Fri, 16 Aug 2024 13:06:59 +0000 Subject: [PATCH 05/21] 7790: Fix for zeromorph verification issue --- .../vm/avm/generated/composer.cpp | 3 ++- .../barretenberg/vm/avm/generated/flavor.hpp | 22 +++++++++++++++++++ .../vm/avm/generated/verifier.cpp | 8 +++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/composer.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/composer.cpp index baaebcea2f7..1b8aeff540f 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/composer.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/composer.cpp @@ -69,7 +69,8 @@ std::shared_ptr AvmComposer::compute_verification_key(C compute_proving_key(circuit_constructor); } - verification_key = std::make_shared(proving_key); + verification_key = + std::make_shared(proving_key->circuit_size, proving_key->num_public_inputs); return verification_key; } diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp index d7a5affe0a2..d263388f4b7 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp @@ -329,7 +329,29 @@ class AvmFlavor { auto get_to_be_shifted() { return AvmFlavor::get_to_be_shifted(*this); } }; +<<<<<<< HEAD using VerificationKey = VerificationKey_, VerifierCommitmentKey>; +======= + // Note(md): required for instantiation from the proving key - im sure there are other ways to construct this + class VerificationKey : public VerificationKey_, VerifierCommitmentKey> { + public: + VerificationKey() = default; + VerificationKey(const size_t circuit_size, const size_t num_public_inputs) + : VerificationKey_(circuit_size, num_public_inputs) + {} + + VerificationKey(const std::shared_ptr& proving_key) + : VerificationKey_(proving_key->circuit_size, proving_key->num_public_inputs) + { + // TODO(md): will likely need more information from this - circuit_size etc??? + + for (auto [polynomial, commitment] : + zip_view(proving_key->get_precomputed_polynomials(), this->get_all())) { + commitment = proving_key->commitment_key->commit(polynomial); + } + } + }; +>>>>>>> d0b2110807 (7790: Fix for zeromorph verification issue) class AllValues : public AllEntities { public: diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.cpp index cde64c811e4..ec2c05f5cdb 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.cpp @@ -145,11 +145,19 @@ bool AvmVerifier::verify_proof(const HonkProof& proof, claimed_evaluations.get_unshifted(), claimed_evaluations.get_shifted(), multivariate_challenge, +<<<<<<< HEAD pcs_verification_key.get_g1_identity(), transcript); auto pairing_points = PCS::reduce_verify(opening_claim, transcript); auto verified = pcs_verification_key.pairing_check(pairing_points[0], pairing_points[1]); +======= + pcs_verification_key->get_g1_identity(), + transcript); + + auto pairing_points = PCS::reduce_verify(opening_claim, transcript); + auto verified = pcs_verification_key->pairing_check(pairing_points[0], pairing_points[1]); +>>>>>>> d0b2110807 (7790: Fix for zeromorph verification issue) return sumcheck_verified.value() && verified; } From 3cfc1c4ff589e88b2dd98ab0d8ef83f9d16bbe2c Mon Sep 17 00:00:00 2001 From: jeanmon Date: Thu, 22 Aug 2024 14:06:04 +0000 Subject: [PATCH 06/21] 7790: fix issues after rebase to master --- .../cpp/src/barretenberg/vm/CMakeLists.txt | 2 +- .../vm/avm/generated/composer.cpp | 3 +-- .../barretenberg/vm/avm/generated/flavor.cpp | 18 ------------- .../barretenberg/vm/avm/generated/flavor.hpp | 25 +++++++++++-------- .../avm/generated/relations/gas_recursive.hpp | 12 +++++++++ .../vm/avm/generated/verifier.cpp | 8 ------ .../vm/avm/recursion/avm_recursive_flavor.hpp | 5 +++- .../avm/recursion/avm_recursive_verifier.hpp | 2 +- 8 files changed, 33 insertions(+), 42 deletions(-) create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/gas_recursive.hpp diff --git a/barretenberg/cpp/src/barretenberg/vm/CMakeLists.txt b/barretenberg/cpp/src/barretenberg/vm/CMakeLists.txt index d013afc5816..b7d1455ca7f 100644 --- a/barretenberg/cpp/src/barretenberg/vm/CMakeLists.txt +++ b/barretenberg/cpp/src/barretenberg/vm/CMakeLists.txt @@ -1,3 +1,3 @@ if(NOT DISABLE_AZTEC_VM) - barretenberg_module(vm sumcheck stdlib_honk_recursion) + barretenberg_module(vm ultra_honk stdlib_honk_verifier) endif() \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/composer.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/composer.cpp index 1b8aeff540f..baaebcea2f7 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/composer.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/composer.cpp @@ -69,8 +69,7 @@ std::shared_ptr AvmComposer::compute_verification_key(C compute_proving_key(circuit_constructor); } - verification_key = - std::make_shared(proving_key->circuit_size, proving_key->num_public_inputs); + verification_key = std::make_shared(proving_key); return verification_key; } diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp index 8fb9bcef6f2..7fdaf735d4f 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp @@ -2427,24 +2427,6 @@ AvmFlavor::CommitmentLabels::CommitmentLabels() Base::incl_mem_tag_err_counts = "INCL_MEM_TAG_ERR_COUNTS"; }; -AvmFlavor::VerifierCommitments::VerifierCommitments(const std::shared_ptr& verification_key) -{ - byte_lookup_sel_bin = verification_key->byte_lookup_sel_bin; - byte_lookup_table_byte_lengths = verification_key->byte_lookup_table_byte_lengths; - byte_lookup_table_in_tags = verification_key->byte_lookup_table_in_tags; - byte_lookup_table_input_a = verification_key->byte_lookup_table_input_a; - byte_lookup_table_input_b = verification_key->byte_lookup_table_input_b; - byte_lookup_table_op_id = verification_key->byte_lookup_table_op_id; - byte_lookup_table_output = verification_key->byte_lookup_table_output; - gas_da_gas_fixed_table = verification_key->gas_da_gas_fixed_table; - gas_l2_gas_fixed_table = verification_key->gas_l2_gas_fixed_table; - gas_sel_gas_cost = verification_key->gas_sel_gas_cost; - main_clk = verification_key->main_clk; - main_sel_first = verification_key->main_sel_first; - main_zeroes = verification_key->main_zeroes; - powers_power_of_2 = verification_key->powers_power_of_2; -} - void AvmFlavor::Transcript::deserialize_full_transcript() { size_t num_frs_read = 0; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp index d263388f4b7..7499ee89801 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp @@ -329,29 +329,30 @@ class AvmFlavor { auto get_to_be_shifted() { return AvmFlavor::get_to_be_shifted(*this); } }; -<<<<<<< HEAD - using VerificationKey = VerificationKey_, VerifierCommitmentKey>; -======= // Note(md): required for instantiation from the proving key - im sure there are other ways to construct this class VerificationKey : public VerificationKey_, VerifierCommitmentKey> { public: VerificationKey() = default; - VerificationKey(const size_t circuit_size, const size_t num_public_inputs) - : VerificationKey_(circuit_size, num_public_inputs) - {} VerificationKey(const std::shared_ptr& proving_key) : VerificationKey_(proving_key->circuit_size, proving_key->num_public_inputs) { - // TODO(md): will likely need more information from this - circuit_size etc??? - for (auto [polynomial, commitment] : zip_view(proving_key->get_precomputed_polynomials(), this->get_all())) { commitment = proving_key->commitment_key->commit(polynomial); } } + + VerificationKey(const size_t circuit_size, + const size_t num_public_inputs, + std::array const& precomputed_cmts) + : VerificationKey_(circuit_size, num_public_inputs) + { + for (auto [vk_cmt, cmt] : zip_view(this->get_all(), precomputed_cmts)) { + vk_cmt = cmt; + } + } }; ->>>>>>> d0b2110807 (7790: Fix for zeromorph verification issue) class AllValues : public AllEntities { public: @@ -447,8 +448,10 @@ class AvmFlavor { this->byte_lookup_table_input_b = verification_key->byte_lookup_table_input_b; this->byte_lookup_table_op_id = verification_key->byte_lookup_table_op_id; this->byte_lookup_table_output = verification_key->byte_lookup_table_output; - this->gas_da_gas_fixed_table = verification_key->gas_da_gas_fixed_table; - this->gas_l2_gas_fixed_table = verification_key->gas_l2_gas_fixed_table; + this->gas_base_da_gas_fixed_table = verification_key->gas_base_da_gas_fixed_table; + this->gas_base_l2_gas_fixed_table = verification_key->gas_base_l2_gas_fixed_table; + this->gas_dyn_da_gas_fixed_table = verification_key->gas_dyn_da_gas_fixed_table; + this->gas_dyn_l2_gas_fixed_table = verification_key->gas_dyn_l2_gas_fixed_table; this->gas_sel_gas_cost = verification_key->gas_sel_gas_cost; this->main_clk = verification_key->main_clk; this->main_sel_first = verification_key->main_sel_first; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/gas_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/gas_recursive.hpp new file mode 100644 index 00000000000..3905a20ee95 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/gas_recursive.hpp @@ -0,0 +1,12 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/flavor/relation_definitions.hpp" +#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" +#include "barretenberg/vm/avm/generated/relations/gas_recursive.hpp" +#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" + +namespace bb { +template class Avm_vm::gas_recursiveImpl>; +DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::gas_recursiveImpl, AvmRecursiveFlavor_); +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.cpp index ec2c05f5cdb..cde64c811e4 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.cpp @@ -145,19 +145,11 @@ bool AvmVerifier::verify_proof(const HonkProof& proof, claimed_evaluations.get_unshifted(), claimed_evaluations.get_shifted(), multivariate_challenge, -<<<<<<< HEAD pcs_verification_key.get_g1_identity(), transcript); auto pairing_points = PCS::reduce_verify(opening_claim, transcript); auto verified = pcs_verification_key.pairing_check(pairing_points[0], pairing_points[1]); -======= - pcs_verification_key->get_g1_identity(), - transcript); - - auto pairing_points = PCS::reduce_verify(opening_claim, transcript); - auto verified = pcs_verification_key->pairing_check(pairing_points[0], pairing_points[1]); ->>>>>>> d0b2110807 (7790: Fix for zeromorph verification issue) return sumcheck_verified.value() && verified; } diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp index 05aac251218..851280130b8 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp @@ -10,9 +10,9 @@ #include "barretenberg/flavor/flavor_macros.hpp" // TODO(md): uni or multivariate polynomials required? // #include "barretenberg/polynomials/univariate.hpp" -#include "barretenberg/stdlib/honk_recursion/transcript/transcript.hpp" #include "barretenberg/stdlib/primitives/curves/bn254.hpp" #include "barretenberg/stdlib/primitives/field/field.hpp" +#include "barretenberg/stdlib/transcript/transcript.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_circuit_builder.hpp" // Include relation files @@ -131,6 +131,9 @@ template class AvmRecursiveFlavor_ { // static constexpr size_t NUM_SUBRELATIONS = compute_number_of_subrelations(); using RelationSeparator = FF; + // This flavor would not be used with ZK Sumcheck + static constexpr bool HasZK = false; + // TODO(md): inherited? // define the containers for storing the contributions from each relation in Sumcheck using TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values()); diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp index 7ac3f8c269f..eaf7ea7aa8e 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp @@ -1,6 +1,6 @@ #pragma once #include "barretenberg/honk/proof_system/types/proof.hpp" -#include "barretenberg/stdlib/honk_recursion/transcript/transcript.hpp" +#include "barretenberg/stdlib/transcript/transcript.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" #include "barretenberg/sumcheck/sumcheck.hpp" #include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" From 79dc2bfc4101f2d9e53f3158c990a6247fa9d0bd Mon Sep 17 00:00:00 2001 From: jeanmon Date: Fri, 23 Aug 2024 07:14:14 +0000 Subject: [PATCH 07/21] 7790: Clean up header files --- .../vm/avm/recursion/avm_recursive_flavor.hpp | 82 +------------------ .../avm/recursion/avm_recursive_verifier.cpp | 4 +- .../avm/recursion/avm_recursive_verifier.hpp | 3 - 3 files changed, 3 insertions(+), 86 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp index 851280130b8..542616f7bc0 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp @@ -5,91 +5,11 @@ // We also want noir to be able to absorb these proofs #pragma once -#include "barretenberg/commitment_schemes/kzg/kzg.hpp" #include "barretenberg/flavor/flavor.hpp" -#include "barretenberg/flavor/flavor_macros.hpp" -// TODO(md): uni or multivariate polynomials required? -// #include "barretenberg/polynomials/univariate.hpp" -#include "barretenberg/stdlib/primitives/curves/bn254.hpp" -#include "barretenberg/stdlib/primitives/field/field.hpp" #include "barretenberg/stdlib/transcript/transcript.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_circuit_builder.hpp" - -// Include relation files -#include "barretenberg/vm/avm/generated/relations/alu.hpp" -#include "barretenberg/vm/avm/generated/relations/binary.hpp" -#include "barretenberg/vm/avm/generated/relations/conversion.hpp" -#include "barretenberg/vm/avm/generated/relations/incl_main_tag_err.hpp" -#include "barretenberg/vm/avm/generated/relations/incl_mem_tag_err.hpp" -#include "barretenberg/vm/avm/generated/relations/keccakf1600.hpp" -#include "barretenberg/vm/avm/generated/relations/kernel.hpp" -#include "barretenberg/vm/avm/generated/relations/kernel_output_lookup.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_byte_lengths.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_byte_operations.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_0.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_1.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_2.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_3.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_4.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_5.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_6.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_7.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_into_kernel.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_hi.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_lo.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_mid.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_opcode_gas.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_pow_2_0.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_pow_2_1.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_0.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_1.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_10.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_11.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_12.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_13.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_14.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_2.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_3.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_4.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_5.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_6.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_7.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_8.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_9.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u8_0.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u8_1.hpp" -#include "barretenberg/vm/avm/generated/relations/main.hpp" -#include "barretenberg/vm/avm/generated/relations/mem.hpp" -#include "barretenberg/vm/avm/generated/relations/pedersen.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_alu.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_bin.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_conv.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_a.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_b.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_c.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_d.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_a.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_b.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_c.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_d.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_pedersen.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_pos2_perm.hpp" -#include "barretenberg/vm/avm/generated/relations/poseidon2.hpp" -#include "barretenberg/vm/avm/generated/relations/range_check_da_gas_hi.hpp" -#include "barretenberg/vm/avm/generated/relations/range_check_da_gas_lo.hpp" -#include "barretenberg/vm/avm/generated/relations/range_check_l2_gas_hi.hpp" -#include "barretenberg/vm/avm/generated/relations/range_check_l2_gas_lo.hpp" -#include "barretenberg/vm/avm/generated/relations/sha256.hpp" - #include "barretenberg/vm/avm/generated/flavor.hpp" -#include "barretenberg/commitment_schemes/commitment_key.hpp" -#include "barretenberg/ecc/curves/bn254/g1.hpp" -#include "barretenberg/polynomials/barycentric.hpp" -#include "barretenberg/polynomials/evaluation_domain.hpp" -#include "barretenberg/polynomials/polynomial.hpp" -#include "barretenberg/polynomials/univariate.hpp" - namespace bb { template class AvmRecursiveFlavor_ { @@ -139,7 +59,7 @@ template class AvmRecursiveFlavor_ { using TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values()); /** - * @brief A field element for each entity of the flavor. These entities represent the prover polynomials + * @brief A field element for each entity of the flavor. These entities represent the prover polynomials * evaluated at one point. */ class AllValues : public AvmFlavor::AllEntities { diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp index 78ff92419c0..e9a9b573107 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp @@ -1,7 +1,5 @@ #include "barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp" #include "barretenberg/commitment_schemes/zeromorph/zeromorph.hpp" -#include "barretenberg/numeric/bitop/get_msb.hpp" -#include "barretenberg/stdlib/primitives/field/field.hpp" #include "barretenberg/transcript/transcript.hpp" namespace bb { @@ -95,6 +93,8 @@ template void AvmRecursiveVerifier_::verify_proof(cons info(gate_challenges[idx]); } + info("All challenges are set!"); + auto [multivariate_challenge, claimed_evaluations, sumcheck_verified] = sumcheck.verify(relation_parameters, alpha, gate_challenges); diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp index eaf7ea7aa8e..259c80f13b9 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp @@ -1,7 +1,4 @@ #pragma once -#include "barretenberg/honk/proof_system/types/proof.hpp" -#include "barretenberg/stdlib/transcript/transcript.hpp" -#include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" #include "barretenberg/sumcheck/sumcheck.hpp" #include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" From b803a267ab5269532fc95889b574d31e0b26a551 Mon Sep 17 00:00:00 2001 From: jeanmon Date: Fri, 23 Aug 2024 13:56:12 +0000 Subject: [PATCH 08/21] 7790: cosmetic cleanups and assert circuit size --- .../eccvm_verifier/eccvm_recursive_verifier.cpp | 1 - .../translator_recursive_verifier.cpp | 2 +- .../stdlib_circuit_builders/ultra_flavor.hpp | 2 +- .../vm/avm/recursion/avm_recursive_verifier.cpp | 11 ++++------- .../vm/avm/recursion/avm_recursive_verifier.test.cpp | 3 +-- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/eccvm_recursive_verifier.cpp b/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/eccvm_recursive_verifier.cpp index fe47fd9469d..eeb04cddc99 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/eccvm_recursive_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/eccvm_recursive_verifier.cpp @@ -16,7 +16,6 @@ ECCVMRecursiveVerifier_::ECCVMRecursiveVerifier_( /** * @brief This function verifies an ECCVM Honk proof for given program settings up to sumcheck. */ -// TODO(https://github.com/AztecProtocol/barretenberg/issues/1007): Finish this template void ECCVMRecursiveVerifier_::verify_proof(const HonkProof& proof) { using Curve = typename Flavor::Curve; diff --git a/barretenberg/cpp/src/barretenberg/stdlib/translator_vm_verifier/translator_recursive_verifier.cpp b/barretenberg/cpp/src/barretenberg/stdlib/translator_vm_verifier/translator_recursive_verifier.cpp index 87dc4ce806e..ea06cfbdbeb 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/translator_vm_verifier/translator_recursive_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/translator_vm_verifier/translator_recursive_verifier.cpp @@ -115,7 +115,7 @@ std::array TranslatorRecursiveVerifier_& proof) : NativeTranscript(proof) {} diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp index e9a9b573107..7d08ebda6da 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp @@ -43,10 +43,10 @@ template void AvmRecursiveVerifier_::verify_proof(cons CommitmentLabels commitment_labels; const auto circuit_size = transcript->template receive_from_prover("circuit_size"); - // TODO: assert the same as the key circuit size? - // if (circuit_size != key->circuit_size) { - // return false; - // } + if (static_cast(circuit_size.get_value()) != key->circuit_size) { + throw_or_abort("AvmRecursiveVerifier::verify_proof: proof circuit size does not match verification key!"); + } + info("got circuit size from prover: ", circuit_size); // Get commitments to VM wires @@ -84,9 +84,6 @@ template void AvmRecursiveVerifier_::verify_proof(cons FF alpha = transcript->template get_challenge("Sumcheck:alpha"); info("rec: sumcheck alpha: ", alpha); - info("got sumcheck alpha"); - - // TODO(md): do we want this to be an unrolled for loop? auto gate_challenges = std::vector(log_circuit_size); for (size_t idx = 0; idx < log_circuit_size; idx++) { gate_challenges[idx] = transcript->template get_challenge("Sumcheck:gate_challenge_" + std::to_string(idx)); diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp index 3388d0fba2f..b6b2655e4f2 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp @@ -1,7 +1,6 @@ // As this adds the honk_stdlib_recursion module to the cmake lists, we probably // want to make vm recursion its own module -// TMEPTEPTMEPTMEPTETMP #include "barretenberg/circuit_checker/circuit_checker.hpp" #include "barretenberg/numeric/random/engine.hpp" @@ -68,6 +67,7 @@ class AvmRecursiveTests : public ::testing::Test { builder.set_trace(std::move(trace)); builder.check_circuit(); + info("inner builder - num gates: ", builder.get_num_gates()); return builder; } @@ -75,7 +75,6 @@ class AvmRecursiveTests : public ::testing::Test { TEST_F(AvmRecursiveTests, recursion) { - AvmCircuitBuilder circuit_builder = generate_avm_circuit(); AvmComposer composer = AvmComposer(); AvmProver prover = composer.create_prover(circuit_builder); From d50361162a6207f8668b1b4d8477235a467960fc Mon Sep 17 00:00:00 2001 From: jeanmon Date: Fri, 23 Aug 2024 14:01:56 +0000 Subject: [PATCH 09/21] 7790: Enable Zeromorph in AVM recursive verifier (just compilation) --- .../avm/recursion/avm_recursive_verifier.cpp | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp index 7d08ebda6da..03918c0904e 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp @@ -20,9 +20,9 @@ AvmRecursiveVerifier_::AvmRecursiveVerifier_(Builder* builder, const std template void AvmRecursiveVerifier_::verify_proof(const HonkProof& proof) { // TODO(md): enable zeromorph - // using Curve = typename Flavor::Curve; - // using Zeromorph = ZeroMorphVerifier_; - // using PCS = typename Flavor::PCS; + using Curve = typename Flavor::Curve; + using Zeromorph = ZeroMorphVerifier_; + using PCS = typename Flavor::PCS; // TODO(md): Questionable assignments // using Curve = typename Flavor::Curve; @@ -99,21 +99,19 @@ template void AvmRecursiveVerifier_::verify_proof(cons // TODO(md): when calling `get_commitments` do the values get constrained in their origin? check that the zip_view // does in fact use the verifier type to get it? - // TODO: will probably need to disable zeromorph for the meantime as we are not able to verify it natively at the - // moment - // info() - // auto multivariate_to_univariate_opening_claim = Zeromorph::verify(commitments.get_unshifted(), - // commitments.get_to_be_shifted(), - // claimed_evaluations.get_unshifted(), - // claimed_evaluations.get_shifted(), - // multivatiate_challenge, - // key->pcs_verification_key->get_g1_identity(), - // transcript); + auto multivariate_to_univariate_opening_claim = Zeromorph::verify(circuit_size, + commitments.get_unshifted(), + commitments.get_to_be_shifted(), + claimed_evaluations.get_unshifted(), + claimed_evaluations.get_shifted(), + multivariate_challenge, + Commitment::one(builder), + transcript); - // auto pairing_points = PCS::reduce_verify(multivariate_to_univariate_opening_claim, transcript); + auto pairing_points = PCS::reduce_verify(multivariate_to_univariate_opening_claim, transcript); - // info("pairing points size ", pairing_points.size()); + info("pairing points size ", pairing_points.size()); // TODO(md): call assert true on the builder type to lay down the positive boolean constraint? } From c08f5d7f0cc889a0577a9637680e0e58177c1cbc Mon Sep 17 00:00:00 2001 From: jeanmon Date: Fri, 23 Aug 2024 15:20:55 +0000 Subject: [PATCH 10/21] 7790: refactor - move pcs_verification_key to verification_key --- .../cpp/src/barretenberg/vm/avm/generated/flavor.hpp | 3 ++- .../cpp/src/barretenberg/vm/avm/generated/verifier.cpp | 6 ++---- .../cpp/src/barretenberg/vm/avm/generated/verifier.hpp | 3 +-- .../vm/avm/recursion/avm_recursive_verifier.test.cpp | 1 + bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs | 5 +++-- bb-pilcom/bb-pil-backend/templates/verifier.cpp.hbs | 6 ++---- bb-pilcom/bb-pil-backend/templates/verifier.hpp.hbs | 3 +-- 7 files changed, 12 insertions(+), 15 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp index 7499ee89801..363b63fba43 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp @@ -329,7 +329,6 @@ class AvmFlavor { auto get_to_be_shifted() { return AvmFlavor::get_to_be_shifted(*this); } }; - // Note(md): required for instantiation from the proving key - im sure there are other ways to construct this class VerificationKey : public VerificationKey_, VerifierCommitmentKey> { public: VerificationKey() = default; @@ -341,6 +340,7 @@ class AvmFlavor { zip_view(proving_key->get_precomputed_polynomials(), this->get_all())) { commitment = proving_key->commitment_key->commit(polynomial); } + pcs_verification_key = std::make_shared(); } VerificationKey(const size_t circuit_size, @@ -351,6 +351,7 @@ class AvmFlavor { for (auto [vk_cmt, cmt] : zip_view(this->get_all(), precomputed_cmts)) { vk_cmt = cmt; } + pcs_verification_key = std::make_shared(); } }; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.cpp index cde64c811e4..bd132af86f6 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.cpp @@ -15,13 +15,11 @@ AvmVerifier::AvmVerifier(std::shared_ptr verifier_key) AvmVerifier::AvmVerifier(AvmVerifier&& other) noexcept : key(std::move(other.key)) - , pcs_verification_key(std::move(other.pcs_verification_key)) {} AvmVerifier& AvmVerifier::operator=(AvmVerifier&& other) noexcept { key = other.key; - pcs_verification_key = other.pcs_verification_key; commitments.clear(); return *this; } @@ -145,11 +143,11 @@ bool AvmVerifier::verify_proof(const HonkProof& proof, claimed_evaluations.get_unshifted(), claimed_evaluations.get_shifted(), multivariate_challenge, - pcs_verification_key.get_g1_identity(), + key->pcs_verification_key->get_g1_identity(), transcript); auto pairing_points = PCS::reduce_verify(opening_claim, transcript); - auto verified = pcs_verification_key.pairing_check(pairing_points[0], pairing_points[1]); + auto verified = key->pcs_verification_key->pairing_check(pairing_points[0], pairing_points[1]); return sumcheck_verified.value() && verified; } diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.hpp index 09569deff31..de4dd7acc24 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/verifier.hpp @@ -16,7 +16,7 @@ class AvmVerifier { using Transcript = Flavor::Transcript; public: - explicit AvmVerifier(std::shared_ptr verifier_key = nullptr); + explicit AvmVerifier(std::shared_ptr verifier_key); AvmVerifier(AvmVerifier&& other) noexcept; AvmVerifier(const AvmVerifier& other) = delete; @@ -27,7 +27,6 @@ class AvmVerifier { std::shared_ptr key; std::map commitments; - VerifierCommitmentKey pcs_verification_key; std::shared_ptr transcript; }; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp index b6b2655e4f2..d86898c8de3 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp @@ -75,6 +75,7 @@ class AvmRecursiveTests : public ::testing::Test { TEST_F(AvmRecursiveTests, recursion) { + GTEST_SKIP() << "Skipping single test"; AvmCircuitBuilder circuit_builder = generate_avm_circuit(); AvmComposer composer = AvmComposer(); AvmProver prover = composer.create_prover(circuit_builder); diff --git a/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs b/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs index 454ec932182..e1093481a35 100644 --- a/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs +++ b/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs @@ -151,7 +151,7 @@ class {{name}}Flavor { , public ShiftedEntities { public: DEFINE_COMPOUND_GET_ALL(PrecomputedEntities, WitnessEntities, ShiftedEntities) - + auto get_unshifted() { return concatenate(PrecomputedEntities::get_all(), WitnessEntities::get_all()); } @@ -170,7 +170,6 @@ class {{name}}Flavor { } }; - // Note(md): required for instantiation from the proving key - im sure there are other ways to construct this class VerificationKey : public VerificationKey_, VerifierCommitmentKey> { public: VerificationKey() = default; @@ -182,6 +181,7 @@ class {{name}}Flavor { zip_view(proving_key->get_precomputed_polynomials(), this->get_all())) { commitment = proving_key->commitment_key->commit(polynomial); } + pcs_verification_key = std::make_shared(); } VerificationKey(const size_t circuit_size, @@ -192,6 +192,7 @@ class {{name}}Flavor { for (auto [vk_cmt, cmt] : zip_view(this->get_all(), precomputed_cmts)) { vk_cmt = cmt; } + pcs_verification_key = std::make_shared(); } }; diff --git a/bb-pilcom/bb-pil-backend/templates/verifier.cpp.hbs b/bb-pilcom/bb-pil-backend/templates/verifier.cpp.hbs index 9fa328e47b2..dbb2ad78685 100644 --- a/bb-pilcom/bb-pil-backend/templates/verifier.cpp.hbs +++ b/bb-pilcom/bb-pil-backend/templates/verifier.cpp.hbs @@ -15,13 +15,11 @@ namespace bb { {{name}}Verifier::{{name}}Verifier({{name}}Verifier&& other) noexcept : key(std::move(other.key)) - , pcs_verification_key(std::move(other.pcs_verification_key)) {} {{name}}Verifier& {{name}}Verifier::operator=({{name}}Verifier&& other) noexcept { key = other.key; - pcs_verification_key = other.pcs_verification_key; commitments.clear(); return *this; } @@ -124,11 +122,11 @@ bool {{name}}Verifier::verify_proof(const HonkProof& proof, [[maybe_unused]] con claimed_evaluations.get_unshifted(), claimed_evaluations.get_shifted(), multivariate_challenge, - pcs_verification_key.get_g1_identity(), + key->pcs_verification_key->get_g1_identity(), transcript); auto pairing_points = PCS::reduce_verify(opening_claim, transcript); - auto verified = pcs_verification_key.pairing_check(pairing_points[0], pairing_points[1]); + auto verified = key->pcs_verification_key->pairing_check(pairing_points[0], pairing_points[1]); return sumcheck_verified.value() && verified; } diff --git a/bb-pilcom/bb-pil-backend/templates/verifier.hpp.hbs b/bb-pilcom/bb-pil-backend/templates/verifier.hpp.hbs index 05514fbb9e4..951ea0b4275 100644 --- a/bb-pilcom/bb-pil-backend/templates/verifier.hpp.hbs +++ b/bb-pilcom/bb-pil-backend/templates/verifier.hpp.hbs @@ -16,7 +16,7 @@ class {{name}}Verifier { using Transcript = Flavor::Transcript; public: - explicit {{name}}Verifier(std::shared_ptr verifier_key = nullptr); + explicit {{name}}Verifier(std::shared_ptr verifier_key); {{name}}Verifier({{name}}Verifier&& other) noexcept; {{name}}Verifier(const {{name}}Verifier& other) = delete; @@ -27,7 +27,6 @@ class {{name}}Verifier { std::shared_ptr key; std::map commitments; - VerifierCommitmentKey pcs_verification_key; std::shared_ptr transcript; }; From 8e6adf60f6ac6cac42827c7906f556cb205bd6b3 Mon Sep 17 00:00:00 2001 From: jeanmon Date: Mon, 26 Aug 2024 08:39:36 +0000 Subject: [PATCH 11/21] 7790: Make Zeromorph verification work in AVM recursive verifier --- .../vm/avm/recursion/avm_recursive_flavor.hpp | 2 +- .../vm/avm/recursion/avm_recursive_verifier.cpp | 5 ----- .../vm/avm/recursion/avm_recursive_verifier.test.cpp | 8 +++++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp index 542616f7bc0..227552a838a 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp @@ -82,7 +82,7 @@ template class AvmRecursiveFlavor_ { this->pcs_verification_key = native_key->pcs_verification_key; this->circuit_size = native_key->circuit_size; this->log_circuit_size = numeric::get_msb(this->circuit_size); - // this->num_public_inputs = native_key->num_public_inputs; + this->num_public_inputs = native_key->num_public_inputs; // this->pub_inputs_offset = native_key->pub_inputs_offset; for (auto [native_comm, comm] : zip_view(native_key->get_all(), this->get_all())) { comm = Commitment::from_witness(builder, native_comm); diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp index 03918c0904e..7d35b762d5f 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp @@ -19,14 +19,9 @@ AvmRecursiveVerifier_::AvmRecursiveVerifier_(Builder* builder, const std template void AvmRecursiveVerifier_::verify_proof(const HonkProof& proof) { - // TODO(md): enable zeromorph using Curve = typename Flavor::Curve; using Zeromorph = ZeroMorphVerifier_; using PCS = typename Flavor::PCS; - - // TODO(md): Questionable assignments - // using Curve = typename Flavor::Curve; - using VerifierCommitments = typename Flavor::VerifierCommitments; using CommitmentLabels = typename Flavor::CommitmentLabels; using RelationParams = ::bb::RelationParameters; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp index d86898c8de3..6cb559215f6 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp @@ -75,7 +75,7 @@ class AvmRecursiveTests : public ::testing::Test { TEST_F(AvmRecursiveTests, recursion) { - GTEST_SKIP() << "Skipping single test"; + // GTEST_SKIP() << "Skipping single test"; AvmCircuitBuilder circuit_builder = generate_avm_circuit(); AvmComposer composer = AvmComposer(); AvmProver prover = composer.create_prover(circuit_builder); @@ -113,8 +113,10 @@ TEST_F(AvmRecursiveTests, recursion) info("Outer circuit failed? ", outer_circuit.failed()); CircuitChecker::check(outer_circuit); - // Make a proof of the verifiers - auto ultra_instance = std::make_shared(outer_circuit); + // Make a proof of the verification of an AVM proof + const size_t srs_size = 1 << 23; + auto ultra_instance = std::make_shared( + outer_circuit, TraceStructure::NONE, std::make_shared>(srs_size)); OuterProver ultra_prover(ultra_instance); auto ultra_verification_key = std::make_shared(ultra_instance->proving_key); OuterVerifier ultra_verifier(ultra_verification_key); From 6fba30c79da9cf1041ba101adb789b80857de24f Mon Sep 17 00:00:00 2001 From: jeanmon Date: Tue, 27 Aug 2024 19:23:48 +0000 Subject: [PATCH 12/21] 7790: recursive verifier returns pairing pooints + other improvements --- .../avm/recursion/avm_recursive_verifier.cpp | 18 ++------- .../avm/recursion/avm_recursive_verifier.hpp | 2 +- .../recursion/avm_recursive_verifier.test.cpp | 37 ++++++++++--------- 3 files changed, 24 insertions(+), 33 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp index 7d35b762d5f..da3417e0a2f 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp @@ -17,7 +17,8 @@ AvmRecursiveVerifier_::AvmRecursiveVerifier_(Builder* builder, const std , builder(builder) {} -template void AvmRecursiveVerifier_::verify_proof(const HonkProof& proof) +template +std::array AvmRecursiveVerifier_::verify_proof(const HonkProof& proof) { using Curve = typename Flavor::Curve; using Zeromorph = ZeroMorphVerifier_; @@ -28,11 +29,8 @@ template void AvmRecursiveVerifier_::verify_proof(cons using Transcript = typename Flavor::Transcript; StdlibProof stdlib_proof = bb::convert_proof_to_witness(builder, proof); - info("converted proof to witness"); transcript = std::make_shared(stdlib_proof); - info("made transcript"); - RelationParams relation_parameters; VerifierCommitments commitments{ key }; CommitmentLabels commitment_labels; @@ -42,8 +40,6 @@ template void AvmRecursiveVerifier_::verify_proof(cons throw_or_abort("AvmRecursiveVerifier::verify_proof: proof circuit size does not match verification key!"); } - info("got circuit size from prover: ", circuit_size); - // Get commitments to VM wires for (auto [comm, label] : zip_view(commitments.get_wires(), commitment_labels.get_wires())) { comm = transcript->template receive_from_prover(label); @@ -61,15 +57,12 @@ template void AvmRecursiveVerifier_::verify_proof(cons auto [beta, gamma] = transcript->template get_challenges("beta", "gamma"); relation_parameters.beta = beta; relation_parameters.gamma = gamma; - info("recursive beta / gamma ", beta, " | ", gamma); // Get commitments to inverses for (auto [label, commitment] : zip_view(commitment_labels.get_derived(), commitments.get_derived())) { commitment = transcript->template receive_from_prover(label); } - info("got commitments from prover"); - // TODO(md): do we not need to hash the counts columns until the sumcheck rounds? // unconstrained @@ -77,16 +70,12 @@ template void AvmRecursiveVerifier_::verify_proof(cons auto sumcheck = SumcheckVerifier(log_circuit_size, transcript); FF alpha = transcript->template get_challenge("Sumcheck:alpha"); - info("rec: sumcheck alpha: ", alpha); auto gate_challenges = std::vector(log_circuit_size); for (size_t idx = 0; idx < log_circuit_size; idx++) { gate_challenges[idx] = transcript->template get_challenge("Sumcheck:gate_challenge_" + std::to_string(idx)); - info(gate_challenges[idx]); } - info("All challenges are set!"); - auto [multivariate_challenge, claimed_evaluations, sumcheck_verified] = sumcheck.verify(relation_parameters, alpha, gate_challenges); @@ -106,8 +95,7 @@ template void AvmRecursiveVerifier_::verify_proof(cons auto pairing_points = PCS::reduce_verify(multivariate_to_univariate_opening_claim, transcript); - info("pairing points size ", pairing_points.size()); - + return pairing_points; // TODO(md): call assert true on the builder type to lay down the positive boolean constraint? } diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp index 259c80f13b9..6bfe57c48a9 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp @@ -25,7 +25,7 @@ template class AvmRecursiveVerifier_ { const std::shared_ptr& native_verification_key); explicit AvmRecursiveVerifier_(Builder* builder, const std::shared_ptr& vkey); - void verify_proof(const HonkProof& proof); + std::array verify_proof(const HonkProof& proof); std::shared_ptr key; std::map commitments; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp index 6cb559215f6..05b4c3b4ebe 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp @@ -52,8 +52,6 @@ class AvmRecursiveTests : public ::testing::Test { static void SetUpTestSuite() { bb::srs::init_crs_factory("../srs_db/ignition"); } // Generate an extremely simple avm trace - // - no public inputs etc - static AvmCircuitBuilder generate_avm_circuit() { AvmTraceBuilder trace_builder(generate_base_public_inputs()); @@ -63,7 +61,7 @@ class AvmRecursiveTests : public ::testing::Test { trace_builder.op_set(0, 1, 2, AvmMemoryTag::U8); trace_builder.op_add(0, 1, 2, 3, AvmMemoryTag::U8); trace_builder.op_return(0, 0, 0); - auto trace = trace_builder.finalize(); + auto trace = trace_builder.finalize(true); builder.set_trace(std::move(trace)); builder.check_circuit(); @@ -75,7 +73,6 @@ class AvmRecursiveTests : public ::testing::Test { TEST_F(AvmRecursiveTests, recursion) { - // GTEST_SKIP() << "Skipping single test"; AvmCircuitBuilder circuit_builder = generate_avm_circuit(); AvmComposer composer = AvmComposer(); AvmProver prover = composer.create_prover(circuit_builder); @@ -89,29 +86,28 @@ TEST_F(AvmRecursiveTests, recursion) bb::avm_trace::copy_public_inputs_columns(public_inputs, {}, {}); bool verified = verifier.verify_proof(proof, public_inputs_vec); - info("proof verified: ", verified); - ASSERT_TRUE(verified); + ASSERT_TRUE(verified) << "native proof verification failed"; // Create the outer verifier, to verify the proof const std::shared_ptr verification_key = verifier.key; - // Verification key contains the commitments to things listed in the verifiercommitments class - // info((*verification_key).main_clk); - - info("got verification key"); - OuterBuilder outer_circuit; RecursiveVerifier recursive_verifier{ &outer_circuit, verification_key }; - info("make recursive verifier"); - // Note(md): no inputs are provided here - so the verifier is under-constrained in respect to public inputs // If we return the pairing points then potentially they can be recursively verified nicely?? - but it is not clear // how aggregation will work unless we make sure the avm has the same circuit size as other things - recursive_verifier.verify_proof(proof); + auto pairing_points = recursive_verifier.verify_proof(proof); + + bool pairing_points_valid = verification_key->pcs_verification_key->pairing_check(pairing_points[0].get_value(), + pairing_points[1].get_value()); + + ASSERT_TRUE(pairing_points_valid) << "Pairing points are not valid."; info("Recursive verifier: num gates = ", outer_circuit.num_gates); - info("Outer circuit failed? ", outer_circuit.failed()); - CircuitChecker::check(outer_circuit); + ASSERT_FALSE(outer_circuit.failed()) << "Outer circuit has failed."; + + bool outer_circuit_checked = CircuitChecker::check(outer_circuit); + ASSERT_TRUE(outer_circuit_checked) << "outer circuit check failed"; // Make a proof of the verification of an AVM proof const size_t srs_size = 1 << 23; @@ -123,7 +119,14 @@ TEST_F(AvmRecursiveTests, recursion) auto recursion_proof = ultra_prover.construct_proof(); bool recursion_verified = ultra_verifier.verify_proof(recursion_proof); + EXPECT_TRUE(recursion_verified) << "recursion proof verification failed"; - info("verified recursive proof, ", recursion_verified); + auto manifest = verifier.transcript->get_manifest(); + auto recursive_manifest = recursive_verifier.transcript->get_manifest(); + + EXPECT_EQ(manifest.size(), recursive_manifest.size()); + for (size_t i = 0; i < recursive_manifest.size(); ++i) { + EXPECT_EQ(recursive_manifest[i], manifest[i]); + } } } // namespace tests_avm From 4ba25b2bf56201523a7b59d5de25083838c0945d Mon Sep 17 00:00:00 2001 From: jeanmon Date: Wed, 28 Aug 2024 08:55:01 +0000 Subject: [PATCH 13/21] 7790: Cleaning up recursive flavor --- .../vm/avm/recursion/avm_recursive_flavor.hpp | 26 +++---------------- .../avm/recursion/avm_recursive_verifier.hpp | 1 - 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp index 227552a838a..1ff254c1408 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp @@ -27,7 +27,8 @@ template class AvmRecursiveFlavor_ { using NativeFlavor = AvmFlavor; using NativeVerificationKey = NativeFlavor::VerificationKey; - using VerifierCommitmentKey = bb::VerifierCommitmentKey; + // Native one is used! + using VerifierCommitmentKey = NativeFlavor::VerifierCommitmentKey; using Relations = AvmFlavor::Relations_; @@ -36,25 +37,14 @@ template class AvmRecursiveFlavor_ { static constexpr size_t NUM_PRECOMPUTED_ENTITIES = NativeFlavor::NUM_PRECOMPUTED_ENTITIES; static constexpr size_t NUM_WITNESS_ENTITIES = NativeFlavor::NUM_WITNESS_ENTITIES; - // TODO(md): can be inherited? - static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length(); - static constexpr size_t MAX_TOTAL_RELATION_LENGTH = compute_max_total_relation_length(); - - // TODO(md): need? - // BATCHED_RELATION_PARTIAL_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta` - // random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation - // length = 3 - static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1; - static constexpr size_t BATCHED_RELATION_TOTAL_LENGTH = MAX_TOTAL_RELATION_LENGTH + 1; + static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = NativeFlavor::BATCHED_RELATION_PARTIAL_LENGTH; static constexpr size_t NUM_RELATIONS = std::tuple_size_v; - // static constexpr size_t NUM_SUBRELATIONS = compute_number_of_subrelations(); using RelationSeparator = FF; // This flavor would not be used with ZK Sumcheck static constexpr bool HasZK = false; - // TODO(md): inherited? // define the containers for storing the contributions from each relation in Sumcheck using TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values()); @@ -70,20 +60,13 @@ template class AvmRecursiveFlavor_ { class VerificationKey : public VerificationKey_, VerifierCommitmentKey> { public: - VerificationKey(const size_t circuit_size, const size_t num_public_inputs) - { - this->circuit_size = circuit_size; - this->log_circuit_size = numeric::get_msb(circuit_size); - this->num_public_inputs = num_public_inputs; - } - VerificationKey(CircuitBuilder* builder, const std::shared_ptr& native_key) { this->pcs_verification_key = native_key->pcs_verification_key; this->circuit_size = native_key->circuit_size; this->log_circuit_size = numeric::get_msb(this->circuit_size); this->num_public_inputs = native_key->num_public_inputs; - // this->pub_inputs_offset = native_key->pub_inputs_offset; + for (auto [native_comm, comm] : zip_view(native_key->get_all(), this->get_all())) { comm = Commitment::from_witness(builder, native_comm); } @@ -92,7 +75,6 @@ template class AvmRecursiveFlavor_ { using WitnessCommitments = AvmFlavor::WitnessEntities; using CommitmentLabels = AvmFlavor::CommitmentLabels; - // Note(md): template types differ here using VerifierCommitments = AvmFlavor::VerifierCommitments_; using Transcript = bb::BaseTranscript>; }; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp index 6bfe57c48a9..63ca991a199 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp @@ -14,7 +14,6 @@ template class AvmRecursiveVerifier_ { using VerificationKey = typename Flavor::VerificationKey; using NativeVerificationKey = typename Flavor::NativeVerificationKey; - using VerifierCommitmentKey = typename Flavor::VerifierCommitmentKey; using Builder = typename Flavor::CircuitBuilder; using PCS = typename Flavor::PCS; using Transcript = bb::BaseTranscript>; From e180d60769672baa53fda31efe1e1872ba77e6f4 Mon Sep 17 00:00:00 2001 From: jeanmon Date: Wed, 28 Aug 2024 09:22:16 +0000 Subject: [PATCH 14/21] 7790: Remove BATCHED_RELATION_TOTAL_LENGTH constant in all flavors --- .../translator_vm_verifier/translator_recursive_flavor.hpp | 1 - .../cpp/src/barretenberg/stdlib_circuit_builders/mega_flavor.hpp | 1 - .../stdlib_circuit_builders/mega_recursive_flavor.hpp | 1 - .../src/barretenberg/stdlib_circuit_builders/ultra_flavor.hpp | 1 - .../src/barretenberg/stdlib_circuit_builders/ultra_keccak.hpp | 1 - .../stdlib_circuit_builders/ultra_recursive_flavor.hpp | 1 - .../cpp/src/barretenberg/translator_vm/translator_flavor.hpp | 1 - 7 files changed, 7 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/stdlib/translator_vm_verifier/translator_recursive_flavor.hpp b/barretenberg/cpp/src/barretenberg/stdlib/translator_vm_verifier/translator_recursive_flavor.hpp index c8331534405..36f8159dad4 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/translator_vm_verifier/translator_recursive_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/translator_vm_verifier/translator_recursive_flavor.hpp @@ -96,7 +96,6 @@ template class TranslatorRecursiveFlavor_ { // random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation // length = 3 static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1; - static constexpr size_t BATCHED_RELATION_TOTAL_LENGTH = MAX_TOTAL_RELATION_LENGTH + 1; static constexpr size_t NUM_RELATIONS = std::tuple_size_v; // define the containers for storing the contributions from each relation in Sumcheck diff --git a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/mega_flavor.hpp b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/mega_flavor.hpp index 071bd50c675..f614265b156 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/mega_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/mega_flavor.hpp @@ -74,7 +74,6 @@ class MegaFlavor { // random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation // length = 3 static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1; - static constexpr size_t BATCHED_RELATION_TOTAL_LENGTH = MAX_TOTAL_RELATION_LENGTH + 1; static constexpr size_t NUM_RELATIONS = std::tuple_size_v; // The total number of witnesses including shifts and derived entities. static constexpr size_t NUM_ALL_WITNESS_ENTITIES = 23; diff --git a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/mega_recursive_flavor.hpp b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/mega_recursive_flavor.hpp index 8d105adb10b..388de27414f 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/mega_recursive_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/mega_recursive_flavor.hpp @@ -66,7 +66,6 @@ template class MegaRecursiveFlavor_ { // random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation // length = 3 static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1; - static constexpr size_t BATCHED_RELATION_TOTAL_LENGTH = MAX_TOTAL_RELATION_LENGTH + 1; static constexpr size_t NUM_RELATIONS = std::tuple_size_v; // For instances of this flavour, used in folding, we need a unique sumcheck batching challenge for each diff --git a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_flavor.hpp b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_flavor.hpp index fbea15d0f7d..ac1304fffc4 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_flavor.hpp @@ -81,7 +81,6 @@ class UltraFlavor { // random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation // length = 3 static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1; - static constexpr size_t BATCHED_RELATION_TOTAL_LENGTH = MAX_TOTAL_RELATION_LENGTH + 1; static constexpr size_t NUM_RELATIONS = std::tuple_size_v; template diff --git a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_keccak.hpp b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_keccak.hpp index 91f9017893c..add2e13f272 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_keccak.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_keccak.hpp @@ -76,7 +76,6 @@ class UltraKeccakFlavor { // random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation // length = 3 static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1; - static constexpr size_t BATCHED_RELATION_TOTAL_LENGTH = MAX_TOTAL_RELATION_LENGTH + 1; static constexpr size_t NUM_RELATIONS = std::tuple_size_v; template diff --git a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_recursive_flavor.hpp b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_recursive_flavor.hpp index f084391ca92..04ff64f28c2 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_recursive_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_recursive_flavor.hpp @@ -81,7 +81,6 @@ template class UltraRecursiveFlavor_ { // random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation // length = 3 static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1; - static constexpr size_t BATCHED_RELATION_TOTAL_LENGTH = MAX_TOTAL_RELATION_LENGTH + 1; static constexpr size_t NUM_RELATIONS = std::tuple_size::value; // For instances of this flavour, used in folding, we need a unique sumcheck batching challenges for each diff --git a/barretenberg/cpp/src/barretenberg/translator_vm/translator_flavor.hpp b/barretenberg/cpp/src/barretenberg/translator_vm/translator_flavor.hpp index 22bb710e84a..b1e717caff8 100644 --- a/barretenberg/cpp/src/barretenberg/translator_vm/translator_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/translator_vm/translator_flavor.hpp @@ -100,7 +100,6 @@ class TranslatorFlavor { // random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation // length = 3 static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1; - static constexpr size_t BATCHED_RELATION_TOTAL_LENGTH = MAX_TOTAL_RELATION_LENGTH + 1; static constexpr size_t NUM_RELATIONS = std::tuple_size_v; // define the containers for storing the contributions from each relation in Sumcheck From 31d29e325349bbaa20d25807ff8445c2c10eb207 Mon Sep 17 00:00:00 2001 From: jeanmon Date: Wed, 28 Aug 2024 11:32:03 +0000 Subject: [PATCH 15/21] 7790: additional clean ups --- .../vm/avm/recursion/avm_recursive_flavor.hpp | 6 ----- .../avm/recursion/avm_recursive_verifier.cpp | 24 +++++++------------ .../recursion/avm_recursive_verifier.test.cpp | 17 ++++--------- 3 files changed, 12 insertions(+), 35 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp index 1ff254c1408..10cd689867a 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp @@ -1,9 +1,3 @@ -// Notes: -// We want the recursive verifier for this proof to be an ultra honk type proof -// that will be aggregated in the rolup circuits -// -// We also want noir to be able to absorb these proofs - #pragma once #include "barretenberg/flavor/flavor.hpp" #include "barretenberg/stdlib/transcript/transcript.hpp" diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp index da3417e0a2f..19ce9f7750b 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp @@ -45,15 +45,6 @@ std::array AvmRecursiveVerifier_::veri comm = transcript->template receive_from_prover(label); } - // // Note(md): inherited from eccvm recursion - // // TODO(https://github.com/AztecProtocol/barretenberg/issues/1017): This is a hack to ensure zero commitments - // // are still on curve as the transcript doesn't currently support a point at infinity representation for - // // cycle_group - // if (!comm.get_value().on_curve()) { - // comm.set_point_at_infinity(true); - // } - // } - auto [beta, gamma] = transcript->template get_challenges("beta", "gamma"); relation_parameters.beta = beta; relation_parameters.gamma = gamma; @@ -63,8 +54,6 @@ std::array AvmRecursiveVerifier_::veri commitment = transcript->template receive_from_prover(label); } - // TODO(md): do we not need to hash the counts columns until the sumcheck rounds? - // unconstrained const size_t log_circuit_size = numeric::get_msb(static_cast(circuit_size.get_value())); auto sumcheck = SumcheckVerifier(log_circuit_size, transcript); @@ -79,10 +68,11 @@ std::array AvmRecursiveVerifier_::veri auto [multivariate_challenge, claimed_evaluations, sumcheck_verified] = sumcheck.verify(relation_parameters, alpha, gate_challenges); - info("verified sumcheck: ", (sumcheck_verified.has_value() && sumcheck_verified.value())); - - // TODO(md): when calling `get_commitments` do the values get constrained in their origin? check that the zip_view - // does in fact use the verifier type to get it? + // TODO(md): call assert true on the builder type to lay down the positive boolean constraint? + // using bool_ct = stdlib::bool_t; + // bool_ct is_true = bool_ct(1); + // sumcheck_verified.must_imply(is_true, "sumcheck verification failed"); + vinfo("verified sumcheck: ", (sumcheck_verified.has_value() && sumcheck_verified.value())); auto multivariate_to_univariate_opening_claim = Zeromorph::verify(circuit_size, commitments.get_unshifted(), @@ -96,7 +86,9 @@ std::array AvmRecursiveVerifier_::veri auto pairing_points = PCS::reduce_verify(multivariate_to_univariate_opening_claim, transcript); return pairing_points; - // TODO(md): call assert true on the builder type to lay down the positive boolean constraint? + + // Probably we will have to return an aggregation object (see ultra_recursive_verifier.cpp) once we interface + // with noir for public_kernel integration. Follow, the same recipe as in ultra_recursive_verifier.cpp in this case. } template class AvmRecursiveVerifier_>; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp index 05b4c3b4ebe..8185ac2b2ad 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp @@ -1,10 +1,6 @@ -// As this adds the honk_stdlib_recursion module to the cmake lists, we probably -// want to make vm recursion its own module - +#include "barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp" #include "barretenberg/circuit_checker/circuit_checker.hpp" - #include "barretenberg/numeric/random/engine.hpp" -#include "barretenberg/stdlib/primitives/circuit_builders/circuit_builders_fwd.hpp" #include "barretenberg/stdlib_circuit_builders/ultra_flavor.hpp" #include "barretenberg/sumcheck/instance/prover_instance.hpp" #include "barretenberg/ultra_honk/ultra_prover.hpp" @@ -12,7 +8,6 @@ #include "barretenberg/vm/avm/generated/circuit_builder.hpp" #include "barretenberg/vm/avm/generated/composer.hpp" #include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp" #include "barretenberg/vm/avm/tests/helpers.test.hpp" #include "barretenberg/vm/avm/trace/common.hpp" #include "barretenberg/vm/avm/trace/helper.hpp" @@ -61,11 +56,11 @@ class AvmRecursiveTests : public ::testing::Test { trace_builder.op_set(0, 1, 2, AvmMemoryTag::U8); trace_builder.op_add(0, 1, 2, 3, AvmMemoryTag::U8); trace_builder.op_return(0, 0, 0); - auto trace = trace_builder.finalize(true); + auto trace = trace_builder.finalize(); // Passing true enables a longer trace with lookups builder.set_trace(std::move(trace)); builder.check_circuit(); - info("inner builder - num gates: ", builder.get_num_gates()); + vinfo("inner builder - num gates: ", builder.get_num_gates()); return builder; } @@ -80,7 +75,6 @@ TEST_F(AvmRecursiveTests, recursion) HonkProof proof = prover.construct_proof(); - // NOTE(md): got to do something about these public inputs auto public_inputs = generate_base_public_inputs(); std::vector> public_inputs_vec = bb::avm_trace::copy_public_inputs_columns(public_inputs, {}, {}); @@ -93,9 +87,6 @@ TEST_F(AvmRecursiveTests, recursion) OuterBuilder outer_circuit; RecursiveVerifier recursive_verifier{ &outer_circuit, verification_key }; - // Note(md): no inputs are provided here - so the verifier is under-constrained in respect to public inputs - // If we return the pairing points then potentially they can be recursively verified nicely?? - but it is not clear - // how aggregation will work unless we make sure the avm has the same circuit size as other things auto pairing_points = recursive_verifier.verify_proof(proof); bool pairing_points_valid = verification_key->pcs_verification_key->pairing_check(pairing_points[0].get_value(), @@ -103,7 +94,7 @@ TEST_F(AvmRecursiveTests, recursion) ASSERT_TRUE(pairing_points_valid) << "Pairing points are not valid."; - info("Recursive verifier: num gates = ", outer_circuit.num_gates); + vinfo("Recursive verifier: num gates = ", outer_circuit.num_gates); ASSERT_FALSE(outer_circuit.failed()) << "Outer circuit has failed."; bool outer_circuit_checked = CircuitChecker::check(outer_circuit); From ad675823ae8d0936605591f1825d20992222f968 Mon Sep 17 00:00:00 2001 From: jeanmon Date: Thu, 29 Aug 2024 08:01:27 +0000 Subject: [PATCH 16/21] 7790: Keep certain classes in flavor.hpp private --- barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp | 2 ++ bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp index 363b63fba43..42f26113d4b 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp @@ -275,6 +275,7 @@ class AvmFlavor { RefVector get_table_polynomials() { return {}; } }; + private: template class WireEntities { public: DEFINE_FLAVOR_MEMBERS(DataType, WIRE_ENTITIES) @@ -296,6 +297,7 @@ class AvmFlavor { return RefArray{ TO_BE_SHIFTED(entities) }; } + public: template class WitnessEntities : public WireEntities, public DerivedWitnessEntities { public: diff --git a/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs b/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs index e1093481a35..23612aab344 100644 --- a/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs +++ b/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs @@ -114,6 +114,7 @@ class {{name}}Flavor { RefVector get_table_polynomials() { return {}; } }; + private: template class WireEntities { public: @@ -137,6 +138,7 @@ class {{name}}Flavor { return RefArray{ TO_BE_SHIFTED(entities) }; } + public: template class WitnessEntities: public WireEntities, public DerivedWitnessEntities { public: From 68e3ddebcfc1c367713b515084515d0e5d78a39b Mon Sep 17 00:00:00 2001 From: jeanmon Date: Thu, 29 Aug 2024 11:13:18 +0000 Subject: [PATCH 17/21] 7790: some review feedback is addressed --- .../eccvm_recursive_verifier.hpp | 1 - .../decider_recursive_verifier.hpp | 1 - .../ultra_recursive_verifier.hpp | 1 - .../translator_recursive_verifier.hpp | 1 - .../stdlib_circuit_builders/ultra_flavor.hpp | 2 +- .../barretenberg/vm/avm/generated/flavor.hpp | 23 +++++-------------- .../vm/avm/recursion/avm_recursive_flavor.hpp | 2 -- .../avm/recursion/avm_recursive_verifier.hpp | 2 -- .../recursion/avm_recursive_verifier.test.cpp | 4 ---- .../bb-pil-backend/templates/flavor.hpp.hbs | 16 ++++++------- 10 files changed, 15 insertions(+), 38 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/eccvm_recursive_verifier.hpp b/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/eccvm_recursive_verifier.hpp index 9e536047778..6a590ebba40 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/eccvm_recursive_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/eccvm_verifier/eccvm_recursive_verifier.hpp @@ -24,7 +24,6 @@ template class ECCVMRecursiveVerifier_ { void verify_proof(const HonkProof& proof); std::shared_ptr key; - std::map commitments; Builder* builder; std::shared_ptr transcript; diff --git a/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/decider_recursive_verifier.hpp b/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/decider_recursive_verifier.hpp index 701d741c6b2..3e46be8b412 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/decider_recursive_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/decider_recursive_verifier.hpp @@ -28,7 +28,6 @@ template class DeciderRecursiveVerifier_ { PairingPoints verify_proof(const HonkProof& proof); - std::map commitments; std::shared_ptr pcs_verification_key; Builder* builder; std::shared_ptr accumulator; diff --git a/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/ultra_recursive_verifier.hpp b/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/ultra_recursive_verifier.hpp index b1ddf11d4ba..2478d999d3c 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/ultra_recursive_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/ultra_recursive_verifier.hpp @@ -32,7 +32,6 @@ template class UltraRecursiveVerifier_ { aggregation_state agg_obj); std::shared_ptr key; - std::map commitments; std::shared_ptr pcs_verification_key; Builder* builder; std::shared_ptr transcript; diff --git a/barretenberg/cpp/src/barretenberg/stdlib/translator_vm_verifier/translator_recursive_verifier.hpp b/barretenberg/cpp/src/barretenberg/stdlib/translator_vm_verifier/translator_recursive_verifier.hpp index 09e99118711..d221bec7360 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/translator_vm_verifier/translator_recursive_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/translator_vm_verifier/translator_recursive_verifier.hpp @@ -28,7 +28,6 @@ template class TranslatorRecursiveVerifier_ { BF batching_challenge_v = 0; std::shared_ptr key; - std::map commitments; std::shared_ptr transcript; std::shared_ptr pcs_verification_key; // can remove maybe hopefully Builder* builder; diff --git a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_flavor.hpp b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_flavor.hpp index ac1304fffc4..f5d4f58ddd8 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_flavor.hpp @@ -713,7 +713,7 @@ class UltraFlavor { Transcript() = default; - // Used by verifier to initialize the xcript + // Used by verifier to initialize the transcript Transcript(const std::vector& proof) : NativeTranscript(proof) {} diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp index 42f26113d4b..7ae23ea8c30 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp @@ -148,7 +148,7 @@ class AvmFlavor { static constexpr size_t NUM_ALL_WITNESS_ENTITIES = NUM_WITNESS_ENTITIES + NUM_SHIFTED_ENTITIES; // Need to be templated for recursive verifier - template + template using MainRelations_ = std::tuple< // Relations Avm_vm::alu, @@ -162,13 +162,12 @@ class AvmFlavor { Avm_vm::mem_slice, Avm_vm::pedersen, Avm_vm::poseidon2, - Avm_vm::range_check, Avm_vm::sha256>; using MainRelations = MainRelations_; // Need to be templated for recursive verifier - template + template using LookupRelations_ = std::tuple< // Lookups incl_main_tag_err_relation, @@ -190,16 +189,6 @@ class AvmFlavor { lookup_pow_2_0_relation, lookup_pow_2_1_relation, lookup_ret_value_relation, - lookup_rng_chk_0_relation, - lookup_rng_chk_1_relation, - lookup_rng_chk_2_relation, - lookup_rng_chk_3_relation, - lookup_rng_chk_4_relation, - lookup_rng_chk_5_relation, - lookup_rng_chk_6_relation, - lookup_rng_chk_7_relation, - lookup_rng_chk_diff_relation, - lookup_rng_chk_pow_2_relation, lookup_u16_0_relation, lookup_u16_1_relation, lookup_u16_10_relation, @@ -247,7 +236,7 @@ class AvmFlavor { using LookupRelations = LookupRelations_; // Need to be templated for recursive verifier - template using Relations_ = tuple_cat_t, LookupRelations_>; + template using Relations_ = tuple_cat_t, LookupRelations_>; using Relations = Relations_; static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length(); @@ -436,10 +425,10 @@ class AvmFlavor { }; // Templated for use in recursive verifier - template - class VerifierCommitments_ : public AllEntities { + template + class VerifierCommitments_ : public AllEntities { private: - using Base = AllEntities; + using Base = AllEntities; public: VerifierCommitments_(const std::shared_ptr& verification_key) diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp index 10cd689867a..85eda197acb 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp @@ -7,9 +7,7 @@ namespace bb { template class AvmRecursiveFlavor_ { - public: - // much of the types end up being the same but derived from the circuit builder types using CircuitBuilder = BuilderType; using Curve = stdlib::bn254; using PCS = KZG; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp index 63ca991a199..7c130c7152d 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.hpp @@ -27,8 +27,6 @@ template class AvmRecursiveVerifier_ { std::array verify_proof(const HonkProof& proof); std::shared_ptr key; - std::map commitments; - Builder* builder; std::shared_ptr transcript; }; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp index 8185ac2b2ad..5990c2b23a4 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp @@ -19,10 +19,6 @@ namespace tests_avm { using namespace bb; using namespace bb::avm_trace; -namespace { -auto& engine = bb::numeric::get_debug_randomness(); -} - class AvmRecursiveTests : public ::testing::Test { public: using RecursiveFlavor = AvmRecursiveFlavor_; diff --git a/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs b/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs index 23612aab344..c0a9924a0f0 100644 --- a/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs +++ b/bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs @@ -68,25 +68,25 @@ class {{name}}Flavor { static constexpr size_t NUM_ALL_WITNESS_ENTITIES = NUM_WITNESS_ENTITIES + NUM_SHIFTED_ENTITIES; // Need to be templated for recursive verifier - template + template using MainRelations_ = std::tuple< // Relations - {{#each relation_file_names as |item|}}{{#if @index}},{{/if}}{{../name}}_vm::{{item}}{{/each}} + {{#each relation_file_names as |item|}}{{#if @index}},{{/if}}{{../name}}_vm::{{item}}{{/each}} >; using MainRelations = MainRelations_; // Need to be templated for recursive verifier - template + template using LookupRelations_ = std::tuple< // Lookups - {{#each lookups as |item|}}{{#if @index}},{{/if}}{{item}}_relation{{/each}} + {{#each lookups as |item|}}{{#if @index}},{{/if}}{{item}}_relation{{/each}} >; using LookupRelations = LookupRelations_; // Need to be templated for recursive verifier - template using Relations_ = tuple_cat_t, LookupRelations_>; + template using Relations_ = tuple_cat_t, LookupRelations_>; using Relations = Relations_; static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length(); @@ -285,10 +285,10 @@ class {{name}}Flavor { }; // Templated for use in recursive verifier - template - class VerifierCommitments_ : public AllEntities { + template + class VerifierCommitments_ : public AllEntities { private: - using Base = AllEntities; + using Base = AllEntities; public: VerifierCommitments_(const std::shared_ptr& verification_key) { From f2021ecb44ef9d13d119f1fe3ef01f6ac403b547 Mon Sep 17 00:00:00 2001 From: jeanmon Date: Thu, 29 Aug 2024 11:28:22 +0000 Subject: [PATCH 18/21] 7790: remove _recursive.hpp generated files --- .../vm/avm/generated/relations/alu_recursive.hpp | 12 ------------ .../vm/avm/generated/relations/binary_recursive.hpp | 12 ------------ .../avm/generated/relations/conversion_recursive.hpp | 12 ------------ .../vm/avm/generated/relations/gas_recursive.hpp | 12 ------------ .../relations/incl_main_tag_err_recursive.hpp | 12 ------------ .../relations/incl_mem_tag_err_recursive.hpp | 12 ------------ .../generated/relations/keccakf1600_recursive.hpp | 12 ------------ .../relations/kernel_output_lookup_recursive.hpp | 12 ------------ .../vm/avm/generated/relations/kernel_recursive.hpp | 12 ------------ .../relations/lookup_byte_lengths_recursive.hpp | 12 ------------ .../relations/lookup_byte_operations_recursive.hpp | 12 ------------ .../relations/lookup_cd_value_recursive.hpp | 12 ------------ .../relations/lookup_div_u16_0_recursive.hpp | 12 ------------ .../relations/lookup_div_u16_1_recursive.hpp | 12 ------------ .../relations/lookup_div_u16_2_recursive.hpp | 12 ------------ .../relations/lookup_div_u16_3_recursive.hpp | 12 ------------ .../relations/lookup_div_u16_4_recursive.hpp | 12 ------------ .../relations/lookup_div_u16_5_recursive.hpp | 12 ------------ .../relations/lookup_div_u16_6_recursive.hpp | 12 ------------ .../relations/lookup_div_u16_7_recursive.hpp | 12 ------------ .../relations/lookup_into_kernel_recursive.hpp | 12 ------------ .../relations/lookup_mem_rng_chk_hi_recursive.hpp | 12 ------------ .../relations/lookup_mem_rng_chk_lo_recursive.hpp | 12 ------------ .../relations/lookup_mem_rng_chk_mid_recursive.hpp | 12 ------------ .../relations/lookup_opcode_gas_recursive.hpp | 12 ------------ .../generated/relations/lookup_pow_2_0_recursive.hpp | 12 ------------ .../generated/relations/lookup_pow_2_1_recursive.hpp | 12 ------------ .../relations/lookup_ret_value_recursive.hpp | 12 ------------ .../generated/relations/lookup_u16_0_recursive.hpp | 12 ------------ .../generated/relations/lookup_u16_10_recursive.hpp | 12 ------------ .../generated/relations/lookup_u16_11_recursive.hpp | 12 ------------ .../generated/relations/lookup_u16_12_recursive.hpp | 12 ------------ .../generated/relations/lookup_u16_13_recursive.hpp | 12 ------------ .../generated/relations/lookup_u16_14_recursive.hpp | 12 ------------ .../generated/relations/lookup_u16_1_recursive.hpp | 12 ------------ .../generated/relations/lookup_u16_2_recursive.hpp | 12 ------------ .../generated/relations/lookup_u16_3_recursive.hpp | 12 ------------ .../generated/relations/lookup_u16_4_recursive.hpp | 12 ------------ .../generated/relations/lookup_u16_5_recursive.hpp | 12 ------------ .../generated/relations/lookup_u16_6_recursive.hpp | 12 ------------ .../generated/relations/lookup_u16_7_recursive.hpp | 12 ------------ .../generated/relations/lookup_u16_8_recursive.hpp | 12 ------------ .../generated/relations/lookup_u16_9_recursive.hpp | 12 ------------ .../generated/relations/lookup_u8_0_recursive.hpp | 12 ------------ .../generated/relations/lookup_u8_1_recursive.hpp | 12 ------------ .../vm/avm/generated/relations/main_recursive.hpp | 12 ------------ .../vm/avm/generated/relations/mem_recursive.hpp | 12 ------------ .../avm/generated/relations/mem_slice_recursive.hpp | 12 ------------ .../avm/generated/relations/pedersen_recursive.hpp | 12 ------------ .../generated/relations/perm_main_alu_recursive.hpp | 12 ------------ .../generated/relations/perm_main_bin_recursive.hpp | 12 ------------ .../generated/relations/perm_main_conv_recursive.hpp | 12 ------------ .../relations/perm_main_mem_a_recursive.hpp | 12 ------------ .../relations/perm_main_mem_b_recursive.hpp | 12 ------------ .../relations/perm_main_mem_c_recursive.hpp | 12 ------------ .../relations/perm_main_mem_d_recursive.hpp | 12 ------------ .../relations/perm_main_mem_ind_addr_a_recursive.hpp | 12 ------------ .../relations/perm_main_mem_ind_addr_b_recursive.hpp | 12 ------------ .../relations/perm_main_mem_ind_addr_c_recursive.hpp | 12 ------------ .../relations/perm_main_mem_ind_addr_d_recursive.hpp | 12 ------------ .../relations/perm_main_pedersen_recursive.hpp | 12 ------------ .../relations/perm_main_pos2_perm_recursive.hpp | 12 ------------ .../relations/perm_main_slice_recursive.hpp | 12 ------------ .../relations/perm_pos_mem_read_a_recursive.hpp | 12 ------------ .../relations/perm_pos_mem_read_b_recursive.hpp | 12 ------------ .../relations/perm_pos_mem_read_c_recursive.hpp | 12 ------------ .../relations/perm_pos_mem_read_d_recursive.hpp | 12 ------------ .../relations/perm_pos_mem_write_a_recursive.hpp | 12 ------------ .../relations/perm_pos_mem_write_b_recursive.hpp | 12 ------------ .../relations/perm_pos_mem_write_c_recursive.hpp | 12 ------------ .../relations/perm_pos_mem_write_d_recursive.hpp | 12 ------------ .../generated/relations/perm_slice_mem_recursive.hpp | 12 ------------ .../avm/generated/relations/poseidon2_recursive.hpp | 12 ------------ .../relations/range_check_da_gas_hi_recursive.hpp | 12 ------------ .../relations/range_check_da_gas_lo_recursive.hpp | 12 ------------ .../relations/range_check_l2_gas_hi_recursive.hpp | 12 ------------ .../relations/range_check_l2_gas_lo_recursive.hpp | 12 ------------ .../vm/avm/generated/relations/sha256_recursive.hpp | 12 ------------ 78 files changed, 936 deletions(-) delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/alu_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/binary_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/conversion_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/gas_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_main_tag_err_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_mem_tag_err_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/keccakf1600_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_output_lookup_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_lengths_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_operations_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_cd_value_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_0_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_1_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_2_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_3_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_4_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_5_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_6_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_7_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_into_kernel_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_hi_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_lo_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_mid_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_opcode_gas_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_0_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_1_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_ret_value_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_0_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_10_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_11_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_12_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_13_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_14_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_1_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_2_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_3_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_4_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_5_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_6_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_7_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_8_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_9_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_0_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_1_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/main_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_slice_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/pedersen_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_alu_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_bin_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_conv_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_a_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_b_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_c_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_d_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_a_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_b_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_c_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_d_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pedersen_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pos2_perm_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_slice_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_a_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_b_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_c_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_d_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_a_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_b_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_c_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_d_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_slice_mem_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_hi_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_lo_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_hi_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_lo_recursive.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/sha256_recursive.hpp diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/alu_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/alu_recursive.hpp deleted file mode 100644 index a0313559b33..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/alu_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/alu_recursive.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class Avm_vm::alu_recursiveImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::alu_recursiveImpl, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/binary_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/binary_recursive.hpp deleted file mode 100644 index 15c808bba41..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/binary_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/binary_recursive.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class Avm_vm::binary_recursiveImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::binary_recursiveImpl, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/conversion_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/conversion_recursive.hpp deleted file mode 100644 index a666ac8ce5e..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/conversion_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/conversion_recursive.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class Avm_vm::conversion_recursiveImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::conversion_recursiveImpl, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/gas_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/gas_recursive.hpp deleted file mode 100644 index 3905a20ee95..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/gas_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/gas_recursive.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class Avm_vm::gas_recursiveImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::gas_recursiveImpl, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_main_tag_err_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_main_tag_err_recursive.hpp deleted file mode 100644 index 9bff05a287f..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_main_tag_err_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/incl_main_tag_err.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class incl_main_tag_err>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(incl_main_tag_err, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_mem_tag_err_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_mem_tag_err_recursive.hpp deleted file mode 100644 index a6ade3c1ddc..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/incl_mem_tag_err_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/incl_mem_tag_err.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class incl_mem_tag_err>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(incl_mem_tag_err, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/keccakf1600_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/keccakf1600_recursive.hpp deleted file mode 100644 index a65ba7a8c25..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/keccakf1600_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/keccakf1600_recursive.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class Avm_vm::keccakf1600_recursiveImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::keccakf1600_recursiveImpl, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_output_lookup_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_output_lookup_recursive.hpp deleted file mode 100644 index bfcf72ba19b..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_output_lookup_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/kernel_output_lookup.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class kernel_output_lookup>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(kernel_output_lookup, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_recursive.hpp deleted file mode 100644 index 5cdcfaecaa6..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/kernel_recursive.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class Avm_vm::kernel_recursiveImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::kernel_recursiveImpl, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_lengths_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_lengths_recursive.hpp deleted file mode 100644 index e68d6432476..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_lengths_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_byte_lengths.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_byte_lengths>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_byte_lengths, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_operations_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_operations_recursive.hpp deleted file mode 100644 index c90107d4d51..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_byte_operations_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_byte_operations.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_byte_operations>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_byte_operations, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_cd_value_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_cd_value_recursive.hpp deleted file mode 100644 index b905bcbcb60..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_cd_value_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_cd_value.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_cd_value>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_cd_value, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_0_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_0_recursive.hpp deleted file mode 100644 index e6da02c0c62..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_0_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_0.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_div_u16_0>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_0, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_1_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_1_recursive.hpp deleted file mode 100644 index 7e22cfd0b56..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_1_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_1.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_div_u16_1>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_1, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_2_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_2_recursive.hpp deleted file mode 100644 index 38f8e46d8a2..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_2_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_2.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_div_u16_2>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_2, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_3_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_3_recursive.hpp deleted file mode 100644 index 65f419807c4..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_3_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_3.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_div_u16_3>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_3, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_4_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_4_recursive.hpp deleted file mode 100644 index a45b196cb6e..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_4_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_4.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_div_u16_4>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_4, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_5_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_5_recursive.hpp deleted file mode 100644 index 33713ac3ed7..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_5_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_5.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_div_u16_5>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_5, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_6_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_6_recursive.hpp deleted file mode 100644 index 17c55090ffb..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_6_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_6.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_div_u16_6>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_6, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_7_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_7_recursive.hpp deleted file mode 100644 index e2a51776a25..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_div_u16_7_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_div_u16_7.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_div_u16_7>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_div_u16_7, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_into_kernel_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_into_kernel_recursive.hpp deleted file mode 100644 index a90a7f0860f..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_into_kernel_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_into_kernel.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_into_kernel>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_into_kernel, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_hi_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_hi_recursive.hpp deleted file mode 100644 index 06bfff17349..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_hi_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_hi.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_mem_rng_chk_hi>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_mem_rng_chk_hi, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_lo_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_lo_recursive.hpp deleted file mode 100644 index 0a2a017a754..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_lo_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_lo.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_mem_rng_chk_lo>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_mem_rng_chk_lo, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_mid_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_mid_recursive.hpp deleted file mode 100644 index 84bee373e91..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_mid_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_mem_rng_chk_mid.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_mem_rng_chk_mid>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_mem_rng_chk_mid, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_opcode_gas_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_opcode_gas_recursive.hpp deleted file mode 100644 index f34ab25c563..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_opcode_gas_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_opcode_gas.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_opcode_gas>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_opcode_gas, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_0_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_0_recursive.hpp deleted file mode 100644 index 0bfaf978ecf..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_0_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_pow_2_0.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_pow_2_0>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_pow_2_0, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_1_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_1_recursive.hpp deleted file mode 100644 index 95afe15dfe2..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_pow_2_1_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_pow_2_1.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_pow_2_1>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_pow_2_1, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_ret_value_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_ret_value_recursive.hpp deleted file mode 100644 index 3c4a3101062..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_ret_value_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_ret_value.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_ret_value>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_ret_value, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_0_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_0_recursive.hpp deleted file mode 100644 index 4b91cd9fd9f..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_0_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_0.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u16_0>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_0, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_10_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_10_recursive.hpp deleted file mode 100644 index 80a9d0e5d7c..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_10_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_10.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u16_10>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_10, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_11_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_11_recursive.hpp deleted file mode 100644 index 2aafb35f24f..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_11_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_11.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u16_11>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_11, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_12_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_12_recursive.hpp deleted file mode 100644 index f0106e87d15..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_12_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_12.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u16_12>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_12, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_13_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_13_recursive.hpp deleted file mode 100644 index 03efb9ec8ff..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_13_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_13.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u16_13>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_13, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_14_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_14_recursive.hpp deleted file mode 100644 index 8dd82de9f28..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_14_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_14.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u16_14>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_14, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_1_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_1_recursive.hpp deleted file mode 100644 index 5da70d1136a..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_1_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_1.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u16_1>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_1, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_2_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_2_recursive.hpp deleted file mode 100644 index 2a65246cb2c..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_2_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_2.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u16_2>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_2, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_3_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_3_recursive.hpp deleted file mode 100644 index 85eaa6c1aa9..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_3_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_3.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u16_3>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_3, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_4_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_4_recursive.hpp deleted file mode 100644 index 4a58bca76ca..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_4_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_4.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u16_4>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_4, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_5_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_5_recursive.hpp deleted file mode 100644 index 9d5799a896b..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_5_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_5.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u16_5>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_5, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_6_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_6_recursive.hpp deleted file mode 100644 index febfc33d07d..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_6_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_6.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u16_6>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_6, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_7_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_7_recursive.hpp deleted file mode 100644 index cf839e1a5ce..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_7_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_7.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u16_7>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_7, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_8_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_8_recursive.hpp deleted file mode 100644 index af447387297..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_8_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_8.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u16_8>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_8, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_9_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_9_recursive.hpp deleted file mode 100644 index f5ae7376ebf..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u16_9_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u16_9.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u16_9>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u16_9, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_0_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_0_recursive.hpp deleted file mode 100644 index 71fb1c80d0f..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_0_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u8_0.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u8_0>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u8_0, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_1_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_1_recursive.hpp deleted file mode 100644 index 98a23b3a371..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/lookup_u8_1_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/lookup_u8_1.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class lookup_u8_1>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(lookup_u8_1, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/main_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/main_recursive.hpp deleted file mode 100644 index 10723902c91..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/main_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/main_recursive.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class Avm_vm::main_recursiveImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::main_recursiveImpl, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_recursive.hpp deleted file mode 100644 index 31dadb6ac1d..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/mem_recursive.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class Avm_vm::mem_recursiveImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::mem_recursiveImpl, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_slice_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_slice_recursive.hpp deleted file mode 100644 index f879a0074c6..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/mem_slice_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/mem_slice_recursive.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class Avm_vm::mem_slice_recursiveImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::mem_slice_recursiveImpl, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/pedersen_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/pedersen_recursive.hpp deleted file mode 100644 index ee7edc43821..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/pedersen_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/pedersen_recursive.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class Avm_vm::pedersen_recursiveImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::pedersen_recursiveImpl, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_alu_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_alu_recursive.hpp deleted file mode 100644 index 66e962e3b36..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_alu_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_alu.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_main_alu>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_alu, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_bin_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_bin_recursive.hpp deleted file mode 100644 index 6ce2b9b9870..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_bin_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_bin.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_main_bin>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_bin, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_conv_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_conv_recursive.hpp deleted file mode 100644 index a89c9a6932a..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_conv_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_conv.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_main_conv>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_conv, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_a_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_a_recursive.hpp deleted file mode 100644 index 701d684c83e..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_a_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_a.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_main_mem_a>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_a, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_b_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_b_recursive.hpp deleted file mode 100644 index 9c520e25125..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_b_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_b.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_main_mem_b>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_b, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_c_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_c_recursive.hpp deleted file mode 100644 index e9797c57278..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_c_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_c.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_main_mem_c>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_c, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_d_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_d_recursive.hpp deleted file mode 100644 index 7b090cd4a21..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_d_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_d.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_main_mem_d>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_d, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_a_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_a_recursive.hpp deleted file mode 100644 index 42fc58f87c0..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_a_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_a.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_main_mem_ind_addr_a>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_ind_addr_a, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_b_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_b_recursive.hpp deleted file mode 100644 index aeb3ef4a800..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_b_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_b.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_main_mem_ind_addr_b>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_ind_addr_b, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_c_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_c_recursive.hpp deleted file mode 100644 index b6ca52b859c..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_c_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_c.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_main_mem_ind_addr_c>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_ind_addr_c, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_d_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_d_recursive.hpp deleted file mode 100644 index c789eb6c387..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_d_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_mem_ind_addr_d.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_main_mem_ind_addr_d>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_mem_ind_addr_d, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pedersen_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pedersen_recursive.hpp deleted file mode 100644 index 4801112841b..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pedersen_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_pedersen.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_main_pedersen>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_pedersen, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pos2_perm_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pos2_perm_recursive.hpp deleted file mode 100644 index c3345797fb6..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_pos2_perm_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_pos2_perm.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_main_pos2_perm>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_pos2_perm, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_slice_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_slice_recursive.hpp deleted file mode 100644 index 6d957380eb0..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_main_slice_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_main_slice.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_main_slice>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_main_slice, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_a_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_a_recursive.hpp deleted file mode 100644 index 80d9979b0cd..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_a_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_read_a.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_pos_mem_read_a>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_read_a, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_b_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_b_recursive.hpp deleted file mode 100644 index 00b1fa53706..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_b_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_read_b.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_pos_mem_read_b>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_read_b, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_c_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_c_recursive.hpp deleted file mode 100644 index ec65c9fe2f0..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_c_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_read_c.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_pos_mem_read_c>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_read_c, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_d_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_d_recursive.hpp deleted file mode 100644 index 3e91668cedc..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_d_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_read_d.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_pos_mem_read_d>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_read_d, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_a_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_a_recursive.hpp deleted file mode 100644 index 62a19a32eaf..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_a_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_write_a.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_pos_mem_write_a>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_write_a, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_b_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_b_recursive.hpp deleted file mode 100644 index 7b35ac06f5f..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_b_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_write_b.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_pos_mem_write_b>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_write_b, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_c_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_c_recursive.hpp deleted file mode 100644 index 5120d85110e..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_c_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_write_c.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_pos_mem_write_c>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_write_c, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_d_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_d_recursive.hpp deleted file mode 100644 index 6de0bcb5283..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_d_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_pos_mem_write_d.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_pos_mem_write_d>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_pos_mem_write_d, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_slice_mem_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_slice_mem_recursive.hpp deleted file mode 100644 index 05951e07e93..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_slice_mem_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/perm_slice_mem.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class perm_slice_mem>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(perm_slice_mem, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2_recursive.hpp deleted file mode 100644 index 4a7940daf71..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/poseidon2_recursive.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class Avm_vm::poseidon2_recursiveImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::poseidon2_recursiveImpl, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_hi_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_hi_recursive.hpp deleted file mode 100644 index 66a8b10995a..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_hi_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/range_check_da_gas_hi.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class range_check_da_gas_hi>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(range_check_da_gas_hi, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_lo_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_lo_recursive.hpp deleted file mode 100644 index 17080775f7c..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_da_gas_lo_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/range_check_da_gas_lo.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class range_check_da_gas_lo>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(range_check_da_gas_lo, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_hi_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_hi_recursive.hpp deleted file mode 100644 index bc1958d1a32..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_hi_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/range_check_l2_gas_hi.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class range_check_l2_gas_hi>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(range_check_l2_gas_hi, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_lo_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_lo_recursive.hpp deleted file mode 100644 index dff7690b905..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/range_check_l2_gas_lo_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/range_check_l2_gas_lo.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class range_check_l2_gas_lo>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(range_check_l2_gas_lo, AvmRecursiveFlavor_); -} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/sha256_recursive.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/sha256_recursive.hpp deleted file mode 100644 index 87a6a032133..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/sha256_recursive.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/sha256_recursive.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class Avm_vm::sha256_recursiveImpl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS(Avm_vm::sha256_recursiveImpl, AvmRecursiveFlavor_); -} // namespace bb From 4bc2381c105c3b30e496efd1d3009691784e1d6e Mon Sep 17 00:00:00 2001 From: jeanmon Date: Thu, 29 Aug 2024 16:16:35 +0000 Subject: [PATCH 19/21] 7790: remove code-gen related to recursive files --- .../bb-pil-backend/src/lookup_builder.rs | 26 ----------------- .../bb-pil-backend/src/permutation_builder.rs | 27 ------------------ .../bb-pil-backend/src/relation_builder.rs | 28 ------------------- .../templates/lookup_recursive.hpp.hbs | 12 -------- .../templates/permutation_recursive.hpp.hbs | 12 -------- .../templates/relation_recursive.hpp.hbs | 12 -------- 6 files changed, 117 deletions(-) delete mode 100644 bb-pilcom/bb-pil-backend/templates/lookup_recursive.hpp.hbs delete mode 100644 bb-pilcom/bb-pil-backend/templates/permutation_recursive.hpp.hbs delete mode 100644 bb-pilcom/bb-pil-backend/templates/relation_recursive.hpp.hbs diff --git a/bb-pilcom/bb-pil-backend/src/lookup_builder.rs b/bb-pilcom/bb-pil-backend/src/lookup_builder.rs index 02fb7de61b8..b6afa095351 100644 --- a/bb-pilcom/bb-pil-backend/src/lookup_builder.rs +++ b/bb-pilcom/bb-pil-backend/src/lookup_builder.rs @@ -80,34 +80,12 @@ impl LookupBuilder for BBFiles { ) .unwrap(); - handlebars - .register_template_string( - "lookup_recursive.hpp", - std::str::from_utf8(include_bytes!("../templates/lookup_recursive.hpp.hbs")) - .unwrap(), - ) - .unwrap(); - for lookup in lookups.iter() { let data = create_lookup_settings_data(lookup); let lookup_settings = handlebars.render("lookup.hpp", &data).unwrap(); let file_name = format!("{}.hpp", lookup.name); self.write_file(Some(&self.relations), &file_name, &lookup_settings); - - // Recursive related file - let recursive_data = create_lookup_recursive_settings_data(lookup); - let recursive_settings = handlebars - .render("lookup_recursive.hpp", &recursive_data) - .unwrap(); - - let recursive_file_name = format!("{}_recursive{}", lookup.name, ".hpp".to_owned()); - - self.write_file( - Some(&self.relations), - &recursive_file_name, - &recursive_settings, - ); } lookups @@ -198,10 +176,6 @@ fn create_lookup_settings_data(lookup: &Lookup) -> Json { }) } -fn create_lookup_recursive_settings_data(lookup: &Lookup) -> Json { - json!({"lookup_name": lookup.name}) -} - fn get_lookup_side( def: &SelectedExpressions>, ) -> LookupSide { diff --git a/bb-pilcom/bb-pil-backend/src/permutation_builder.rs b/bb-pilcom/bb-pil-backend/src/permutation_builder.rs index b9912447b71..5a77a8a2883 100644 --- a/bb-pilcom/bb-pil-backend/src/permutation_builder.rs +++ b/bb-pilcom/bb-pil-backend/src/permutation_builder.rs @@ -77,35 +77,12 @@ impl PermutationBuilder for BBFiles { ) .unwrap(); - handlebars - .register_template_string( - "permutation_recursive.hpp", - std::str::from_utf8(include_bytes!("../templates/permutation_recursive.hpp.hbs")) - .unwrap(), - ) - .unwrap(); - for permutation in permutations.iter() { let data = create_permutation_settings_data(permutation); let perm_settings = handlebars.render("permutation.hpp", &data).unwrap(); let file_name = format!("{}.hpp", permutation.name); self.write_file(Some(&self.relations), &file_name, &perm_settings); - - // Recursive related file - let recursive_data = create_perm_recursive_settings_data(permutation); - let recursive_settings = handlebars - .render("permutation_recursive.hpp", &recursive_data) - .unwrap(); - - let recursive_file_name = - format!("{}_recursive{}", permutation.name, ".hpp".to_owned()); - - self.write_file( - Some(&self.relations), - &recursive_file_name, - &recursive_settings, - ); } permutations @@ -165,10 +142,6 @@ fn create_permutation_settings_data(permutation: &Permutation) -> Json { }) } -fn create_perm_recursive_settings_data(permutation: &Permutation) -> Json { - json!({"perm_name": permutation.name}) -} - fn get_perm_side( def: &SelectedExpressions>, ) -> PermutationSide { diff --git a/bb-pilcom/bb-pil-backend/src/relation_builder.rs b/bb-pilcom/bb-pil-backend/src/relation_builder.rs index 68f2a379c35..513d44c95fe 100644 --- a/bb-pilcom/bb-pil-backend/src/relation_builder.rs +++ b/bb-pilcom/bb-pil-backend/src/relation_builder.rs @@ -61,8 +61,6 @@ pub trait RelationBuilder { skippable_if: &Option, alias_polys_in_order: &Vec<(String, u64, String)>, ); - - fn create_recursive_relation(&self, root_name: &str, name: &str); } impl RelationBuilder for BBFiles { @@ -110,7 +108,6 @@ impl RelationBuilder for BBFiles { &skippable_if, &used_alias_defs_in_order, ); - self.create_recursive_relation(file_name, relation_name); } relations.sort(); @@ -175,31 +172,6 @@ impl RelationBuilder for BBFiles { &relation_hpp, ); } - - fn create_recursive_relation(&self, root_name: &str, name: &str) { - let name = &format!("{name}_recursive"); - let data = &json!({ - "root_name": root_name, - "name": name, - }); - - let mut handlebars = Handlebars::new(); - handlebars - .register_template_string( - "relation_recursive.hpp", - std::str::from_utf8(include_bytes!("../templates/relation_recursive.hpp.hbs")) - .unwrap(), - ) - .unwrap(); - - let relation_recursive_hpp = handlebars.render("relation_recursive.hpp", data).unwrap(); - - self.write_file( - Some(&self.relations), - &format!("{}.hpp", snake_case(name)), - &relation_recursive_hpp, - ); - } } /// Group relations per file diff --git a/bb-pilcom/bb-pil-backend/templates/lookup_recursive.hpp.hbs b/bb-pilcom/bb-pil-backend/templates/lookup_recursive.hpp.hbs deleted file mode 100644 index fd33fcf62e1..00000000000 --- a/bb-pilcom/bb-pil-backend/templates/lookup_recursive.hpp.hbs +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/{{lookup_name}}.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class {{lookup_name}}>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS({{lookup_name}}, AvmRecursiveFlavor_); -} // namespace bb diff --git a/bb-pilcom/bb-pil-backend/templates/permutation_recursive.hpp.hbs b/bb-pilcom/bb-pil-backend/templates/permutation_recursive.hpp.hbs deleted file mode 100644 index 3ff4e144b36..00000000000 --- a/bb-pilcom/bb-pil-backend/templates/permutation_recursive.hpp.hbs +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/{{perm_name}}.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class {{perm_name}}>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS({{perm_name}}, AvmRecursiveFlavor_); -} // namespace bb \ No newline at end of file diff --git a/bb-pilcom/bb-pil-backend/templates/relation_recursive.hpp.hbs b/bb-pilcom/bb-pil-backend/templates/relation_recursive.hpp.hbs deleted file mode 100644 index 564db585730..00000000000 --- a/bb-pilcom/bb-pil-backend/templates/relation_recursive.hpp.hbs +++ /dev/null @@ -1,12 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/flavor/relation_definitions.hpp" -#include "barretenberg/stdlib/primitives/bigfield/bigfield.hpp" -#include "barretenberg/vm/avm/generated/relations/{{name}}.hpp" -#include "barretenberg/vm/avm/recursion/avm_recursive_flavor.hpp" - -namespace bb { -template class {{root_name}}_vm::{{name}}Impl>; -DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS({{root_name}}_vm::{{name}}Impl, AvmRecursiveFlavor_); -} // namespace bb From 33c16ad7c9333f77b025f13df40df9e0122645bd Mon Sep 17 00:00:00 2001 From: jeanmon Date: Thu, 29 Aug 2024 17:05:27 +0000 Subject: [PATCH 20/21] 7790: some other review comments are addressed --- .../cpp/src/barretenberg/vm/CMakeLists.txt | 2 +- .../avm/recursion/avm_recursive_verifier.cpp | 25 +++++++++---------- .../recursion/avm_recursive_verifier.test.cpp | 23 +++++++++++------ 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/CMakeLists.txt b/barretenberg/cpp/src/barretenberg/vm/CMakeLists.txt index b7d1455ca7f..2b697200bb0 100644 --- a/barretenberg/cpp/src/barretenberg/vm/CMakeLists.txt +++ b/barretenberg/cpp/src/barretenberg/vm/CMakeLists.txt @@ -1,3 +1,3 @@ if(NOT DISABLE_AZTEC_VM) - barretenberg_module(vm ultra_honk stdlib_honk_verifier) + barretenberg_module(vm sumcheck stdlib_honk_verifier) endif() \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp index 19ce9f7750b..bd5129a50d5 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.cpp @@ -17,6 +17,7 @@ AvmRecursiveVerifier_::AvmRecursiveVerifier_(Builder* builder, const std , builder(builder) {} +// TODO(#991): (see https://github.com/AztecProtocol/barretenberg/issues/991) template std::array AvmRecursiveVerifier_::verify_proof(const HonkProof& proof) { @@ -65,25 +66,23 @@ std::array AvmRecursiveVerifier_::veri gate_challenges[idx] = transcript->template get_challenge("Sumcheck:gate_challenge_" + std::to_string(idx)); } + // No need to constrain that sumcheck_verified is true as this is guaranteed by the implementation of + // when called over a "circuit field" types. auto [multivariate_challenge, claimed_evaluations, sumcheck_verified] = sumcheck.verify(relation_parameters, alpha, gate_challenges); - // TODO(md): call assert true on the builder type to lay down the positive boolean constraint? - // using bool_ct = stdlib::bool_t; - // bool_ct is_true = bool_ct(1); - // sumcheck_verified.must_imply(is_true, "sumcheck verification failed"); vinfo("verified sumcheck: ", (sumcheck_verified.has_value() && sumcheck_verified.value())); - auto multivariate_to_univariate_opening_claim = Zeromorph::verify(circuit_size, - commitments.get_unshifted(), - commitments.get_to_be_shifted(), - claimed_evaluations.get_unshifted(), - claimed_evaluations.get_shifted(), - multivariate_challenge, - Commitment::one(builder), - transcript); + auto opening_claim = Zeromorph::verify(circuit_size, + commitments.get_unshifted(), + commitments.get_to_be_shifted(), + claimed_evaluations.get_unshifted(), + claimed_evaluations.get_shifted(), + multivariate_challenge, + Commitment::one(builder), + transcript); - auto pairing_points = PCS::reduce_verify(multivariate_to_univariate_opening_claim, transcript); + auto pairing_points = PCS::reduce_verify(opening_claim, transcript); return pairing_points; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp index 5990c2b23a4..9f2b10185bf 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/recursion/avm_recursive_verifier.test.cpp @@ -96,6 +96,21 @@ TEST_F(AvmRecursiveTests, recursion) bool outer_circuit_checked = CircuitChecker::check(outer_circuit); ASSERT_TRUE(outer_circuit_checked) << "outer circuit check failed"; + auto manifest = verifier.transcript->get_manifest(); + auto recursive_manifest = recursive_verifier.transcript->get_manifest(); + + EXPECT_EQ(manifest.size(), recursive_manifest.size()); + for (size_t i = 0; i < recursive_manifest.size(); ++i) { + EXPECT_EQ(recursive_manifest[i], manifest[i]); + } + + for (auto const [key_el, rec_key_el] : zip_view(verifier.key->get_all(), recursive_verifier.key->get_all())) { + EXPECT_EQ(key_el, rec_key_el.get_value()); + } + + EXPECT_EQ(verifier.key->circuit_size, recursive_verifier.key->circuit_size); + EXPECT_EQ(verifier.key->num_public_inputs, recursive_verifier.key->num_public_inputs); + // Make a proof of the verification of an AVM proof const size_t srs_size = 1 << 23; auto ultra_instance = std::make_shared( @@ -107,13 +122,5 @@ TEST_F(AvmRecursiveTests, recursion) auto recursion_proof = ultra_prover.construct_proof(); bool recursion_verified = ultra_verifier.verify_proof(recursion_proof); EXPECT_TRUE(recursion_verified) << "recursion proof verification failed"; - - auto manifest = verifier.transcript->get_manifest(); - auto recursive_manifest = recursive_verifier.transcript->get_manifest(); - - EXPECT_EQ(manifest.size(), recursive_manifest.size()); - for (size_t i = 0; i < recursive_manifest.size(); ++i) { - EXPECT_EQ(recursive_manifest[i], manifest[i]); - } } } // namespace tests_avm From 84412e79da86307d05307e24b636029395764add Mon Sep 17 00:00:00 2001 From: jeanmon Date: Thu, 29 Aug 2024 18:38:04 +0000 Subject: [PATCH 21/21] 7790: resolve conflict after rebase on master --- .../barretenberg/vm/avm/generated/flavor.hpp | 159 ++++++++++-------- 1 file changed, 85 insertions(+), 74 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp index 7ae23ea8c30..30f7aac11ed 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp @@ -151,18 +151,19 @@ class AvmFlavor { template using MainRelations_ = std::tuple< // Relations - Avm_vm::alu, - Avm_vm::binary, - Avm_vm::conversion, - Avm_vm::gas, - Avm_vm::keccakf1600, - Avm_vm::kernel, - Avm_vm::main, - Avm_vm::mem, - Avm_vm::mem_slice, - Avm_vm::pedersen, - Avm_vm::poseidon2, - Avm_vm::sha256>; + Avm_vm::alu, + Avm_vm::binary, + Avm_vm::conversion, + Avm_vm::gas, + Avm_vm::keccakf1600, + Avm_vm::kernel, + Avm_vm::main, + Avm_vm::mem, + Avm_vm::mem_slice, + Avm_vm::pedersen, + Avm_vm::poseidon2, + Avm_vm::range_check, + Avm_vm::sha256>; using MainRelations = MainRelations_; @@ -170,68 +171,78 @@ class AvmFlavor { template using LookupRelations_ = std::tuple< // Lookups - incl_main_tag_err_relation, - incl_mem_tag_err_relation, - kernel_output_lookup_relation, - lookup_byte_lengths_relation, - lookup_byte_operations_relation, - lookup_cd_value_relation, - lookup_div_u16_0_relation, - lookup_div_u16_1_relation, - lookup_div_u16_2_relation, - lookup_div_u16_3_relation, - lookup_div_u16_4_relation, - lookup_div_u16_5_relation, - lookup_div_u16_6_relation, - lookup_div_u16_7_relation, - lookup_into_kernel_relation, - lookup_opcode_gas_relation, - lookup_pow_2_0_relation, - lookup_pow_2_1_relation, - lookup_ret_value_relation, - lookup_u16_0_relation, - lookup_u16_1_relation, - lookup_u16_10_relation, - lookup_u16_11_relation, - lookup_u16_12_relation, - lookup_u16_13_relation, - lookup_u16_14_relation, - lookup_u16_2_relation, - lookup_u16_3_relation, - lookup_u16_4_relation, - lookup_u16_5_relation, - lookup_u16_6_relation, - lookup_u16_7_relation, - lookup_u16_8_relation, - lookup_u16_9_relation, - lookup_u8_0_relation, - lookup_u8_1_relation, - perm_main_alu_relation, - perm_main_bin_relation, - perm_main_conv_relation, - perm_main_mem_a_relation, - perm_main_mem_b_relation, - perm_main_mem_c_relation, - perm_main_mem_d_relation, - perm_main_mem_ind_addr_a_relation, - perm_main_mem_ind_addr_b_relation, - perm_main_mem_ind_addr_c_relation, - perm_main_mem_ind_addr_d_relation, - perm_main_pedersen_relation, - perm_main_pos2_perm_relation, - perm_main_slice_relation, - perm_pos_mem_read_a_relation, - perm_pos_mem_read_b_relation, - perm_pos_mem_read_c_relation, - perm_pos_mem_read_d_relation, - perm_pos_mem_write_a_relation, - perm_pos_mem_write_b_relation, - perm_pos_mem_write_c_relation, - perm_pos_mem_write_d_relation, - perm_rng_gas_da_relation, - perm_rng_gas_l2_relation, - perm_rng_mem_relation, - perm_slice_mem_relation>; + incl_main_tag_err_relation, + incl_mem_tag_err_relation, + kernel_output_lookup_relation, + lookup_byte_lengths_relation, + lookup_byte_operations_relation, + lookup_cd_value_relation, + lookup_div_u16_0_relation, + lookup_div_u16_1_relation, + lookup_div_u16_2_relation, + lookup_div_u16_3_relation, + lookup_div_u16_4_relation, + lookup_div_u16_5_relation, + lookup_div_u16_6_relation, + lookup_div_u16_7_relation, + lookup_into_kernel_relation, + lookup_opcode_gas_relation, + lookup_pow_2_0_relation, + lookup_pow_2_1_relation, + lookup_ret_value_relation, + lookup_rng_chk_0_relation, + lookup_rng_chk_1_relation, + lookup_rng_chk_2_relation, + lookup_rng_chk_3_relation, + lookup_rng_chk_4_relation, + lookup_rng_chk_5_relation, + lookup_rng_chk_6_relation, + lookup_rng_chk_7_relation, + lookup_rng_chk_diff_relation, + lookup_rng_chk_pow_2_relation, + lookup_u16_0_relation, + lookup_u16_1_relation, + lookup_u16_10_relation, + lookup_u16_11_relation, + lookup_u16_12_relation, + lookup_u16_13_relation, + lookup_u16_14_relation, + lookup_u16_2_relation, + lookup_u16_3_relation, + lookup_u16_4_relation, + lookup_u16_5_relation, + lookup_u16_6_relation, + lookup_u16_7_relation, + lookup_u16_8_relation, + lookup_u16_9_relation, + lookup_u8_0_relation, + lookup_u8_1_relation, + perm_main_alu_relation, + perm_main_bin_relation, + perm_main_conv_relation, + perm_main_mem_a_relation, + perm_main_mem_b_relation, + perm_main_mem_c_relation, + perm_main_mem_d_relation, + perm_main_mem_ind_addr_a_relation, + perm_main_mem_ind_addr_b_relation, + perm_main_mem_ind_addr_c_relation, + perm_main_mem_ind_addr_d_relation, + perm_main_pedersen_relation, + perm_main_pos2_perm_relation, + perm_main_slice_relation, + perm_pos_mem_read_a_relation, + perm_pos_mem_read_b_relation, + perm_pos_mem_read_c_relation, + perm_pos_mem_read_d_relation, + perm_pos_mem_write_a_relation, + perm_pos_mem_write_b_relation, + perm_pos_mem_write_c_relation, + perm_pos_mem_write_d_relation, + perm_rng_gas_da_relation, + perm_rng_gas_l2_relation, + perm_rng_mem_relation, + perm_slice_mem_relation>; using LookupRelations = LookupRelations_;