From 4b793b014b31382c10ea0ff7c35bd324b834410a Mon Sep 17 00:00:00 2001 From: Facundo Date: Fri, 2 Aug 2024 14:31:32 +0100 Subject: [PATCH] chore(avm): make fixed tables use constant polys (#7744) The witnesses are gone but these columns are still NOT correctly loaded from the pk/vk. --- barretenberg/cpp/pil/avm/binary.pil | 1 - .../cpp/pil/avm/fixed/byte_lookup.pil | 16 +- barretenberg/cpp/pil/avm/fixed/gas.pil | 13 +- barretenberg/cpp/pil/avm/fixed/powers.pil | 5 +- .../vm/avm/generated/circuit_builder.cpp | 22 +- .../barretenberg/vm/avm/generated/flavor.cpp | 1215 +++++++++-------- .../barretenberg/vm/avm/generated/flavor.hpp | 12 +- .../vm/avm/generated/full_row.cpp | 46 +- .../vm/avm/generated/full_row.hpp | 22 +- .../vm/avm/generated/relations/gas.hpp | 59 - .../vm/avm/generated/relations/powers.hpp | 45 - .../barretenberg/vm/avm/trace/fixed_gas.cpp | 4 +- .../barretenberg/vm/avm/trace/fixed_gas.hpp | 7 +- .../vm/avm/trace/fixed_powers.hpp | 5 +- .../src/barretenberg/vm/avm/trace/trace.cpp | 3 +- 15 files changed, 684 insertions(+), 791 deletions(-) delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/gas.hpp delete mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/powers.hpp diff --git a/barretenberg/cpp/pil/avm/binary.pil b/barretenberg/cpp/pil/avm/binary.pil index c951481caf6..d30edaa7474 100644 --- a/barretenberg/cpp/pil/avm/binary.pil +++ b/barretenberg/cpp/pil/avm/binary.pil @@ -1,7 +1,6 @@ include "fixed/byte_lookup.pil"; namespace binary(256); - pol commit clk; // Selector for Binary Operation diff --git a/barretenberg/cpp/pil/avm/fixed/byte_lookup.pil b/barretenberg/cpp/pil/avm/fixed/byte_lookup.pil index 1759bf83899..5cd3b8f242f 100644 --- a/barretenberg/cpp/pil/avm/fixed/byte_lookup.pil +++ b/barretenberg/cpp/pil/avm/fixed/byte_lookup.pil @@ -1,15 +1,13 @@ namespace byte_lookup(256); - // These columns are commited for now, but will be migrated to constant/fixed when - // we support more *exotic* code generation options - pol commit table_op_id; // identifies if operation is AND/OR/XOR - pol commit table_input_a; // column of all 8-bit numbers - pol commit table_input_b; // column of all 8-bit numbers - pol commit table_output; // output = a AND/OR/XOR b + pol constant table_op_id; // identifies if operation is AND/OR/XOR + pol constant table_input_a; // column of all 8-bit numbers + pol constant table_input_b; // column of all 8-bit numbers + pol constant table_output; // output = a AND/OR/XOR b // Selector to indicate when to utilise the lookup table // TODO: Support for 1-sided lookups may make this redundant. - pol commit sel_bin; + pol constant sel_bin; // These two columns are a mapping between instruction tags and their byte lengths // {U8: 1, U16: 2, ... , U128: 16} - pol commit table_in_tags; // Column of U8,U16,...,U128 - pol commit table_byte_lengths; // Columns of byte lengths 1,2,...,16; + pol constant table_in_tags; // Column of U8,U16,...,U128 + pol constant table_byte_lengths; // Columns of byte lengths 1,2,...,16; diff --git a/barretenberg/cpp/pil/avm/fixed/gas.pil b/barretenberg/cpp/pil/avm/fixed/gas.pil index e366c85c67f..d540abbf149 100644 --- a/barretenberg/cpp/pil/avm/fixed/gas.pil +++ b/barretenberg/cpp/pil/avm/fixed/gas.pil @@ -1,13 +1,6 @@ namespace gas(256); - // TODO: WILL BE FIXED - we should be able to have this be a fixed column / the lookup tables are fixed so require no selectors - // TODO: All the columns here will have to be constant (when supported by our powdr fork and proving system) - pol commit sel_gas_cost; + pol constant sel_gas_cost; // TODO(ISSUE_NUMBER): Constrain variable gas costs - pol commit l2_gas_fixed_table; - pol commit da_gas_fixed_table; - - // DUMMY RELATIONS to force creation of hpp. - sel_gas_cost - sel_gas_cost = 0; - l2_gas_fixed_table - l2_gas_fixed_table = 0; - da_gas_fixed_table - da_gas_fixed_table = 0; \ No newline at end of file + pol constant l2_gas_fixed_table; + pol constant da_gas_fixed_table; \ No newline at end of file diff --git a/barretenberg/cpp/pil/avm/fixed/powers.pil b/barretenberg/cpp/pil/avm/fixed/powers.pil index bc497eca04c..dcf0bb00e83 100644 --- a/barretenberg/cpp/pil/avm/fixed/powers.pil +++ b/barretenberg/cpp/pil/avm/fixed/powers.pil @@ -3,7 +3,4 @@ // power_of_2 = 1 << clk; namespace powers(256); // clk will be the implicit power. - pol commit power_of_2; - - // DUMMY RELATION to force creation of hpp. - power_of_2 - power_of_2 = 0; \ No newline at end of file + pol constant power_of_2; \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/circuit_builder.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/circuit_builder.cpp index 709257a4159..3a68409794b 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/circuit_builder.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/circuit_builder.cpp @@ -24,9 +24,20 @@ AvmCircuitBuilder::ProverPolynomials AvmCircuitBuilder::compute_polynomials() co } for (size_t i = 0; i < rows.size(); i++) { + polys.byte_lookup_sel_bin[i] = rows[i].byte_lookup_sel_bin; + polys.byte_lookup_table_byte_lengths[i] = rows[i].byte_lookup_table_byte_lengths; + polys.byte_lookup_table_in_tags[i] = rows[i].byte_lookup_table_in_tags; + polys.byte_lookup_table_input_a[i] = rows[i].byte_lookup_table_input_a; + polys.byte_lookup_table_input_b[i] = rows[i].byte_lookup_table_input_b; + polys.byte_lookup_table_op_id[i] = rows[i].byte_lookup_table_op_id; + polys.byte_lookup_table_output[i] = rows[i].byte_lookup_table_output; + polys.gas_da_gas_fixed_table[i] = rows[i].gas_da_gas_fixed_table; + polys.gas_l2_gas_fixed_table[i] = rows[i].gas_l2_gas_fixed_table; + polys.gas_sel_gas_cost[i] = rows[i].gas_sel_gas_cost; polys.main_clk[i] = rows[i].main_clk; polys.main_sel_first[i] = rows[i].main_sel_first; polys.main_zeroes[i] = rows[i].main_zeroes; + polys.powers_power_of_2[i] = rows[i].powers_power_of_2; polys.kernel_kernel_inputs[i] = rows[i].kernel_kernel_inputs; polys.kernel_kernel_value_out[i] = rows[i].kernel_kernel_value_out; polys.kernel_kernel_side_effect_out[i] = rows[i].kernel_kernel_side_effect_out; @@ -129,21 +140,11 @@ AvmCircuitBuilder::ProverPolynomials AvmCircuitBuilder::compute_polynomials() co polys.binary_op_id[i] = rows[i].binary_op_id; polys.binary_sel_bin[i] = rows[i].binary_sel_bin; polys.binary_start[i] = rows[i].binary_start; - polys.byte_lookup_sel_bin[i] = rows[i].byte_lookup_sel_bin; - polys.byte_lookup_table_byte_lengths[i] = rows[i].byte_lookup_table_byte_lengths; - polys.byte_lookup_table_in_tags[i] = rows[i].byte_lookup_table_in_tags; - polys.byte_lookup_table_input_a[i] = rows[i].byte_lookup_table_input_a; - polys.byte_lookup_table_input_b[i] = rows[i].byte_lookup_table_input_b; - polys.byte_lookup_table_op_id[i] = rows[i].byte_lookup_table_op_id; - polys.byte_lookup_table_output[i] = rows[i].byte_lookup_table_output; polys.conversion_clk[i] = rows[i].conversion_clk; polys.conversion_input[i] = rows[i].conversion_input; polys.conversion_num_limbs[i] = rows[i].conversion_num_limbs; polys.conversion_radix[i] = rows[i].conversion_radix; polys.conversion_sel_to_radix_le[i] = rows[i].conversion_sel_to_radix_le; - polys.gas_da_gas_fixed_table[i] = rows[i].gas_da_gas_fixed_table; - polys.gas_l2_gas_fixed_table[i] = rows[i].gas_l2_gas_fixed_table; - polys.gas_sel_gas_cost[i] = rows[i].gas_sel_gas_cost; polys.keccakf1600_clk[i] = rows[i].keccakf1600_clk; polys.keccakf1600_input[i] = rows[i].keccakf1600_input; polys.keccakf1600_output[i] = rows[i].keccakf1600_output; @@ -602,7 +603,6 @@ AvmCircuitBuilder::ProverPolynomials AvmCircuitBuilder::compute_polynomials() co polys.poseidon2_mem_addr_write_d[i] = rows[i].poseidon2_mem_addr_write_d; polys.poseidon2_output_addr[i] = rows[i].poseidon2_output_addr; polys.poseidon2_sel_poseidon_perm[i] = rows[i].poseidon2_sel_poseidon_perm; - polys.powers_power_of_2[i] = rows[i].powers_power_of_2; polys.sha256_clk[i] = rows[i].sha256_clk; polys.sha256_input[i] = rows[i].sha256_input; polys.sha256_output[i] = rows[i].sha256_output; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp index 6b4758f47b2..481de9fb1b2 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp @@ -5,585 +5,585 @@ namespace bb { AvmFlavor::AllConstRefValues::AllConstRefValues( const RefArray& il) - : main_clk(il[0]) - , main_sel_first(il[1]) - , main_zeroes(il[2]) - , kernel_kernel_inputs(il[3]) - , kernel_kernel_value_out(il[4]) - , kernel_kernel_side_effect_out(il[5]) - , kernel_kernel_metadata_out(il[6]) - , main_calldata(il[7]) - , main_returndata(il[8]) - , alu_a_hi(il[9]) - , alu_a_lo(il[10]) - , alu_b_hi(il[11]) - , alu_b_lo(il[12]) - , alu_borrow(il[13]) - , alu_cf(il[14]) - , alu_clk(il[15]) - , alu_cmp_rng_ctr(il[16]) - , alu_div_u16_r0(il[17]) - , alu_div_u16_r1(il[18]) - , alu_div_u16_r2(il[19]) - , alu_div_u16_r3(il[20]) - , alu_div_u16_r4(il[21]) - , alu_div_u16_r5(il[22]) - , alu_div_u16_r6(il[23]) - , alu_div_u16_r7(il[24]) - , alu_divisor_hi(il[25]) - , alu_divisor_lo(il[26]) - , alu_ff_tag(il[27]) - , alu_ia(il[28]) - , alu_ib(il[29]) - , alu_ic(il[30]) - , alu_in_tag(il[31]) - , alu_op_add(il[32]) - , alu_op_cast(il[33]) - , alu_op_cast_prev(il[34]) - , alu_op_div(il[35]) - , alu_op_div_a_lt_b(il[36]) - , alu_op_div_std(il[37]) - , alu_op_eq(il[38]) - , alu_op_eq_diff_inv(il[39]) - , alu_op_lt(il[40]) - , alu_op_lte(il[41]) - , alu_op_mul(il[42]) - , alu_op_not(il[43]) - , alu_op_shl(il[44]) - , alu_op_shr(il[45]) - , alu_op_sub(il[46]) - , alu_p_a_borrow(il[47]) - , alu_p_b_borrow(il[48]) - , alu_p_sub_a_hi(il[49]) - , alu_p_sub_a_lo(il[50]) - , alu_p_sub_b_hi(il[51]) - , alu_p_sub_b_lo(il[52]) - , alu_partial_prod_hi(il[53]) - , alu_partial_prod_lo(il[54]) - , alu_quotient_hi(il[55]) - , alu_quotient_lo(il[56]) - , alu_remainder(il[57]) - , alu_res_hi(il[58]) - , alu_res_lo(il[59]) - , alu_sel_alu(il[60]) - , alu_sel_cmp(il[61]) - , alu_sel_div_rng_chk(il[62]) - , alu_sel_rng_chk(il[63]) - , alu_sel_rng_chk_lookup(il[64]) - , alu_sel_shift_which(il[65]) - , alu_shift_lt_bit_len(il[66]) - , alu_t_sub_s_bits(il[67]) - , alu_two_pow_s(il[68]) - , alu_two_pow_t_sub_s(il[69]) - , alu_u128_tag(il[70]) - , alu_u16_r0(il[71]) - , alu_u16_r1(il[72]) - , alu_u16_r10(il[73]) - , alu_u16_r11(il[74]) - , alu_u16_r12(il[75]) - , alu_u16_r13(il[76]) - , alu_u16_r14(il[77]) - , alu_u16_r2(il[78]) - , alu_u16_r3(il[79]) - , alu_u16_r4(il[80]) - , alu_u16_r5(il[81]) - , alu_u16_r6(il[82]) - , alu_u16_r7(il[83]) - , alu_u16_r8(il[84]) - , alu_u16_r9(il[85]) - , alu_u16_tag(il[86]) - , alu_u32_tag(il[87]) - , alu_u64_tag(il[88]) - , alu_u8_r0(il[89]) - , alu_u8_r1(il[90]) - , alu_u8_tag(il[91]) - , binary_acc_ia(il[92]) - , binary_acc_ib(il[93]) - , binary_acc_ic(il[94]) - , binary_clk(il[95]) - , binary_ia_bytes(il[96]) - , binary_ib_bytes(il[97]) - , binary_ic_bytes(il[98]) - , binary_in_tag(il[99]) - , binary_mem_tag_ctr(il[100]) - , binary_mem_tag_ctr_inv(il[101]) - , binary_op_id(il[102]) - , binary_sel_bin(il[103]) - , binary_start(il[104]) - , byte_lookup_sel_bin(il[105]) - , byte_lookup_table_byte_lengths(il[106]) - , byte_lookup_table_in_tags(il[107]) - , byte_lookup_table_input_a(il[108]) - , byte_lookup_table_input_b(il[109]) - , byte_lookup_table_op_id(il[110]) - , byte_lookup_table_output(il[111]) - , conversion_clk(il[112]) - , conversion_input(il[113]) - , conversion_num_limbs(il[114]) - , conversion_radix(il[115]) - , conversion_sel_to_radix_le(il[116]) - , gas_da_gas_fixed_table(il[117]) - , gas_l2_gas_fixed_table(il[118]) - , gas_sel_gas_cost(il[119]) - , keccakf1600_clk(il[120]) - , keccakf1600_input(il[121]) - , keccakf1600_output(il[122]) - , keccakf1600_sel_keccakf1600(il[123]) - , kernel_emit_l2_to_l1_msg_write_offset(il[124]) - , kernel_emit_note_hash_write_offset(il[125]) - , kernel_emit_nullifier_write_offset(il[126]) - , kernel_emit_unencrypted_log_write_offset(il[127]) - , kernel_kernel_in_offset(il[128]) - , kernel_kernel_out_offset(il[129]) - , kernel_l1_to_l2_msg_exists_write_offset(il[130]) - , kernel_note_hash_exist_write_offset(il[131]) - , kernel_nullifier_exists_write_offset(il[132]) - , kernel_nullifier_non_exists_write_offset(il[133]) - , kernel_q_public_input_kernel_add_to_table(il[134]) - , kernel_q_public_input_kernel_out_add_to_table(il[135]) - , kernel_side_effect_counter(il[136]) - , kernel_sload_write_offset(il[137]) - , kernel_sstore_write_offset(il[138]) - , main_abs_da_rem_gas_hi(il[139]) - , main_abs_da_rem_gas_lo(il[140]) - , main_abs_l2_rem_gas_hi(il[141]) - , main_abs_l2_rem_gas_lo(il[142]) - , main_alu_in_tag(il[143]) - , main_bin_op_id(il[144]) - , main_call_ptr(il[145]) - , main_da_gas_op_cost(il[146]) - , main_da_gas_remaining(il[147]) - , main_da_out_of_gas(il[148]) - , main_ia(il[149]) - , main_ib(il[150]) - , main_ic(il[151]) - , main_id(il[152]) - , main_id_zero(il[153]) - , main_ind_addr_a(il[154]) - , main_ind_addr_b(il[155]) - , main_ind_addr_c(il[156]) - , main_ind_addr_d(il[157]) - , main_internal_return_ptr(il[158]) - , main_inv(il[159]) - , main_l2_gas_op_cost(il[160]) - , main_l2_gas_remaining(il[161]) - , main_l2_out_of_gas(il[162]) - , main_mem_addr_a(il[163]) - , main_mem_addr_b(il[164]) - , main_mem_addr_c(il[165]) - , main_mem_addr_d(il[166]) - , main_op_err(il[167]) - , main_opcode_val(il[168]) - , main_pc(il[169]) - , main_r_in_tag(il[170]) - , main_rwa(il[171]) - , main_rwb(il[172]) - , main_rwc(il[173]) - , main_rwd(il[174]) - , main_sel_alu(il[175]) - , main_sel_bin(il[176]) - , main_sel_calldata(il[177]) - , main_sel_gas_accounting_active(il[178]) - , main_sel_last(il[179]) - , main_sel_mem_op_a(il[180]) - , main_sel_mem_op_activate_gas(il[181]) - , main_sel_mem_op_b(il[182]) - , main_sel_mem_op_c(il[183]) - , main_sel_mem_op_d(il[184]) - , main_sel_mov_ia_to_ic(il[185]) - , main_sel_mov_ib_to_ic(il[186]) - , main_sel_op_add(il[187]) - , main_sel_op_address(il[188]) - , main_sel_op_and(il[189]) - , main_sel_op_block_number(il[190]) - , main_sel_op_calldata_copy(il[191]) - , main_sel_op_cast(il[192]) - , main_sel_op_chain_id(il[193]) - , main_sel_op_cmov(il[194]) - , main_sel_op_coinbase(il[195]) - , main_sel_op_dagasleft(il[196]) - , main_sel_op_div(il[197]) - , main_sel_op_emit_l2_to_l1_msg(il[198]) - , main_sel_op_emit_note_hash(il[199]) - , main_sel_op_emit_nullifier(il[200]) - , main_sel_op_emit_unencrypted_log(il[201]) - , main_sel_op_eq(il[202]) - , main_sel_op_external_call(il[203]) - , main_sel_op_external_return(il[204]) - , main_sel_op_fdiv(il[205]) - , main_sel_op_fee_per_da_gas(il[206]) - , main_sel_op_fee_per_l2_gas(il[207]) - , main_sel_op_function_selector(il[208]) - , main_sel_op_get_contract_instance(il[209]) - , main_sel_op_halt(il[210]) - , main_sel_op_internal_call(il[211]) - , main_sel_op_internal_return(il[212]) - , main_sel_op_jump(il[213]) - , main_sel_op_jumpi(il[214]) - , main_sel_op_keccak(il[215]) - , main_sel_op_l1_to_l2_msg_exists(il[216]) - , main_sel_op_l2gasleft(il[217]) - , main_sel_op_lt(il[218]) - , main_sel_op_lte(il[219]) - , main_sel_op_mov(il[220]) - , main_sel_op_mul(il[221]) - , main_sel_op_not(il[222]) - , main_sel_op_note_hash_exists(il[223]) - , main_sel_op_nullifier_exists(il[224]) - , main_sel_op_or(il[225]) - , main_sel_op_pedersen(il[226]) - , main_sel_op_poseidon2(il[227]) - , main_sel_op_radix_le(il[228]) - , main_sel_op_sender(il[229]) - , main_sel_op_sha256(il[230]) - , main_sel_op_shl(il[231]) - , main_sel_op_shr(il[232]) - , main_sel_op_sload(il[233]) - , main_sel_op_sstore(il[234]) - , main_sel_op_storage_address(il[235]) - , main_sel_op_sub(il[236]) - , main_sel_op_timestamp(il[237]) - , main_sel_op_transaction_fee(il[238]) - , main_sel_op_version(il[239]) - , main_sel_op_xor(il[240]) - , main_sel_q_kernel_lookup(il[241]) - , main_sel_q_kernel_output_lookup(il[242]) - , main_sel_resolve_ind_addr_a(il[243]) - , main_sel_resolve_ind_addr_b(il[244]) - , main_sel_resolve_ind_addr_c(il[245]) - , main_sel_resolve_ind_addr_d(il[246]) - , main_sel_returndata(il[247]) - , main_sel_rng_16(il[248]) - , main_sel_rng_8(il[249]) - , main_sel_slice_gadget(il[250]) - , main_space_id(il[251]) - , main_tag_err(il[252]) - , main_w_in_tag(il[253]) - , mem_addr(il[254]) - , mem_clk(il[255]) - , mem_diff_hi(il[256]) - , mem_diff_lo(il[257]) - , mem_diff_mid(il[258]) - , mem_glob_addr(il[259]) - , mem_last(il[260]) - , mem_lastAccess(il[261]) - , mem_one_min_inv(il[262]) - , mem_r_in_tag(il[263]) - , mem_rw(il[264]) - , mem_sel_mem(il[265]) - , mem_sel_mov_ia_to_ic(il[266]) - , mem_sel_mov_ib_to_ic(il[267]) - , mem_sel_op_a(il[268]) - , mem_sel_op_b(il[269]) - , mem_sel_op_c(il[270]) - , mem_sel_op_cmov(il[271]) - , mem_sel_op_d(il[272]) - , mem_sel_op_poseidon_read_a(il[273]) - , mem_sel_op_poseidon_read_b(il[274]) - , mem_sel_op_poseidon_read_c(il[275]) - , mem_sel_op_poseidon_read_d(il[276]) - , mem_sel_op_poseidon_write_a(il[277]) - , mem_sel_op_poseidon_write_b(il[278]) - , mem_sel_op_poseidon_write_c(il[279]) - , mem_sel_op_poseidon_write_d(il[280]) - , mem_sel_op_slice(il[281]) - , mem_sel_resolve_ind_addr_a(il[282]) - , mem_sel_resolve_ind_addr_b(il[283]) - , mem_sel_resolve_ind_addr_c(il[284]) - , mem_sel_resolve_ind_addr_d(il[285]) - , mem_sel_rng_chk(il[286]) - , mem_skip_check_tag(il[287]) - , mem_space_id(il[288]) - , mem_tag(il[289]) - , mem_tag_err(il[290]) - , mem_tsp(il[291]) - , mem_val(il[292]) - , mem_w_in_tag(il[293]) - , pedersen_clk(il[294]) - , pedersen_input(il[295]) - , pedersen_output(il[296]) - , pedersen_sel_pedersen(il[297]) - , poseidon2_B_10_0(il[298]) - , poseidon2_B_10_1(il[299]) - , poseidon2_B_10_2(il[300]) - , poseidon2_B_10_3(il[301]) - , poseidon2_B_11_0(il[302]) - , poseidon2_B_11_1(il[303]) - , poseidon2_B_11_2(il[304]) - , poseidon2_B_11_3(il[305]) - , poseidon2_B_12_0(il[306]) - , poseidon2_B_12_1(il[307]) - , poseidon2_B_12_2(il[308]) - , poseidon2_B_12_3(il[309]) - , poseidon2_B_13_0(il[310]) - , poseidon2_B_13_1(il[311]) - , poseidon2_B_13_2(il[312]) - , poseidon2_B_13_3(il[313]) - , poseidon2_B_14_0(il[314]) - , poseidon2_B_14_1(il[315]) - , poseidon2_B_14_2(il[316]) - , poseidon2_B_14_3(il[317]) - , poseidon2_B_15_0(il[318]) - , poseidon2_B_15_1(il[319]) - , poseidon2_B_15_2(il[320]) - , poseidon2_B_15_3(il[321]) - , poseidon2_B_16_0(il[322]) - , poseidon2_B_16_1(il[323]) - , poseidon2_B_16_2(il[324]) - , poseidon2_B_16_3(il[325]) - , poseidon2_B_17_0(il[326]) - , poseidon2_B_17_1(il[327]) - , poseidon2_B_17_2(il[328]) - , poseidon2_B_17_3(il[329]) - , poseidon2_B_18_0(il[330]) - , poseidon2_B_18_1(il[331]) - , poseidon2_B_18_2(il[332]) - , poseidon2_B_18_3(il[333]) - , poseidon2_B_19_0(il[334]) - , poseidon2_B_19_1(il[335]) - , poseidon2_B_19_2(il[336]) - , poseidon2_B_19_3(il[337]) - , poseidon2_B_20_0(il[338]) - , poseidon2_B_20_1(il[339]) - , poseidon2_B_20_2(il[340]) - , poseidon2_B_20_3(il[341]) - , poseidon2_B_21_0(il[342]) - , poseidon2_B_21_1(il[343]) - , poseidon2_B_21_2(il[344]) - , poseidon2_B_21_3(il[345]) - , poseidon2_B_22_0(il[346]) - , poseidon2_B_22_1(il[347]) - , poseidon2_B_22_2(il[348]) - , poseidon2_B_22_3(il[349]) - , poseidon2_B_23_0(il[350]) - , poseidon2_B_23_1(il[351]) - , poseidon2_B_23_2(il[352]) - , poseidon2_B_23_3(il[353]) - , poseidon2_B_24_0(il[354]) - , poseidon2_B_24_1(il[355]) - , poseidon2_B_24_2(il[356]) - , poseidon2_B_24_3(il[357]) - , poseidon2_B_25_0(il[358]) - , poseidon2_B_25_1(il[359]) - , poseidon2_B_25_2(il[360]) - , poseidon2_B_25_3(il[361]) - , poseidon2_B_26_0(il[362]) - , poseidon2_B_26_1(il[363]) - , poseidon2_B_26_2(il[364]) - , poseidon2_B_26_3(il[365]) - , poseidon2_B_27_0(il[366]) - , poseidon2_B_27_1(il[367]) - , poseidon2_B_27_2(il[368]) - , poseidon2_B_27_3(il[369]) - , poseidon2_B_28_0(il[370]) - , poseidon2_B_28_1(il[371]) - , poseidon2_B_28_2(il[372]) - , poseidon2_B_28_3(il[373]) - , poseidon2_B_29_0(il[374]) - , poseidon2_B_29_1(il[375]) - , poseidon2_B_29_2(il[376]) - , poseidon2_B_29_3(il[377]) - , poseidon2_B_30_0(il[378]) - , poseidon2_B_30_1(il[379]) - , poseidon2_B_30_2(il[380]) - , poseidon2_B_30_3(il[381]) - , poseidon2_B_31_0(il[382]) - , poseidon2_B_31_1(il[383]) - , poseidon2_B_31_2(il[384]) - , poseidon2_B_31_3(il[385]) - , poseidon2_B_32_0(il[386]) - , poseidon2_B_32_1(il[387]) - , poseidon2_B_32_2(il[388]) - , poseidon2_B_32_3(il[389]) - , poseidon2_B_33_0(il[390]) - , poseidon2_B_33_1(il[391]) - , poseidon2_B_33_2(il[392]) - , poseidon2_B_33_3(il[393]) - , poseidon2_B_34_0(il[394]) - , poseidon2_B_34_1(il[395]) - , poseidon2_B_34_2(il[396]) - , poseidon2_B_34_3(il[397]) - , poseidon2_B_35_0(il[398]) - , poseidon2_B_35_1(il[399]) - , poseidon2_B_35_2(il[400]) - , poseidon2_B_35_3(il[401]) - , poseidon2_B_36_0(il[402]) - , poseidon2_B_36_1(il[403]) - , poseidon2_B_36_2(il[404]) - , poseidon2_B_36_3(il[405]) - , poseidon2_B_37_0(il[406]) - , poseidon2_B_37_1(il[407]) - , poseidon2_B_37_2(il[408]) - , poseidon2_B_37_3(il[409]) - , poseidon2_B_38_0(il[410]) - , poseidon2_B_38_1(il[411]) - , poseidon2_B_38_2(il[412]) - , poseidon2_B_38_3(il[413]) - , poseidon2_B_39_0(il[414]) - , poseidon2_B_39_1(il[415]) - , poseidon2_B_39_2(il[416]) - , poseidon2_B_39_3(il[417]) - , poseidon2_B_40_0(il[418]) - , poseidon2_B_40_1(il[419]) - , poseidon2_B_40_2(il[420]) - , poseidon2_B_40_3(il[421]) - , poseidon2_B_41_0(il[422]) - , poseidon2_B_41_1(il[423]) - , poseidon2_B_41_2(il[424]) - , poseidon2_B_41_3(il[425]) - , poseidon2_B_42_0(il[426]) - , poseidon2_B_42_1(il[427]) - , poseidon2_B_42_2(il[428]) - , poseidon2_B_42_3(il[429]) - , poseidon2_B_43_0(il[430]) - , poseidon2_B_43_1(il[431]) - , poseidon2_B_43_2(il[432]) - , poseidon2_B_43_3(il[433]) - , poseidon2_B_44_0(il[434]) - , poseidon2_B_44_1(il[435]) - , poseidon2_B_44_2(il[436]) - , poseidon2_B_44_3(il[437]) - , poseidon2_B_45_0(il[438]) - , poseidon2_B_45_1(il[439]) - , poseidon2_B_45_2(il[440]) - , poseidon2_B_45_3(il[441]) - , poseidon2_B_46_0(il[442]) - , poseidon2_B_46_1(il[443]) - , poseidon2_B_46_2(il[444]) - , poseidon2_B_46_3(il[445]) - , poseidon2_B_47_0(il[446]) - , poseidon2_B_47_1(il[447]) - , poseidon2_B_47_2(il[448]) - , poseidon2_B_47_3(il[449]) - , poseidon2_B_48_0(il[450]) - , poseidon2_B_48_1(il[451]) - , poseidon2_B_48_2(il[452]) - , poseidon2_B_48_3(il[453]) - , poseidon2_B_49_0(il[454]) - , poseidon2_B_49_1(il[455]) - , poseidon2_B_49_2(il[456]) - , poseidon2_B_49_3(il[457]) - , poseidon2_B_4_0(il[458]) - , poseidon2_B_4_1(il[459]) - , poseidon2_B_4_2(il[460]) - , poseidon2_B_4_3(il[461]) - , poseidon2_B_50_0(il[462]) - , poseidon2_B_50_1(il[463]) - , poseidon2_B_50_2(il[464]) - , poseidon2_B_50_3(il[465]) - , poseidon2_B_51_0(il[466]) - , poseidon2_B_51_1(il[467]) - , poseidon2_B_51_2(il[468]) - , poseidon2_B_51_3(il[469]) - , poseidon2_B_52_0(il[470]) - , poseidon2_B_52_1(il[471]) - , poseidon2_B_52_2(il[472]) - , poseidon2_B_52_3(il[473]) - , poseidon2_B_53_0(il[474]) - , poseidon2_B_53_1(il[475]) - , poseidon2_B_53_2(il[476]) - , poseidon2_B_53_3(il[477]) - , poseidon2_B_54_0(il[478]) - , poseidon2_B_54_1(il[479]) - , poseidon2_B_54_2(il[480]) - , poseidon2_B_54_3(il[481]) - , poseidon2_B_55_0(il[482]) - , poseidon2_B_55_1(il[483]) - , poseidon2_B_55_2(il[484]) - , poseidon2_B_55_3(il[485]) - , poseidon2_B_56_0(il[486]) - , poseidon2_B_56_1(il[487]) - , poseidon2_B_56_2(il[488]) - , poseidon2_B_56_3(il[489]) - , poseidon2_B_57_0(il[490]) - , poseidon2_B_57_1(il[491]) - , poseidon2_B_57_2(il[492]) - , poseidon2_B_57_3(il[493]) - , poseidon2_B_58_0(il[494]) - , poseidon2_B_58_1(il[495]) - , poseidon2_B_58_2(il[496]) - , poseidon2_B_58_3(il[497]) - , poseidon2_B_59_0(il[498]) - , poseidon2_B_59_1(il[499]) - , poseidon2_B_59_2(il[500]) - , poseidon2_B_59_3(il[501]) - , poseidon2_B_5_0(il[502]) - , poseidon2_B_5_1(il[503]) - , poseidon2_B_5_2(il[504]) - , poseidon2_B_5_3(il[505]) - , poseidon2_B_6_0(il[506]) - , poseidon2_B_6_1(il[507]) - , poseidon2_B_6_2(il[508]) - , poseidon2_B_6_3(il[509]) - , poseidon2_B_7_0(il[510]) - , poseidon2_B_7_1(il[511]) - , poseidon2_B_7_2(il[512]) - , poseidon2_B_7_3(il[513]) - , poseidon2_B_8_0(il[514]) - , poseidon2_B_8_1(il[515]) - , poseidon2_B_8_2(il[516]) - , poseidon2_B_8_3(il[517]) - , poseidon2_B_9_0(il[518]) - , poseidon2_B_9_1(il[519]) - , poseidon2_B_9_2(il[520]) - , poseidon2_B_9_3(il[521]) - , poseidon2_EXT_LAYER_4(il[522]) - , poseidon2_EXT_LAYER_5(il[523]) - , poseidon2_EXT_LAYER_6(il[524]) - , poseidon2_EXT_LAYER_7(il[525]) - , poseidon2_T_0_4(il[526]) - , poseidon2_T_0_5(il[527]) - , poseidon2_T_0_6(il[528]) - , poseidon2_T_0_7(il[529]) - , poseidon2_T_1_4(il[530]) - , poseidon2_T_1_5(il[531]) - , poseidon2_T_1_6(il[532]) - , poseidon2_T_1_7(il[533]) - , poseidon2_T_2_4(il[534]) - , poseidon2_T_2_5(il[535]) - , poseidon2_T_2_6(il[536]) - , poseidon2_T_2_7(il[537]) - , poseidon2_T_3_4(il[538]) - , poseidon2_T_3_5(il[539]) - , poseidon2_T_3_6(il[540]) - , poseidon2_T_3_7(il[541]) - , poseidon2_T_60_4(il[542]) - , poseidon2_T_60_5(il[543]) - , poseidon2_T_60_6(il[544]) - , poseidon2_T_60_7(il[545]) - , poseidon2_T_61_4(il[546]) - , poseidon2_T_61_5(il[547]) - , poseidon2_T_61_6(il[548]) - , poseidon2_T_61_7(il[549]) - , poseidon2_T_62_4(il[550]) - , poseidon2_T_62_5(il[551]) - , poseidon2_T_62_6(il[552]) - , poseidon2_T_62_7(il[553]) - , poseidon2_T_63_4(il[554]) - , poseidon2_T_63_5(il[555]) - , poseidon2_T_63_6(il[556]) - , poseidon2_T_63_7(il[557]) - , poseidon2_a_0(il[558]) - , poseidon2_a_1(il[559]) - , poseidon2_a_2(il[560]) - , poseidon2_a_3(il[561]) - , poseidon2_b_0(il[562]) - , poseidon2_b_1(il[563]) - , poseidon2_b_2(il[564]) - , poseidon2_b_3(il[565]) - , poseidon2_clk(il[566]) - , poseidon2_input_addr(il[567]) - , poseidon2_mem_addr_read_a(il[568]) - , poseidon2_mem_addr_read_b(il[569]) - , poseidon2_mem_addr_read_c(il[570]) - , poseidon2_mem_addr_read_d(il[571]) - , poseidon2_mem_addr_write_a(il[572]) - , poseidon2_mem_addr_write_b(il[573]) - , poseidon2_mem_addr_write_c(il[574]) - , poseidon2_mem_addr_write_d(il[575]) - , poseidon2_output_addr(il[576]) - , poseidon2_sel_poseidon_perm(il[577]) - , powers_power_of_2(il[578]) + : byte_lookup_sel_bin(il[0]) + , byte_lookup_table_byte_lengths(il[1]) + , byte_lookup_table_in_tags(il[2]) + , byte_lookup_table_input_a(il[3]) + , byte_lookup_table_input_b(il[4]) + , byte_lookup_table_op_id(il[5]) + , byte_lookup_table_output(il[6]) + , gas_da_gas_fixed_table(il[7]) + , gas_l2_gas_fixed_table(il[8]) + , gas_sel_gas_cost(il[9]) + , main_clk(il[10]) + , main_sel_first(il[11]) + , main_zeroes(il[12]) + , powers_power_of_2(il[13]) + , kernel_kernel_inputs(il[14]) + , kernel_kernel_value_out(il[15]) + , kernel_kernel_side_effect_out(il[16]) + , kernel_kernel_metadata_out(il[17]) + , main_calldata(il[18]) + , main_returndata(il[19]) + , alu_a_hi(il[20]) + , alu_a_lo(il[21]) + , alu_b_hi(il[22]) + , alu_b_lo(il[23]) + , alu_borrow(il[24]) + , alu_cf(il[25]) + , alu_clk(il[26]) + , alu_cmp_rng_ctr(il[27]) + , alu_div_u16_r0(il[28]) + , alu_div_u16_r1(il[29]) + , alu_div_u16_r2(il[30]) + , alu_div_u16_r3(il[31]) + , alu_div_u16_r4(il[32]) + , alu_div_u16_r5(il[33]) + , alu_div_u16_r6(il[34]) + , alu_div_u16_r7(il[35]) + , alu_divisor_hi(il[36]) + , alu_divisor_lo(il[37]) + , alu_ff_tag(il[38]) + , alu_ia(il[39]) + , alu_ib(il[40]) + , alu_ic(il[41]) + , alu_in_tag(il[42]) + , alu_op_add(il[43]) + , alu_op_cast(il[44]) + , alu_op_cast_prev(il[45]) + , alu_op_div(il[46]) + , alu_op_div_a_lt_b(il[47]) + , alu_op_div_std(il[48]) + , alu_op_eq(il[49]) + , alu_op_eq_diff_inv(il[50]) + , alu_op_lt(il[51]) + , alu_op_lte(il[52]) + , alu_op_mul(il[53]) + , alu_op_not(il[54]) + , alu_op_shl(il[55]) + , alu_op_shr(il[56]) + , alu_op_sub(il[57]) + , alu_p_a_borrow(il[58]) + , alu_p_b_borrow(il[59]) + , alu_p_sub_a_hi(il[60]) + , alu_p_sub_a_lo(il[61]) + , alu_p_sub_b_hi(il[62]) + , alu_p_sub_b_lo(il[63]) + , alu_partial_prod_hi(il[64]) + , alu_partial_prod_lo(il[65]) + , alu_quotient_hi(il[66]) + , alu_quotient_lo(il[67]) + , alu_remainder(il[68]) + , alu_res_hi(il[69]) + , alu_res_lo(il[70]) + , alu_sel_alu(il[71]) + , alu_sel_cmp(il[72]) + , alu_sel_div_rng_chk(il[73]) + , alu_sel_rng_chk(il[74]) + , alu_sel_rng_chk_lookup(il[75]) + , alu_sel_shift_which(il[76]) + , alu_shift_lt_bit_len(il[77]) + , alu_t_sub_s_bits(il[78]) + , alu_two_pow_s(il[79]) + , alu_two_pow_t_sub_s(il[80]) + , alu_u128_tag(il[81]) + , alu_u16_r0(il[82]) + , alu_u16_r1(il[83]) + , alu_u16_r10(il[84]) + , alu_u16_r11(il[85]) + , alu_u16_r12(il[86]) + , alu_u16_r13(il[87]) + , alu_u16_r14(il[88]) + , alu_u16_r2(il[89]) + , alu_u16_r3(il[90]) + , alu_u16_r4(il[91]) + , alu_u16_r5(il[92]) + , alu_u16_r6(il[93]) + , alu_u16_r7(il[94]) + , alu_u16_r8(il[95]) + , alu_u16_r9(il[96]) + , alu_u16_tag(il[97]) + , alu_u32_tag(il[98]) + , alu_u64_tag(il[99]) + , alu_u8_r0(il[100]) + , alu_u8_r1(il[101]) + , alu_u8_tag(il[102]) + , binary_acc_ia(il[103]) + , binary_acc_ib(il[104]) + , binary_acc_ic(il[105]) + , binary_clk(il[106]) + , binary_ia_bytes(il[107]) + , binary_ib_bytes(il[108]) + , binary_ic_bytes(il[109]) + , binary_in_tag(il[110]) + , binary_mem_tag_ctr(il[111]) + , binary_mem_tag_ctr_inv(il[112]) + , binary_op_id(il[113]) + , binary_sel_bin(il[114]) + , binary_start(il[115]) + , conversion_clk(il[116]) + , conversion_input(il[117]) + , conversion_num_limbs(il[118]) + , conversion_radix(il[119]) + , conversion_sel_to_radix_le(il[120]) + , keccakf1600_clk(il[121]) + , keccakf1600_input(il[122]) + , keccakf1600_output(il[123]) + , keccakf1600_sel_keccakf1600(il[124]) + , kernel_emit_l2_to_l1_msg_write_offset(il[125]) + , kernel_emit_note_hash_write_offset(il[126]) + , kernel_emit_nullifier_write_offset(il[127]) + , kernel_emit_unencrypted_log_write_offset(il[128]) + , kernel_kernel_in_offset(il[129]) + , kernel_kernel_out_offset(il[130]) + , kernel_l1_to_l2_msg_exists_write_offset(il[131]) + , kernel_note_hash_exist_write_offset(il[132]) + , kernel_nullifier_exists_write_offset(il[133]) + , kernel_nullifier_non_exists_write_offset(il[134]) + , kernel_q_public_input_kernel_add_to_table(il[135]) + , kernel_q_public_input_kernel_out_add_to_table(il[136]) + , kernel_side_effect_counter(il[137]) + , kernel_sload_write_offset(il[138]) + , kernel_sstore_write_offset(il[139]) + , main_abs_da_rem_gas_hi(il[140]) + , main_abs_da_rem_gas_lo(il[141]) + , main_abs_l2_rem_gas_hi(il[142]) + , main_abs_l2_rem_gas_lo(il[143]) + , main_alu_in_tag(il[144]) + , main_bin_op_id(il[145]) + , main_call_ptr(il[146]) + , main_da_gas_op_cost(il[147]) + , main_da_gas_remaining(il[148]) + , main_da_out_of_gas(il[149]) + , main_ia(il[150]) + , main_ib(il[151]) + , main_ic(il[152]) + , main_id(il[153]) + , main_id_zero(il[154]) + , main_ind_addr_a(il[155]) + , main_ind_addr_b(il[156]) + , main_ind_addr_c(il[157]) + , main_ind_addr_d(il[158]) + , main_internal_return_ptr(il[159]) + , main_inv(il[160]) + , main_l2_gas_op_cost(il[161]) + , main_l2_gas_remaining(il[162]) + , main_l2_out_of_gas(il[163]) + , main_mem_addr_a(il[164]) + , main_mem_addr_b(il[165]) + , main_mem_addr_c(il[166]) + , main_mem_addr_d(il[167]) + , main_op_err(il[168]) + , main_opcode_val(il[169]) + , main_pc(il[170]) + , main_r_in_tag(il[171]) + , main_rwa(il[172]) + , main_rwb(il[173]) + , main_rwc(il[174]) + , main_rwd(il[175]) + , main_sel_alu(il[176]) + , main_sel_bin(il[177]) + , main_sel_calldata(il[178]) + , main_sel_gas_accounting_active(il[179]) + , main_sel_last(il[180]) + , main_sel_mem_op_a(il[181]) + , main_sel_mem_op_activate_gas(il[182]) + , main_sel_mem_op_b(il[183]) + , main_sel_mem_op_c(il[184]) + , main_sel_mem_op_d(il[185]) + , main_sel_mov_ia_to_ic(il[186]) + , main_sel_mov_ib_to_ic(il[187]) + , main_sel_op_add(il[188]) + , main_sel_op_address(il[189]) + , main_sel_op_and(il[190]) + , main_sel_op_block_number(il[191]) + , main_sel_op_calldata_copy(il[192]) + , main_sel_op_cast(il[193]) + , main_sel_op_chain_id(il[194]) + , main_sel_op_cmov(il[195]) + , main_sel_op_coinbase(il[196]) + , main_sel_op_dagasleft(il[197]) + , main_sel_op_div(il[198]) + , main_sel_op_emit_l2_to_l1_msg(il[199]) + , main_sel_op_emit_note_hash(il[200]) + , main_sel_op_emit_nullifier(il[201]) + , main_sel_op_emit_unencrypted_log(il[202]) + , main_sel_op_eq(il[203]) + , main_sel_op_external_call(il[204]) + , main_sel_op_external_return(il[205]) + , main_sel_op_fdiv(il[206]) + , main_sel_op_fee_per_da_gas(il[207]) + , main_sel_op_fee_per_l2_gas(il[208]) + , main_sel_op_function_selector(il[209]) + , main_sel_op_get_contract_instance(il[210]) + , main_sel_op_halt(il[211]) + , main_sel_op_internal_call(il[212]) + , main_sel_op_internal_return(il[213]) + , main_sel_op_jump(il[214]) + , main_sel_op_jumpi(il[215]) + , main_sel_op_keccak(il[216]) + , main_sel_op_l1_to_l2_msg_exists(il[217]) + , main_sel_op_l2gasleft(il[218]) + , main_sel_op_lt(il[219]) + , main_sel_op_lte(il[220]) + , main_sel_op_mov(il[221]) + , main_sel_op_mul(il[222]) + , main_sel_op_not(il[223]) + , main_sel_op_note_hash_exists(il[224]) + , main_sel_op_nullifier_exists(il[225]) + , main_sel_op_or(il[226]) + , main_sel_op_pedersen(il[227]) + , main_sel_op_poseidon2(il[228]) + , main_sel_op_radix_le(il[229]) + , main_sel_op_sender(il[230]) + , main_sel_op_sha256(il[231]) + , main_sel_op_shl(il[232]) + , main_sel_op_shr(il[233]) + , main_sel_op_sload(il[234]) + , main_sel_op_sstore(il[235]) + , main_sel_op_storage_address(il[236]) + , main_sel_op_sub(il[237]) + , main_sel_op_timestamp(il[238]) + , main_sel_op_transaction_fee(il[239]) + , main_sel_op_version(il[240]) + , main_sel_op_xor(il[241]) + , main_sel_q_kernel_lookup(il[242]) + , main_sel_q_kernel_output_lookup(il[243]) + , main_sel_resolve_ind_addr_a(il[244]) + , main_sel_resolve_ind_addr_b(il[245]) + , main_sel_resolve_ind_addr_c(il[246]) + , main_sel_resolve_ind_addr_d(il[247]) + , main_sel_returndata(il[248]) + , main_sel_rng_16(il[249]) + , main_sel_rng_8(il[250]) + , main_sel_slice_gadget(il[251]) + , main_space_id(il[252]) + , main_tag_err(il[253]) + , main_w_in_tag(il[254]) + , mem_addr(il[255]) + , mem_clk(il[256]) + , mem_diff_hi(il[257]) + , mem_diff_lo(il[258]) + , mem_diff_mid(il[259]) + , mem_glob_addr(il[260]) + , mem_last(il[261]) + , mem_lastAccess(il[262]) + , mem_one_min_inv(il[263]) + , mem_r_in_tag(il[264]) + , mem_rw(il[265]) + , mem_sel_mem(il[266]) + , mem_sel_mov_ia_to_ic(il[267]) + , mem_sel_mov_ib_to_ic(il[268]) + , mem_sel_op_a(il[269]) + , mem_sel_op_b(il[270]) + , mem_sel_op_c(il[271]) + , mem_sel_op_cmov(il[272]) + , mem_sel_op_d(il[273]) + , mem_sel_op_poseidon_read_a(il[274]) + , mem_sel_op_poseidon_read_b(il[275]) + , mem_sel_op_poseidon_read_c(il[276]) + , mem_sel_op_poseidon_read_d(il[277]) + , mem_sel_op_poseidon_write_a(il[278]) + , mem_sel_op_poseidon_write_b(il[279]) + , mem_sel_op_poseidon_write_c(il[280]) + , mem_sel_op_poseidon_write_d(il[281]) + , mem_sel_op_slice(il[282]) + , mem_sel_resolve_ind_addr_a(il[283]) + , mem_sel_resolve_ind_addr_b(il[284]) + , mem_sel_resolve_ind_addr_c(il[285]) + , mem_sel_resolve_ind_addr_d(il[286]) + , mem_sel_rng_chk(il[287]) + , mem_skip_check_tag(il[288]) + , mem_space_id(il[289]) + , mem_tag(il[290]) + , mem_tag_err(il[291]) + , mem_tsp(il[292]) + , mem_val(il[293]) + , mem_w_in_tag(il[294]) + , pedersen_clk(il[295]) + , pedersen_input(il[296]) + , pedersen_output(il[297]) + , pedersen_sel_pedersen(il[298]) + , poseidon2_B_10_0(il[299]) + , poseidon2_B_10_1(il[300]) + , poseidon2_B_10_2(il[301]) + , poseidon2_B_10_3(il[302]) + , poseidon2_B_11_0(il[303]) + , poseidon2_B_11_1(il[304]) + , poseidon2_B_11_2(il[305]) + , poseidon2_B_11_3(il[306]) + , poseidon2_B_12_0(il[307]) + , poseidon2_B_12_1(il[308]) + , poseidon2_B_12_2(il[309]) + , poseidon2_B_12_3(il[310]) + , poseidon2_B_13_0(il[311]) + , poseidon2_B_13_1(il[312]) + , poseidon2_B_13_2(il[313]) + , poseidon2_B_13_3(il[314]) + , poseidon2_B_14_0(il[315]) + , poseidon2_B_14_1(il[316]) + , poseidon2_B_14_2(il[317]) + , poseidon2_B_14_3(il[318]) + , poseidon2_B_15_0(il[319]) + , poseidon2_B_15_1(il[320]) + , poseidon2_B_15_2(il[321]) + , poseidon2_B_15_3(il[322]) + , poseidon2_B_16_0(il[323]) + , poseidon2_B_16_1(il[324]) + , poseidon2_B_16_2(il[325]) + , poseidon2_B_16_3(il[326]) + , poseidon2_B_17_0(il[327]) + , poseidon2_B_17_1(il[328]) + , poseidon2_B_17_2(il[329]) + , poseidon2_B_17_3(il[330]) + , poseidon2_B_18_0(il[331]) + , poseidon2_B_18_1(il[332]) + , poseidon2_B_18_2(il[333]) + , poseidon2_B_18_3(il[334]) + , poseidon2_B_19_0(il[335]) + , poseidon2_B_19_1(il[336]) + , poseidon2_B_19_2(il[337]) + , poseidon2_B_19_3(il[338]) + , poseidon2_B_20_0(il[339]) + , poseidon2_B_20_1(il[340]) + , poseidon2_B_20_2(il[341]) + , poseidon2_B_20_3(il[342]) + , poseidon2_B_21_0(il[343]) + , poseidon2_B_21_1(il[344]) + , poseidon2_B_21_2(il[345]) + , poseidon2_B_21_3(il[346]) + , poseidon2_B_22_0(il[347]) + , poseidon2_B_22_1(il[348]) + , poseidon2_B_22_2(il[349]) + , poseidon2_B_22_3(il[350]) + , poseidon2_B_23_0(il[351]) + , poseidon2_B_23_1(il[352]) + , poseidon2_B_23_2(il[353]) + , poseidon2_B_23_3(il[354]) + , poseidon2_B_24_0(il[355]) + , poseidon2_B_24_1(il[356]) + , poseidon2_B_24_2(il[357]) + , poseidon2_B_24_3(il[358]) + , poseidon2_B_25_0(il[359]) + , poseidon2_B_25_1(il[360]) + , poseidon2_B_25_2(il[361]) + , poseidon2_B_25_3(il[362]) + , poseidon2_B_26_0(il[363]) + , poseidon2_B_26_1(il[364]) + , poseidon2_B_26_2(il[365]) + , poseidon2_B_26_3(il[366]) + , poseidon2_B_27_0(il[367]) + , poseidon2_B_27_1(il[368]) + , poseidon2_B_27_2(il[369]) + , poseidon2_B_27_3(il[370]) + , poseidon2_B_28_0(il[371]) + , poseidon2_B_28_1(il[372]) + , poseidon2_B_28_2(il[373]) + , poseidon2_B_28_3(il[374]) + , poseidon2_B_29_0(il[375]) + , poseidon2_B_29_1(il[376]) + , poseidon2_B_29_2(il[377]) + , poseidon2_B_29_3(il[378]) + , poseidon2_B_30_0(il[379]) + , poseidon2_B_30_1(il[380]) + , poseidon2_B_30_2(il[381]) + , poseidon2_B_30_3(il[382]) + , poseidon2_B_31_0(il[383]) + , poseidon2_B_31_1(il[384]) + , poseidon2_B_31_2(il[385]) + , poseidon2_B_31_3(il[386]) + , poseidon2_B_32_0(il[387]) + , poseidon2_B_32_1(il[388]) + , poseidon2_B_32_2(il[389]) + , poseidon2_B_32_3(il[390]) + , poseidon2_B_33_0(il[391]) + , poseidon2_B_33_1(il[392]) + , poseidon2_B_33_2(il[393]) + , poseidon2_B_33_3(il[394]) + , poseidon2_B_34_0(il[395]) + , poseidon2_B_34_1(il[396]) + , poseidon2_B_34_2(il[397]) + , poseidon2_B_34_3(il[398]) + , poseidon2_B_35_0(il[399]) + , poseidon2_B_35_1(il[400]) + , poseidon2_B_35_2(il[401]) + , poseidon2_B_35_3(il[402]) + , poseidon2_B_36_0(il[403]) + , poseidon2_B_36_1(il[404]) + , poseidon2_B_36_2(il[405]) + , poseidon2_B_36_3(il[406]) + , poseidon2_B_37_0(il[407]) + , poseidon2_B_37_1(il[408]) + , poseidon2_B_37_2(il[409]) + , poseidon2_B_37_3(il[410]) + , poseidon2_B_38_0(il[411]) + , poseidon2_B_38_1(il[412]) + , poseidon2_B_38_2(il[413]) + , poseidon2_B_38_3(il[414]) + , poseidon2_B_39_0(il[415]) + , poseidon2_B_39_1(il[416]) + , poseidon2_B_39_2(il[417]) + , poseidon2_B_39_3(il[418]) + , poseidon2_B_40_0(il[419]) + , poseidon2_B_40_1(il[420]) + , poseidon2_B_40_2(il[421]) + , poseidon2_B_40_3(il[422]) + , poseidon2_B_41_0(il[423]) + , poseidon2_B_41_1(il[424]) + , poseidon2_B_41_2(il[425]) + , poseidon2_B_41_3(il[426]) + , poseidon2_B_42_0(il[427]) + , poseidon2_B_42_1(il[428]) + , poseidon2_B_42_2(il[429]) + , poseidon2_B_42_3(il[430]) + , poseidon2_B_43_0(il[431]) + , poseidon2_B_43_1(il[432]) + , poseidon2_B_43_2(il[433]) + , poseidon2_B_43_3(il[434]) + , poseidon2_B_44_0(il[435]) + , poseidon2_B_44_1(il[436]) + , poseidon2_B_44_2(il[437]) + , poseidon2_B_44_3(il[438]) + , poseidon2_B_45_0(il[439]) + , poseidon2_B_45_1(il[440]) + , poseidon2_B_45_2(il[441]) + , poseidon2_B_45_3(il[442]) + , poseidon2_B_46_0(il[443]) + , poseidon2_B_46_1(il[444]) + , poseidon2_B_46_2(il[445]) + , poseidon2_B_46_3(il[446]) + , poseidon2_B_47_0(il[447]) + , poseidon2_B_47_1(il[448]) + , poseidon2_B_47_2(il[449]) + , poseidon2_B_47_3(il[450]) + , poseidon2_B_48_0(il[451]) + , poseidon2_B_48_1(il[452]) + , poseidon2_B_48_2(il[453]) + , poseidon2_B_48_3(il[454]) + , poseidon2_B_49_0(il[455]) + , poseidon2_B_49_1(il[456]) + , poseidon2_B_49_2(il[457]) + , poseidon2_B_49_3(il[458]) + , poseidon2_B_4_0(il[459]) + , poseidon2_B_4_1(il[460]) + , poseidon2_B_4_2(il[461]) + , poseidon2_B_4_3(il[462]) + , poseidon2_B_50_0(il[463]) + , poseidon2_B_50_1(il[464]) + , poseidon2_B_50_2(il[465]) + , poseidon2_B_50_3(il[466]) + , poseidon2_B_51_0(il[467]) + , poseidon2_B_51_1(il[468]) + , poseidon2_B_51_2(il[469]) + , poseidon2_B_51_3(il[470]) + , poseidon2_B_52_0(il[471]) + , poseidon2_B_52_1(il[472]) + , poseidon2_B_52_2(il[473]) + , poseidon2_B_52_3(il[474]) + , poseidon2_B_53_0(il[475]) + , poseidon2_B_53_1(il[476]) + , poseidon2_B_53_2(il[477]) + , poseidon2_B_53_3(il[478]) + , poseidon2_B_54_0(il[479]) + , poseidon2_B_54_1(il[480]) + , poseidon2_B_54_2(il[481]) + , poseidon2_B_54_3(il[482]) + , poseidon2_B_55_0(il[483]) + , poseidon2_B_55_1(il[484]) + , poseidon2_B_55_2(il[485]) + , poseidon2_B_55_3(il[486]) + , poseidon2_B_56_0(il[487]) + , poseidon2_B_56_1(il[488]) + , poseidon2_B_56_2(il[489]) + , poseidon2_B_56_3(il[490]) + , poseidon2_B_57_0(il[491]) + , poseidon2_B_57_1(il[492]) + , poseidon2_B_57_2(il[493]) + , poseidon2_B_57_3(il[494]) + , poseidon2_B_58_0(il[495]) + , poseidon2_B_58_1(il[496]) + , poseidon2_B_58_2(il[497]) + , poseidon2_B_58_3(il[498]) + , poseidon2_B_59_0(il[499]) + , poseidon2_B_59_1(il[500]) + , poseidon2_B_59_2(il[501]) + , poseidon2_B_59_3(il[502]) + , poseidon2_B_5_0(il[503]) + , poseidon2_B_5_1(il[504]) + , poseidon2_B_5_2(il[505]) + , poseidon2_B_5_3(il[506]) + , poseidon2_B_6_0(il[507]) + , poseidon2_B_6_1(il[508]) + , poseidon2_B_6_2(il[509]) + , poseidon2_B_6_3(il[510]) + , poseidon2_B_7_0(il[511]) + , poseidon2_B_7_1(il[512]) + , poseidon2_B_7_2(il[513]) + , poseidon2_B_7_3(il[514]) + , poseidon2_B_8_0(il[515]) + , poseidon2_B_8_1(il[516]) + , poseidon2_B_8_2(il[517]) + , poseidon2_B_8_3(il[518]) + , poseidon2_B_9_0(il[519]) + , poseidon2_B_9_1(il[520]) + , poseidon2_B_9_2(il[521]) + , poseidon2_B_9_3(il[522]) + , poseidon2_EXT_LAYER_4(il[523]) + , poseidon2_EXT_LAYER_5(il[524]) + , poseidon2_EXT_LAYER_6(il[525]) + , poseidon2_EXT_LAYER_7(il[526]) + , poseidon2_T_0_4(il[527]) + , poseidon2_T_0_5(il[528]) + , poseidon2_T_0_6(il[529]) + , poseidon2_T_0_7(il[530]) + , poseidon2_T_1_4(il[531]) + , poseidon2_T_1_5(il[532]) + , poseidon2_T_1_6(il[533]) + , poseidon2_T_1_7(il[534]) + , poseidon2_T_2_4(il[535]) + , poseidon2_T_2_5(il[536]) + , poseidon2_T_2_6(il[537]) + , poseidon2_T_2_7(il[538]) + , poseidon2_T_3_4(il[539]) + , poseidon2_T_3_5(il[540]) + , poseidon2_T_3_6(il[541]) + , poseidon2_T_3_7(il[542]) + , poseidon2_T_60_4(il[543]) + , poseidon2_T_60_5(il[544]) + , poseidon2_T_60_6(il[545]) + , poseidon2_T_60_7(il[546]) + , poseidon2_T_61_4(il[547]) + , poseidon2_T_61_5(il[548]) + , poseidon2_T_61_6(il[549]) + , poseidon2_T_61_7(il[550]) + , poseidon2_T_62_4(il[551]) + , poseidon2_T_62_5(il[552]) + , poseidon2_T_62_6(il[553]) + , poseidon2_T_62_7(il[554]) + , poseidon2_T_63_4(il[555]) + , poseidon2_T_63_5(il[556]) + , poseidon2_T_63_6(il[557]) + , poseidon2_T_63_7(il[558]) + , poseidon2_a_0(il[559]) + , poseidon2_a_1(il[560]) + , poseidon2_a_2(il[561]) + , poseidon2_a_3(il[562]) + , poseidon2_b_0(il[563]) + , poseidon2_b_1(il[564]) + , poseidon2_b_2(il[565]) + , poseidon2_b_3(il[566]) + , poseidon2_clk(il[567]) + , poseidon2_input_addr(il[568]) + , poseidon2_mem_addr_read_a(il[569]) + , poseidon2_mem_addr_read_b(il[570]) + , poseidon2_mem_addr_read_c(il[571]) + , poseidon2_mem_addr_read_d(il[572]) + , poseidon2_mem_addr_write_a(il[573]) + , poseidon2_mem_addr_write_b(il[574]) + , poseidon2_mem_addr_write_c(il[575]) + , poseidon2_mem_addr_write_d(il[576]) + , poseidon2_output_addr(il[577]) + , poseidon2_sel_poseidon_perm(il[578]) , sha256_clk(il[579]) , sha256_input(il[580]) , sha256_output(il[581]) @@ -799,9 +799,20 @@ AvmFlavor::ProverPolynomials::ProverPolynomials(ProvingKey& proving_key) AvmFlavor::AllConstRefValues AvmFlavor::ProverPolynomials::get_row(size_t row_idx) const { - return AllConstRefValues(RefArray{ main_clk[row_idx], + return AllConstRefValues(RefArray{ byte_lookup_sel_bin[row_idx], + byte_lookup_table_byte_lengths[row_idx], + byte_lookup_table_in_tags[row_idx], + byte_lookup_table_input_a[row_idx], + byte_lookup_table_input_b[row_idx], + byte_lookup_table_op_id[row_idx], + byte_lookup_table_output[row_idx], + gas_da_gas_fixed_table[row_idx], + gas_l2_gas_fixed_table[row_idx], + gas_sel_gas_cost[row_idx], + main_clk[row_idx], main_sel_first[row_idx], main_zeroes[row_idx], + powers_power_of_2[row_idx], kernel_kernel_inputs[row_idx], kernel_kernel_value_out[row_idx], kernel_kernel_side_effect_out[row_idx], @@ -904,21 +915,11 @@ AvmFlavor::AllConstRefValues AvmFlavor::ProverPolynomials::get_row(size_t row_id binary_op_id[row_idx], binary_sel_bin[row_idx], binary_start[row_idx], - byte_lookup_sel_bin[row_idx], - byte_lookup_table_byte_lengths[row_idx], - byte_lookup_table_in_tags[row_idx], - byte_lookup_table_input_a[row_idx], - byte_lookup_table_input_b[row_idx], - byte_lookup_table_op_id[row_idx], - byte_lookup_table_output[row_idx], conversion_clk[row_idx], conversion_input[row_idx], conversion_num_limbs[row_idx], conversion_radix[row_idx], conversion_sel_to_radix_le[row_idx], - gas_da_gas_fixed_table[row_idx], - gas_l2_gas_fixed_table[row_idx], - gas_sel_gas_cost[row_idx], keccakf1600_clk[row_idx], keccakf1600_input[row_idx], keccakf1600_output[row_idx], @@ -1377,7 +1378,6 @@ AvmFlavor::AllConstRefValues AvmFlavor::ProverPolynomials::get_row(size_t row_id poseidon2_mem_addr_write_d[row_idx], poseidon2_output_addr[row_idx], poseidon2_sel_poseidon_perm[row_idx], - powers_power_of_2[row_idx], sha256_clk[row_idx], sha256_input[row_idx], sha256_output[row_idx], @@ -1581,9 +1581,20 @@ AvmFlavor::AllConstRefValues AvmFlavor::ProverPolynomials::get_row(size_t row_id AvmFlavor::CommitmentLabels::CommitmentLabels() { + Base::byte_lookup_sel_bin = "BYTE_LOOKUP_SEL_BIN"; + Base::byte_lookup_table_byte_lengths = "BYTE_LOOKUP_TABLE_BYTE_LENGTHS"; + Base::byte_lookup_table_in_tags = "BYTE_LOOKUP_TABLE_IN_TAGS"; + Base::byte_lookup_table_input_a = "BYTE_LOOKUP_TABLE_INPUT_A"; + Base::byte_lookup_table_input_b = "BYTE_LOOKUP_TABLE_INPUT_B"; + Base::byte_lookup_table_op_id = "BYTE_LOOKUP_TABLE_OP_ID"; + Base::byte_lookup_table_output = "BYTE_LOOKUP_TABLE_OUTPUT"; + Base::gas_da_gas_fixed_table = "GAS_DA_GAS_FIXED_TABLE"; + Base::gas_l2_gas_fixed_table = "GAS_L2_GAS_FIXED_TABLE"; + Base::gas_sel_gas_cost = "GAS_SEL_GAS_COST"; Base::main_clk = "MAIN_CLK"; Base::main_sel_first = "MAIN_SEL_FIRST"; Base::main_zeroes = "MAIN_ZEROES"; + Base::powers_power_of_2 = "POWERS_POWER_OF_2"; Base::kernel_kernel_inputs = "KERNEL_KERNEL_INPUTS"; Base::kernel_kernel_value_out = "KERNEL_KERNEL_VALUE_OUT"; Base::kernel_kernel_side_effect_out = "KERNEL_KERNEL_SIDE_EFFECT_OUT"; @@ -1686,21 +1697,11 @@ AvmFlavor::CommitmentLabels::CommitmentLabels() Base::binary_op_id = "BINARY_OP_ID"; Base::binary_sel_bin = "BINARY_SEL_BIN"; Base::binary_start = "BINARY_START"; - Base::byte_lookup_sel_bin = "BYTE_LOOKUP_SEL_BIN"; - Base::byte_lookup_table_byte_lengths = "BYTE_LOOKUP_TABLE_BYTE_LENGTHS"; - Base::byte_lookup_table_in_tags = "BYTE_LOOKUP_TABLE_IN_TAGS"; - Base::byte_lookup_table_input_a = "BYTE_LOOKUP_TABLE_INPUT_A"; - Base::byte_lookup_table_input_b = "BYTE_LOOKUP_TABLE_INPUT_B"; - Base::byte_lookup_table_op_id = "BYTE_LOOKUP_TABLE_OP_ID"; - Base::byte_lookup_table_output = "BYTE_LOOKUP_TABLE_OUTPUT"; Base::conversion_clk = "CONVERSION_CLK"; Base::conversion_input = "CONVERSION_INPUT"; Base::conversion_num_limbs = "CONVERSION_NUM_LIMBS"; Base::conversion_radix = "CONVERSION_RADIX"; Base::conversion_sel_to_radix_le = "CONVERSION_SEL_TO_RADIX_LE"; - Base::gas_da_gas_fixed_table = "GAS_DA_GAS_FIXED_TABLE"; - Base::gas_l2_gas_fixed_table = "GAS_L2_GAS_FIXED_TABLE"; - Base::gas_sel_gas_cost = "GAS_SEL_GAS_COST"; Base::keccakf1600_clk = "KECCAKF1600_CLK"; Base::keccakf1600_input = "KECCAKF1600_INPUT"; Base::keccakf1600_output = "KECCAKF1600_OUTPUT"; @@ -2159,7 +2160,6 @@ AvmFlavor::CommitmentLabels::CommitmentLabels() Base::poseidon2_mem_addr_write_d = "POSEIDON2_MEM_ADDR_WRITE_D"; Base::poseidon2_output_addr = "POSEIDON2_OUTPUT_ADDR"; Base::poseidon2_sel_poseidon_perm = "POSEIDON2_SEL_POSEIDON_PERM"; - Base::powers_power_of_2 = "POWERS_POWER_OF_2"; Base::sha256_clk = "SHA256_CLK"; Base::sha256_input = "SHA256_INPUT"; Base::sha256_output = "SHA256_OUTPUT"; @@ -2289,9 +2289,20 @@ AvmFlavor::CommitmentLabels::CommitmentLabels() AvmFlavor::VerifierCommitments::VerifierCommitments(const std::shared_ptr& verification_key) { + byte_lookup_sel_bin = verification_key->byte_lookup_sel_bin; + byte_lookup_table_byte_lengths = verification_key->byte_lookup_table_byte_lengths; + byte_lookup_table_in_tags = verification_key->byte_lookup_table_in_tags; + byte_lookup_table_input_a = verification_key->byte_lookup_table_input_a; + byte_lookup_table_input_b = verification_key->byte_lookup_table_input_b; + byte_lookup_table_op_id = verification_key->byte_lookup_table_op_id; + byte_lookup_table_output = verification_key->byte_lookup_table_output; + gas_da_gas_fixed_table = verification_key->gas_da_gas_fixed_table; + gas_l2_gas_fixed_table = verification_key->gas_l2_gas_fixed_table; + gas_sel_gas_cost = verification_key->gas_sel_gas_cost; main_clk = verification_key->main_clk; main_sel_first = verification_key->main_sel_first; main_zeroes = verification_key->main_zeroes; + powers_power_of_2 = verification_key->powers_power_of_2; } void AvmFlavor::Transcript::deserialize_full_transcript() diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp index 0ae00ebb352..990e0ed703f 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp @@ -19,7 +19,6 @@ #include "barretenberg/vm/avm/generated/relations/alu.hpp" #include "barretenberg/vm/avm/generated/relations/binary.hpp" #include "barretenberg/vm/avm/generated/relations/conversion.hpp" -#include "barretenberg/vm/avm/generated/relations/gas.hpp" #include "barretenberg/vm/avm/generated/relations/keccakf1600.hpp" #include "barretenberg/vm/avm/generated/relations/kernel.hpp" #include "barretenberg/vm/avm/generated/relations/main.hpp" @@ -27,7 +26,6 @@ #include "barretenberg/vm/avm/generated/relations/mem_slice.hpp" #include "barretenberg/vm/avm/generated/relations/pedersen.hpp" #include "barretenberg/vm/avm/generated/relations/poseidon2.hpp" -#include "barretenberg/vm/avm/generated/relations/powers.hpp" #include "barretenberg/vm/avm/generated/relations/sha256.hpp" // Lookup and permutation relations @@ -103,8 +101,8 @@ template using tuple_cat_t = decltype(std::tuple_cat(std:: // The entities that will be used in the flavor. // clang-format off -#define PRECOMPUTED_ENTITIES main_clk, main_sel_first, main_zeroes -#define WIRE_ENTITIES kernel_kernel_inputs, kernel_kernel_value_out, kernel_kernel_side_effect_out, kernel_kernel_metadata_out, main_calldata, main_returndata, 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_calldata, 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_calldata_copy, 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_external_return, 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_returndata, main_sel_rng_16, main_sel_rng_8, main_sel_slice_gadget, 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_op_poseidon_read_a, mem_sel_op_poseidon_read_b, mem_sel_op_poseidon_read_c, mem_sel_op_poseidon_read_d, mem_sel_op_poseidon_write_a, mem_sel_op_poseidon_write_b, mem_sel_op_poseidon_write_c, mem_sel_op_poseidon_write_d, mem_sel_op_slice, 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_B_10_0, poseidon2_B_10_1, poseidon2_B_10_2, poseidon2_B_10_3, poseidon2_B_11_0, poseidon2_B_11_1, poseidon2_B_11_2, poseidon2_B_11_3, poseidon2_B_12_0, poseidon2_B_12_1, poseidon2_B_12_2, poseidon2_B_12_3, poseidon2_B_13_0, poseidon2_B_13_1, poseidon2_B_13_2, poseidon2_B_13_3, poseidon2_B_14_0, poseidon2_B_14_1, poseidon2_B_14_2, poseidon2_B_14_3, poseidon2_B_15_0, poseidon2_B_15_1, poseidon2_B_15_2, poseidon2_B_15_3, poseidon2_B_16_0, poseidon2_B_16_1, poseidon2_B_16_2, poseidon2_B_16_3, poseidon2_B_17_0, poseidon2_B_17_1, poseidon2_B_17_2, poseidon2_B_17_3, poseidon2_B_18_0, poseidon2_B_18_1, poseidon2_B_18_2, poseidon2_B_18_3, poseidon2_B_19_0, poseidon2_B_19_1, poseidon2_B_19_2, poseidon2_B_19_3, poseidon2_B_20_0, poseidon2_B_20_1, poseidon2_B_20_2, poseidon2_B_20_3, poseidon2_B_21_0, poseidon2_B_21_1, poseidon2_B_21_2, poseidon2_B_21_3, poseidon2_B_22_0, poseidon2_B_22_1, poseidon2_B_22_2, poseidon2_B_22_3, poseidon2_B_23_0, poseidon2_B_23_1, poseidon2_B_23_2, poseidon2_B_23_3, poseidon2_B_24_0, poseidon2_B_24_1, poseidon2_B_24_2, poseidon2_B_24_3, poseidon2_B_25_0, poseidon2_B_25_1, poseidon2_B_25_2, poseidon2_B_25_3, poseidon2_B_26_0, poseidon2_B_26_1, poseidon2_B_26_2, poseidon2_B_26_3, poseidon2_B_27_0, poseidon2_B_27_1, poseidon2_B_27_2, poseidon2_B_27_3, poseidon2_B_28_0, poseidon2_B_28_1, poseidon2_B_28_2, poseidon2_B_28_3, poseidon2_B_29_0, poseidon2_B_29_1, poseidon2_B_29_2, poseidon2_B_29_3, poseidon2_B_30_0, poseidon2_B_30_1, poseidon2_B_30_2, poseidon2_B_30_3, poseidon2_B_31_0, poseidon2_B_31_1, poseidon2_B_31_2, poseidon2_B_31_3, poseidon2_B_32_0, poseidon2_B_32_1, poseidon2_B_32_2, poseidon2_B_32_3, poseidon2_B_33_0, poseidon2_B_33_1, poseidon2_B_33_2, poseidon2_B_33_3, poseidon2_B_34_0, poseidon2_B_34_1, poseidon2_B_34_2, poseidon2_B_34_3, poseidon2_B_35_0, poseidon2_B_35_1, poseidon2_B_35_2, poseidon2_B_35_3, poseidon2_B_36_0, poseidon2_B_36_1, poseidon2_B_36_2, poseidon2_B_36_3, poseidon2_B_37_0, poseidon2_B_37_1, poseidon2_B_37_2, poseidon2_B_37_3, poseidon2_B_38_0, poseidon2_B_38_1, poseidon2_B_38_2, poseidon2_B_38_3, poseidon2_B_39_0, poseidon2_B_39_1, poseidon2_B_39_2, poseidon2_B_39_3, poseidon2_B_40_0, poseidon2_B_40_1, poseidon2_B_40_2, poseidon2_B_40_3, poseidon2_B_41_0, poseidon2_B_41_1, poseidon2_B_41_2, poseidon2_B_41_3, poseidon2_B_42_0, poseidon2_B_42_1, poseidon2_B_42_2, poseidon2_B_42_3, poseidon2_B_43_0, poseidon2_B_43_1, poseidon2_B_43_2, poseidon2_B_43_3, poseidon2_B_44_0, poseidon2_B_44_1, poseidon2_B_44_2, poseidon2_B_44_3, poseidon2_B_45_0, poseidon2_B_45_1, poseidon2_B_45_2, poseidon2_B_45_3, poseidon2_B_46_0, poseidon2_B_46_1, poseidon2_B_46_2, poseidon2_B_46_3, poseidon2_B_47_0, poseidon2_B_47_1, poseidon2_B_47_2, poseidon2_B_47_3, poseidon2_B_48_0, poseidon2_B_48_1, poseidon2_B_48_2, poseidon2_B_48_3, poseidon2_B_49_0, poseidon2_B_49_1, poseidon2_B_49_2, poseidon2_B_49_3, poseidon2_B_4_0, poseidon2_B_4_1, poseidon2_B_4_2, poseidon2_B_4_3, poseidon2_B_50_0, poseidon2_B_50_1, poseidon2_B_50_2, poseidon2_B_50_3, poseidon2_B_51_0, poseidon2_B_51_1, poseidon2_B_51_2, poseidon2_B_51_3, poseidon2_B_52_0, poseidon2_B_52_1, poseidon2_B_52_2, poseidon2_B_52_3, poseidon2_B_53_0, poseidon2_B_53_1, poseidon2_B_53_2, poseidon2_B_53_3, poseidon2_B_54_0, poseidon2_B_54_1, poseidon2_B_54_2, poseidon2_B_54_3, poseidon2_B_55_0, poseidon2_B_55_1, poseidon2_B_55_2, poseidon2_B_55_3, poseidon2_B_56_0, poseidon2_B_56_1, poseidon2_B_56_2, poseidon2_B_56_3, poseidon2_B_57_0, poseidon2_B_57_1, poseidon2_B_57_2, poseidon2_B_57_3, poseidon2_B_58_0, poseidon2_B_58_1, poseidon2_B_58_2, poseidon2_B_58_3, poseidon2_B_59_0, poseidon2_B_59_1, poseidon2_B_59_2, poseidon2_B_59_3, poseidon2_B_5_0, poseidon2_B_5_1, poseidon2_B_5_2, poseidon2_B_5_3, poseidon2_B_6_0, poseidon2_B_6_1, poseidon2_B_6_2, poseidon2_B_6_3, poseidon2_B_7_0, poseidon2_B_7_1, poseidon2_B_7_2, poseidon2_B_7_3, poseidon2_B_8_0, poseidon2_B_8_1, poseidon2_B_8_2, poseidon2_B_8_3, poseidon2_B_9_0, poseidon2_B_9_1, poseidon2_B_9_2, poseidon2_B_9_3, poseidon2_EXT_LAYER_4, poseidon2_EXT_LAYER_5, poseidon2_EXT_LAYER_6, poseidon2_EXT_LAYER_7, poseidon2_T_0_4, poseidon2_T_0_5, poseidon2_T_0_6, poseidon2_T_0_7, poseidon2_T_1_4, poseidon2_T_1_5, poseidon2_T_1_6, poseidon2_T_1_7, poseidon2_T_2_4, poseidon2_T_2_5, poseidon2_T_2_6, poseidon2_T_2_7, poseidon2_T_3_4, poseidon2_T_3_5, poseidon2_T_3_6, poseidon2_T_3_7, poseidon2_T_60_4, poseidon2_T_60_5, poseidon2_T_60_6, poseidon2_T_60_7, poseidon2_T_61_4, poseidon2_T_61_5, poseidon2_T_61_6, poseidon2_T_61_7, poseidon2_T_62_4, poseidon2_T_62_5, poseidon2_T_62_6, poseidon2_T_62_7, poseidon2_T_63_4, poseidon2_T_63_5, poseidon2_T_63_6, poseidon2_T_63_7, poseidon2_a_0, poseidon2_a_1, poseidon2_a_2, poseidon2_a_3, poseidon2_b_0, poseidon2_b_1, poseidon2_b_2, poseidon2_b_3, poseidon2_clk, poseidon2_input_addr, poseidon2_mem_addr_read_a, poseidon2_mem_addr_read_b, poseidon2_mem_addr_read_c, poseidon2_mem_addr_read_d, poseidon2_mem_addr_write_a, poseidon2_mem_addr_write_b, poseidon2_mem_addr_write_c, poseidon2_mem_addr_write_d, poseidon2_output_addr, poseidon2_sel_poseidon_perm, powers_power_of_2, sha256_clk, sha256_input, sha256_output, sha256_sel_sha256_compression, sha256_state, slice_addr, slice_clk, slice_cnt, slice_col_offset, slice_one_min_inv, slice_sel_cd_cpy, slice_sel_mem_active, slice_sel_return, slice_sel_start, slice_space_id, slice_val, lookup_byte_lengths_counts, lookup_byte_operations_counts, lookup_cd_value_counts, lookup_ret_value_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 +#define PRECOMPUTED_ENTITIES 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, gas_da_gas_fixed_table, gas_l2_gas_fixed_table, gas_sel_gas_cost, main_clk, main_sel_first, main_zeroes, powers_power_of_2 +#define WIRE_ENTITIES kernel_kernel_inputs, kernel_kernel_value_out, kernel_kernel_side_effect_out, kernel_kernel_metadata_out, main_calldata, main_returndata, 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, conversion_clk, conversion_input, conversion_num_limbs, conversion_radix, conversion_sel_to_radix_le, 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_calldata, 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_calldata_copy, 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_external_return, 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_returndata, main_sel_rng_16, main_sel_rng_8, main_sel_slice_gadget, 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_op_poseidon_read_a, mem_sel_op_poseidon_read_b, mem_sel_op_poseidon_read_c, mem_sel_op_poseidon_read_d, mem_sel_op_poseidon_write_a, mem_sel_op_poseidon_write_b, mem_sel_op_poseidon_write_c, mem_sel_op_poseidon_write_d, mem_sel_op_slice, 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_B_10_0, poseidon2_B_10_1, poseidon2_B_10_2, poseidon2_B_10_3, poseidon2_B_11_0, poseidon2_B_11_1, poseidon2_B_11_2, poseidon2_B_11_3, poseidon2_B_12_0, poseidon2_B_12_1, poseidon2_B_12_2, poseidon2_B_12_3, poseidon2_B_13_0, poseidon2_B_13_1, poseidon2_B_13_2, poseidon2_B_13_3, poseidon2_B_14_0, poseidon2_B_14_1, poseidon2_B_14_2, poseidon2_B_14_3, poseidon2_B_15_0, poseidon2_B_15_1, poseidon2_B_15_2, poseidon2_B_15_3, poseidon2_B_16_0, poseidon2_B_16_1, poseidon2_B_16_2, poseidon2_B_16_3, poseidon2_B_17_0, poseidon2_B_17_1, poseidon2_B_17_2, poseidon2_B_17_3, poseidon2_B_18_0, poseidon2_B_18_1, poseidon2_B_18_2, poseidon2_B_18_3, poseidon2_B_19_0, poseidon2_B_19_1, poseidon2_B_19_2, poseidon2_B_19_3, poseidon2_B_20_0, poseidon2_B_20_1, poseidon2_B_20_2, poseidon2_B_20_3, poseidon2_B_21_0, poseidon2_B_21_1, poseidon2_B_21_2, poseidon2_B_21_3, poseidon2_B_22_0, poseidon2_B_22_1, poseidon2_B_22_2, poseidon2_B_22_3, poseidon2_B_23_0, poseidon2_B_23_1, poseidon2_B_23_2, poseidon2_B_23_3, poseidon2_B_24_0, poseidon2_B_24_1, poseidon2_B_24_2, poseidon2_B_24_3, poseidon2_B_25_0, poseidon2_B_25_1, poseidon2_B_25_2, poseidon2_B_25_3, poseidon2_B_26_0, poseidon2_B_26_1, poseidon2_B_26_2, poseidon2_B_26_3, poseidon2_B_27_0, poseidon2_B_27_1, poseidon2_B_27_2, poseidon2_B_27_3, poseidon2_B_28_0, poseidon2_B_28_1, poseidon2_B_28_2, poseidon2_B_28_3, poseidon2_B_29_0, poseidon2_B_29_1, poseidon2_B_29_2, poseidon2_B_29_3, poseidon2_B_30_0, poseidon2_B_30_1, poseidon2_B_30_2, poseidon2_B_30_3, poseidon2_B_31_0, poseidon2_B_31_1, poseidon2_B_31_2, poseidon2_B_31_3, poseidon2_B_32_0, poseidon2_B_32_1, poseidon2_B_32_2, poseidon2_B_32_3, poseidon2_B_33_0, poseidon2_B_33_1, poseidon2_B_33_2, poseidon2_B_33_3, poseidon2_B_34_0, poseidon2_B_34_1, poseidon2_B_34_2, poseidon2_B_34_3, poseidon2_B_35_0, poseidon2_B_35_1, poseidon2_B_35_2, poseidon2_B_35_3, poseidon2_B_36_0, poseidon2_B_36_1, poseidon2_B_36_2, poseidon2_B_36_3, poseidon2_B_37_0, poseidon2_B_37_1, poseidon2_B_37_2, poseidon2_B_37_3, poseidon2_B_38_0, poseidon2_B_38_1, poseidon2_B_38_2, poseidon2_B_38_3, poseidon2_B_39_0, poseidon2_B_39_1, poseidon2_B_39_2, poseidon2_B_39_3, poseidon2_B_40_0, poseidon2_B_40_1, poseidon2_B_40_2, poseidon2_B_40_3, poseidon2_B_41_0, poseidon2_B_41_1, poseidon2_B_41_2, poseidon2_B_41_3, poseidon2_B_42_0, poseidon2_B_42_1, poseidon2_B_42_2, poseidon2_B_42_3, poseidon2_B_43_0, poseidon2_B_43_1, poseidon2_B_43_2, poseidon2_B_43_3, poseidon2_B_44_0, poseidon2_B_44_1, poseidon2_B_44_2, poseidon2_B_44_3, poseidon2_B_45_0, poseidon2_B_45_1, poseidon2_B_45_2, poseidon2_B_45_3, poseidon2_B_46_0, poseidon2_B_46_1, poseidon2_B_46_2, poseidon2_B_46_3, poseidon2_B_47_0, poseidon2_B_47_1, poseidon2_B_47_2, poseidon2_B_47_3, poseidon2_B_48_0, poseidon2_B_48_1, poseidon2_B_48_2, poseidon2_B_48_3, poseidon2_B_49_0, poseidon2_B_49_1, poseidon2_B_49_2, poseidon2_B_49_3, poseidon2_B_4_0, poseidon2_B_4_1, poseidon2_B_4_2, poseidon2_B_4_3, poseidon2_B_50_0, poseidon2_B_50_1, poseidon2_B_50_2, poseidon2_B_50_3, poseidon2_B_51_0, poseidon2_B_51_1, poseidon2_B_51_2, poseidon2_B_51_3, poseidon2_B_52_0, poseidon2_B_52_1, poseidon2_B_52_2, poseidon2_B_52_3, poseidon2_B_53_0, poseidon2_B_53_1, poseidon2_B_53_2, poseidon2_B_53_3, poseidon2_B_54_0, poseidon2_B_54_1, poseidon2_B_54_2, poseidon2_B_54_3, poseidon2_B_55_0, poseidon2_B_55_1, poseidon2_B_55_2, poseidon2_B_55_3, poseidon2_B_56_0, poseidon2_B_56_1, poseidon2_B_56_2, poseidon2_B_56_3, poseidon2_B_57_0, poseidon2_B_57_1, poseidon2_B_57_2, poseidon2_B_57_3, poseidon2_B_58_0, poseidon2_B_58_1, poseidon2_B_58_2, poseidon2_B_58_3, poseidon2_B_59_0, poseidon2_B_59_1, poseidon2_B_59_2, poseidon2_B_59_3, poseidon2_B_5_0, poseidon2_B_5_1, poseidon2_B_5_2, poseidon2_B_5_3, poseidon2_B_6_0, poseidon2_B_6_1, poseidon2_B_6_2, poseidon2_B_6_3, poseidon2_B_7_0, poseidon2_B_7_1, poseidon2_B_7_2, poseidon2_B_7_3, poseidon2_B_8_0, poseidon2_B_8_1, poseidon2_B_8_2, poseidon2_B_8_3, poseidon2_B_9_0, poseidon2_B_9_1, poseidon2_B_9_2, poseidon2_B_9_3, poseidon2_EXT_LAYER_4, poseidon2_EXT_LAYER_5, poseidon2_EXT_LAYER_6, poseidon2_EXT_LAYER_7, poseidon2_T_0_4, poseidon2_T_0_5, poseidon2_T_0_6, poseidon2_T_0_7, poseidon2_T_1_4, poseidon2_T_1_5, poseidon2_T_1_6, poseidon2_T_1_7, poseidon2_T_2_4, poseidon2_T_2_5, poseidon2_T_2_6, poseidon2_T_2_7, poseidon2_T_3_4, poseidon2_T_3_5, poseidon2_T_3_6, poseidon2_T_3_7, poseidon2_T_60_4, poseidon2_T_60_5, poseidon2_T_60_6, poseidon2_T_60_7, poseidon2_T_61_4, poseidon2_T_61_5, poseidon2_T_61_6, poseidon2_T_61_7, poseidon2_T_62_4, poseidon2_T_62_5, poseidon2_T_62_6, poseidon2_T_62_7, poseidon2_T_63_4, poseidon2_T_63_5, poseidon2_T_63_6, poseidon2_T_63_7, poseidon2_a_0, poseidon2_a_1, poseidon2_a_2, poseidon2_a_3, poseidon2_b_0, poseidon2_b_1, poseidon2_b_2, poseidon2_b_3, poseidon2_clk, poseidon2_input_addr, poseidon2_mem_addr_read_a, poseidon2_mem_addr_read_b, poseidon2_mem_addr_read_c, poseidon2_mem_addr_read_d, poseidon2_mem_addr_write_a, poseidon2_mem_addr_write_b, poseidon2_mem_addr_write_c, poseidon2_mem_addr_write_d, poseidon2_output_addr, poseidon2_sel_poseidon_perm, sha256_clk, sha256_input, sha256_output, sha256_sel_sha256_compression, sha256_state, slice_addr, slice_clk, slice_cnt, slice_col_offset, slice_one_min_inv, slice_sel_cd_cpy, slice_sel_mem_active, slice_sel_return, slice_sel_start, slice_space_id, slice_val, lookup_byte_lengths_counts, lookup_byte_operations_counts, lookup_cd_value_counts, lookup_ret_value_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 #define DERIVED_WITNESS_ENTITIES perm_pos_mem_read_a, perm_pos_mem_read_b, perm_pos_mem_read_c, perm_pos_mem_read_d, perm_pos_mem_write_a, perm_pos_mem_write_b, perm_pos_mem_write_c, perm_pos_mem_write_d, perm_slice_mem, perm_main_alu, perm_main_bin, perm_main_conv, perm_main_pos2_perm, perm_main_pedersen, perm_main_slice, 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_cd_value, lookup_ret_value, 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 #define SHIFTED_ENTITIES 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, slice_addr_shift, slice_clk_shift, slice_cnt_shift, slice_col_offset_shift, slice_sel_cd_cpy_shift, slice_sel_mem_active_shift, slice_sel_return_shift, slice_sel_start_shift, slice_space_id_shift #define TO_BE_SHIFTED(e) e.alu_a_hi, e.alu_a_lo, e.alu_b_hi, e.alu_b_lo, e.alu_cmp_rng_ctr, e.alu_div_u16_r0, e.alu_div_u16_r1, e.alu_div_u16_r2, e.alu_div_u16_r3, e.alu_div_u16_r4, e.alu_div_u16_r5, e.alu_div_u16_r6, e.alu_div_u16_r7, e.alu_op_add, e.alu_op_cast_prev, e.alu_op_cast, e.alu_op_div, e.alu_op_mul, e.alu_op_shl, e.alu_op_shr, e.alu_op_sub, e.alu_p_sub_a_hi, e.alu_p_sub_a_lo, e.alu_p_sub_b_hi, e.alu_p_sub_b_lo, e.alu_sel_alu, e.alu_sel_cmp, e.alu_sel_div_rng_chk, e.alu_sel_rng_chk_lookup, e.alu_sel_rng_chk, e.alu_u16_r0, e.alu_u16_r1, e.alu_u16_r2, e.alu_u16_r3, e.alu_u16_r4, e.alu_u16_r5, e.alu_u16_r6, e.alu_u8_r0, e.alu_u8_r1, e.binary_acc_ia, e.binary_acc_ib, e.binary_acc_ic, e.binary_mem_tag_ctr, e.binary_op_id, e.kernel_emit_l2_to_l1_msg_write_offset, e.kernel_emit_note_hash_write_offset, e.kernel_emit_nullifier_write_offset, e.kernel_emit_unencrypted_log_write_offset, e.kernel_l1_to_l2_msg_exists_write_offset, e.kernel_note_hash_exist_write_offset, e.kernel_nullifier_exists_write_offset, e.kernel_nullifier_non_exists_write_offset, e.kernel_side_effect_counter, e.kernel_sload_write_offset, e.kernel_sstore_write_offset, e.main_da_gas_remaining, e.main_internal_return_ptr, e.main_l2_gas_remaining, e.main_pc, e.mem_glob_addr, e.mem_rw, e.mem_sel_mem, e.mem_tag, e.mem_tsp, e.mem_val, e.slice_addr, e.slice_clk, e.slice_cnt, e.slice_col_offset, e.slice_sel_cd_cpy, e.slice_sel_mem_active, e.slice_sel_return, e.slice_sel_start, e.slice_space_id @@ -129,8 +127,8 @@ class AvmFlavor { using VerifierCommitmentKey = AvmFlavorSettings::VerifierCommitmentKey; using RelationSeparator = AvmFlavorSettings::RelationSeparator; - static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 3; - static constexpr size_t NUM_WITNESS_ENTITIES = 701; + static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 14; + static constexpr size_t NUM_WITNESS_ENTITIES = 690; static constexpr size_t NUM_WIRES = NUM_WITNESS_ENTITIES + NUM_PRECOMPUTED_ENTITIES; // We have two copies of the witness entities, so we subtract the number of fixed ones (they have no shift), one for // the unshifted and one for the shifted @@ -141,7 +139,6 @@ class AvmFlavor { Avm_vm::alu, Avm_vm::binary, Avm_vm::conversion, - Avm_vm::gas, Avm_vm::keccakf1600, Avm_vm::kernel, Avm_vm::main, @@ -149,7 +146,6 @@ class AvmFlavor { Avm_vm::mem_slice, Avm_vm::pedersen, Avm_vm::poseidon2, - Avm_vm::powers, Avm_vm::sha256>; using LookupRelations = std::tuple< diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/full_row.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/full_row.cpp index e1353484573..eb57c0bd310 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/full_row.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/full_row.cpp @@ -19,9 +19,20 @@ template std::string field_to_string(const FF& ff) template std::vector AvmFullRow::names() { - return { "main_clk", + return { "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", + "gas_da_gas_fixed_table", + "gas_l2_gas_fixed_table", + "gas_sel_gas_cost", + "main_clk", "main_sel_first", "main_zeroes", + "powers_power_of_2", "kernel_kernel_inputs", "kernel_kernel_value_out", "kernel_kernel_side_effect_out", @@ -124,21 +135,11 @@ template std::vector AvmFullRow::names() "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", @@ -597,7 +598,6 @@ template std::vector AvmFullRow::names() "poseidon2_mem_addr_write_d", "poseidon2_output_addr", "poseidon2_sel_poseidon_perm", - "powers_power_of_2", "sha256_clk", "sha256_input", "sha256_output", @@ -728,9 +728,20 @@ template std::vector AvmFullRow::names() template RefVector AvmFullRow::as_vector() const { return RefVector{ + 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, + gas_da_gas_fixed_table, + gas_l2_gas_fixed_table, + gas_sel_gas_cost, main_clk, main_sel_first, main_zeroes, + powers_power_of_2, kernel_kernel_inputs, kernel_kernel_value_out, kernel_kernel_side_effect_out, @@ -833,21 +844,11 @@ template RefVector AvmFullRow::as_vector() const 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, @@ -1306,7 +1307,6 @@ template RefVector AvmFullRow::as_vector() const poseidon2_mem_addr_write_d, poseidon2_output_addr, poseidon2_sel_poseidon_perm, - powers_power_of_2, sha256_clk, sha256_input, sha256_output, diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/full_row.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/full_row.hpp index 6feca6cc507..278ce258c3c 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/full_row.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/full_row.hpp @@ -10,9 +10,20 @@ namespace bb { template struct AvmFullRow { + FF byte_lookup_sel_bin{}; + FF byte_lookup_table_byte_lengths{}; + FF byte_lookup_table_in_tags{}; + FF byte_lookup_table_input_a{}; + FF byte_lookup_table_input_b{}; + FF byte_lookup_table_op_id{}; + FF byte_lookup_table_output{}; + FF gas_da_gas_fixed_table{}; + FF gas_l2_gas_fixed_table{}; + FF gas_sel_gas_cost{}; FF main_clk{}; FF main_sel_first{}; FF main_zeroes{}; + FF powers_power_of_2{}; FF kernel_kernel_inputs{}; FF kernel_kernel_value_out{}; FF kernel_kernel_side_effect_out{}; @@ -115,21 +126,11 @@ template struct AvmFullRow { FF binary_op_id{}; FF binary_sel_bin{}; FF binary_start{}; - FF byte_lookup_sel_bin{}; - FF byte_lookup_table_byte_lengths{}; - FF byte_lookup_table_in_tags{}; - FF byte_lookup_table_input_a{}; - FF byte_lookup_table_input_b{}; - FF byte_lookup_table_op_id{}; - FF byte_lookup_table_output{}; FF conversion_clk{}; FF conversion_input{}; FF conversion_num_limbs{}; FF conversion_radix{}; FF conversion_sel_to_radix_le{}; - FF gas_da_gas_fixed_table{}; - FF gas_l2_gas_fixed_table{}; - FF gas_sel_gas_cost{}; FF keccakf1600_clk{}; FF keccakf1600_input{}; FF keccakf1600_output{}; @@ -588,7 +589,6 @@ template struct AvmFullRow { FF poseidon2_mem_addr_write_d{}; FF poseidon2_output_addr{}; FF poseidon2_sel_poseidon_perm{}; - FF powers_power_of_2{}; FF sha256_clk{}; FF sha256_input{}; FF sha256_output{}; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/gas.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/gas.hpp deleted file mode 100644 index 9951f97b24f..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/gas.hpp +++ /dev/null @@ -1,59 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/relations/relation_parameters.hpp" -#include "barretenberg/relations/relation_types.hpp" - -namespace bb::Avm_vm { - -template struct GasRow { - FF gas_da_gas_fixed_table{}; - FF gas_l2_gas_fixed_table{}; - FF gas_sel_gas_cost{}; -}; - -template class gasImpl { - public: - using FF = FF_; - - static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { 2, 2, 2 }; - - template - void static accumulate(ContainerOverSubrelations& evals, - const AllEntities& new_term, - [[maybe_unused]] const RelationParameters&, - [[maybe_unused]] const FF& scaling_factor) - { - { - using Accumulator = typename std::tuple_element_t<0, ContainerOverSubrelations>; - auto tmp = (new_term.gas_sel_gas_cost - new_term.gas_sel_gas_cost); - tmp *= scaling_factor; - std::get<0>(evals) += typename Accumulator::View(tmp); - } - { - using Accumulator = typename std::tuple_element_t<1, ContainerOverSubrelations>; - auto tmp = (new_term.gas_l2_gas_fixed_table - new_term.gas_l2_gas_fixed_table); - tmp *= scaling_factor; - std::get<1>(evals) += typename Accumulator::View(tmp); - } - { - using Accumulator = typename std::tuple_element_t<2, ContainerOverSubrelations>; - auto tmp = (new_term.gas_da_gas_fixed_table - new_term.gas_da_gas_fixed_table); - tmp *= scaling_factor; - std::get<2>(evals) += typename Accumulator::View(tmp); - } - } -}; - -template class gas : public Relation> { - public: - static constexpr const char* NAME = "gas"; - - static std::string get_subrelation_label(size_t index) - { - switch (index) {} - return std::to_string(index); - } -}; - -} // namespace bb::Avm_vm \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/powers.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/powers.hpp deleted file mode 100644 index 981fec25445..00000000000 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/powers.hpp +++ /dev/null @@ -1,45 +0,0 @@ -// AUTOGENERATED FILE -#pragma once - -#include "barretenberg/relations/relation_parameters.hpp" -#include "barretenberg/relations/relation_types.hpp" - -namespace bb::Avm_vm { - -template struct PowersRow { - FF powers_power_of_2{}; -}; - -template class powersImpl { - public: - using FF = FF_; - - static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { 2 }; - - template - void static accumulate(ContainerOverSubrelations& evals, - const AllEntities& new_term, - [[maybe_unused]] const RelationParameters&, - [[maybe_unused]] const FF& scaling_factor) - { - { - using Accumulator = typename std::tuple_element_t<0, ContainerOverSubrelations>; - auto tmp = (new_term.powers_power_of_2 - new_term.powers_power_of_2); - tmp *= scaling_factor; - std::get<0>(evals) += typename Accumulator::View(tmp); - } - } -}; - -template class powers : public Relation> { - public: - static constexpr const char* NAME = "powers"; - - static std::string get_subrelation_label(size_t index) - { - switch (index) {} - return std::to_string(index); - } -}; - -} // namespace bb::Avm_vm \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/trace/fixed_gas.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/trace/fixed_gas.cpp index 47fd3597a61..dce5e0674d9 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/trace/fixed_gas.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/trace/fixed_gas.cpp @@ -6,9 +6,9 @@ FixedGasTable::FixedGasTable() { for (int i = 0; i < static_cast(OpCode::LAST_OPCODE_SENTINEL); i++) { table_rows.push_back(GasRow{ - .gas_da_gas_fixed_table = FF(2), - .gas_l2_gas_fixed_table = FF(10), .gas_sel_gas_cost = FF(1), + .gas_l2_gas_fixed_table = FF(10), + .gas_da_gas_fixed_table = FF(2), }); } } diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/trace/fixed_gas.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/trace/fixed_gas.hpp index 309ebb6b416..b2834ed647e 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/trace/fixed_gas.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/trace/fixed_gas.hpp @@ -4,7 +4,6 @@ #include #include "barretenberg/ecc/curves/bn254/fr.hpp" -#include "barretenberg/vm/avm/generated/relations/gas.hpp" #include "barretenberg/vm/avm/trace/common.hpp" #include "barretenberg/vm/avm/trace/opcode.hpp" @@ -12,7 +11,11 @@ namespace bb::avm_trace { class FixedGasTable { public: - using GasRow = bb::Avm_vm::GasRow; + struct GasRow { + FF gas_sel_gas_cost; + FF gas_l2_gas_fixed_table; + FF gas_da_gas_fixed_table; + }; static const FixedGasTable& get(); diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/trace/fixed_powers.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/trace/fixed_powers.hpp index d5319a43dae..4f0901f4b36 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/trace/fixed_powers.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/trace/fixed_powers.hpp @@ -4,14 +4,15 @@ #include #include "barretenberg/ecc/curves/bn254/fr.hpp" -#include "barretenberg/vm/avm/generated/relations/powers.hpp" #include "barretenberg/vm/avm/trace/common.hpp" namespace bb::avm_trace { class FixedPowersTable { public: - using PowersRow = bb::Avm_vm::PowersRow; + struct PowersRow { + FF powers_power_of_2; + }; static const FixedPowersTable& get(); diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/trace/trace.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/trace/trace.cpp index 479486d2dcb..0e0954ee2e8 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/trace/trace.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/trace/trace.cpp @@ -54,12 +54,12 @@ uint32_t finalize_bin_trace_lookup_for_testing(std::vector& main_trace, Avm } if (clk > (main_trace.size() - 1)) { main_trace.push_back(Row{ - .main_clk = FF(clk), .byte_lookup_sel_bin = FF(1), .byte_lookup_table_input_a = a, .byte_lookup_table_input_b = b, .byte_lookup_table_op_id = op_id, .byte_lookup_table_output = bit_op, + .main_clk = FF(clk), .lookup_byte_operations_counts = count, }); } else { @@ -4398,7 +4398,6 @@ std::vector AvmTraceBuilder::finalize(uint32_t min_trace_size, bool range_c // Assume that gas_trace entries are ordered by a strictly increasing clk sequence. for (auto const& gas_entry : gas_trace) { - // Filling potential gap between two gas_trace entries // Remaining gas values remain unchanged. while (gas_entry.clk > current_clk) {