Skip to content

Commit

Permalink
feat(avm): avm recursive verifier cpp (#8162)
Browse files Browse the repository at this point in the history
Resolves #7790
Resolves #7816 
The current version does not enable checks related to public inputs.
This will be handled as part of #7817
  • Loading branch information
jeanmon authored and codygunton committed Aug 30, 2024
1 parent 609d5ca commit 4f1b52b
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 92 deletions.
170 changes: 85 additions & 85 deletions barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,98 +144,98 @@ class AvmFlavor {
template <typename FF_>
using MainRelations_ = std::tuple<
// Relations
Avm_vm::alu<FF>,
Avm_vm::binary<FF>,
Avm_vm::conversion<FF>,
Avm_vm::gas<FF>,
Avm_vm::keccakf1600<FF>,
Avm_vm::kernel<FF>,
Avm_vm::main<FF>,
Avm_vm::mem<FF>,
Avm_vm::mem_slice<FF>,
Avm_vm::pedersen<FF>,
Avm_vm::poseidon2<FF>,
Avm_vm::range_check<FF>,
Avm_vm::sha256<FF>>;
Avm_vm::alu<FF_>,
Avm_vm::binary<FF_>,
Avm_vm::conversion<FF_>,
Avm_vm::gas<FF_>,
Avm_vm::keccakf1600<FF_>,
Avm_vm::kernel<FF_>,
Avm_vm::main<FF_>,
Avm_vm::mem<FF_>,
Avm_vm::mem_slice<FF_>,
Avm_vm::pedersen<FF_>,
Avm_vm::poseidon2<FF_>,
Avm_vm::range_check<FF_>,
Avm_vm::sha256<FF_>>;

using MainRelations = MainRelations_<FF>;

// Need to be templated for recursive verifier
template <typename FF_>
using LookupRelations_ = std::tuple<
// Lookups
incl_main_tag_err_relation<FF>,
incl_mem_tag_err_relation<FF>,
kernel_output_lookup_relation<FF>,
lookup_byte_lengths_relation<FF>,
lookup_byte_operations_relation<FF>,
lookup_cd_value_relation<FF>,
lookup_div_u16_0_relation<FF>,
lookup_div_u16_1_relation<FF>,
lookup_div_u16_2_relation<FF>,
lookup_div_u16_3_relation<FF>,
lookup_div_u16_4_relation<FF>,
lookup_div_u16_5_relation<FF>,
lookup_div_u16_6_relation<FF>,
lookup_div_u16_7_relation<FF>,
lookup_into_kernel_relation<FF>,
lookup_opcode_gas_relation<FF>,
lookup_pow_2_0_relation<FF>,
lookup_pow_2_1_relation<FF>,
lookup_ret_value_relation<FF>,
lookup_rng_chk_0_relation<FF>,
lookup_rng_chk_1_relation<FF>,
lookup_rng_chk_2_relation<FF>,
lookup_rng_chk_3_relation<FF>,
lookup_rng_chk_4_relation<FF>,
lookup_rng_chk_5_relation<FF>,
lookup_rng_chk_6_relation<FF>,
lookup_rng_chk_7_relation<FF>,
lookup_rng_chk_diff_relation<FF>,
lookup_rng_chk_pow_2_relation<FF>,
lookup_u16_0_relation<FF>,
lookup_u16_1_relation<FF>,
lookup_u16_10_relation<FF>,
lookup_u16_11_relation<FF>,
lookup_u16_12_relation<FF>,
lookup_u16_13_relation<FF>,
lookup_u16_14_relation<FF>,
lookup_u16_2_relation<FF>,
lookup_u16_3_relation<FF>,
lookup_u16_4_relation<FF>,
lookup_u16_5_relation<FF>,
lookup_u16_6_relation<FF>,
lookup_u16_7_relation<FF>,
lookup_u16_8_relation<FF>,
lookup_u16_9_relation<FF>,
lookup_u8_0_relation<FF>,
lookup_u8_1_relation<FF>,
perm_main_alu_relation<FF>,
perm_main_bin_relation<FF>,
perm_main_conv_relation<FF>,
perm_main_mem_a_relation<FF>,
perm_main_mem_b_relation<FF>,
perm_main_mem_c_relation<FF>,
perm_main_mem_d_relation<FF>,
perm_main_mem_ind_addr_a_relation<FF>,
perm_main_mem_ind_addr_b_relation<FF>,
perm_main_mem_ind_addr_c_relation<FF>,
perm_main_mem_ind_addr_d_relation<FF>,
perm_main_pedersen_relation<FF>,
perm_main_pos2_perm_relation<FF>,
perm_main_slice_relation<FF>,
perm_pos_mem_read_a_relation<FF>,
perm_pos_mem_read_b_relation<FF>,
perm_pos_mem_read_c_relation<FF>,
perm_pos_mem_read_d_relation<FF>,
perm_pos_mem_write_a_relation<FF>,
perm_pos_mem_write_b_relation<FF>,
perm_pos_mem_write_c_relation<FF>,
perm_pos_mem_write_d_relation<FF>,
perm_rng_gas_da_relation<FF>,
perm_rng_gas_l2_relation<FF>,
perm_rng_mem_relation<FF>,
perm_slice_mem_relation<FF>>;
incl_main_tag_err_relation<FF_>,
incl_mem_tag_err_relation<FF_>,
kernel_output_lookup_relation<FF_>,
lookup_byte_lengths_relation<FF_>,
lookup_byte_operations_relation<FF_>,
lookup_cd_value_relation<FF_>,
lookup_div_u16_0_relation<FF_>,
lookup_div_u16_1_relation<FF_>,
lookup_div_u16_2_relation<FF_>,
lookup_div_u16_3_relation<FF_>,
lookup_div_u16_4_relation<FF_>,
lookup_div_u16_5_relation<FF_>,
lookup_div_u16_6_relation<FF_>,
lookup_div_u16_7_relation<FF_>,
lookup_into_kernel_relation<FF_>,
lookup_opcode_gas_relation<FF_>,
lookup_pow_2_0_relation<FF_>,
lookup_pow_2_1_relation<FF_>,
lookup_ret_value_relation<FF_>,
lookup_rng_chk_0_relation<FF_>,
lookup_rng_chk_1_relation<FF_>,
lookup_rng_chk_2_relation<FF_>,
lookup_rng_chk_3_relation<FF_>,
lookup_rng_chk_4_relation<FF_>,
lookup_rng_chk_5_relation<FF_>,
lookup_rng_chk_6_relation<FF_>,
lookup_rng_chk_7_relation<FF_>,
lookup_rng_chk_diff_relation<FF_>,
lookup_rng_chk_pow_2_relation<FF_>,
lookup_u16_0_relation<FF_>,
lookup_u16_1_relation<FF_>,
lookup_u16_10_relation<FF_>,
lookup_u16_11_relation<FF_>,
lookup_u16_12_relation<FF_>,
lookup_u16_13_relation<FF_>,
lookup_u16_14_relation<FF_>,
lookup_u16_2_relation<FF_>,
lookup_u16_3_relation<FF_>,
lookup_u16_4_relation<FF_>,
lookup_u16_5_relation<FF_>,
lookup_u16_6_relation<FF_>,
lookup_u16_7_relation<FF_>,
lookup_u16_8_relation<FF_>,
lookup_u16_9_relation<FF_>,
lookup_u8_0_relation<FF_>,
lookup_u8_1_relation<FF_>,
perm_main_alu_relation<FF_>,
perm_main_bin_relation<FF_>,
perm_main_conv_relation<FF_>,
perm_main_mem_a_relation<FF_>,
perm_main_mem_b_relation<FF_>,
perm_main_mem_c_relation<FF_>,
perm_main_mem_d_relation<FF_>,
perm_main_mem_ind_addr_a_relation<FF_>,
perm_main_mem_ind_addr_b_relation<FF_>,
perm_main_mem_ind_addr_c_relation<FF_>,
perm_main_mem_ind_addr_d_relation<FF_>,
perm_main_pedersen_relation<FF_>,
perm_main_pos2_perm_relation<FF_>,
perm_main_slice_relation<FF_>,
perm_pos_mem_read_a_relation<FF_>,
perm_pos_mem_read_b_relation<FF_>,
perm_pos_mem_read_c_relation<FF_>,
perm_pos_mem_read_d_relation<FF_>,
perm_pos_mem_write_a_relation<FF_>,
perm_pos_mem_write_b_relation<FF_>,
perm_pos_mem_write_c_relation<FF_>,
perm_pos_mem_write_d_relation<FF_>,
perm_rng_gas_da_relation<FF_>,
perm_rng_gas_l2_relation<FF_>,
perm_rng_mem_relation<FF_>,
perm_slice_mem_relation<FF_>>;

using LookupRelations = LookupRelations_<FF>;

Expand Down
14 changes: 7 additions & 7 deletions bb-pilcom/bb-pil-backend/templates/flavor.hpp.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,13 @@ class {{name}}Flavor {
template <size_t LENGTH>
using ProverUnivariates = AllEntities<bb::Univariate<FF, LENGTH>>;

/**
* @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 <size_t LENGTH, size_t SKIP_COUNT>
using ProverUnivariatesWithOptimisticSkipping = AllEntities<bb::Univariate<FF, LENGTH, 0, SKIP_COUNT>>;
/**
* @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 <size_t LENGTH, size_t SKIP_COUNT>
using OptimisedProverUnivariates = AllEntities<bb::Univariate<FF, LENGTH, 0, SKIP_COUNT>>;

/**
* @brief A container for univariates produced during the hot loop in sumcheck.
Expand Down

0 comments on commit 4f1b52b

Please sign in to comment.