From 2810ef58e70d891c4618ed92710400b33d1c0d48 Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Wed, 3 Jul 2024 10:04:45 +0000 Subject: [PATCH 1/2] feat: cleanup flavor prover and verifier --- .../barretenberg/vm/generated/avm_flavor.hpp | 2007 ++--------------- .../barretenberg/vm/generated/avm_prover.cpp | 762 +------ .../vm/generated/avm_verifier.cpp | 534 +---- 3 files changed, 161 insertions(+), 3142 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/generated/avm_flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/generated/avm_flavor.hpp index c29a3b0212a..950e7dd5029 100644 --- a/barretenberg/cpp/src/barretenberg/vm/generated/avm_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/generated/avm_flavor.hpp @@ -106,61 +106,6 @@ class AvmFlavor { // the unshifted and one for the shifted static constexpr size_t NUM_ALL_ENTITIES = 452; - using GrandProductRelations = std::tuple, - perm_main_bin_relation, - perm_main_conv_relation, - perm_main_pos2_perm_relation, - perm_main_pedersen_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, - lookup_byte_lengths_relation, - lookup_byte_operations_relation, - lookup_opcode_gas_relation, - range_check_l2_gas_hi_relation, - range_check_l2_gas_lo_relation, - range_check_da_gas_hi_relation, - range_check_da_gas_lo_relation, - kernel_output_lookup_relation, - lookup_into_kernel_relation, - incl_main_tag_err_relation, - incl_mem_tag_err_relation, - lookup_mem_rng_chk_lo_relation, - lookup_mem_rng_chk_mid_relation, - lookup_mem_rng_chk_hi_relation, - lookup_pow_2_0_relation, - lookup_pow_2_1_relation, - lookup_u8_0_relation, - lookup_u8_1_relation, - lookup_u16_0_relation, - lookup_u16_1_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_u16_10_relation, - lookup_u16_11_relation, - lookup_u16_12_relation, - lookup_u16_13_relation, - lookup_u16_14_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>; - using Relations = std::tuple, Avm_vm::binary, Avm_vm::conversion, @@ -257,7 +202,7 @@ class AvmFlavor { RefVector get_table_polynomials() { return {}; }; }; - template class WitnessEntities { + template class WireEntities { public: DEFINE_FLAVOR_MEMBERS(DataType, kernel_kernel_inputs, @@ -550,6 +495,58 @@ class AvmFlavor { sha256_output, sha256_sel_sha256_compression, sha256_state, + lookup_byte_lengths_counts, + lookup_byte_operations_counts, + lookup_opcode_gas_counts, + range_check_l2_gas_hi_counts, + range_check_l2_gas_lo_counts, + range_check_da_gas_hi_counts, + range_check_da_gas_lo_counts, + kernel_output_lookup_counts, + lookup_into_kernel_counts, + incl_main_tag_err_counts, + incl_mem_tag_err_counts, + lookup_mem_rng_chk_lo_counts, + lookup_mem_rng_chk_mid_counts, + lookup_mem_rng_chk_hi_counts, + lookup_pow_2_0_counts, + lookup_pow_2_1_counts, + lookup_u8_0_counts, + lookup_u8_1_counts, + lookup_u16_0_counts, + lookup_u16_1_counts, + lookup_u16_2_counts, + lookup_u16_3_counts, + lookup_u16_4_counts, + lookup_u16_5_counts, + lookup_u16_6_counts, + lookup_u16_7_counts, + lookup_u16_8_counts, + lookup_u16_9_counts, + lookup_u16_10_counts, + lookup_u16_11_counts, + lookup_u16_12_counts, + lookup_u16_13_counts, + lookup_u16_14_counts, + lookup_div_u16_0_counts, + lookup_div_u16_1_counts, + lookup_div_u16_2_counts, + lookup_div_u16_3_counts, + lookup_div_u16_4_counts, + lookup_div_u16_5_counts, + lookup_div_u16_6_counts, + lookup_div_u16_7_counts) + + RefVector get_wires() { return get_all(); }; + }; + + /** + * @brief Entities that are constructed by the prover. + * + * @tparam DataType + */ + template struct DerivedWitnessEntities { + DEFINE_FLAVOR_MEMBERS(DataType, perm_main_alu, perm_main_bin, perm_main_conv, @@ -603,829 +600,19 @@ class AvmFlavor { lookup_div_u16_4, lookup_div_u16_5, lookup_div_u16_6, - lookup_div_u16_7, - lookup_byte_lengths_counts, - lookup_byte_operations_counts, - lookup_opcode_gas_counts, - range_check_l2_gas_hi_counts, - range_check_l2_gas_lo_counts, - range_check_da_gas_hi_counts, - range_check_da_gas_lo_counts, - kernel_output_lookup_counts, - lookup_into_kernel_counts, - incl_main_tag_err_counts, - incl_mem_tag_err_counts, - lookup_mem_rng_chk_lo_counts, - lookup_mem_rng_chk_mid_counts, - lookup_mem_rng_chk_hi_counts, - lookup_pow_2_0_counts, - lookup_pow_2_1_counts, - lookup_u8_0_counts, - lookup_u8_1_counts, - lookup_u16_0_counts, - lookup_u16_1_counts, - lookup_u16_2_counts, - lookup_u16_3_counts, - lookup_u16_4_counts, - lookup_u16_5_counts, - lookup_u16_6_counts, - lookup_u16_7_counts, - lookup_u16_8_counts, - lookup_u16_9_counts, - lookup_u16_10_counts, - lookup_u16_11_counts, - lookup_u16_12_counts, - lookup_u16_13_counts, - lookup_u16_14_counts, - lookup_div_u16_0_counts, - lookup_div_u16_1_counts, - lookup_div_u16_2_counts, - lookup_div_u16_3_counts, - lookup_div_u16_4_counts, - lookup_div_u16_5_counts, - lookup_div_u16_6_counts, - lookup_div_u16_7_counts) + lookup_div_u16_7); + }; - RefVector get_wires() - { - return { kernel_kernel_inputs, - kernel_kernel_value_out, - kernel_kernel_side_effect_out, - kernel_kernel_metadata_out, - main_calldata, - alu_a_hi, - alu_a_lo, - alu_b_hi, - alu_b_lo, - alu_borrow, - alu_cf, - alu_clk, - alu_cmp_rng_ctr, - alu_div_u16_r0, - alu_div_u16_r1, - alu_div_u16_r2, - alu_div_u16_r3, - alu_div_u16_r4, - alu_div_u16_r5, - alu_div_u16_r6, - alu_div_u16_r7, - alu_divisor_hi, - alu_divisor_lo, - alu_ff_tag, - alu_ia, - alu_ib, - alu_ic, - alu_in_tag, - alu_op_add, - alu_op_cast, - alu_op_cast_prev, - alu_op_div, - alu_op_div_a_lt_b, - alu_op_div_std, - alu_op_eq, - alu_op_eq_diff_inv, - alu_op_lt, - alu_op_lte, - alu_op_mul, - alu_op_not, - alu_op_shl, - alu_op_shr, - alu_op_sub, - alu_p_a_borrow, - alu_p_b_borrow, - alu_p_sub_a_hi, - alu_p_sub_a_lo, - alu_p_sub_b_hi, - alu_p_sub_b_lo, - alu_partial_prod_hi, - alu_partial_prod_lo, - alu_quotient_hi, - alu_quotient_lo, - alu_remainder, - alu_res_hi, - alu_res_lo, - alu_sel_alu, - alu_sel_cmp, - alu_sel_div_rng_chk, - alu_sel_rng_chk, - alu_sel_rng_chk_lookup, - alu_sel_shift_which, - alu_shift_lt_bit_len, - alu_t_sub_s_bits, - alu_two_pow_s, - alu_two_pow_t_sub_s, - alu_u128_tag, - alu_u16_r0, - alu_u16_r1, - alu_u16_r10, - alu_u16_r11, - alu_u16_r12, - alu_u16_r13, - alu_u16_r14, - alu_u16_r2, - alu_u16_r3, - alu_u16_r4, - alu_u16_r5, - alu_u16_r6, - alu_u16_r7, - alu_u16_r8, - alu_u16_r9, - alu_u16_tag, - alu_u32_tag, - alu_u64_tag, - alu_u8_r0, - alu_u8_r1, - alu_u8_tag, - binary_acc_ia, - binary_acc_ib, - binary_acc_ic, - binary_clk, - binary_ia_bytes, - binary_ib_bytes, - binary_ic_bytes, - binary_in_tag, - binary_mem_tag_ctr, - binary_mem_tag_ctr_inv, - binary_op_id, - binary_sel_bin, - binary_start, - byte_lookup_sel_bin, - byte_lookup_table_byte_lengths, - byte_lookup_table_in_tags, - byte_lookup_table_input_a, - byte_lookup_table_input_b, - byte_lookup_table_op_id, - byte_lookup_table_output, - conversion_clk, - conversion_input, - conversion_num_limbs, - conversion_radix, - conversion_sel_to_radix_le, - gas_da_gas_fixed_table, - gas_l2_gas_fixed_table, - gas_sel_gas_cost, - keccakf1600_clk, - keccakf1600_input, - keccakf1600_output, - keccakf1600_sel_keccakf1600, - kernel_emit_l2_to_l1_msg_write_offset, - kernel_emit_note_hash_write_offset, - kernel_emit_nullifier_write_offset, - kernel_emit_unencrypted_log_write_offset, - kernel_kernel_in_offset, - kernel_kernel_out_offset, - kernel_l1_to_l2_msg_exists_write_offset, - kernel_note_hash_exist_write_offset, - kernel_nullifier_exists_write_offset, - kernel_nullifier_non_exists_write_offset, - kernel_q_public_input_kernel_add_to_table, - kernel_q_public_input_kernel_out_add_to_table, - kernel_side_effect_counter, - kernel_sload_write_offset, - kernel_sstore_write_offset, - main_abs_da_rem_gas_hi, - main_abs_da_rem_gas_lo, - main_abs_l2_rem_gas_hi, - main_abs_l2_rem_gas_lo, - main_alu_in_tag, - main_bin_op_id, - main_call_ptr, - main_da_gas_op_cost, - main_da_gas_remaining, - main_da_out_of_gas, - main_ia, - main_ib, - main_ic, - main_id, - main_id_zero, - main_ind_addr_a, - main_ind_addr_b, - main_ind_addr_c, - main_ind_addr_d, - main_internal_return_ptr, - main_inv, - main_l2_gas_op_cost, - main_l2_gas_remaining, - main_l2_out_of_gas, - main_mem_addr_a, - main_mem_addr_b, - main_mem_addr_c, - main_mem_addr_d, - main_op_err, - main_opcode_val, - main_pc, - main_r_in_tag, - main_rwa, - main_rwb, - main_rwc, - main_rwd, - main_sel_alu, - main_sel_bin, - main_sel_gas_accounting_active, - main_sel_last, - main_sel_mem_op_a, - main_sel_mem_op_activate_gas, - main_sel_mem_op_b, - main_sel_mem_op_c, - main_sel_mem_op_d, - main_sel_mov_ia_to_ic, - main_sel_mov_ib_to_ic, - main_sel_op_add, - main_sel_op_address, - main_sel_op_and, - main_sel_op_block_number, - main_sel_op_cast, - main_sel_op_chain_id, - main_sel_op_cmov, - main_sel_op_coinbase, - main_sel_op_dagasleft, - main_sel_op_div, - main_sel_op_emit_l2_to_l1_msg, - main_sel_op_emit_note_hash, - main_sel_op_emit_nullifier, - main_sel_op_emit_unencrypted_log, - main_sel_op_eq, - main_sel_op_external_call, - main_sel_op_fdiv, - main_sel_op_fee_per_da_gas, - main_sel_op_fee_per_l2_gas, - main_sel_op_function_selector, - main_sel_op_get_contract_instance, - main_sel_op_halt, - main_sel_op_internal_call, - main_sel_op_internal_return, - main_sel_op_jump, - main_sel_op_jumpi, - main_sel_op_keccak, - main_sel_op_l1_to_l2_msg_exists, - main_sel_op_l2gasleft, - main_sel_op_lt, - main_sel_op_lte, - main_sel_op_mov, - main_sel_op_mul, - main_sel_op_not, - main_sel_op_note_hash_exists, - main_sel_op_nullifier_exists, - main_sel_op_or, - main_sel_op_pedersen, - main_sel_op_poseidon2, - main_sel_op_radix_le, - main_sel_op_sender, - main_sel_op_sha256, - main_sel_op_shl, - main_sel_op_shr, - main_sel_op_sload, - main_sel_op_sstore, - main_sel_op_storage_address, - main_sel_op_sub, - main_sel_op_timestamp, - main_sel_op_transaction_fee, - main_sel_op_version, - main_sel_op_xor, - main_sel_q_kernel_lookup, - main_sel_q_kernel_output_lookup, - main_sel_resolve_ind_addr_a, - main_sel_resolve_ind_addr_b, - main_sel_resolve_ind_addr_c, - main_sel_resolve_ind_addr_d, - main_sel_rng_16, - main_sel_rng_8, - main_space_id, - main_tag_err, - main_w_in_tag, - mem_addr, - mem_clk, - mem_diff_hi, - mem_diff_lo, - mem_diff_mid, - mem_glob_addr, - mem_last, - mem_lastAccess, - mem_one_min_inv, - mem_r_in_tag, - mem_rw, - mem_sel_mem, - mem_sel_mov_ia_to_ic, - mem_sel_mov_ib_to_ic, - mem_sel_op_a, - mem_sel_op_b, - mem_sel_op_c, - mem_sel_op_cmov, - mem_sel_op_d, - mem_sel_resolve_ind_addr_a, - mem_sel_resolve_ind_addr_b, - mem_sel_resolve_ind_addr_c, - mem_sel_resolve_ind_addr_d, - mem_sel_rng_chk, - mem_skip_check_tag, - mem_space_id, - mem_tag, - mem_tag_err, - mem_tsp, - mem_val, - mem_w_in_tag, - pedersen_clk, - pedersen_input, - pedersen_output, - pedersen_sel_pedersen, - poseidon2_clk, - poseidon2_input, - poseidon2_output, - poseidon2_sel_poseidon_perm, - powers_power_of_2, - sha256_clk, - sha256_input, - sha256_output, - sha256_sel_sha256_compression, - sha256_state, - perm_main_alu, - perm_main_bin, - perm_main_conv, - perm_main_pos2_perm, - perm_main_pedersen, - perm_main_mem_a, - perm_main_mem_b, - perm_main_mem_c, - perm_main_mem_d, - perm_main_mem_ind_addr_a, - perm_main_mem_ind_addr_b, - perm_main_mem_ind_addr_c, - perm_main_mem_ind_addr_d, - lookup_byte_lengths, - lookup_byte_operations, - lookup_opcode_gas, - range_check_l2_gas_hi, - range_check_l2_gas_lo, - range_check_da_gas_hi, - range_check_da_gas_lo, - kernel_output_lookup, - lookup_into_kernel, - incl_main_tag_err, - incl_mem_tag_err, - lookup_mem_rng_chk_lo, - lookup_mem_rng_chk_mid, - lookup_mem_rng_chk_hi, - lookup_pow_2_0, - lookup_pow_2_1, - lookup_u8_0, - lookup_u8_1, - lookup_u16_0, - lookup_u16_1, - lookup_u16_2, - lookup_u16_3, - lookup_u16_4, - lookup_u16_5, - lookup_u16_6, - lookup_u16_7, - lookup_u16_8, - lookup_u16_9, - lookup_u16_10, - lookup_u16_11, - lookup_u16_12, - lookup_u16_13, - lookup_u16_14, - lookup_div_u16_0, - lookup_div_u16_1, - lookup_div_u16_2, - lookup_div_u16_3, - lookup_div_u16_4, - lookup_div_u16_5, - lookup_div_u16_6, - lookup_div_u16_7, - lookup_byte_lengths_counts, - lookup_byte_operations_counts, - lookup_opcode_gas_counts, - range_check_l2_gas_hi_counts, - range_check_l2_gas_lo_counts, - range_check_da_gas_hi_counts, - range_check_da_gas_lo_counts, - kernel_output_lookup_counts, - lookup_into_kernel_counts, - incl_main_tag_err_counts, - incl_mem_tag_err_counts, - lookup_mem_rng_chk_lo_counts, - lookup_mem_rng_chk_mid_counts, - lookup_mem_rng_chk_hi_counts, - lookup_pow_2_0_counts, - lookup_pow_2_1_counts, - lookup_u8_0_counts, - lookup_u8_1_counts, - lookup_u16_0_counts, - lookup_u16_1_counts, - lookup_u16_2_counts, - lookup_u16_3_counts, - lookup_u16_4_counts, - lookup_u16_5_counts, - lookup_u16_6_counts, - lookup_u16_7_counts, - lookup_u16_8_counts, - lookup_u16_9_counts, - lookup_u16_10_counts, - lookup_u16_11_counts, - lookup_u16_12_counts, - lookup_u16_13_counts, - lookup_u16_14_counts, - lookup_div_u16_0_counts, - lookup_div_u16_1_counts, - lookup_div_u16_2_counts, - lookup_div_u16_3_counts, - lookup_div_u16_4_counts, - lookup_div_u16_5_counts, - lookup_div_u16_6_counts, - lookup_div_u16_7_counts }; - }; + template + class WitnessEntities : public WireEntities, public DerivedWitnessEntities { + public: + DEFINE_COMPOUND_GET_ALL(WireEntities, DerivedWitnessEntities) + auto get_wires() { return WireEntities::get_all(); }; }; - template class AllEntities { + template class ShiftedEntities { public: DEFINE_FLAVOR_MEMBERS(DataType, - main_clk, - main_sel_first, - kernel_kernel_inputs, - kernel_kernel_value_out, - kernel_kernel_side_effect_out, - kernel_kernel_metadata_out, - main_calldata, - alu_a_hi, - alu_a_lo, - alu_b_hi, - alu_b_lo, - alu_borrow, - alu_cf, - alu_clk, - alu_cmp_rng_ctr, - alu_div_u16_r0, - alu_div_u16_r1, - alu_div_u16_r2, - alu_div_u16_r3, - alu_div_u16_r4, - alu_div_u16_r5, - alu_div_u16_r6, - alu_div_u16_r7, - alu_divisor_hi, - alu_divisor_lo, - alu_ff_tag, - alu_ia, - alu_ib, - alu_ic, - alu_in_tag, - alu_op_add, - alu_op_cast, - alu_op_cast_prev, - alu_op_div, - alu_op_div_a_lt_b, - alu_op_div_std, - alu_op_eq, - alu_op_eq_diff_inv, - alu_op_lt, - alu_op_lte, - alu_op_mul, - alu_op_not, - alu_op_shl, - alu_op_shr, - alu_op_sub, - alu_p_a_borrow, - alu_p_b_borrow, - alu_p_sub_a_hi, - alu_p_sub_a_lo, - alu_p_sub_b_hi, - alu_p_sub_b_lo, - alu_partial_prod_hi, - alu_partial_prod_lo, - alu_quotient_hi, - alu_quotient_lo, - alu_remainder, - alu_res_hi, - alu_res_lo, - alu_sel_alu, - alu_sel_cmp, - alu_sel_div_rng_chk, - alu_sel_rng_chk, - alu_sel_rng_chk_lookup, - alu_sel_shift_which, - alu_shift_lt_bit_len, - alu_t_sub_s_bits, - alu_two_pow_s, - alu_two_pow_t_sub_s, - alu_u128_tag, - alu_u16_r0, - alu_u16_r1, - alu_u16_r10, - alu_u16_r11, - alu_u16_r12, - alu_u16_r13, - alu_u16_r14, - alu_u16_r2, - alu_u16_r3, - alu_u16_r4, - alu_u16_r5, - alu_u16_r6, - alu_u16_r7, - alu_u16_r8, - alu_u16_r9, - alu_u16_tag, - alu_u32_tag, - alu_u64_tag, - alu_u8_r0, - alu_u8_r1, - alu_u8_tag, - binary_acc_ia, - binary_acc_ib, - binary_acc_ic, - binary_clk, - binary_ia_bytes, - binary_ib_bytes, - binary_ic_bytes, - binary_in_tag, - binary_mem_tag_ctr, - binary_mem_tag_ctr_inv, - binary_op_id, - binary_sel_bin, - binary_start, - byte_lookup_sel_bin, - byte_lookup_table_byte_lengths, - byte_lookup_table_in_tags, - byte_lookup_table_input_a, - byte_lookup_table_input_b, - byte_lookup_table_op_id, - byte_lookup_table_output, - conversion_clk, - conversion_input, - conversion_num_limbs, - conversion_radix, - conversion_sel_to_radix_le, - gas_da_gas_fixed_table, - gas_l2_gas_fixed_table, - gas_sel_gas_cost, - keccakf1600_clk, - keccakf1600_input, - keccakf1600_output, - keccakf1600_sel_keccakf1600, - kernel_emit_l2_to_l1_msg_write_offset, - kernel_emit_note_hash_write_offset, - kernel_emit_nullifier_write_offset, - kernel_emit_unencrypted_log_write_offset, - kernel_kernel_in_offset, - kernel_kernel_out_offset, - kernel_l1_to_l2_msg_exists_write_offset, - kernel_note_hash_exist_write_offset, - kernel_nullifier_exists_write_offset, - kernel_nullifier_non_exists_write_offset, - kernel_q_public_input_kernel_add_to_table, - kernel_q_public_input_kernel_out_add_to_table, - kernel_side_effect_counter, - kernel_sload_write_offset, - kernel_sstore_write_offset, - main_abs_da_rem_gas_hi, - main_abs_da_rem_gas_lo, - main_abs_l2_rem_gas_hi, - main_abs_l2_rem_gas_lo, - main_alu_in_tag, - main_bin_op_id, - main_call_ptr, - main_da_gas_op_cost, - main_da_gas_remaining, - main_da_out_of_gas, - main_ia, - main_ib, - main_ic, - main_id, - main_id_zero, - main_ind_addr_a, - main_ind_addr_b, - main_ind_addr_c, - main_ind_addr_d, - main_internal_return_ptr, - main_inv, - main_l2_gas_op_cost, - main_l2_gas_remaining, - main_l2_out_of_gas, - main_mem_addr_a, - main_mem_addr_b, - main_mem_addr_c, - main_mem_addr_d, - main_op_err, - main_opcode_val, - main_pc, - main_r_in_tag, - main_rwa, - main_rwb, - main_rwc, - main_rwd, - main_sel_alu, - main_sel_bin, - main_sel_gas_accounting_active, - main_sel_last, - main_sel_mem_op_a, - main_sel_mem_op_activate_gas, - main_sel_mem_op_b, - main_sel_mem_op_c, - main_sel_mem_op_d, - main_sel_mov_ia_to_ic, - main_sel_mov_ib_to_ic, - main_sel_op_add, - main_sel_op_address, - main_sel_op_and, - main_sel_op_block_number, - main_sel_op_cast, - main_sel_op_chain_id, - main_sel_op_cmov, - main_sel_op_coinbase, - main_sel_op_dagasleft, - main_sel_op_div, - main_sel_op_emit_l2_to_l1_msg, - main_sel_op_emit_note_hash, - main_sel_op_emit_nullifier, - main_sel_op_emit_unencrypted_log, - main_sel_op_eq, - main_sel_op_external_call, - main_sel_op_fdiv, - main_sel_op_fee_per_da_gas, - main_sel_op_fee_per_l2_gas, - main_sel_op_function_selector, - main_sel_op_get_contract_instance, - main_sel_op_halt, - main_sel_op_internal_call, - main_sel_op_internal_return, - main_sel_op_jump, - main_sel_op_jumpi, - main_sel_op_keccak, - main_sel_op_l1_to_l2_msg_exists, - main_sel_op_l2gasleft, - main_sel_op_lt, - main_sel_op_lte, - main_sel_op_mov, - main_sel_op_mul, - main_sel_op_not, - main_sel_op_note_hash_exists, - main_sel_op_nullifier_exists, - main_sel_op_or, - main_sel_op_pedersen, - main_sel_op_poseidon2, - main_sel_op_radix_le, - main_sel_op_sender, - main_sel_op_sha256, - main_sel_op_shl, - main_sel_op_shr, - main_sel_op_sload, - main_sel_op_sstore, - main_sel_op_storage_address, - main_sel_op_sub, - main_sel_op_timestamp, - main_sel_op_transaction_fee, - main_sel_op_version, - main_sel_op_xor, - main_sel_q_kernel_lookup, - main_sel_q_kernel_output_lookup, - main_sel_resolve_ind_addr_a, - main_sel_resolve_ind_addr_b, - main_sel_resolve_ind_addr_c, - main_sel_resolve_ind_addr_d, - main_sel_rng_16, - main_sel_rng_8, - main_space_id, - main_tag_err, - main_w_in_tag, - mem_addr, - mem_clk, - mem_diff_hi, - mem_diff_lo, - mem_diff_mid, - mem_glob_addr, - mem_last, - mem_lastAccess, - mem_one_min_inv, - mem_r_in_tag, - mem_rw, - mem_sel_mem, - mem_sel_mov_ia_to_ic, - mem_sel_mov_ib_to_ic, - mem_sel_op_a, - mem_sel_op_b, - mem_sel_op_c, - mem_sel_op_cmov, - mem_sel_op_d, - mem_sel_resolve_ind_addr_a, - mem_sel_resolve_ind_addr_b, - mem_sel_resolve_ind_addr_c, - mem_sel_resolve_ind_addr_d, - mem_sel_rng_chk, - mem_skip_check_tag, - mem_space_id, - mem_tag, - mem_tag_err, - mem_tsp, - mem_val, - mem_w_in_tag, - pedersen_clk, - pedersen_input, - pedersen_output, - pedersen_sel_pedersen, - poseidon2_clk, - poseidon2_input, - poseidon2_output, - poseidon2_sel_poseidon_perm, - powers_power_of_2, - sha256_clk, - sha256_input, - sha256_output, - sha256_sel_sha256_compression, - sha256_state, - perm_main_alu, - perm_main_bin, - perm_main_conv, - perm_main_pos2_perm, - perm_main_pedersen, - perm_main_mem_a, - perm_main_mem_b, - perm_main_mem_c, - perm_main_mem_d, - perm_main_mem_ind_addr_a, - perm_main_mem_ind_addr_b, - perm_main_mem_ind_addr_c, - perm_main_mem_ind_addr_d, - lookup_byte_lengths, - lookup_byte_operations, - lookup_opcode_gas, - range_check_l2_gas_hi, - range_check_l2_gas_lo, - range_check_da_gas_hi, - range_check_da_gas_lo, - kernel_output_lookup, - lookup_into_kernel, - incl_main_tag_err, - incl_mem_tag_err, - lookup_mem_rng_chk_lo, - lookup_mem_rng_chk_mid, - lookup_mem_rng_chk_hi, - lookup_pow_2_0, - lookup_pow_2_1, - lookup_u8_0, - lookup_u8_1, - lookup_u16_0, - lookup_u16_1, - lookup_u16_2, - lookup_u16_3, - lookup_u16_4, - lookup_u16_5, - lookup_u16_6, - lookup_u16_7, - lookup_u16_8, - lookup_u16_9, - lookup_u16_10, - lookup_u16_11, - lookup_u16_12, - lookup_u16_13, - lookup_u16_14, - lookup_div_u16_0, - lookup_div_u16_1, - lookup_div_u16_2, - lookup_div_u16_3, - lookup_div_u16_4, - lookup_div_u16_5, - lookup_div_u16_6, - lookup_div_u16_7, - lookup_byte_lengths_counts, - lookup_byte_operations_counts, - lookup_opcode_gas_counts, - range_check_l2_gas_hi_counts, - range_check_l2_gas_lo_counts, - range_check_da_gas_hi_counts, - range_check_da_gas_lo_counts, - kernel_output_lookup_counts, - lookup_into_kernel_counts, - incl_main_tag_err_counts, - incl_mem_tag_err_counts, - lookup_mem_rng_chk_lo_counts, - lookup_mem_rng_chk_mid_counts, - lookup_mem_rng_chk_hi_counts, - lookup_pow_2_0_counts, - lookup_pow_2_1_counts, - lookup_u8_0_counts, - lookup_u8_1_counts, - lookup_u16_0_counts, - lookup_u16_1_counts, - lookup_u16_2_counts, - lookup_u16_3_counts, - lookup_u16_4_counts, - lookup_u16_5_counts, - lookup_u16_6_counts, - lookup_u16_7_counts, - lookup_u16_8_counts, - lookup_u16_9_counts, - lookup_u16_10_counts, - lookup_u16_11_counts, - lookup_u16_12_counts, - lookup_u16_13_counts, - lookup_u16_14_counts, - lookup_div_u16_0_counts, - lookup_div_u16_1_counts, - lookup_div_u16_2_counts, - lookup_div_u16_3_counts, - lookup_div_u16_4_counts, - lookup_div_u16_5_counts, - lookup_div_u16_6_counts, - lookup_div_u16_7_counts, alu_a_hi_shift, alu_a_lo_shift, alu_b_hi_shift, @@ -1491,988 +678,100 @@ class AvmFlavor { mem_tag_shift, mem_tsp_shift, mem_val_shift) + }; - RefVector get_wires() - { - return { main_clk, - main_sel_first, - kernel_kernel_inputs, - kernel_kernel_value_out, - kernel_kernel_side_effect_out, - kernel_kernel_metadata_out, - main_calldata, - alu_a_hi, - alu_a_lo, - alu_b_hi, - alu_b_lo, - alu_borrow, - alu_cf, - alu_clk, - alu_cmp_rng_ctr, - alu_div_u16_r0, - alu_div_u16_r1, - alu_div_u16_r2, - alu_div_u16_r3, - alu_div_u16_r4, - alu_div_u16_r5, - alu_div_u16_r6, - alu_div_u16_r7, - alu_divisor_hi, - alu_divisor_lo, - alu_ff_tag, - alu_ia, - alu_ib, - alu_ic, - alu_in_tag, - alu_op_add, - alu_op_cast, - alu_op_cast_prev, - alu_op_div, - alu_op_div_a_lt_b, - alu_op_div_std, - alu_op_eq, - alu_op_eq_diff_inv, - alu_op_lt, - alu_op_lte, - alu_op_mul, - alu_op_not, - alu_op_shl, - alu_op_shr, - alu_op_sub, - alu_p_a_borrow, - alu_p_b_borrow, - alu_p_sub_a_hi, - alu_p_sub_a_lo, - alu_p_sub_b_hi, - alu_p_sub_b_lo, - alu_partial_prod_hi, - alu_partial_prod_lo, - alu_quotient_hi, - alu_quotient_lo, - alu_remainder, - alu_res_hi, - alu_res_lo, - alu_sel_alu, - alu_sel_cmp, - alu_sel_div_rng_chk, - alu_sel_rng_chk, - alu_sel_rng_chk_lookup, - alu_sel_shift_which, - alu_shift_lt_bit_len, - alu_t_sub_s_bits, - alu_two_pow_s, - alu_two_pow_t_sub_s, - alu_u128_tag, - alu_u16_r0, - alu_u16_r1, - alu_u16_r10, - alu_u16_r11, - alu_u16_r12, - alu_u16_r13, - alu_u16_r14, - alu_u16_r2, - alu_u16_r3, - alu_u16_r4, - alu_u16_r5, - alu_u16_r6, - alu_u16_r7, - alu_u16_r8, - alu_u16_r9, - alu_u16_tag, - alu_u32_tag, - alu_u64_tag, - alu_u8_r0, - alu_u8_r1, - alu_u8_tag, - binary_acc_ia, - binary_acc_ib, - binary_acc_ic, - binary_clk, - binary_ia_bytes, - binary_ib_bytes, - binary_ic_bytes, - binary_in_tag, - binary_mem_tag_ctr, - binary_mem_tag_ctr_inv, - binary_op_id, - binary_sel_bin, - binary_start, - byte_lookup_sel_bin, - byte_lookup_table_byte_lengths, - byte_lookup_table_in_tags, - byte_lookup_table_input_a, - byte_lookup_table_input_b, - byte_lookup_table_op_id, - byte_lookup_table_output, - conversion_clk, - conversion_input, - conversion_num_limbs, - conversion_radix, - conversion_sel_to_radix_le, - gas_da_gas_fixed_table, - gas_l2_gas_fixed_table, - gas_sel_gas_cost, - keccakf1600_clk, - keccakf1600_input, - keccakf1600_output, - keccakf1600_sel_keccakf1600, - kernel_emit_l2_to_l1_msg_write_offset, - kernel_emit_note_hash_write_offset, - kernel_emit_nullifier_write_offset, - kernel_emit_unencrypted_log_write_offset, - kernel_kernel_in_offset, - kernel_kernel_out_offset, - kernel_l1_to_l2_msg_exists_write_offset, - kernel_note_hash_exist_write_offset, - kernel_nullifier_exists_write_offset, - kernel_nullifier_non_exists_write_offset, - kernel_q_public_input_kernel_add_to_table, - kernel_q_public_input_kernel_out_add_to_table, - kernel_side_effect_counter, - kernel_sload_write_offset, - kernel_sstore_write_offset, - main_abs_da_rem_gas_hi, - main_abs_da_rem_gas_lo, - main_abs_l2_rem_gas_hi, - main_abs_l2_rem_gas_lo, - main_alu_in_tag, - main_bin_op_id, - main_call_ptr, - main_da_gas_op_cost, - main_da_gas_remaining, - main_da_out_of_gas, - main_ia, - main_ib, - main_ic, - main_id, - main_id_zero, - main_ind_addr_a, - main_ind_addr_b, - main_ind_addr_c, - main_ind_addr_d, - main_internal_return_ptr, - main_inv, - main_l2_gas_op_cost, - main_l2_gas_remaining, - main_l2_out_of_gas, - main_mem_addr_a, - main_mem_addr_b, - main_mem_addr_c, - main_mem_addr_d, - main_op_err, - main_opcode_val, - main_pc, - main_r_in_tag, - main_rwa, - main_rwb, - main_rwc, - main_rwd, - main_sel_alu, - main_sel_bin, - main_sel_gas_accounting_active, - main_sel_last, - main_sel_mem_op_a, - main_sel_mem_op_activate_gas, - main_sel_mem_op_b, - main_sel_mem_op_c, - main_sel_mem_op_d, - main_sel_mov_ia_to_ic, - main_sel_mov_ib_to_ic, - main_sel_op_add, - main_sel_op_address, - main_sel_op_and, - main_sel_op_block_number, - main_sel_op_cast, - main_sel_op_chain_id, - main_sel_op_cmov, - main_sel_op_coinbase, - main_sel_op_dagasleft, - main_sel_op_div, - main_sel_op_emit_l2_to_l1_msg, - main_sel_op_emit_note_hash, - main_sel_op_emit_nullifier, - main_sel_op_emit_unencrypted_log, - main_sel_op_eq, - main_sel_op_external_call, - main_sel_op_fdiv, - main_sel_op_fee_per_da_gas, - main_sel_op_fee_per_l2_gas, - main_sel_op_function_selector, - main_sel_op_get_contract_instance, - main_sel_op_halt, - main_sel_op_internal_call, - main_sel_op_internal_return, - main_sel_op_jump, - main_sel_op_jumpi, - main_sel_op_keccak, - main_sel_op_l1_to_l2_msg_exists, - main_sel_op_l2gasleft, - main_sel_op_lt, - main_sel_op_lte, - main_sel_op_mov, - main_sel_op_mul, - main_sel_op_not, - main_sel_op_note_hash_exists, - main_sel_op_nullifier_exists, - main_sel_op_or, - main_sel_op_pedersen, - main_sel_op_poseidon2, - main_sel_op_radix_le, - main_sel_op_sender, - main_sel_op_sha256, - main_sel_op_shl, - main_sel_op_shr, - main_sel_op_sload, - main_sel_op_sstore, - main_sel_op_storage_address, - main_sel_op_sub, - main_sel_op_timestamp, - main_sel_op_transaction_fee, - main_sel_op_version, - main_sel_op_xor, - main_sel_q_kernel_lookup, - main_sel_q_kernel_output_lookup, - main_sel_resolve_ind_addr_a, - main_sel_resolve_ind_addr_b, - main_sel_resolve_ind_addr_c, - main_sel_resolve_ind_addr_d, - main_sel_rng_16, - main_sel_rng_8, - main_space_id, - main_tag_err, - main_w_in_tag, - mem_addr, - mem_clk, - mem_diff_hi, - mem_diff_lo, - mem_diff_mid, - mem_glob_addr, - mem_last, - mem_lastAccess, - mem_one_min_inv, - mem_r_in_tag, - mem_rw, - mem_sel_mem, - mem_sel_mov_ia_to_ic, - mem_sel_mov_ib_to_ic, - mem_sel_op_a, - mem_sel_op_b, - mem_sel_op_c, - mem_sel_op_cmov, - mem_sel_op_d, - mem_sel_resolve_ind_addr_a, - mem_sel_resolve_ind_addr_b, - mem_sel_resolve_ind_addr_c, - mem_sel_resolve_ind_addr_d, - mem_sel_rng_chk, - mem_skip_check_tag, - mem_space_id, - mem_tag, - mem_tag_err, - mem_tsp, - mem_val, - mem_w_in_tag, - pedersen_clk, - pedersen_input, - pedersen_output, - pedersen_sel_pedersen, - poseidon2_clk, - poseidon2_input, - poseidon2_output, - poseidon2_sel_poseidon_perm, - powers_power_of_2, - sha256_clk, - sha256_input, - sha256_output, - sha256_sel_sha256_compression, - sha256_state, - perm_main_alu, - perm_main_bin, - perm_main_conv, - perm_main_pos2_perm, - perm_main_pedersen, - perm_main_mem_a, - perm_main_mem_b, - perm_main_mem_c, - perm_main_mem_d, - perm_main_mem_ind_addr_a, - perm_main_mem_ind_addr_b, - perm_main_mem_ind_addr_c, - perm_main_mem_ind_addr_d, - lookup_byte_lengths, - lookup_byte_operations, - lookup_opcode_gas, - range_check_l2_gas_hi, - range_check_l2_gas_lo, - range_check_da_gas_hi, - range_check_da_gas_lo, - kernel_output_lookup, - lookup_into_kernel, - incl_main_tag_err, - incl_mem_tag_err, - lookup_mem_rng_chk_lo, - lookup_mem_rng_chk_mid, - lookup_mem_rng_chk_hi, - lookup_pow_2_0, - lookup_pow_2_1, - lookup_u8_0, - lookup_u8_1, - lookup_u16_0, - lookup_u16_1, - lookup_u16_2, - lookup_u16_3, - lookup_u16_4, - lookup_u16_5, - lookup_u16_6, - lookup_u16_7, - lookup_u16_8, - lookup_u16_9, - lookup_u16_10, - lookup_u16_11, - lookup_u16_12, - lookup_u16_13, - lookup_u16_14, - lookup_div_u16_0, - lookup_div_u16_1, - lookup_div_u16_2, - lookup_div_u16_3, - lookup_div_u16_4, - lookup_div_u16_5, - lookup_div_u16_6, - lookup_div_u16_7, - lookup_byte_lengths_counts, - lookup_byte_operations_counts, - lookup_opcode_gas_counts, - range_check_l2_gas_hi_counts, - range_check_l2_gas_lo_counts, - range_check_da_gas_hi_counts, - range_check_da_gas_lo_counts, - kernel_output_lookup_counts, - lookup_into_kernel_counts, - incl_main_tag_err_counts, - incl_mem_tag_err_counts, - lookup_mem_rng_chk_lo_counts, - lookup_mem_rng_chk_mid_counts, - lookup_mem_rng_chk_hi_counts, - lookup_pow_2_0_counts, - lookup_pow_2_1_counts, - lookup_u8_0_counts, - lookup_u8_1_counts, - lookup_u16_0_counts, - lookup_u16_1_counts, - lookup_u16_2_counts, - lookup_u16_3_counts, - lookup_u16_4_counts, - lookup_u16_5_counts, - lookup_u16_6_counts, - lookup_u16_7_counts, - lookup_u16_8_counts, - lookup_u16_9_counts, - lookup_u16_10_counts, - lookup_u16_11_counts, - lookup_u16_12_counts, - lookup_u16_13_counts, - lookup_u16_14_counts, - lookup_div_u16_0_counts, - lookup_div_u16_1_counts, - lookup_div_u16_2_counts, - lookup_div_u16_3_counts, - lookup_div_u16_4_counts, - lookup_div_u16_5_counts, - lookup_div_u16_6_counts, - lookup_div_u16_7_counts, - alu_a_hi_shift, - alu_a_lo_shift, - alu_b_hi_shift, - alu_b_lo_shift, - alu_cmp_rng_ctr_shift, - alu_div_u16_r0_shift, - alu_div_u16_r1_shift, - alu_div_u16_r2_shift, - alu_div_u16_r3_shift, - alu_div_u16_r4_shift, - alu_div_u16_r5_shift, - alu_div_u16_r6_shift, - alu_div_u16_r7_shift, - alu_op_add_shift, - alu_op_cast_prev_shift, - alu_op_cast_shift, - alu_op_div_shift, - alu_op_mul_shift, - alu_op_shl_shift, - alu_op_shr_shift, - alu_op_sub_shift, - alu_p_sub_a_hi_shift, - alu_p_sub_a_lo_shift, - alu_p_sub_b_hi_shift, - alu_p_sub_b_lo_shift, - alu_sel_alu_shift, - alu_sel_cmp_shift, - alu_sel_div_rng_chk_shift, - alu_sel_rng_chk_lookup_shift, - alu_sel_rng_chk_shift, - alu_u16_r0_shift, - alu_u16_r1_shift, - alu_u16_r2_shift, - alu_u16_r3_shift, - alu_u16_r4_shift, - alu_u16_r5_shift, - alu_u16_r6_shift, - alu_u8_r0_shift, - alu_u8_r1_shift, - binary_acc_ia_shift, - binary_acc_ib_shift, - binary_acc_ic_shift, - binary_mem_tag_ctr_shift, - binary_op_id_shift, - kernel_emit_l2_to_l1_msg_write_offset_shift, - kernel_emit_note_hash_write_offset_shift, - kernel_emit_nullifier_write_offset_shift, - kernel_emit_unencrypted_log_write_offset_shift, - kernel_l1_to_l2_msg_exists_write_offset_shift, - kernel_note_hash_exist_write_offset_shift, - kernel_nullifier_exists_write_offset_shift, - kernel_nullifier_non_exists_write_offset_shift, - kernel_side_effect_counter_shift, - kernel_sload_write_offset_shift, - kernel_sstore_write_offset_shift, - main_da_gas_remaining_shift, - main_internal_return_ptr_shift, - main_l2_gas_remaining_shift, - main_pc_shift, - mem_glob_addr_shift, - mem_rw_shift, - mem_sel_mem_shift, - mem_tag_shift, - mem_tsp_shift, - mem_val_shift }; - }; - RefVector get_unshifted() - { - return { main_clk, - main_sel_first, - kernel_kernel_inputs, - kernel_kernel_value_out, - kernel_kernel_side_effect_out, - kernel_kernel_metadata_out, - main_calldata, - alu_a_hi, - alu_a_lo, - alu_b_hi, - alu_b_lo, - alu_borrow, - alu_cf, - alu_clk, - alu_cmp_rng_ctr, - alu_div_u16_r0, - alu_div_u16_r1, - alu_div_u16_r2, - alu_div_u16_r3, - alu_div_u16_r4, - alu_div_u16_r5, - alu_div_u16_r6, - alu_div_u16_r7, - alu_divisor_hi, - alu_divisor_lo, - alu_ff_tag, - alu_ia, - alu_ib, - alu_ic, - alu_in_tag, - alu_op_add, - alu_op_cast, - alu_op_cast_prev, - alu_op_div, - alu_op_div_a_lt_b, - alu_op_div_std, - alu_op_eq, - alu_op_eq_diff_inv, - alu_op_lt, - alu_op_lte, - alu_op_mul, - alu_op_not, - alu_op_shl, - alu_op_shr, - alu_op_sub, - alu_p_a_borrow, - alu_p_b_borrow, - alu_p_sub_a_hi, - alu_p_sub_a_lo, - alu_p_sub_b_hi, - alu_p_sub_b_lo, - alu_partial_prod_hi, - alu_partial_prod_lo, - alu_quotient_hi, - alu_quotient_lo, - alu_remainder, - alu_res_hi, - alu_res_lo, - alu_sel_alu, - alu_sel_cmp, - alu_sel_div_rng_chk, - alu_sel_rng_chk, - alu_sel_rng_chk_lookup, - alu_sel_shift_which, - alu_shift_lt_bit_len, - alu_t_sub_s_bits, - alu_two_pow_s, - alu_two_pow_t_sub_s, - alu_u128_tag, - alu_u16_r0, - alu_u16_r1, - alu_u16_r10, - alu_u16_r11, - alu_u16_r12, - alu_u16_r13, - alu_u16_r14, - alu_u16_r2, - alu_u16_r3, - alu_u16_r4, - alu_u16_r5, - alu_u16_r6, - alu_u16_r7, - alu_u16_r8, - alu_u16_r9, - alu_u16_tag, - alu_u32_tag, - alu_u64_tag, - alu_u8_r0, - alu_u8_r1, - alu_u8_tag, - binary_acc_ia, - binary_acc_ib, - binary_acc_ic, - binary_clk, - binary_ia_bytes, - binary_ib_bytes, - binary_ic_bytes, - binary_in_tag, - binary_mem_tag_ctr, - binary_mem_tag_ctr_inv, - binary_op_id, - binary_sel_bin, - binary_start, - byte_lookup_sel_bin, - byte_lookup_table_byte_lengths, - byte_lookup_table_in_tags, - byte_lookup_table_input_a, - byte_lookup_table_input_b, - byte_lookup_table_op_id, - byte_lookup_table_output, - conversion_clk, - conversion_input, - conversion_num_limbs, - conversion_radix, - conversion_sel_to_radix_le, - gas_da_gas_fixed_table, - gas_l2_gas_fixed_table, - gas_sel_gas_cost, - keccakf1600_clk, - keccakf1600_input, - keccakf1600_output, - keccakf1600_sel_keccakf1600, - kernel_emit_l2_to_l1_msg_write_offset, - kernel_emit_note_hash_write_offset, - kernel_emit_nullifier_write_offset, - kernel_emit_unencrypted_log_write_offset, - kernel_kernel_in_offset, - kernel_kernel_out_offset, - kernel_l1_to_l2_msg_exists_write_offset, - kernel_note_hash_exist_write_offset, - kernel_nullifier_exists_write_offset, - kernel_nullifier_non_exists_write_offset, - kernel_q_public_input_kernel_add_to_table, - kernel_q_public_input_kernel_out_add_to_table, - kernel_side_effect_counter, - kernel_sload_write_offset, - kernel_sstore_write_offset, - main_abs_da_rem_gas_hi, - main_abs_da_rem_gas_lo, - main_abs_l2_rem_gas_hi, - main_abs_l2_rem_gas_lo, - main_alu_in_tag, - main_bin_op_id, - main_call_ptr, - main_da_gas_op_cost, - main_da_gas_remaining, - main_da_out_of_gas, - main_ia, - main_ib, - main_ic, - main_id, - main_id_zero, - main_ind_addr_a, - main_ind_addr_b, - main_ind_addr_c, - main_ind_addr_d, - main_internal_return_ptr, - main_inv, - main_l2_gas_op_cost, - main_l2_gas_remaining, - main_l2_out_of_gas, - main_mem_addr_a, - main_mem_addr_b, - main_mem_addr_c, - main_mem_addr_d, - main_op_err, - main_opcode_val, - main_pc, - main_r_in_tag, - main_rwa, - main_rwb, - main_rwc, - main_rwd, - main_sel_alu, - main_sel_bin, - main_sel_gas_accounting_active, - main_sel_last, - main_sel_mem_op_a, - main_sel_mem_op_activate_gas, - main_sel_mem_op_b, - main_sel_mem_op_c, - main_sel_mem_op_d, - main_sel_mov_ia_to_ic, - main_sel_mov_ib_to_ic, - main_sel_op_add, - main_sel_op_address, - main_sel_op_and, - main_sel_op_block_number, - main_sel_op_cast, - main_sel_op_chain_id, - main_sel_op_cmov, - main_sel_op_coinbase, - main_sel_op_dagasleft, - main_sel_op_div, - main_sel_op_emit_l2_to_l1_msg, - main_sel_op_emit_note_hash, - main_sel_op_emit_nullifier, - main_sel_op_emit_unencrypted_log, - main_sel_op_eq, - main_sel_op_external_call, - main_sel_op_fdiv, - main_sel_op_fee_per_da_gas, - main_sel_op_fee_per_l2_gas, - main_sel_op_function_selector, - main_sel_op_get_contract_instance, - main_sel_op_halt, - main_sel_op_internal_call, - main_sel_op_internal_return, - main_sel_op_jump, - main_sel_op_jumpi, - main_sel_op_keccak, - main_sel_op_l1_to_l2_msg_exists, - main_sel_op_l2gasleft, - main_sel_op_lt, - main_sel_op_lte, - main_sel_op_mov, - main_sel_op_mul, - main_sel_op_not, - main_sel_op_note_hash_exists, - main_sel_op_nullifier_exists, - main_sel_op_or, - main_sel_op_pedersen, - main_sel_op_poseidon2, - main_sel_op_radix_le, - main_sel_op_sender, - main_sel_op_sha256, - main_sel_op_shl, - main_sel_op_shr, - main_sel_op_sload, - main_sel_op_sstore, - main_sel_op_storage_address, - main_sel_op_sub, - main_sel_op_timestamp, - main_sel_op_transaction_fee, - main_sel_op_version, - main_sel_op_xor, - main_sel_q_kernel_lookup, - main_sel_q_kernel_output_lookup, - main_sel_resolve_ind_addr_a, - main_sel_resolve_ind_addr_b, - main_sel_resolve_ind_addr_c, - main_sel_resolve_ind_addr_d, - main_sel_rng_16, - main_sel_rng_8, - main_space_id, - main_tag_err, - main_w_in_tag, - mem_addr, - mem_clk, - mem_diff_hi, - mem_diff_lo, - mem_diff_mid, - mem_glob_addr, - mem_last, - mem_lastAccess, - mem_one_min_inv, - mem_r_in_tag, - mem_rw, - mem_sel_mem, - mem_sel_mov_ia_to_ic, - mem_sel_mov_ib_to_ic, - mem_sel_op_a, - mem_sel_op_b, - mem_sel_op_c, - mem_sel_op_cmov, - mem_sel_op_d, - mem_sel_resolve_ind_addr_a, - mem_sel_resolve_ind_addr_b, - mem_sel_resolve_ind_addr_c, - mem_sel_resolve_ind_addr_d, - mem_sel_rng_chk, - mem_skip_check_tag, - mem_space_id, - mem_tag, - mem_tag_err, - mem_tsp, - mem_val, - mem_w_in_tag, - pedersen_clk, - pedersen_input, - pedersen_output, - pedersen_sel_pedersen, - poseidon2_clk, - poseidon2_input, - poseidon2_output, - poseidon2_sel_poseidon_perm, - powers_power_of_2, - sha256_clk, - sha256_input, - sha256_output, - sha256_sel_sha256_compression, - sha256_state, - perm_main_alu, - perm_main_bin, - perm_main_conv, - perm_main_pos2_perm, - perm_main_pedersen, - perm_main_mem_a, - perm_main_mem_b, - perm_main_mem_c, - perm_main_mem_d, - perm_main_mem_ind_addr_a, - perm_main_mem_ind_addr_b, - perm_main_mem_ind_addr_c, - perm_main_mem_ind_addr_d, - lookup_byte_lengths, - lookup_byte_operations, - lookup_opcode_gas, - range_check_l2_gas_hi, - range_check_l2_gas_lo, - range_check_da_gas_hi, - range_check_da_gas_lo, - kernel_output_lookup, - lookup_into_kernel, - incl_main_tag_err, - incl_mem_tag_err, - lookup_mem_rng_chk_lo, - lookup_mem_rng_chk_mid, - lookup_mem_rng_chk_hi, - lookup_pow_2_0, - lookup_pow_2_1, - lookup_u8_0, - lookup_u8_1, - lookup_u16_0, - lookup_u16_1, - lookup_u16_2, - lookup_u16_3, - lookup_u16_4, - lookup_u16_5, - lookup_u16_6, - lookup_u16_7, - lookup_u16_8, - lookup_u16_9, - lookup_u16_10, - lookup_u16_11, - lookup_u16_12, - lookup_u16_13, - lookup_u16_14, - lookup_div_u16_0, - lookup_div_u16_1, - lookup_div_u16_2, - lookup_div_u16_3, - lookup_div_u16_4, - lookup_div_u16_5, - lookup_div_u16_6, - lookup_div_u16_7, - lookup_byte_lengths_counts, - lookup_byte_operations_counts, - lookup_opcode_gas_counts, - range_check_l2_gas_hi_counts, - range_check_l2_gas_lo_counts, - range_check_da_gas_hi_counts, - range_check_da_gas_lo_counts, - kernel_output_lookup_counts, - lookup_into_kernel_counts, - incl_main_tag_err_counts, - incl_mem_tag_err_counts, - lookup_mem_rng_chk_lo_counts, - lookup_mem_rng_chk_mid_counts, - lookup_mem_rng_chk_hi_counts, - lookup_pow_2_0_counts, - lookup_pow_2_1_counts, - lookup_u8_0_counts, - lookup_u8_1_counts, - lookup_u16_0_counts, - lookup_u16_1_counts, - lookup_u16_2_counts, - lookup_u16_3_counts, - lookup_u16_4_counts, - lookup_u16_5_counts, - lookup_u16_6_counts, - lookup_u16_7_counts, - lookup_u16_8_counts, - lookup_u16_9_counts, - lookup_u16_10_counts, - lookup_u16_11_counts, - lookup_u16_12_counts, - lookup_u16_13_counts, - lookup_u16_14_counts, - lookup_div_u16_0_counts, - lookup_div_u16_1_counts, - lookup_div_u16_2_counts, - lookup_div_u16_3_counts, - lookup_div_u16_4_counts, - lookup_div_u16_5_counts, - lookup_div_u16_6_counts, - lookup_div_u16_7_counts }; - }; - RefVector get_to_be_shifted() - { - return { alu_a_hi, - alu_a_lo, - alu_b_hi, - alu_b_lo, - alu_cmp_rng_ctr, - alu_div_u16_r0, - alu_div_u16_r1, - alu_div_u16_r2, - alu_div_u16_r3, - alu_div_u16_r4, - alu_div_u16_r5, - alu_div_u16_r6, - alu_div_u16_r7, - alu_op_add, - alu_op_cast_prev, - alu_op_cast, - alu_op_div, - alu_op_mul, - alu_op_shl, - alu_op_shr, - alu_op_sub, - alu_p_sub_a_hi, - alu_p_sub_a_lo, - alu_p_sub_b_hi, - alu_p_sub_b_lo, - alu_sel_alu, - alu_sel_cmp, - alu_sel_div_rng_chk, - alu_sel_rng_chk_lookup, - alu_sel_rng_chk, - alu_u16_r0, - alu_u16_r1, - alu_u16_r2, - alu_u16_r3, - alu_u16_r4, - alu_u16_r5, - alu_u16_r6, - alu_u8_r0, - alu_u8_r1, - binary_acc_ia, - binary_acc_ib, - binary_acc_ic, - binary_mem_tag_ctr, - binary_op_id, - kernel_emit_l2_to_l1_msg_write_offset, - kernel_emit_note_hash_write_offset, - kernel_emit_nullifier_write_offset, - kernel_emit_unencrypted_log_write_offset, - kernel_l1_to_l2_msg_exists_write_offset, - kernel_note_hash_exist_write_offset, - kernel_nullifier_exists_write_offset, - kernel_nullifier_non_exists_write_offset, - kernel_side_effect_counter, - kernel_sload_write_offset, - kernel_sstore_write_offset, - main_da_gas_remaining, - main_internal_return_ptr, - main_l2_gas_remaining, - main_pc, - mem_glob_addr, - mem_rw, - mem_sel_mem, - mem_tag, - mem_tsp, - mem_val }; - }; - RefVector get_shifted() + template + static auto get_to_be_shifted(PrecomputedAndWitnessEntitiesSuperset& entities) + { + return RefArray{ entities.alu_a_hi, + entities.alu_a_lo, + entities.alu_b_hi, + entities.alu_b_lo, + entities.alu_cmp_rng_ctr, + entities.alu_div_u16_r0, + entities.alu_div_u16_r1, + entities.alu_div_u16_r2, + entities.alu_div_u16_r3, + entities.alu_div_u16_r4, + entities.alu_div_u16_r5, + entities.alu_div_u16_r6, + entities.alu_div_u16_r7, + entities.alu_op_add, + entities.alu_op_cast_prev, + entities.alu_op_cast, + entities.alu_op_div, + entities.alu_op_mul, + entities.alu_op_shl, + entities.alu_op_shr, + entities.alu_op_sub, + entities.alu_p_sub_a_hi, + entities.alu_p_sub_a_lo, + entities.alu_p_sub_b_hi, + entities.alu_p_sub_b_lo, + entities.alu_sel_alu, + entities.alu_sel_cmp, + entities.alu_sel_div_rng_chk, + entities.alu_sel_rng_chk_lookup, + entities.alu_sel_rng_chk, + entities.alu_u16_r0, + entities.alu_u16_r1, + entities.alu_u16_r2, + entities.alu_u16_r3, + entities.alu_u16_r4, + entities.alu_u16_r5, + entities.alu_u16_r6, + entities.alu_u8_r0, + entities.alu_u8_r1, + entities.binary_acc_ia, + entities.binary_acc_ib, + entities.binary_acc_ic, + entities.binary_mem_tag_ctr, + entities.binary_op_id, + entities.kernel_emit_l2_to_l1_msg_write_offset, + entities.kernel_emit_note_hash_write_offset, + entities.kernel_emit_nullifier_write_offset, + entities.kernel_emit_unencrypted_log_write_offset, + entities.kernel_l1_to_l2_msg_exists_write_offset, + entities.kernel_note_hash_exist_write_offset, + entities.kernel_nullifier_exists_write_offset, + entities.kernel_nullifier_non_exists_write_offset, + entities.kernel_side_effect_counter, + entities.kernel_sload_write_offset, + entities.kernel_sstore_write_offset, + entities.main_da_gas_remaining, + entities.main_internal_return_ptr, + entities.main_l2_gas_remaining, + entities.main_pc, + entities.mem_glob_addr, + entities.mem_rw, + entities.mem_sel_mem, + entities.mem_tag, + entities.mem_tsp, + entities.mem_val }; + } + + template + class AllEntities : public PrecomputedEntities, + public WitnessEntities, + public ShiftedEntities { + public: + // Init + AllEntities() + : PrecomputedEntities{} + , WitnessEntities{} + , ShiftedEntities{} + {} + + DEFINE_COMPOUND_GET_ALL(PrecomputedEntities, WitnessEntities, ShiftedEntities) + + auto get_unshifted() { - return { alu_a_hi_shift, - alu_a_lo_shift, - alu_b_hi_shift, - alu_b_lo_shift, - alu_cmp_rng_ctr_shift, - alu_div_u16_r0_shift, - alu_div_u16_r1_shift, - alu_div_u16_r2_shift, - alu_div_u16_r3_shift, - alu_div_u16_r4_shift, - alu_div_u16_r5_shift, - alu_div_u16_r6_shift, - alu_div_u16_r7_shift, - alu_op_add_shift, - alu_op_cast_prev_shift, - alu_op_cast_shift, - alu_op_div_shift, - alu_op_mul_shift, - alu_op_shl_shift, - alu_op_shr_shift, - alu_op_sub_shift, - alu_p_sub_a_hi_shift, - alu_p_sub_a_lo_shift, - alu_p_sub_b_hi_shift, - alu_p_sub_b_lo_shift, - alu_sel_alu_shift, - alu_sel_cmp_shift, - alu_sel_div_rng_chk_shift, - alu_sel_rng_chk_lookup_shift, - alu_sel_rng_chk_shift, - alu_u16_r0_shift, - alu_u16_r1_shift, - alu_u16_r2_shift, - alu_u16_r3_shift, - alu_u16_r4_shift, - alu_u16_r5_shift, - alu_u16_r6_shift, - alu_u8_r0_shift, - alu_u8_r1_shift, - binary_acc_ia_shift, - binary_acc_ib_shift, - binary_acc_ic_shift, - binary_mem_tag_ctr_shift, - binary_op_id_shift, - kernel_emit_l2_to_l1_msg_write_offset_shift, - kernel_emit_note_hash_write_offset_shift, - kernel_emit_nullifier_write_offset_shift, - kernel_emit_unencrypted_log_write_offset_shift, - kernel_l1_to_l2_msg_exists_write_offset_shift, - kernel_note_hash_exist_write_offset_shift, - kernel_nullifier_exists_write_offset_shift, - kernel_nullifier_non_exists_write_offset_shift, - kernel_side_effect_counter_shift, - kernel_sload_write_offset_shift, - kernel_sstore_write_offset_shift, - main_da_gas_remaining_shift, - main_internal_return_ptr_shift, - main_l2_gas_remaining_shift, - main_pc_shift, - mem_glob_addr_shift, - mem_rw_shift, - mem_sel_mem_shift, - mem_tag_shift, - mem_tsp_shift, - mem_val_shift }; - }; + return concatenate(PrecomputedEntities::get_all(), WitnessEntities::get_all()); + } + + auto get_to_be_shifted() { return AvmFlavor::get_to_be_shifted(*this); } + auto get_shifted() { return ShiftedEntities::get_all(); } + auto get_precomputed() { return PrecomputedEntities::get_all(); } }; public: diff --git a/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.cpp b/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.cpp index 93ff4ac5989..88fe4755fa3 100644 --- a/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.cpp @@ -55,765 +55,13 @@ void AvmProver::execute_preamble_round() */ void AvmProver::execute_wire_commitments_round() { - // Commit to all polynomials (apart from logderivative inverse polynomials, which are committed to in the later // logderivative phase) - witness_commitments.kernel_kernel_inputs = commitment_key->commit(key->kernel_kernel_inputs); - witness_commitments.kernel_kernel_value_out = commitment_key->commit(key->kernel_kernel_value_out); - witness_commitments.kernel_kernel_side_effect_out = commitment_key->commit(key->kernel_kernel_side_effect_out); - witness_commitments.kernel_kernel_metadata_out = commitment_key->commit(key->kernel_kernel_metadata_out); - witness_commitments.main_calldata = commitment_key->commit(key->main_calldata); - witness_commitments.alu_a_hi = commitment_key->commit(key->alu_a_hi); - witness_commitments.alu_a_lo = commitment_key->commit(key->alu_a_lo); - witness_commitments.alu_b_hi = commitment_key->commit(key->alu_b_hi); - witness_commitments.alu_b_lo = commitment_key->commit(key->alu_b_lo); - witness_commitments.alu_borrow = commitment_key->commit(key->alu_borrow); - witness_commitments.alu_cf = commitment_key->commit(key->alu_cf); - witness_commitments.alu_clk = commitment_key->commit(key->alu_clk); - witness_commitments.alu_cmp_rng_ctr = commitment_key->commit(key->alu_cmp_rng_ctr); - witness_commitments.alu_div_u16_r0 = commitment_key->commit(key->alu_div_u16_r0); - witness_commitments.alu_div_u16_r1 = commitment_key->commit(key->alu_div_u16_r1); - witness_commitments.alu_div_u16_r2 = commitment_key->commit(key->alu_div_u16_r2); - witness_commitments.alu_div_u16_r3 = commitment_key->commit(key->alu_div_u16_r3); - witness_commitments.alu_div_u16_r4 = commitment_key->commit(key->alu_div_u16_r4); - witness_commitments.alu_div_u16_r5 = commitment_key->commit(key->alu_div_u16_r5); - witness_commitments.alu_div_u16_r6 = commitment_key->commit(key->alu_div_u16_r6); - witness_commitments.alu_div_u16_r7 = commitment_key->commit(key->alu_div_u16_r7); - witness_commitments.alu_divisor_hi = commitment_key->commit(key->alu_divisor_hi); - witness_commitments.alu_divisor_lo = commitment_key->commit(key->alu_divisor_lo); - witness_commitments.alu_ff_tag = commitment_key->commit(key->alu_ff_tag); - witness_commitments.alu_ia = commitment_key->commit(key->alu_ia); - witness_commitments.alu_ib = commitment_key->commit(key->alu_ib); - witness_commitments.alu_ic = commitment_key->commit(key->alu_ic); - witness_commitments.alu_in_tag = commitment_key->commit(key->alu_in_tag); - witness_commitments.alu_op_add = commitment_key->commit(key->alu_op_add); - witness_commitments.alu_op_cast = commitment_key->commit(key->alu_op_cast); - witness_commitments.alu_op_cast_prev = commitment_key->commit(key->alu_op_cast_prev); - witness_commitments.alu_op_div = commitment_key->commit(key->alu_op_div); - witness_commitments.alu_op_div_a_lt_b = commitment_key->commit(key->alu_op_div_a_lt_b); - witness_commitments.alu_op_div_std = commitment_key->commit(key->alu_op_div_std); - witness_commitments.alu_op_eq = commitment_key->commit(key->alu_op_eq); - witness_commitments.alu_op_eq_diff_inv = commitment_key->commit(key->alu_op_eq_diff_inv); - witness_commitments.alu_op_lt = commitment_key->commit(key->alu_op_lt); - witness_commitments.alu_op_lte = commitment_key->commit(key->alu_op_lte); - witness_commitments.alu_op_mul = commitment_key->commit(key->alu_op_mul); - witness_commitments.alu_op_not = commitment_key->commit(key->alu_op_not); - witness_commitments.alu_op_shl = commitment_key->commit(key->alu_op_shl); - witness_commitments.alu_op_shr = commitment_key->commit(key->alu_op_shr); - witness_commitments.alu_op_sub = commitment_key->commit(key->alu_op_sub); - witness_commitments.alu_p_a_borrow = commitment_key->commit(key->alu_p_a_borrow); - witness_commitments.alu_p_b_borrow = commitment_key->commit(key->alu_p_b_borrow); - witness_commitments.alu_p_sub_a_hi = commitment_key->commit(key->alu_p_sub_a_hi); - witness_commitments.alu_p_sub_a_lo = commitment_key->commit(key->alu_p_sub_a_lo); - witness_commitments.alu_p_sub_b_hi = commitment_key->commit(key->alu_p_sub_b_hi); - witness_commitments.alu_p_sub_b_lo = commitment_key->commit(key->alu_p_sub_b_lo); - witness_commitments.alu_partial_prod_hi = commitment_key->commit(key->alu_partial_prod_hi); - witness_commitments.alu_partial_prod_lo = commitment_key->commit(key->alu_partial_prod_lo); - witness_commitments.alu_quotient_hi = commitment_key->commit(key->alu_quotient_hi); - witness_commitments.alu_quotient_lo = commitment_key->commit(key->alu_quotient_lo); - witness_commitments.alu_remainder = commitment_key->commit(key->alu_remainder); - witness_commitments.alu_res_hi = commitment_key->commit(key->alu_res_hi); - witness_commitments.alu_res_lo = commitment_key->commit(key->alu_res_lo); - witness_commitments.alu_sel_alu = commitment_key->commit(key->alu_sel_alu); - witness_commitments.alu_sel_cmp = commitment_key->commit(key->alu_sel_cmp); - witness_commitments.alu_sel_div_rng_chk = commitment_key->commit(key->alu_sel_div_rng_chk); - witness_commitments.alu_sel_rng_chk = commitment_key->commit(key->alu_sel_rng_chk); - witness_commitments.alu_sel_rng_chk_lookup = commitment_key->commit(key->alu_sel_rng_chk_lookup); - witness_commitments.alu_sel_shift_which = commitment_key->commit(key->alu_sel_shift_which); - witness_commitments.alu_shift_lt_bit_len = commitment_key->commit(key->alu_shift_lt_bit_len); - witness_commitments.alu_t_sub_s_bits = commitment_key->commit(key->alu_t_sub_s_bits); - witness_commitments.alu_two_pow_s = commitment_key->commit(key->alu_two_pow_s); - witness_commitments.alu_two_pow_t_sub_s = commitment_key->commit(key->alu_two_pow_t_sub_s); - witness_commitments.alu_u128_tag = commitment_key->commit(key->alu_u128_tag); - witness_commitments.alu_u16_r0 = commitment_key->commit(key->alu_u16_r0); - witness_commitments.alu_u16_r1 = commitment_key->commit(key->alu_u16_r1); - witness_commitments.alu_u16_r10 = commitment_key->commit(key->alu_u16_r10); - witness_commitments.alu_u16_r11 = commitment_key->commit(key->alu_u16_r11); - witness_commitments.alu_u16_r12 = commitment_key->commit(key->alu_u16_r12); - witness_commitments.alu_u16_r13 = commitment_key->commit(key->alu_u16_r13); - witness_commitments.alu_u16_r14 = commitment_key->commit(key->alu_u16_r14); - witness_commitments.alu_u16_r2 = commitment_key->commit(key->alu_u16_r2); - witness_commitments.alu_u16_r3 = commitment_key->commit(key->alu_u16_r3); - witness_commitments.alu_u16_r4 = commitment_key->commit(key->alu_u16_r4); - witness_commitments.alu_u16_r5 = commitment_key->commit(key->alu_u16_r5); - witness_commitments.alu_u16_r6 = commitment_key->commit(key->alu_u16_r6); - witness_commitments.alu_u16_r7 = commitment_key->commit(key->alu_u16_r7); - witness_commitments.alu_u16_r8 = commitment_key->commit(key->alu_u16_r8); - witness_commitments.alu_u16_r9 = commitment_key->commit(key->alu_u16_r9); - witness_commitments.alu_u16_tag = commitment_key->commit(key->alu_u16_tag); - witness_commitments.alu_u32_tag = commitment_key->commit(key->alu_u32_tag); - witness_commitments.alu_u64_tag = commitment_key->commit(key->alu_u64_tag); - witness_commitments.alu_u8_r0 = commitment_key->commit(key->alu_u8_r0); - witness_commitments.alu_u8_r1 = commitment_key->commit(key->alu_u8_r1); - witness_commitments.alu_u8_tag = commitment_key->commit(key->alu_u8_tag); - witness_commitments.binary_acc_ia = commitment_key->commit(key->binary_acc_ia); - witness_commitments.binary_acc_ib = commitment_key->commit(key->binary_acc_ib); - witness_commitments.binary_acc_ic = commitment_key->commit(key->binary_acc_ic); - witness_commitments.binary_clk = commitment_key->commit(key->binary_clk); - witness_commitments.binary_ia_bytes = commitment_key->commit(key->binary_ia_bytes); - witness_commitments.binary_ib_bytes = commitment_key->commit(key->binary_ib_bytes); - witness_commitments.binary_ic_bytes = commitment_key->commit(key->binary_ic_bytes); - witness_commitments.binary_in_tag = commitment_key->commit(key->binary_in_tag); - witness_commitments.binary_mem_tag_ctr = commitment_key->commit(key->binary_mem_tag_ctr); - witness_commitments.binary_mem_tag_ctr_inv = commitment_key->commit(key->binary_mem_tag_ctr_inv); - witness_commitments.binary_op_id = commitment_key->commit(key->binary_op_id); - witness_commitments.binary_sel_bin = commitment_key->commit(key->binary_sel_bin); - witness_commitments.binary_start = commitment_key->commit(key->binary_start); - witness_commitments.byte_lookup_sel_bin = commitment_key->commit(key->byte_lookup_sel_bin); - witness_commitments.byte_lookup_table_byte_lengths = commitment_key->commit(key->byte_lookup_table_byte_lengths); - witness_commitments.byte_lookup_table_in_tags = commitment_key->commit(key->byte_lookup_table_in_tags); - witness_commitments.byte_lookup_table_input_a = commitment_key->commit(key->byte_lookup_table_input_a); - witness_commitments.byte_lookup_table_input_b = commitment_key->commit(key->byte_lookup_table_input_b); - witness_commitments.byte_lookup_table_op_id = commitment_key->commit(key->byte_lookup_table_op_id); - witness_commitments.byte_lookup_table_output = commitment_key->commit(key->byte_lookup_table_output); - witness_commitments.conversion_clk = commitment_key->commit(key->conversion_clk); - witness_commitments.conversion_input = commitment_key->commit(key->conversion_input); - witness_commitments.conversion_num_limbs = commitment_key->commit(key->conversion_num_limbs); - witness_commitments.conversion_radix = commitment_key->commit(key->conversion_radix); - witness_commitments.conversion_sel_to_radix_le = commitment_key->commit(key->conversion_sel_to_radix_le); - witness_commitments.gas_da_gas_fixed_table = commitment_key->commit(key->gas_da_gas_fixed_table); - witness_commitments.gas_l2_gas_fixed_table = commitment_key->commit(key->gas_l2_gas_fixed_table); - witness_commitments.gas_sel_gas_cost = commitment_key->commit(key->gas_sel_gas_cost); - witness_commitments.keccakf1600_clk = commitment_key->commit(key->keccakf1600_clk); - witness_commitments.keccakf1600_input = commitment_key->commit(key->keccakf1600_input); - witness_commitments.keccakf1600_output = commitment_key->commit(key->keccakf1600_output); - witness_commitments.keccakf1600_sel_keccakf1600 = commitment_key->commit(key->keccakf1600_sel_keccakf1600); - witness_commitments.kernel_emit_l2_to_l1_msg_write_offset = - commitment_key->commit(key->kernel_emit_l2_to_l1_msg_write_offset); - witness_commitments.kernel_emit_note_hash_write_offset = - commitment_key->commit(key->kernel_emit_note_hash_write_offset); - witness_commitments.kernel_emit_nullifier_write_offset = - commitment_key->commit(key->kernel_emit_nullifier_write_offset); - witness_commitments.kernel_emit_unencrypted_log_write_offset = - commitment_key->commit(key->kernel_emit_unencrypted_log_write_offset); - witness_commitments.kernel_kernel_in_offset = commitment_key->commit(key->kernel_kernel_in_offset); - witness_commitments.kernel_kernel_out_offset = commitment_key->commit(key->kernel_kernel_out_offset); - witness_commitments.kernel_l1_to_l2_msg_exists_write_offset = - commitment_key->commit(key->kernel_l1_to_l2_msg_exists_write_offset); - witness_commitments.kernel_note_hash_exist_write_offset = - commitment_key->commit(key->kernel_note_hash_exist_write_offset); - witness_commitments.kernel_nullifier_exists_write_offset = - commitment_key->commit(key->kernel_nullifier_exists_write_offset); - witness_commitments.kernel_nullifier_non_exists_write_offset = - commitment_key->commit(key->kernel_nullifier_non_exists_write_offset); - witness_commitments.kernel_q_public_input_kernel_add_to_table = - commitment_key->commit(key->kernel_q_public_input_kernel_add_to_table); - witness_commitments.kernel_q_public_input_kernel_out_add_to_table = - commitment_key->commit(key->kernel_q_public_input_kernel_out_add_to_table); - witness_commitments.kernel_side_effect_counter = commitment_key->commit(key->kernel_side_effect_counter); - witness_commitments.kernel_sload_write_offset = commitment_key->commit(key->kernel_sload_write_offset); - witness_commitments.kernel_sstore_write_offset = commitment_key->commit(key->kernel_sstore_write_offset); - witness_commitments.main_abs_da_rem_gas_hi = commitment_key->commit(key->main_abs_da_rem_gas_hi); - witness_commitments.main_abs_da_rem_gas_lo = commitment_key->commit(key->main_abs_da_rem_gas_lo); - witness_commitments.main_abs_l2_rem_gas_hi = commitment_key->commit(key->main_abs_l2_rem_gas_hi); - witness_commitments.main_abs_l2_rem_gas_lo = commitment_key->commit(key->main_abs_l2_rem_gas_lo); - witness_commitments.main_alu_in_tag = commitment_key->commit(key->main_alu_in_tag); - witness_commitments.main_bin_op_id = commitment_key->commit(key->main_bin_op_id); - witness_commitments.main_call_ptr = commitment_key->commit(key->main_call_ptr); - witness_commitments.main_da_gas_op_cost = commitment_key->commit(key->main_da_gas_op_cost); - witness_commitments.main_da_gas_remaining = commitment_key->commit(key->main_da_gas_remaining); - witness_commitments.main_da_out_of_gas = commitment_key->commit(key->main_da_out_of_gas); - witness_commitments.main_ia = commitment_key->commit(key->main_ia); - witness_commitments.main_ib = commitment_key->commit(key->main_ib); - witness_commitments.main_ic = commitment_key->commit(key->main_ic); - witness_commitments.main_id = commitment_key->commit(key->main_id); - witness_commitments.main_id_zero = commitment_key->commit(key->main_id_zero); - witness_commitments.main_ind_addr_a = commitment_key->commit(key->main_ind_addr_a); - witness_commitments.main_ind_addr_b = commitment_key->commit(key->main_ind_addr_b); - witness_commitments.main_ind_addr_c = commitment_key->commit(key->main_ind_addr_c); - witness_commitments.main_ind_addr_d = commitment_key->commit(key->main_ind_addr_d); - witness_commitments.main_internal_return_ptr = commitment_key->commit(key->main_internal_return_ptr); - witness_commitments.main_inv = commitment_key->commit(key->main_inv); - witness_commitments.main_l2_gas_op_cost = commitment_key->commit(key->main_l2_gas_op_cost); - witness_commitments.main_l2_gas_remaining = commitment_key->commit(key->main_l2_gas_remaining); - witness_commitments.main_l2_out_of_gas = commitment_key->commit(key->main_l2_out_of_gas); - witness_commitments.main_mem_addr_a = commitment_key->commit(key->main_mem_addr_a); - witness_commitments.main_mem_addr_b = commitment_key->commit(key->main_mem_addr_b); - witness_commitments.main_mem_addr_c = commitment_key->commit(key->main_mem_addr_c); - witness_commitments.main_mem_addr_d = commitment_key->commit(key->main_mem_addr_d); - witness_commitments.main_op_err = commitment_key->commit(key->main_op_err); - witness_commitments.main_opcode_val = commitment_key->commit(key->main_opcode_val); - witness_commitments.main_pc = commitment_key->commit(key->main_pc); - witness_commitments.main_r_in_tag = commitment_key->commit(key->main_r_in_tag); - witness_commitments.main_rwa = commitment_key->commit(key->main_rwa); - witness_commitments.main_rwb = commitment_key->commit(key->main_rwb); - witness_commitments.main_rwc = commitment_key->commit(key->main_rwc); - witness_commitments.main_rwd = commitment_key->commit(key->main_rwd); - witness_commitments.main_sel_alu = commitment_key->commit(key->main_sel_alu); - witness_commitments.main_sel_bin = commitment_key->commit(key->main_sel_bin); - witness_commitments.main_sel_gas_accounting_active = commitment_key->commit(key->main_sel_gas_accounting_active); - witness_commitments.main_sel_last = commitment_key->commit(key->main_sel_last); - witness_commitments.main_sel_mem_op_a = commitment_key->commit(key->main_sel_mem_op_a); - witness_commitments.main_sel_mem_op_activate_gas = commitment_key->commit(key->main_sel_mem_op_activate_gas); - witness_commitments.main_sel_mem_op_b = commitment_key->commit(key->main_sel_mem_op_b); - witness_commitments.main_sel_mem_op_c = commitment_key->commit(key->main_sel_mem_op_c); - witness_commitments.main_sel_mem_op_d = commitment_key->commit(key->main_sel_mem_op_d); - witness_commitments.main_sel_mov_ia_to_ic = commitment_key->commit(key->main_sel_mov_ia_to_ic); - witness_commitments.main_sel_mov_ib_to_ic = commitment_key->commit(key->main_sel_mov_ib_to_ic); - witness_commitments.main_sel_op_add = commitment_key->commit(key->main_sel_op_add); - witness_commitments.main_sel_op_address = commitment_key->commit(key->main_sel_op_address); - witness_commitments.main_sel_op_and = commitment_key->commit(key->main_sel_op_and); - witness_commitments.main_sel_op_block_number = commitment_key->commit(key->main_sel_op_block_number); - witness_commitments.main_sel_op_cast = commitment_key->commit(key->main_sel_op_cast); - witness_commitments.main_sel_op_chain_id = commitment_key->commit(key->main_sel_op_chain_id); - witness_commitments.main_sel_op_cmov = commitment_key->commit(key->main_sel_op_cmov); - witness_commitments.main_sel_op_coinbase = commitment_key->commit(key->main_sel_op_coinbase); - witness_commitments.main_sel_op_dagasleft = commitment_key->commit(key->main_sel_op_dagasleft); - witness_commitments.main_sel_op_div = commitment_key->commit(key->main_sel_op_div); - witness_commitments.main_sel_op_emit_l2_to_l1_msg = commitment_key->commit(key->main_sel_op_emit_l2_to_l1_msg); - witness_commitments.main_sel_op_emit_note_hash = commitment_key->commit(key->main_sel_op_emit_note_hash); - witness_commitments.main_sel_op_emit_nullifier = commitment_key->commit(key->main_sel_op_emit_nullifier); - witness_commitments.main_sel_op_emit_unencrypted_log = - commitment_key->commit(key->main_sel_op_emit_unencrypted_log); - witness_commitments.main_sel_op_eq = commitment_key->commit(key->main_sel_op_eq); - witness_commitments.main_sel_op_external_call = commitment_key->commit(key->main_sel_op_external_call); - witness_commitments.main_sel_op_fdiv = commitment_key->commit(key->main_sel_op_fdiv); - witness_commitments.main_sel_op_fee_per_da_gas = commitment_key->commit(key->main_sel_op_fee_per_da_gas); - witness_commitments.main_sel_op_fee_per_l2_gas = commitment_key->commit(key->main_sel_op_fee_per_l2_gas); - witness_commitments.main_sel_op_function_selector = commitment_key->commit(key->main_sel_op_function_selector); - witness_commitments.main_sel_op_get_contract_instance = - commitment_key->commit(key->main_sel_op_get_contract_instance); - witness_commitments.main_sel_op_halt = commitment_key->commit(key->main_sel_op_halt); - witness_commitments.main_sel_op_internal_call = commitment_key->commit(key->main_sel_op_internal_call); - witness_commitments.main_sel_op_internal_return = commitment_key->commit(key->main_sel_op_internal_return); - witness_commitments.main_sel_op_jump = commitment_key->commit(key->main_sel_op_jump); - witness_commitments.main_sel_op_jumpi = commitment_key->commit(key->main_sel_op_jumpi); - witness_commitments.main_sel_op_keccak = commitment_key->commit(key->main_sel_op_keccak); - witness_commitments.main_sel_op_l1_to_l2_msg_exists = commitment_key->commit(key->main_sel_op_l1_to_l2_msg_exists); - witness_commitments.main_sel_op_l2gasleft = commitment_key->commit(key->main_sel_op_l2gasleft); - witness_commitments.main_sel_op_lt = commitment_key->commit(key->main_sel_op_lt); - witness_commitments.main_sel_op_lte = commitment_key->commit(key->main_sel_op_lte); - witness_commitments.main_sel_op_mov = commitment_key->commit(key->main_sel_op_mov); - witness_commitments.main_sel_op_mul = commitment_key->commit(key->main_sel_op_mul); - witness_commitments.main_sel_op_not = commitment_key->commit(key->main_sel_op_not); - witness_commitments.main_sel_op_note_hash_exists = commitment_key->commit(key->main_sel_op_note_hash_exists); - witness_commitments.main_sel_op_nullifier_exists = commitment_key->commit(key->main_sel_op_nullifier_exists); - witness_commitments.main_sel_op_or = commitment_key->commit(key->main_sel_op_or); - witness_commitments.main_sel_op_pedersen = commitment_key->commit(key->main_sel_op_pedersen); - witness_commitments.main_sel_op_poseidon2 = commitment_key->commit(key->main_sel_op_poseidon2); - witness_commitments.main_sel_op_radix_le = commitment_key->commit(key->main_sel_op_radix_le); - witness_commitments.main_sel_op_sender = commitment_key->commit(key->main_sel_op_sender); - witness_commitments.main_sel_op_sha256 = commitment_key->commit(key->main_sel_op_sha256); - witness_commitments.main_sel_op_shl = commitment_key->commit(key->main_sel_op_shl); - witness_commitments.main_sel_op_shr = commitment_key->commit(key->main_sel_op_shr); - witness_commitments.main_sel_op_sload = commitment_key->commit(key->main_sel_op_sload); - witness_commitments.main_sel_op_sstore = commitment_key->commit(key->main_sel_op_sstore); - witness_commitments.main_sel_op_storage_address = commitment_key->commit(key->main_sel_op_storage_address); - witness_commitments.main_sel_op_sub = commitment_key->commit(key->main_sel_op_sub); - witness_commitments.main_sel_op_timestamp = commitment_key->commit(key->main_sel_op_timestamp); - witness_commitments.main_sel_op_transaction_fee = commitment_key->commit(key->main_sel_op_transaction_fee); - witness_commitments.main_sel_op_version = commitment_key->commit(key->main_sel_op_version); - witness_commitments.main_sel_op_xor = commitment_key->commit(key->main_sel_op_xor); - witness_commitments.main_sel_q_kernel_lookup = commitment_key->commit(key->main_sel_q_kernel_lookup); - witness_commitments.main_sel_q_kernel_output_lookup = commitment_key->commit(key->main_sel_q_kernel_output_lookup); - witness_commitments.main_sel_resolve_ind_addr_a = commitment_key->commit(key->main_sel_resolve_ind_addr_a); - witness_commitments.main_sel_resolve_ind_addr_b = commitment_key->commit(key->main_sel_resolve_ind_addr_b); - witness_commitments.main_sel_resolve_ind_addr_c = commitment_key->commit(key->main_sel_resolve_ind_addr_c); - witness_commitments.main_sel_resolve_ind_addr_d = commitment_key->commit(key->main_sel_resolve_ind_addr_d); - witness_commitments.main_sel_rng_16 = commitment_key->commit(key->main_sel_rng_16); - witness_commitments.main_sel_rng_8 = commitment_key->commit(key->main_sel_rng_8); - witness_commitments.main_space_id = commitment_key->commit(key->main_space_id); - witness_commitments.main_tag_err = commitment_key->commit(key->main_tag_err); - witness_commitments.main_w_in_tag = commitment_key->commit(key->main_w_in_tag); - witness_commitments.mem_addr = commitment_key->commit(key->mem_addr); - witness_commitments.mem_clk = commitment_key->commit(key->mem_clk); - witness_commitments.mem_diff_hi = commitment_key->commit(key->mem_diff_hi); - witness_commitments.mem_diff_lo = commitment_key->commit(key->mem_diff_lo); - witness_commitments.mem_diff_mid = commitment_key->commit(key->mem_diff_mid); - witness_commitments.mem_glob_addr = commitment_key->commit(key->mem_glob_addr); - witness_commitments.mem_last = commitment_key->commit(key->mem_last); - witness_commitments.mem_lastAccess = commitment_key->commit(key->mem_lastAccess); - witness_commitments.mem_one_min_inv = commitment_key->commit(key->mem_one_min_inv); - witness_commitments.mem_r_in_tag = commitment_key->commit(key->mem_r_in_tag); - witness_commitments.mem_rw = commitment_key->commit(key->mem_rw); - witness_commitments.mem_sel_mem = commitment_key->commit(key->mem_sel_mem); - witness_commitments.mem_sel_mov_ia_to_ic = commitment_key->commit(key->mem_sel_mov_ia_to_ic); - witness_commitments.mem_sel_mov_ib_to_ic = commitment_key->commit(key->mem_sel_mov_ib_to_ic); - witness_commitments.mem_sel_op_a = commitment_key->commit(key->mem_sel_op_a); - witness_commitments.mem_sel_op_b = commitment_key->commit(key->mem_sel_op_b); - witness_commitments.mem_sel_op_c = commitment_key->commit(key->mem_sel_op_c); - witness_commitments.mem_sel_op_cmov = commitment_key->commit(key->mem_sel_op_cmov); - witness_commitments.mem_sel_op_d = commitment_key->commit(key->mem_sel_op_d); - witness_commitments.mem_sel_resolve_ind_addr_a = commitment_key->commit(key->mem_sel_resolve_ind_addr_a); - witness_commitments.mem_sel_resolve_ind_addr_b = commitment_key->commit(key->mem_sel_resolve_ind_addr_b); - witness_commitments.mem_sel_resolve_ind_addr_c = commitment_key->commit(key->mem_sel_resolve_ind_addr_c); - witness_commitments.mem_sel_resolve_ind_addr_d = commitment_key->commit(key->mem_sel_resolve_ind_addr_d); - witness_commitments.mem_sel_rng_chk = commitment_key->commit(key->mem_sel_rng_chk); - witness_commitments.mem_skip_check_tag = commitment_key->commit(key->mem_skip_check_tag); - witness_commitments.mem_space_id = commitment_key->commit(key->mem_space_id); - witness_commitments.mem_tag = commitment_key->commit(key->mem_tag); - witness_commitments.mem_tag_err = commitment_key->commit(key->mem_tag_err); - witness_commitments.mem_tsp = commitment_key->commit(key->mem_tsp); - witness_commitments.mem_val = commitment_key->commit(key->mem_val); - witness_commitments.mem_w_in_tag = commitment_key->commit(key->mem_w_in_tag); - witness_commitments.pedersen_clk = commitment_key->commit(key->pedersen_clk); - witness_commitments.pedersen_input = commitment_key->commit(key->pedersen_input); - witness_commitments.pedersen_output = commitment_key->commit(key->pedersen_output); - witness_commitments.pedersen_sel_pedersen = commitment_key->commit(key->pedersen_sel_pedersen); - witness_commitments.poseidon2_clk = commitment_key->commit(key->poseidon2_clk); - witness_commitments.poseidon2_input = commitment_key->commit(key->poseidon2_input); - witness_commitments.poseidon2_output = commitment_key->commit(key->poseidon2_output); - witness_commitments.poseidon2_sel_poseidon_perm = commitment_key->commit(key->poseidon2_sel_poseidon_perm); - witness_commitments.powers_power_of_2 = commitment_key->commit(key->powers_power_of_2); - witness_commitments.sha256_clk = commitment_key->commit(key->sha256_clk); - witness_commitments.sha256_input = commitment_key->commit(key->sha256_input); - witness_commitments.sha256_output = commitment_key->commit(key->sha256_output); - witness_commitments.sha256_sel_sha256_compression = commitment_key->commit(key->sha256_sel_sha256_compression); - witness_commitments.sha256_state = commitment_key->commit(key->sha256_state); - witness_commitments.lookup_byte_lengths_counts = commitment_key->commit(key->lookup_byte_lengths_counts); - witness_commitments.lookup_byte_operations_counts = commitment_key->commit(key->lookup_byte_operations_counts); - witness_commitments.lookup_opcode_gas_counts = commitment_key->commit(key->lookup_opcode_gas_counts); - witness_commitments.range_check_l2_gas_hi_counts = commitment_key->commit(key->range_check_l2_gas_hi_counts); - witness_commitments.range_check_l2_gas_lo_counts = commitment_key->commit(key->range_check_l2_gas_lo_counts); - witness_commitments.range_check_da_gas_hi_counts = commitment_key->commit(key->range_check_da_gas_hi_counts); - witness_commitments.range_check_da_gas_lo_counts = commitment_key->commit(key->range_check_da_gas_lo_counts); - witness_commitments.kernel_output_lookup_counts = commitment_key->commit(key->kernel_output_lookup_counts); - witness_commitments.lookup_into_kernel_counts = commitment_key->commit(key->lookup_into_kernel_counts); - witness_commitments.incl_main_tag_err_counts = commitment_key->commit(key->incl_main_tag_err_counts); - witness_commitments.incl_mem_tag_err_counts = commitment_key->commit(key->incl_mem_tag_err_counts); - witness_commitments.lookup_mem_rng_chk_lo_counts = commitment_key->commit(key->lookup_mem_rng_chk_lo_counts); - witness_commitments.lookup_mem_rng_chk_mid_counts = commitment_key->commit(key->lookup_mem_rng_chk_mid_counts); - witness_commitments.lookup_mem_rng_chk_hi_counts = commitment_key->commit(key->lookup_mem_rng_chk_hi_counts); - witness_commitments.lookup_pow_2_0_counts = commitment_key->commit(key->lookup_pow_2_0_counts); - witness_commitments.lookup_pow_2_1_counts = commitment_key->commit(key->lookup_pow_2_1_counts); - witness_commitments.lookup_u8_0_counts = commitment_key->commit(key->lookup_u8_0_counts); - witness_commitments.lookup_u8_1_counts = commitment_key->commit(key->lookup_u8_1_counts); - witness_commitments.lookup_u16_0_counts = commitment_key->commit(key->lookup_u16_0_counts); - witness_commitments.lookup_u16_1_counts = commitment_key->commit(key->lookup_u16_1_counts); - witness_commitments.lookup_u16_2_counts = commitment_key->commit(key->lookup_u16_2_counts); - witness_commitments.lookup_u16_3_counts = commitment_key->commit(key->lookup_u16_3_counts); - witness_commitments.lookup_u16_4_counts = commitment_key->commit(key->lookup_u16_4_counts); - witness_commitments.lookup_u16_5_counts = commitment_key->commit(key->lookup_u16_5_counts); - witness_commitments.lookup_u16_6_counts = commitment_key->commit(key->lookup_u16_6_counts); - witness_commitments.lookup_u16_7_counts = commitment_key->commit(key->lookup_u16_7_counts); - witness_commitments.lookup_u16_8_counts = commitment_key->commit(key->lookup_u16_8_counts); - witness_commitments.lookup_u16_9_counts = commitment_key->commit(key->lookup_u16_9_counts); - witness_commitments.lookup_u16_10_counts = commitment_key->commit(key->lookup_u16_10_counts); - witness_commitments.lookup_u16_11_counts = commitment_key->commit(key->lookup_u16_11_counts); - witness_commitments.lookup_u16_12_counts = commitment_key->commit(key->lookup_u16_12_counts); - witness_commitments.lookup_u16_13_counts = commitment_key->commit(key->lookup_u16_13_counts); - witness_commitments.lookup_u16_14_counts = commitment_key->commit(key->lookup_u16_14_counts); - witness_commitments.lookup_div_u16_0_counts = commitment_key->commit(key->lookup_div_u16_0_counts); - witness_commitments.lookup_div_u16_1_counts = commitment_key->commit(key->lookup_div_u16_1_counts); - witness_commitments.lookup_div_u16_2_counts = commitment_key->commit(key->lookup_div_u16_2_counts); - witness_commitments.lookup_div_u16_3_counts = commitment_key->commit(key->lookup_div_u16_3_counts); - witness_commitments.lookup_div_u16_4_counts = commitment_key->commit(key->lookup_div_u16_4_counts); - witness_commitments.lookup_div_u16_5_counts = commitment_key->commit(key->lookup_div_u16_5_counts); - witness_commitments.lookup_div_u16_6_counts = commitment_key->commit(key->lookup_div_u16_6_counts); - witness_commitments.lookup_div_u16_7_counts = commitment_key->commit(key->lookup_div_u16_7_counts); - - // Send all commitments to the verifier - transcript->send_to_verifier(commitment_labels.kernel_kernel_inputs, witness_commitments.kernel_kernel_inputs); - transcript->send_to_verifier(commitment_labels.kernel_kernel_value_out, - witness_commitments.kernel_kernel_value_out); - transcript->send_to_verifier(commitment_labels.kernel_kernel_side_effect_out, - witness_commitments.kernel_kernel_side_effect_out); - transcript->send_to_verifier(commitment_labels.kernel_kernel_metadata_out, - witness_commitments.kernel_kernel_metadata_out); - transcript->send_to_verifier(commitment_labels.main_calldata, witness_commitments.main_calldata); - transcript->send_to_verifier(commitment_labels.alu_a_hi, witness_commitments.alu_a_hi); - transcript->send_to_verifier(commitment_labels.alu_a_lo, witness_commitments.alu_a_lo); - transcript->send_to_verifier(commitment_labels.alu_b_hi, witness_commitments.alu_b_hi); - transcript->send_to_verifier(commitment_labels.alu_b_lo, witness_commitments.alu_b_lo); - transcript->send_to_verifier(commitment_labels.alu_borrow, witness_commitments.alu_borrow); - transcript->send_to_verifier(commitment_labels.alu_cf, witness_commitments.alu_cf); - transcript->send_to_verifier(commitment_labels.alu_clk, witness_commitments.alu_clk); - transcript->send_to_verifier(commitment_labels.alu_cmp_rng_ctr, witness_commitments.alu_cmp_rng_ctr); - transcript->send_to_verifier(commitment_labels.alu_div_u16_r0, witness_commitments.alu_div_u16_r0); - transcript->send_to_verifier(commitment_labels.alu_div_u16_r1, witness_commitments.alu_div_u16_r1); - transcript->send_to_verifier(commitment_labels.alu_div_u16_r2, witness_commitments.alu_div_u16_r2); - transcript->send_to_verifier(commitment_labels.alu_div_u16_r3, witness_commitments.alu_div_u16_r3); - transcript->send_to_verifier(commitment_labels.alu_div_u16_r4, witness_commitments.alu_div_u16_r4); - transcript->send_to_verifier(commitment_labels.alu_div_u16_r5, witness_commitments.alu_div_u16_r5); - transcript->send_to_verifier(commitment_labels.alu_div_u16_r6, witness_commitments.alu_div_u16_r6); - transcript->send_to_verifier(commitment_labels.alu_div_u16_r7, witness_commitments.alu_div_u16_r7); - transcript->send_to_verifier(commitment_labels.alu_divisor_hi, witness_commitments.alu_divisor_hi); - transcript->send_to_verifier(commitment_labels.alu_divisor_lo, witness_commitments.alu_divisor_lo); - transcript->send_to_verifier(commitment_labels.alu_ff_tag, witness_commitments.alu_ff_tag); - transcript->send_to_verifier(commitment_labels.alu_ia, witness_commitments.alu_ia); - transcript->send_to_verifier(commitment_labels.alu_ib, witness_commitments.alu_ib); - transcript->send_to_verifier(commitment_labels.alu_ic, witness_commitments.alu_ic); - transcript->send_to_verifier(commitment_labels.alu_in_tag, witness_commitments.alu_in_tag); - transcript->send_to_verifier(commitment_labels.alu_op_add, witness_commitments.alu_op_add); - transcript->send_to_verifier(commitment_labels.alu_op_cast, witness_commitments.alu_op_cast); - transcript->send_to_verifier(commitment_labels.alu_op_cast_prev, witness_commitments.alu_op_cast_prev); - transcript->send_to_verifier(commitment_labels.alu_op_div, witness_commitments.alu_op_div); - transcript->send_to_verifier(commitment_labels.alu_op_div_a_lt_b, witness_commitments.alu_op_div_a_lt_b); - transcript->send_to_verifier(commitment_labels.alu_op_div_std, witness_commitments.alu_op_div_std); - transcript->send_to_verifier(commitment_labels.alu_op_eq, witness_commitments.alu_op_eq); - transcript->send_to_verifier(commitment_labels.alu_op_eq_diff_inv, witness_commitments.alu_op_eq_diff_inv); - transcript->send_to_verifier(commitment_labels.alu_op_lt, witness_commitments.alu_op_lt); - transcript->send_to_verifier(commitment_labels.alu_op_lte, witness_commitments.alu_op_lte); - transcript->send_to_verifier(commitment_labels.alu_op_mul, witness_commitments.alu_op_mul); - transcript->send_to_verifier(commitment_labels.alu_op_not, witness_commitments.alu_op_not); - transcript->send_to_verifier(commitment_labels.alu_op_shl, witness_commitments.alu_op_shl); - transcript->send_to_verifier(commitment_labels.alu_op_shr, witness_commitments.alu_op_shr); - transcript->send_to_verifier(commitment_labels.alu_op_sub, witness_commitments.alu_op_sub); - transcript->send_to_verifier(commitment_labels.alu_p_a_borrow, witness_commitments.alu_p_a_borrow); - transcript->send_to_verifier(commitment_labels.alu_p_b_borrow, witness_commitments.alu_p_b_borrow); - transcript->send_to_verifier(commitment_labels.alu_p_sub_a_hi, witness_commitments.alu_p_sub_a_hi); - transcript->send_to_verifier(commitment_labels.alu_p_sub_a_lo, witness_commitments.alu_p_sub_a_lo); - transcript->send_to_verifier(commitment_labels.alu_p_sub_b_hi, witness_commitments.alu_p_sub_b_hi); - transcript->send_to_verifier(commitment_labels.alu_p_sub_b_lo, witness_commitments.alu_p_sub_b_lo); - transcript->send_to_verifier(commitment_labels.alu_partial_prod_hi, witness_commitments.alu_partial_prod_hi); - transcript->send_to_verifier(commitment_labels.alu_partial_prod_lo, witness_commitments.alu_partial_prod_lo); - transcript->send_to_verifier(commitment_labels.alu_quotient_hi, witness_commitments.alu_quotient_hi); - transcript->send_to_verifier(commitment_labels.alu_quotient_lo, witness_commitments.alu_quotient_lo); - transcript->send_to_verifier(commitment_labels.alu_remainder, witness_commitments.alu_remainder); - transcript->send_to_verifier(commitment_labels.alu_res_hi, witness_commitments.alu_res_hi); - transcript->send_to_verifier(commitment_labels.alu_res_lo, witness_commitments.alu_res_lo); - transcript->send_to_verifier(commitment_labels.alu_sel_alu, witness_commitments.alu_sel_alu); - transcript->send_to_verifier(commitment_labels.alu_sel_cmp, witness_commitments.alu_sel_cmp); - transcript->send_to_verifier(commitment_labels.alu_sel_div_rng_chk, witness_commitments.alu_sel_div_rng_chk); - transcript->send_to_verifier(commitment_labels.alu_sel_rng_chk, witness_commitments.alu_sel_rng_chk); - transcript->send_to_verifier(commitment_labels.alu_sel_rng_chk_lookup, witness_commitments.alu_sel_rng_chk_lookup); - transcript->send_to_verifier(commitment_labels.alu_sel_shift_which, witness_commitments.alu_sel_shift_which); - transcript->send_to_verifier(commitment_labels.alu_shift_lt_bit_len, witness_commitments.alu_shift_lt_bit_len); - transcript->send_to_verifier(commitment_labels.alu_t_sub_s_bits, witness_commitments.alu_t_sub_s_bits); - transcript->send_to_verifier(commitment_labels.alu_two_pow_s, witness_commitments.alu_two_pow_s); - transcript->send_to_verifier(commitment_labels.alu_two_pow_t_sub_s, witness_commitments.alu_two_pow_t_sub_s); - transcript->send_to_verifier(commitment_labels.alu_u128_tag, witness_commitments.alu_u128_tag); - transcript->send_to_verifier(commitment_labels.alu_u16_r0, witness_commitments.alu_u16_r0); - transcript->send_to_verifier(commitment_labels.alu_u16_r1, witness_commitments.alu_u16_r1); - transcript->send_to_verifier(commitment_labels.alu_u16_r10, witness_commitments.alu_u16_r10); - transcript->send_to_verifier(commitment_labels.alu_u16_r11, witness_commitments.alu_u16_r11); - transcript->send_to_verifier(commitment_labels.alu_u16_r12, witness_commitments.alu_u16_r12); - transcript->send_to_verifier(commitment_labels.alu_u16_r13, witness_commitments.alu_u16_r13); - transcript->send_to_verifier(commitment_labels.alu_u16_r14, witness_commitments.alu_u16_r14); - transcript->send_to_verifier(commitment_labels.alu_u16_r2, witness_commitments.alu_u16_r2); - transcript->send_to_verifier(commitment_labels.alu_u16_r3, witness_commitments.alu_u16_r3); - transcript->send_to_verifier(commitment_labels.alu_u16_r4, witness_commitments.alu_u16_r4); - transcript->send_to_verifier(commitment_labels.alu_u16_r5, witness_commitments.alu_u16_r5); - transcript->send_to_verifier(commitment_labels.alu_u16_r6, witness_commitments.alu_u16_r6); - transcript->send_to_verifier(commitment_labels.alu_u16_r7, witness_commitments.alu_u16_r7); - transcript->send_to_verifier(commitment_labels.alu_u16_r8, witness_commitments.alu_u16_r8); - transcript->send_to_verifier(commitment_labels.alu_u16_r9, witness_commitments.alu_u16_r9); - transcript->send_to_verifier(commitment_labels.alu_u16_tag, witness_commitments.alu_u16_tag); - transcript->send_to_verifier(commitment_labels.alu_u32_tag, witness_commitments.alu_u32_tag); - transcript->send_to_verifier(commitment_labels.alu_u64_tag, witness_commitments.alu_u64_tag); - transcript->send_to_verifier(commitment_labels.alu_u8_r0, witness_commitments.alu_u8_r0); - transcript->send_to_verifier(commitment_labels.alu_u8_r1, witness_commitments.alu_u8_r1); - transcript->send_to_verifier(commitment_labels.alu_u8_tag, witness_commitments.alu_u8_tag); - transcript->send_to_verifier(commitment_labels.binary_acc_ia, witness_commitments.binary_acc_ia); - transcript->send_to_verifier(commitment_labels.binary_acc_ib, witness_commitments.binary_acc_ib); - transcript->send_to_verifier(commitment_labels.binary_acc_ic, witness_commitments.binary_acc_ic); - transcript->send_to_verifier(commitment_labels.binary_clk, witness_commitments.binary_clk); - transcript->send_to_verifier(commitment_labels.binary_ia_bytes, witness_commitments.binary_ia_bytes); - transcript->send_to_verifier(commitment_labels.binary_ib_bytes, witness_commitments.binary_ib_bytes); - transcript->send_to_verifier(commitment_labels.binary_ic_bytes, witness_commitments.binary_ic_bytes); - transcript->send_to_verifier(commitment_labels.binary_in_tag, witness_commitments.binary_in_tag); - transcript->send_to_verifier(commitment_labels.binary_mem_tag_ctr, witness_commitments.binary_mem_tag_ctr); - transcript->send_to_verifier(commitment_labels.binary_mem_tag_ctr_inv, witness_commitments.binary_mem_tag_ctr_inv); - transcript->send_to_verifier(commitment_labels.binary_op_id, witness_commitments.binary_op_id); - transcript->send_to_verifier(commitment_labels.binary_sel_bin, witness_commitments.binary_sel_bin); - transcript->send_to_verifier(commitment_labels.binary_start, witness_commitments.binary_start); - transcript->send_to_verifier(commitment_labels.byte_lookup_sel_bin, witness_commitments.byte_lookup_sel_bin); - transcript->send_to_verifier(commitment_labels.byte_lookup_table_byte_lengths, - witness_commitments.byte_lookup_table_byte_lengths); - transcript->send_to_verifier(commitment_labels.byte_lookup_table_in_tags, - witness_commitments.byte_lookup_table_in_tags); - transcript->send_to_verifier(commitment_labels.byte_lookup_table_input_a, - witness_commitments.byte_lookup_table_input_a); - transcript->send_to_verifier(commitment_labels.byte_lookup_table_input_b, - witness_commitments.byte_lookup_table_input_b); - transcript->send_to_verifier(commitment_labels.byte_lookup_table_op_id, - witness_commitments.byte_lookup_table_op_id); - transcript->send_to_verifier(commitment_labels.byte_lookup_table_output, - witness_commitments.byte_lookup_table_output); - transcript->send_to_verifier(commitment_labels.conversion_clk, witness_commitments.conversion_clk); - transcript->send_to_verifier(commitment_labels.conversion_input, witness_commitments.conversion_input); - transcript->send_to_verifier(commitment_labels.conversion_num_limbs, witness_commitments.conversion_num_limbs); - transcript->send_to_verifier(commitment_labels.conversion_radix, witness_commitments.conversion_radix); - transcript->send_to_verifier(commitment_labels.conversion_sel_to_radix_le, - witness_commitments.conversion_sel_to_radix_le); - transcript->send_to_verifier(commitment_labels.gas_da_gas_fixed_table, witness_commitments.gas_da_gas_fixed_table); - transcript->send_to_verifier(commitment_labels.gas_l2_gas_fixed_table, witness_commitments.gas_l2_gas_fixed_table); - transcript->send_to_verifier(commitment_labels.gas_sel_gas_cost, witness_commitments.gas_sel_gas_cost); - transcript->send_to_verifier(commitment_labels.keccakf1600_clk, witness_commitments.keccakf1600_clk); - transcript->send_to_verifier(commitment_labels.keccakf1600_input, witness_commitments.keccakf1600_input); - transcript->send_to_verifier(commitment_labels.keccakf1600_output, witness_commitments.keccakf1600_output); - transcript->send_to_verifier(commitment_labels.keccakf1600_sel_keccakf1600, - witness_commitments.keccakf1600_sel_keccakf1600); - transcript->send_to_verifier(commitment_labels.kernel_emit_l2_to_l1_msg_write_offset, - witness_commitments.kernel_emit_l2_to_l1_msg_write_offset); - transcript->send_to_verifier(commitment_labels.kernel_emit_note_hash_write_offset, - witness_commitments.kernel_emit_note_hash_write_offset); - transcript->send_to_verifier(commitment_labels.kernel_emit_nullifier_write_offset, - witness_commitments.kernel_emit_nullifier_write_offset); - transcript->send_to_verifier(commitment_labels.kernel_emit_unencrypted_log_write_offset, - witness_commitments.kernel_emit_unencrypted_log_write_offset); - transcript->send_to_verifier(commitment_labels.kernel_kernel_in_offset, - witness_commitments.kernel_kernel_in_offset); - transcript->send_to_verifier(commitment_labels.kernel_kernel_out_offset, - witness_commitments.kernel_kernel_out_offset); - transcript->send_to_verifier(commitment_labels.kernel_l1_to_l2_msg_exists_write_offset, - witness_commitments.kernel_l1_to_l2_msg_exists_write_offset); - transcript->send_to_verifier(commitment_labels.kernel_note_hash_exist_write_offset, - witness_commitments.kernel_note_hash_exist_write_offset); - transcript->send_to_verifier(commitment_labels.kernel_nullifier_exists_write_offset, - witness_commitments.kernel_nullifier_exists_write_offset); - transcript->send_to_verifier(commitment_labels.kernel_nullifier_non_exists_write_offset, - witness_commitments.kernel_nullifier_non_exists_write_offset); - transcript->send_to_verifier(commitment_labels.kernel_q_public_input_kernel_add_to_table, - witness_commitments.kernel_q_public_input_kernel_add_to_table); - transcript->send_to_verifier(commitment_labels.kernel_q_public_input_kernel_out_add_to_table, - witness_commitments.kernel_q_public_input_kernel_out_add_to_table); - transcript->send_to_verifier(commitment_labels.kernel_side_effect_counter, - witness_commitments.kernel_side_effect_counter); - transcript->send_to_verifier(commitment_labels.kernel_sload_write_offset, - witness_commitments.kernel_sload_write_offset); - transcript->send_to_verifier(commitment_labels.kernel_sstore_write_offset, - witness_commitments.kernel_sstore_write_offset); - transcript->send_to_verifier(commitment_labels.main_abs_da_rem_gas_hi, witness_commitments.main_abs_da_rem_gas_hi); - transcript->send_to_verifier(commitment_labels.main_abs_da_rem_gas_lo, witness_commitments.main_abs_da_rem_gas_lo); - transcript->send_to_verifier(commitment_labels.main_abs_l2_rem_gas_hi, witness_commitments.main_abs_l2_rem_gas_hi); - transcript->send_to_verifier(commitment_labels.main_abs_l2_rem_gas_lo, witness_commitments.main_abs_l2_rem_gas_lo); - transcript->send_to_verifier(commitment_labels.main_alu_in_tag, witness_commitments.main_alu_in_tag); - transcript->send_to_verifier(commitment_labels.main_bin_op_id, witness_commitments.main_bin_op_id); - transcript->send_to_verifier(commitment_labels.main_call_ptr, witness_commitments.main_call_ptr); - transcript->send_to_verifier(commitment_labels.main_da_gas_op_cost, witness_commitments.main_da_gas_op_cost); - transcript->send_to_verifier(commitment_labels.main_da_gas_remaining, witness_commitments.main_da_gas_remaining); - transcript->send_to_verifier(commitment_labels.main_da_out_of_gas, witness_commitments.main_da_out_of_gas); - transcript->send_to_verifier(commitment_labels.main_ia, witness_commitments.main_ia); - transcript->send_to_verifier(commitment_labels.main_ib, witness_commitments.main_ib); - transcript->send_to_verifier(commitment_labels.main_ic, witness_commitments.main_ic); - transcript->send_to_verifier(commitment_labels.main_id, witness_commitments.main_id); - transcript->send_to_verifier(commitment_labels.main_id_zero, witness_commitments.main_id_zero); - transcript->send_to_verifier(commitment_labels.main_ind_addr_a, witness_commitments.main_ind_addr_a); - transcript->send_to_verifier(commitment_labels.main_ind_addr_b, witness_commitments.main_ind_addr_b); - transcript->send_to_verifier(commitment_labels.main_ind_addr_c, witness_commitments.main_ind_addr_c); - transcript->send_to_verifier(commitment_labels.main_ind_addr_d, witness_commitments.main_ind_addr_d); - transcript->send_to_verifier(commitment_labels.main_internal_return_ptr, - witness_commitments.main_internal_return_ptr); - transcript->send_to_verifier(commitment_labels.main_inv, witness_commitments.main_inv); - transcript->send_to_verifier(commitment_labels.main_l2_gas_op_cost, witness_commitments.main_l2_gas_op_cost); - transcript->send_to_verifier(commitment_labels.main_l2_gas_remaining, witness_commitments.main_l2_gas_remaining); - transcript->send_to_verifier(commitment_labels.main_l2_out_of_gas, witness_commitments.main_l2_out_of_gas); - transcript->send_to_verifier(commitment_labels.main_mem_addr_a, witness_commitments.main_mem_addr_a); - transcript->send_to_verifier(commitment_labels.main_mem_addr_b, witness_commitments.main_mem_addr_b); - transcript->send_to_verifier(commitment_labels.main_mem_addr_c, witness_commitments.main_mem_addr_c); - transcript->send_to_verifier(commitment_labels.main_mem_addr_d, witness_commitments.main_mem_addr_d); - transcript->send_to_verifier(commitment_labels.main_op_err, witness_commitments.main_op_err); - transcript->send_to_verifier(commitment_labels.main_opcode_val, witness_commitments.main_opcode_val); - transcript->send_to_verifier(commitment_labels.main_pc, witness_commitments.main_pc); - transcript->send_to_verifier(commitment_labels.main_r_in_tag, witness_commitments.main_r_in_tag); - transcript->send_to_verifier(commitment_labels.main_rwa, witness_commitments.main_rwa); - transcript->send_to_verifier(commitment_labels.main_rwb, witness_commitments.main_rwb); - transcript->send_to_verifier(commitment_labels.main_rwc, witness_commitments.main_rwc); - transcript->send_to_verifier(commitment_labels.main_rwd, witness_commitments.main_rwd); - transcript->send_to_verifier(commitment_labels.main_sel_alu, witness_commitments.main_sel_alu); - transcript->send_to_verifier(commitment_labels.main_sel_bin, witness_commitments.main_sel_bin); - transcript->send_to_verifier(commitment_labels.main_sel_gas_accounting_active, - witness_commitments.main_sel_gas_accounting_active); - transcript->send_to_verifier(commitment_labels.main_sel_last, witness_commitments.main_sel_last); - transcript->send_to_verifier(commitment_labels.main_sel_mem_op_a, witness_commitments.main_sel_mem_op_a); - transcript->send_to_verifier(commitment_labels.main_sel_mem_op_activate_gas, - witness_commitments.main_sel_mem_op_activate_gas); - transcript->send_to_verifier(commitment_labels.main_sel_mem_op_b, witness_commitments.main_sel_mem_op_b); - transcript->send_to_verifier(commitment_labels.main_sel_mem_op_c, witness_commitments.main_sel_mem_op_c); - transcript->send_to_verifier(commitment_labels.main_sel_mem_op_d, witness_commitments.main_sel_mem_op_d); - transcript->send_to_verifier(commitment_labels.main_sel_mov_ia_to_ic, witness_commitments.main_sel_mov_ia_to_ic); - transcript->send_to_verifier(commitment_labels.main_sel_mov_ib_to_ic, witness_commitments.main_sel_mov_ib_to_ic); - transcript->send_to_verifier(commitment_labels.main_sel_op_add, witness_commitments.main_sel_op_add); - transcript->send_to_verifier(commitment_labels.main_sel_op_address, witness_commitments.main_sel_op_address); - transcript->send_to_verifier(commitment_labels.main_sel_op_and, witness_commitments.main_sel_op_and); - transcript->send_to_verifier(commitment_labels.main_sel_op_block_number, - witness_commitments.main_sel_op_block_number); - transcript->send_to_verifier(commitment_labels.main_sel_op_cast, witness_commitments.main_sel_op_cast); - transcript->send_to_verifier(commitment_labels.main_sel_op_chain_id, witness_commitments.main_sel_op_chain_id); - transcript->send_to_verifier(commitment_labels.main_sel_op_cmov, witness_commitments.main_sel_op_cmov); - transcript->send_to_verifier(commitment_labels.main_sel_op_coinbase, witness_commitments.main_sel_op_coinbase); - transcript->send_to_verifier(commitment_labels.main_sel_op_dagasleft, witness_commitments.main_sel_op_dagasleft); - transcript->send_to_verifier(commitment_labels.main_sel_op_div, witness_commitments.main_sel_op_div); - transcript->send_to_verifier(commitment_labels.main_sel_op_emit_l2_to_l1_msg, - witness_commitments.main_sel_op_emit_l2_to_l1_msg); - transcript->send_to_verifier(commitment_labels.main_sel_op_emit_note_hash, - witness_commitments.main_sel_op_emit_note_hash); - transcript->send_to_verifier(commitment_labels.main_sel_op_emit_nullifier, - witness_commitments.main_sel_op_emit_nullifier); - transcript->send_to_verifier(commitment_labels.main_sel_op_emit_unencrypted_log, - witness_commitments.main_sel_op_emit_unencrypted_log); - transcript->send_to_verifier(commitment_labels.main_sel_op_eq, witness_commitments.main_sel_op_eq); - transcript->send_to_verifier(commitment_labels.main_sel_op_external_call, - witness_commitments.main_sel_op_external_call); - transcript->send_to_verifier(commitment_labels.main_sel_op_fdiv, witness_commitments.main_sel_op_fdiv); - transcript->send_to_verifier(commitment_labels.main_sel_op_fee_per_da_gas, - witness_commitments.main_sel_op_fee_per_da_gas); - transcript->send_to_verifier(commitment_labels.main_sel_op_fee_per_l2_gas, - witness_commitments.main_sel_op_fee_per_l2_gas); - transcript->send_to_verifier(commitment_labels.main_sel_op_function_selector, - witness_commitments.main_sel_op_function_selector); - transcript->send_to_verifier(commitment_labels.main_sel_op_get_contract_instance, - witness_commitments.main_sel_op_get_contract_instance); - transcript->send_to_verifier(commitment_labels.main_sel_op_halt, witness_commitments.main_sel_op_halt); - transcript->send_to_verifier(commitment_labels.main_sel_op_internal_call, - witness_commitments.main_sel_op_internal_call); - transcript->send_to_verifier(commitment_labels.main_sel_op_internal_return, - witness_commitments.main_sel_op_internal_return); - transcript->send_to_verifier(commitment_labels.main_sel_op_jump, witness_commitments.main_sel_op_jump); - transcript->send_to_verifier(commitment_labels.main_sel_op_jumpi, witness_commitments.main_sel_op_jumpi); - transcript->send_to_verifier(commitment_labels.main_sel_op_keccak, witness_commitments.main_sel_op_keccak); - transcript->send_to_verifier(commitment_labels.main_sel_op_l1_to_l2_msg_exists, - witness_commitments.main_sel_op_l1_to_l2_msg_exists); - transcript->send_to_verifier(commitment_labels.main_sel_op_l2gasleft, witness_commitments.main_sel_op_l2gasleft); - transcript->send_to_verifier(commitment_labels.main_sel_op_lt, witness_commitments.main_sel_op_lt); - transcript->send_to_verifier(commitment_labels.main_sel_op_lte, witness_commitments.main_sel_op_lte); - transcript->send_to_verifier(commitment_labels.main_sel_op_mov, witness_commitments.main_sel_op_mov); - transcript->send_to_verifier(commitment_labels.main_sel_op_mul, witness_commitments.main_sel_op_mul); - transcript->send_to_verifier(commitment_labels.main_sel_op_not, witness_commitments.main_sel_op_not); - transcript->send_to_verifier(commitment_labels.main_sel_op_note_hash_exists, - witness_commitments.main_sel_op_note_hash_exists); - transcript->send_to_verifier(commitment_labels.main_sel_op_nullifier_exists, - witness_commitments.main_sel_op_nullifier_exists); - transcript->send_to_verifier(commitment_labels.main_sel_op_or, witness_commitments.main_sel_op_or); - transcript->send_to_verifier(commitment_labels.main_sel_op_pedersen, witness_commitments.main_sel_op_pedersen); - transcript->send_to_verifier(commitment_labels.main_sel_op_poseidon2, witness_commitments.main_sel_op_poseidon2); - transcript->send_to_verifier(commitment_labels.main_sel_op_radix_le, witness_commitments.main_sel_op_radix_le); - transcript->send_to_verifier(commitment_labels.main_sel_op_sender, witness_commitments.main_sel_op_sender); - transcript->send_to_verifier(commitment_labels.main_sel_op_sha256, witness_commitments.main_sel_op_sha256); - transcript->send_to_verifier(commitment_labels.main_sel_op_shl, witness_commitments.main_sel_op_shl); - transcript->send_to_verifier(commitment_labels.main_sel_op_shr, witness_commitments.main_sel_op_shr); - transcript->send_to_verifier(commitment_labels.main_sel_op_sload, witness_commitments.main_sel_op_sload); - transcript->send_to_verifier(commitment_labels.main_sel_op_sstore, witness_commitments.main_sel_op_sstore); - transcript->send_to_verifier(commitment_labels.main_sel_op_storage_address, - witness_commitments.main_sel_op_storage_address); - transcript->send_to_verifier(commitment_labels.main_sel_op_sub, witness_commitments.main_sel_op_sub); - transcript->send_to_verifier(commitment_labels.main_sel_op_timestamp, witness_commitments.main_sel_op_timestamp); - transcript->send_to_verifier(commitment_labels.main_sel_op_transaction_fee, - witness_commitments.main_sel_op_transaction_fee); - transcript->send_to_verifier(commitment_labels.main_sel_op_version, witness_commitments.main_sel_op_version); - transcript->send_to_verifier(commitment_labels.main_sel_op_xor, witness_commitments.main_sel_op_xor); - transcript->send_to_verifier(commitment_labels.main_sel_q_kernel_lookup, - witness_commitments.main_sel_q_kernel_lookup); - transcript->send_to_verifier(commitment_labels.main_sel_q_kernel_output_lookup, - witness_commitments.main_sel_q_kernel_output_lookup); - transcript->send_to_verifier(commitment_labels.main_sel_resolve_ind_addr_a, - witness_commitments.main_sel_resolve_ind_addr_a); - transcript->send_to_verifier(commitment_labels.main_sel_resolve_ind_addr_b, - witness_commitments.main_sel_resolve_ind_addr_b); - transcript->send_to_verifier(commitment_labels.main_sel_resolve_ind_addr_c, - witness_commitments.main_sel_resolve_ind_addr_c); - transcript->send_to_verifier(commitment_labels.main_sel_resolve_ind_addr_d, - witness_commitments.main_sel_resolve_ind_addr_d); - transcript->send_to_verifier(commitment_labels.main_sel_rng_16, witness_commitments.main_sel_rng_16); - transcript->send_to_verifier(commitment_labels.main_sel_rng_8, witness_commitments.main_sel_rng_8); - transcript->send_to_verifier(commitment_labels.main_space_id, witness_commitments.main_space_id); - transcript->send_to_verifier(commitment_labels.main_tag_err, witness_commitments.main_tag_err); - transcript->send_to_verifier(commitment_labels.main_w_in_tag, witness_commitments.main_w_in_tag); - transcript->send_to_verifier(commitment_labels.mem_addr, witness_commitments.mem_addr); - transcript->send_to_verifier(commitment_labels.mem_clk, witness_commitments.mem_clk); - transcript->send_to_verifier(commitment_labels.mem_diff_hi, witness_commitments.mem_diff_hi); - transcript->send_to_verifier(commitment_labels.mem_diff_lo, witness_commitments.mem_diff_lo); - transcript->send_to_verifier(commitment_labels.mem_diff_mid, witness_commitments.mem_diff_mid); - transcript->send_to_verifier(commitment_labels.mem_glob_addr, witness_commitments.mem_glob_addr); - transcript->send_to_verifier(commitment_labels.mem_last, witness_commitments.mem_last); - transcript->send_to_verifier(commitment_labels.mem_lastAccess, witness_commitments.mem_lastAccess); - transcript->send_to_verifier(commitment_labels.mem_one_min_inv, witness_commitments.mem_one_min_inv); - transcript->send_to_verifier(commitment_labels.mem_r_in_tag, witness_commitments.mem_r_in_tag); - transcript->send_to_verifier(commitment_labels.mem_rw, witness_commitments.mem_rw); - transcript->send_to_verifier(commitment_labels.mem_sel_mem, witness_commitments.mem_sel_mem); - transcript->send_to_verifier(commitment_labels.mem_sel_mov_ia_to_ic, witness_commitments.mem_sel_mov_ia_to_ic); - transcript->send_to_verifier(commitment_labels.mem_sel_mov_ib_to_ic, witness_commitments.mem_sel_mov_ib_to_ic); - transcript->send_to_verifier(commitment_labels.mem_sel_op_a, witness_commitments.mem_sel_op_a); - transcript->send_to_verifier(commitment_labels.mem_sel_op_b, witness_commitments.mem_sel_op_b); - transcript->send_to_verifier(commitment_labels.mem_sel_op_c, witness_commitments.mem_sel_op_c); - transcript->send_to_verifier(commitment_labels.mem_sel_op_cmov, witness_commitments.mem_sel_op_cmov); - transcript->send_to_verifier(commitment_labels.mem_sel_op_d, witness_commitments.mem_sel_op_d); - transcript->send_to_verifier(commitment_labels.mem_sel_resolve_ind_addr_a, - witness_commitments.mem_sel_resolve_ind_addr_a); - transcript->send_to_verifier(commitment_labels.mem_sel_resolve_ind_addr_b, - witness_commitments.mem_sel_resolve_ind_addr_b); - transcript->send_to_verifier(commitment_labels.mem_sel_resolve_ind_addr_c, - witness_commitments.mem_sel_resolve_ind_addr_c); - transcript->send_to_verifier(commitment_labels.mem_sel_resolve_ind_addr_d, - witness_commitments.mem_sel_resolve_ind_addr_d); - transcript->send_to_verifier(commitment_labels.mem_sel_rng_chk, witness_commitments.mem_sel_rng_chk); - transcript->send_to_verifier(commitment_labels.mem_skip_check_tag, witness_commitments.mem_skip_check_tag); - transcript->send_to_verifier(commitment_labels.mem_space_id, witness_commitments.mem_space_id); - transcript->send_to_verifier(commitment_labels.mem_tag, witness_commitments.mem_tag); - transcript->send_to_verifier(commitment_labels.mem_tag_err, witness_commitments.mem_tag_err); - transcript->send_to_verifier(commitment_labels.mem_tsp, witness_commitments.mem_tsp); - transcript->send_to_verifier(commitment_labels.mem_val, witness_commitments.mem_val); - transcript->send_to_verifier(commitment_labels.mem_w_in_tag, witness_commitments.mem_w_in_tag); - transcript->send_to_verifier(commitment_labels.pedersen_clk, witness_commitments.pedersen_clk); - transcript->send_to_verifier(commitment_labels.pedersen_input, witness_commitments.pedersen_input); - transcript->send_to_verifier(commitment_labels.pedersen_output, witness_commitments.pedersen_output); - transcript->send_to_verifier(commitment_labels.pedersen_sel_pedersen, witness_commitments.pedersen_sel_pedersen); - transcript->send_to_verifier(commitment_labels.poseidon2_clk, witness_commitments.poseidon2_clk); - transcript->send_to_verifier(commitment_labels.poseidon2_input, witness_commitments.poseidon2_input); - transcript->send_to_verifier(commitment_labels.poseidon2_output, witness_commitments.poseidon2_output); - transcript->send_to_verifier(commitment_labels.poseidon2_sel_poseidon_perm, - witness_commitments.poseidon2_sel_poseidon_perm); - transcript->send_to_verifier(commitment_labels.powers_power_of_2, witness_commitments.powers_power_of_2); - transcript->send_to_verifier(commitment_labels.sha256_clk, witness_commitments.sha256_clk); - transcript->send_to_verifier(commitment_labels.sha256_input, witness_commitments.sha256_input); - transcript->send_to_verifier(commitment_labels.sha256_output, witness_commitments.sha256_output); - transcript->send_to_verifier(commitment_labels.sha256_sel_sha256_compression, - witness_commitments.sha256_sel_sha256_compression); - transcript->send_to_verifier(commitment_labels.sha256_state, witness_commitments.sha256_state); - transcript->send_to_verifier(commitment_labels.lookup_byte_lengths_counts, - witness_commitments.lookup_byte_lengths_counts); - transcript->send_to_verifier(commitment_labels.lookup_byte_operations_counts, - witness_commitments.lookup_byte_operations_counts); - transcript->send_to_verifier(commitment_labels.lookup_opcode_gas_counts, - witness_commitments.lookup_opcode_gas_counts); - transcript->send_to_verifier(commitment_labels.range_check_l2_gas_hi_counts, - witness_commitments.range_check_l2_gas_hi_counts); - transcript->send_to_verifier(commitment_labels.range_check_l2_gas_lo_counts, - witness_commitments.range_check_l2_gas_lo_counts); - transcript->send_to_verifier(commitment_labels.range_check_da_gas_hi_counts, - witness_commitments.range_check_da_gas_hi_counts); - transcript->send_to_verifier(commitment_labels.range_check_da_gas_lo_counts, - witness_commitments.range_check_da_gas_lo_counts); - transcript->send_to_verifier(commitment_labels.kernel_output_lookup_counts, - witness_commitments.kernel_output_lookup_counts); - transcript->send_to_verifier(commitment_labels.lookup_into_kernel_counts, - witness_commitments.lookup_into_kernel_counts); - transcript->send_to_verifier(commitment_labels.incl_main_tag_err_counts, - witness_commitments.incl_main_tag_err_counts); - transcript->send_to_verifier(commitment_labels.incl_mem_tag_err_counts, - witness_commitments.incl_mem_tag_err_counts); - transcript->send_to_verifier(commitment_labels.lookup_mem_rng_chk_lo_counts, - witness_commitments.lookup_mem_rng_chk_lo_counts); - transcript->send_to_verifier(commitment_labels.lookup_mem_rng_chk_mid_counts, - witness_commitments.lookup_mem_rng_chk_mid_counts); - transcript->send_to_verifier(commitment_labels.lookup_mem_rng_chk_hi_counts, - witness_commitments.lookup_mem_rng_chk_hi_counts); - transcript->send_to_verifier(commitment_labels.lookup_pow_2_0_counts, witness_commitments.lookup_pow_2_0_counts); - transcript->send_to_verifier(commitment_labels.lookup_pow_2_1_counts, witness_commitments.lookup_pow_2_1_counts); - transcript->send_to_verifier(commitment_labels.lookup_u8_0_counts, witness_commitments.lookup_u8_0_counts); - transcript->send_to_verifier(commitment_labels.lookup_u8_1_counts, witness_commitments.lookup_u8_1_counts); - transcript->send_to_verifier(commitment_labels.lookup_u16_0_counts, witness_commitments.lookup_u16_0_counts); - transcript->send_to_verifier(commitment_labels.lookup_u16_1_counts, witness_commitments.lookup_u16_1_counts); - transcript->send_to_verifier(commitment_labels.lookup_u16_2_counts, witness_commitments.lookup_u16_2_counts); - transcript->send_to_verifier(commitment_labels.lookup_u16_3_counts, witness_commitments.lookup_u16_3_counts); - transcript->send_to_verifier(commitment_labels.lookup_u16_4_counts, witness_commitments.lookup_u16_4_counts); - transcript->send_to_verifier(commitment_labels.lookup_u16_5_counts, witness_commitments.lookup_u16_5_counts); - transcript->send_to_verifier(commitment_labels.lookup_u16_6_counts, witness_commitments.lookup_u16_6_counts); - transcript->send_to_verifier(commitment_labels.lookup_u16_7_counts, witness_commitments.lookup_u16_7_counts); - transcript->send_to_verifier(commitment_labels.lookup_u16_8_counts, witness_commitments.lookup_u16_8_counts); - transcript->send_to_verifier(commitment_labels.lookup_u16_9_counts, witness_commitments.lookup_u16_9_counts); - transcript->send_to_verifier(commitment_labels.lookup_u16_10_counts, witness_commitments.lookup_u16_10_counts); - transcript->send_to_verifier(commitment_labels.lookup_u16_11_counts, witness_commitments.lookup_u16_11_counts); - transcript->send_to_verifier(commitment_labels.lookup_u16_12_counts, witness_commitments.lookup_u16_12_counts); - transcript->send_to_verifier(commitment_labels.lookup_u16_13_counts, witness_commitments.lookup_u16_13_counts); - transcript->send_to_verifier(commitment_labels.lookup_u16_14_counts, witness_commitments.lookup_u16_14_counts); - transcript->send_to_verifier(commitment_labels.lookup_div_u16_0_counts, - witness_commitments.lookup_div_u16_0_counts); - transcript->send_to_verifier(commitment_labels.lookup_div_u16_1_counts, - witness_commitments.lookup_div_u16_1_counts); - transcript->send_to_verifier(commitment_labels.lookup_div_u16_2_counts, - witness_commitments.lookup_div_u16_2_counts); - transcript->send_to_verifier(commitment_labels.lookup_div_u16_3_counts, - witness_commitments.lookup_div_u16_3_counts); - transcript->send_to_verifier(commitment_labels.lookup_div_u16_4_counts, - witness_commitments.lookup_div_u16_4_counts); - transcript->send_to_verifier(commitment_labels.lookup_div_u16_5_counts, - witness_commitments.lookup_div_u16_5_counts); - transcript->send_to_verifier(commitment_labels.lookup_div_u16_6_counts, - witness_commitments.lookup_div_u16_6_counts); - transcript->send_to_verifier(commitment_labels.lookup_div_u16_7_counts, - witness_commitments.lookup_div_u16_7_counts); + auto wire_polys = prover_polynomials.get_wires(); + auto labels = commitment_labels.get_wires(); + for (size_t idx = 0; idx < wire_polys.size(); ++idx) { + transcript->send_to_verifier(labels[idx], commitment_key->commit(wire_polys[idx])); + } } void AvmProver::execute_log_derivative_inverse_round() diff --git a/barretenberg/cpp/src/barretenberg/vm/generated/avm_verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/generated/avm_verifier.cpp index d15ad4f2fca..71f078ae560 100644 --- a/barretenberg/cpp/src/barretenberg/vm/generated/avm_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/generated/avm_verifier.cpp @@ -71,537 +71,9 @@ bool AvmVerifier::verify_proof(const HonkProof& proof, const std::vectortemplate 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.main_calldata = transcript->template receive_from_prover(commitment_labels.main_calldata); - 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_function_selector = - transcript->template receive_from_prover(commitment_labels.main_sel_op_function_selector); - 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); + for (auto [comm, label] : zip_view(commitments.get_wires(), commitment_labels.get_wires())) { + comm = transcript->template receive_from_prover(label); + } auto [beta, gamm] = transcript->template get_challenges("beta", "gamma"); relation_parameters.beta = beta; From 79de4a6f73552e712a9de138ff74d90fec68a54e Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Wed, 3 Jul 2024 10:35:32 +0000 Subject: [PATCH 2/2] chore: update codegen --- .../barretenberg/vm/generated/avm_flavor.hpp | 158 +++++++++--------- .../barretenberg/vm/generated/avm_prover.cpp | 1 + .../bb-pil-backend/src/flavor_builder.rs | 128 ++++++++++---- .../bb-pil-backend/src/prover_builder.rs | 31 +--- .../bb-pil-backend/src/verifier_builder.rs | 8 +- bb-pilcom/bb-pil-backend/src/vm_builder.rs | 10 +- 6 files changed, 189 insertions(+), 147 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/generated/avm_flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/generated/avm_flavor.hpp index 950e7dd5029..066bf7e1a31 100644 --- a/barretenberg/cpp/src/barretenberg/vm/generated/avm_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/generated/avm_flavor.hpp @@ -536,15 +536,8 @@ class AvmFlavor { lookup_div_u16_5_counts, lookup_div_u16_6_counts, lookup_div_u16_7_counts) - - RefVector get_wires() { return get_all(); }; }; - /** - * @brief Entities that are constructed by the prover. - * - * @tparam DataType - */ template struct DerivedWitnessEntities { DEFINE_FLAVOR_MEMBERS(DataType, perm_main_alu, @@ -600,14 +593,7 @@ class AvmFlavor { lookup_div_u16_4, lookup_div_u16_5, lookup_div_u16_6, - lookup_div_u16_7); - }; - - template - class WitnessEntities : public WireEntities, public DerivedWitnessEntities { - public: - DEFINE_COMPOUND_GET_ALL(WireEntities, DerivedWitnessEntities) - auto get_wires() { return WireEntities::get_all(); }; + lookup_div_u16_7) }; template class ShiftedEntities { @@ -683,79 +669,88 @@ class AvmFlavor { template static auto get_to_be_shifted(PrecomputedAndWitnessEntitiesSuperset& entities) { - return RefArray{ entities.alu_a_hi, - entities.alu_a_lo, - entities.alu_b_hi, - entities.alu_b_lo, - entities.alu_cmp_rng_ctr, - entities.alu_div_u16_r0, - entities.alu_div_u16_r1, - entities.alu_div_u16_r2, - entities.alu_div_u16_r3, - entities.alu_div_u16_r4, - entities.alu_div_u16_r5, - entities.alu_div_u16_r6, - entities.alu_div_u16_r7, - entities.alu_op_add, - entities.alu_op_cast_prev, - entities.alu_op_cast, - entities.alu_op_div, - entities.alu_op_mul, - entities.alu_op_shl, - entities.alu_op_shr, - entities.alu_op_sub, - entities.alu_p_sub_a_hi, - entities.alu_p_sub_a_lo, - entities.alu_p_sub_b_hi, - entities.alu_p_sub_b_lo, - entities.alu_sel_alu, - entities.alu_sel_cmp, - entities.alu_sel_div_rng_chk, - entities.alu_sel_rng_chk_lookup, - entities.alu_sel_rng_chk, - entities.alu_u16_r0, - entities.alu_u16_r1, - entities.alu_u16_r2, - entities.alu_u16_r3, - entities.alu_u16_r4, - entities.alu_u16_r5, - entities.alu_u16_r6, - entities.alu_u8_r0, - entities.alu_u8_r1, - entities.binary_acc_ia, - entities.binary_acc_ib, - entities.binary_acc_ic, - entities.binary_mem_tag_ctr, - entities.binary_op_id, - entities.kernel_emit_l2_to_l1_msg_write_offset, - entities.kernel_emit_note_hash_write_offset, - entities.kernel_emit_nullifier_write_offset, - entities.kernel_emit_unencrypted_log_write_offset, - entities.kernel_l1_to_l2_msg_exists_write_offset, - entities.kernel_note_hash_exist_write_offset, - entities.kernel_nullifier_exists_write_offset, - entities.kernel_nullifier_non_exists_write_offset, - entities.kernel_side_effect_counter, - entities.kernel_sload_write_offset, - entities.kernel_sstore_write_offset, - entities.main_da_gas_remaining, - entities.main_internal_return_ptr, - entities.main_l2_gas_remaining, - entities.main_pc, - entities.mem_glob_addr, - entities.mem_rw, - entities.mem_sel_mem, - entities.mem_tag, - entities.mem_tsp, - entities.mem_val }; + return RefArray{ + + entities.alu_a_hi, + entities.alu_a_lo, + entities.alu_b_hi, + entities.alu_b_lo, + entities.alu_cmp_rng_ctr, + entities.alu_div_u16_r0, + entities.alu_div_u16_r1, + entities.alu_div_u16_r2, + entities.alu_div_u16_r3, + entities.alu_div_u16_r4, + entities.alu_div_u16_r5, + entities.alu_div_u16_r6, + entities.alu_div_u16_r7, + entities.alu_op_add, + entities.alu_op_cast_prev, + entities.alu_op_cast, + entities.alu_op_div, + entities.alu_op_mul, + entities.alu_op_shl, + entities.alu_op_shr, + entities.alu_op_sub, + entities.alu_p_sub_a_hi, + entities.alu_p_sub_a_lo, + entities.alu_p_sub_b_hi, + entities.alu_p_sub_b_lo, + entities.alu_sel_alu, + entities.alu_sel_cmp, + entities.alu_sel_div_rng_chk, + entities.alu_sel_rng_chk_lookup, + entities.alu_sel_rng_chk, + entities.alu_u16_r0, + entities.alu_u16_r1, + entities.alu_u16_r2, + entities.alu_u16_r3, + entities.alu_u16_r4, + entities.alu_u16_r5, + entities.alu_u16_r6, + entities.alu_u8_r0, + entities.alu_u8_r1, + entities.binary_acc_ia, + entities.binary_acc_ib, + entities.binary_acc_ic, + entities.binary_mem_tag_ctr, + entities.binary_op_id, + entities.kernel_emit_l2_to_l1_msg_write_offset, + entities.kernel_emit_note_hash_write_offset, + entities.kernel_emit_nullifier_write_offset, + entities.kernel_emit_unencrypted_log_write_offset, + entities.kernel_l1_to_l2_msg_exists_write_offset, + entities.kernel_note_hash_exist_write_offset, + entities.kernel_nullifier_exists_write_offset, + entities.kernel_nullifier_non_exists_write_offset, + entities.kernel_side_effect_counter, + entities.kernel_sload_write_offset, + entities.kernel_sstore_write_offset, + entities.main_da_gas_remaining, + entities.main_internal_return_ptr, + entities.main_l2_gas_remaining, + entities.main_pc, + entities.mem_glob_addr, + entities.mem_rw, + entities.mem_sel_mem, + entities.mem_tag, + entities.mem_tsp, + entities.mem_val, + }; } + template + class WitnessEntities : public WireEntities, public DerivedWitnessEntities { + public: + DEFINE_COMPOUND_GET_ALL(WireEntities, DerivedWitnessEntities) + auto get_wires() { return WireEntities::get_all(); }; + }; + template class AllEntities : public PrecomputedEntities, public WitnessEntities, public ShiftedEntities { public: - // Init AllEntities() : PrecomputedEntities{} , WitnessEntities{} @@ -768,7 +763,6 @@ class AvmFlavor { { return concatenate(PrecomputedEntities::get_all(), WitnessEntities::get_all()); } - auto get_to_be_shifted() { return AvmFlavor::get_to_be_shifted(*this); } auto get_shifted() { return ShiftedEntities::get_all(); } auto get_precomputed() { return PrecomputedEntities::get_all(); } diff --git a/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.cpp b/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.cpp index 88fe4755fa3..c4926193ce6 100644 --- a/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.cpp @@ -55,6 +55,7 @@ void AvmProver::execute_preamble_round() */ void AvmProver::execute_wire_commitments_round() { + // Commit to all polynomials (apart from logderivative inverse polynomials, which are committed to in the later // logderivative phase) auto wire_polys = prover_polynomials.get_wires(); diff --git a/bb-pilcom/bb-pil-backend/src/flavor_builder.rs b/bb-pilcom/bb-pil-backend/src/flavor_builder.rs index dab4058bdfe..2c139e505c1 100644 --- a/bb-pilcom/bb-pil-backend/src/flavor_builder.rs +++ b/bb-pilcom/bb-pil-backend/src/flavor_builder.rs @@ -12,6 +12,7 @@ pub trait FlavorBuilder { lookups: &[String], fixed: &[String], witness: &[String], + witness_without_inverses: &[String], all_cols: &[String], to_be_shifted: &[String], shifted: &[String], @@ -28,6 +29,7 @@ impl FlavorBuilder for BBFiles { lookups: &[String], fixed: &[String], witness: &[String], + witness_without_inverses: &[String], all_cols: &[String], to_be_shifted: &[String], shifted: &[String], @@ -47,9 +49,9 @@ impl FlavorBuilder for BBFiles { // Entities classes let precomputed_entities = create_precomputed_entities(fixed); - let witness_entities = create_witness_entities(witness); - let all_entities = - create_all_entities(all_cols, to_be_shifted, shifted, all_cols_and_shifts); + let witness_entities = + create_witness_entities(witness_without_inverses, lookups, shifted, to_be_shifted); + let all_entities = create_all_entities(); let proving_and_verification_key = create_proving_and_verification_key(name, lookups, to_be_shifted); @@ -197,16 +199,12 @@ fn create_relation_definitions( let comma_sep_lookups: Option = create_lookups_tuple(lookups); // We only include the grand product relations if we are given lookups - let mut grand_product_relations = String::new(); let mut all_relations = comma_sep_relations.to_string(); if let Some(lookups) = comma_sep_lookups { all_relations = all_relations + &format!(", {lookups}"); - grand_product_relations = format!("using GrandProductRelations = std::tuple<{lookups}>;"); } format!(" - {grand_product_relations} - using Relations = std::tuple<{all_relations}>; static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length(); @@ -286,52 +284,120 @@ fn create_precomputed_entities(fixed: &[String]) -> String { ) } -fn create_witness_entities(witness: &[String]) -> String { - let pointer_view = create_flavor_members(witness); - - let wires = return_ref_vector("get_wires", witness); +// Note(md): this is witnesses WITHOUT inverses or shifts +fn create_wire_entities(witness: &[String]) -> String { + let flavor_members = create_flavor_members(witness); format!( " template - class WitnessEntities {{ + class WireEntities {{ public: + {flavor_members} + }}; + " + ) +} - {pointer_view} +// Note(md): this is witnesses and in future grand products +fn create_derived_witnesses(inverses: &[String]) -> String { + let flavor_members = create_flavor_members(inverses); - {wires} + format!( + " + template + struct DerivedWitnessEntities {{ + {flavor_members} }}; " ) } -/// Creates container of all witness entities and shifts -fn create_all_entities( - all_cols: &[String], - to_be_shifted: &[String], +fn create_shifted_entities(shifted: &[String]) -> String { + let flavor_members = create_flavor_members(shifted); + + format!( + " + template + class ShiftedEntities {{ + public: + {flavor_members} + }}; + " + ) +} + +fn create_to_be_shifted(to_be_shifted: &[String]) -> String { + let entities_transformation = |name: &String| format!("entities.{name},"); + let entities_list = map_with_newline(to_be_shifted, entities_transformation); + + format!( + " + template + static auto get_to_be_shifted(PrecomputedAndWitnessEntitiesSuperset& entities) {{ + return RefArray{{ + + {entities_list} + }}; + }} + " + ) +} + +fn create_witness_entities( + witness: &[String], + inverses: &[String], shifted: &[String], - all_cols_and_shifts: &[String], + to_be_shifted: &[String], ) -> String { - let all_entities_flavor_members = create_flavor_members(all_cols_and_shifts); - - let wires = return_ref_vector("get_wires", all_cols_and_shifts); - let get_unshifted = return_ref_vector("get_unshifted", all_cols); - let get_to_be_shifted = return_ref_vector("get_to_be_shifted", to_be_shifted); - let get_shifted = return_ref_vector("get_shifted", shifted); + let wire_entities = create_wire_entities(witness); + let derived_witnesses = create_derived_witnesses(inverses); + let shifted_entities = create_shifted_entities(shifted); + let to_be_shifted = create_to_be_shifted(to_be_shifted); format!( " + {wire_entities} + + {derived_witnesses} + + {shifted_entities} + + {to_be_shifted} + template - class AllEntities {{ + class WitnessEntities: public WireEntities, public DerivedWitnessEntities {{ public: + DEFINE_COMPOUND_GET_ALL(WireEntities, DerivedWitnessEntities) + auto get_wires() {{ return WireEntities::get_all(); }}; + }}; + " + ) +} - {all_entities_flavor_members} +/// Creates container of all witness entities and shifts +fn create_all_entities() -> String { + format!( + " + template + class AllEntities: public PrecomputedEntities, + public WitnessEntities, + public ShiftedEntities {{ + public: + AllEntities() + : PrecomputedEntities{{}} + , WitnessEntities{{}} + , ShiftedEntities{{}} + {{}} + DEFINE_COMPOUND_GET_ALL(PrecomputedEntities, WitnessEntities, ShiftedEntities) - {wires} - {get_unshifted} - {get_to_be_shifted} - {get_shifted} + auto get_unshifted(){{ + return concatenate(PrecomputedEntities::get_all(), WitnessEntities::get_all()); + }} + auto get_to_be_shifted(){{ return AvmFlavor::get_to_be_shifted(*this); }} + auto get_shifted() {{ return ShiftedEntities::get_all(); }} + auto get_precomputed() {{ return PrecomputedEntities::get_all(); }} }}; " ) diff --git a/bb-pilcom/bb-pil-backend/src/prover_builder.rs b/bb-pilcom/bb-pil-backend/src/prover_builder.rs index c0ea19709a5..faa2d81df98 100644 --- a/bb-pilcom/bb-pil-backend/src/prover_builder.rs +++ b/bb-pilcom/bb-pil-backend/src/prover_builder.rs @@ -4,12 +4,7 @@ use crate::utils::{map_with_newline, snake_case}; pub trait ProverBuilder { fn create_prover_hpp(&mut self, name: &str); - fn create_prover_cpp( - &mut self, - name: &str, - commitment_polys: &[String], - lookup_names: &[String], - ); + fn create_prover_cpp(&mut self, name: &str, lookup_names: &[String]); } impl ProverBuilder for BBFiles { @@ -83,15 +78,10 @@ impl ProverBuilder for BBFiles { /// Create the prover cpp file /// /// Committed polys are included as we manually unroll all commitments, as we do not commit to everything - fn create_prover_cpp( - &mut self, - name: &str, - commitment_polys: &[String], - lookup_names: &[String], - ) { + fn create_prover_cpp(&mut self, name: &str, lookup_names: &[String]) { let include_str = includes_cpp(&snake_case(name)); - let polynomial_commitment_phase = create_commitments_phase(commitment_polys); + let polynomial_commitment_phase = create_commitments_phase(); let (call_log_derivative_phase, log_derivative_inverse_phase): (String, String) = if lookup_names.is_empty() { @@ -292,18 +282,15 @@ fn send_to_verifier_transform(name: &String) -> String { format!("transcript->send_to_verifier(commitment_labels.{name}, witness_commitments.{name});") } -fn create_commitments_phase(polys_to_commit_to: &[String]) -> String { - let all_commit_operations = map_with_newline(polys_to_commit_to, commitment_transform); - let send_to_verifier_operations = - map_with_newline(polys_to_commit_to, send_to_verifier_transform); - +fn create_commitments_phase() -> String { format!( " // Commit to all polynomials (apart from logderivative inverse polynomials, which are committed to in the later logderivative phase) - {all_commit_operations} - - // Send all commitments to the verifier - {send_to_verifier_operations} + auto wire_polys = prover_polynomials.get_wires(); + auto labels = commitment_labels.get_wires(); + for (size_t idx = 0; idx < wire_polys.size(); ++idx) {{ + transcript->send_to_verifier(labels[idx], commitment_key->commit(wire_polys[idx])); + }} " ) } diff --git a/bb-pilcom/bb-pil-backend/src/verifier_builder.rs b/bb-pilcom/bb-pil-backend/src/verifier_builder.rs index a10a7bea021..588574de2ca 100644 --- a/bb-pilcom/bb-pil-backend/src/verifier_builder.rs +++ b/bb-pilcom/bb-pil-backend/src/verifier_builder.rs @@ -7,7 +7,6 @@ pub trait VerifierBuilder { fn create_verifier_cpp( &mut self, name: &str, - witness: &[String], inverses: &[String], public_cols: &[(String, usize)], ); @@ -19,7 +18,6 @@ impl VerifierBuilder for BBFiles { fn create_verifier_cpp( &mut self, name: &str, - witness: &[String], inverses: &[String], public_cols: &[(String, usize)], ) { @@ -30,8 +28,6 @@ impl VerifierBuilder for BBFiles { "commitments.{n} = transcript->template receive_from_prover(commitment_labels.{n});" ) }; - let wire_commitments = map_with_newline(witness, wire_transformation); - let has_public_input_columns = !public_cols.is_empty(); let has_inverses = !inverses.is_empty(); @@ -151,7 +147,9 @@ impl VerifierBuilder for BBFiles { }} // Get commitments to VM wires - {wire_commitments} + for (auto [comm, label] : zip_view(commitments.get_wires(), commitment_labels.get_wires())) {{ + comm = transcript->template receive_from_prover(label); + }} {get_inverse_challenges} diff --git a/bb-pilcom/bb-pil-backend/src/vm_builder.rs b/bb-pilcom/bb-pil-backend/src/vm_builder.rs index 8707ef40a45..1410a317dc5 100644 --- a/bb-pilcom/bb-pil-backend/src/vm_builder.rs +++ b/bb-pilcom/bb-pil-backend/src/vm_builder.rs @@ -136,6 +136,7 @@ pub fn analyzed_to_cpp( &inverses, &fixed, &witness, + &witnesses_without_inverses, &all_cols, &to_be_shifted, &shifted, @@ -147,16 +148,11 @@ pub fn analyzed_to_cpp( bb_files.create_composer_hpp(file_name); // ----------------------- Create the Verifier files ----------------------- - bb_files.create_verifier_cpp( - file_name, - &witnesses_without_inverses, - &inverses, - &public_inputs, - ); + bb_files.create_verifier_cpp(file_name, &inverses, &public_inputs); bb_files.create_verifier_hpp(file_name, &public_inputs); // ----------------------- Create the Prover files ----------------------- - bb_files.create_prover_cpp(file_name, &witnesses_without_inverses, &inverses); + bb_files.create_prover_cpp(file_name, &inverses); bb_files.create_prover_hpp(file_name); }