From 095967803064acefe2361d88bd1d9b51db3c7e3e Mon Sep 17 00:00:00 2001 From: IlyasRidhuan Date: Tue, 8 Oct 2024 08:30:50 +0000 Subject: [PATCH] feat(avm): full poseidon2 --- .../cpp/pil/avm/gadgets/poseidon2.pil | 44 +- .../cpp/pil/avm/gadgets/poseidon2_full.pil | 89 ++ barretenberg/cpp/pil/avm/main.pil | 1 + .../crypto/poseidon2/poseidon2.cpp | 2 +- .../vm/avm/generated/circuit_builder.cpp | 29 +- .../barretenberg/vm/avm/generated/flavor.cpp | 1125 +++++++++-------- .../barretenberg/vm/avm/generated/flavor.hpp | 18 +- .../vm/avm/generated/full_row.cpp | 50 +- .../vm/avm/generated/full_row.hpp | 27 +- .../vm/avm/generated/relations/kernel.hpp | 200 ++- .../vm/avm/generated/relations/main.hpp | 335 +++-- .../relations/perm_pos2_fixed_pos2_perm.hpp | 83 ++ .../relations/perm_pos_mem_read_a.hpp | 10 +- .../relations/perm_pos_mem_read_b.hpp | 10 +- .../relations/perm_pos_mem_read_c.hpp | 10 +- .../relations/perm_pos_mem_read_d.hpp | 10 +- .../relations/perm_pos_mem_write_a.hpp | 10 +- .../relations/perm_pos_mem_write_b.hpp | 10 +- .../relations/perm_pos_mem_write_c.hpp | 10 +- .../relations/perm_pos_mem_write_d.hpp | 10 +- .../vm/avm/generated/relations/poseidon2.hpp | 593 ++++----- .../generated/relations/poseidon2_full.hpp | 189 +++ .../vm/avm/tests/full_poseidon2.test.cpp | 106 ++ .../vm/avm/tests/fuzz_skippable.test.cpp | 2 + .../vm/avm/trace/gadgets/poseidon2.cpp | 113 +- .../vm/avm/trace/gadgets/poseidon2.hpp | 30 +- .../src/barretenberg/vm/aztec_constants.hpp | 2 +- .../crates/types/src/constants.nr | 2 +- yarn-project/circuits.js/src/constants.gen.ts | 2 +- 29 files changed, 1955 insertions(+), 1167 deletions(-) create mode 100644 barretenberg/cpp/pil/avm/gadgets/poseidon2_full.pil create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos2_fixed_pos2_perm.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2_full.hpp create mode 100644 barretenberg/cpp/src/barretenberg/vm/avm/tests/full_poseidon2.test.cpp diff --git a/barretenberg/cpp/pil/avm/gadgets/poseidon2.pil b/barretenberg/cpp/pil/avm/gadgets/poseidon2.pil index 4bce94cedde..eda6be40272 100644 --- a/barretenberg/cpp/pil/avm/gadgets/poseidon2.pil +++ b/barretenberg/cpp/pil/avm/gadgets/poseidon2.pil @@ -9,6 +9,16 @@ namespace poseidon2(256); // Selector is boolean sel_poseidon_perm * (1 - sel_poseidon_perm) = 0; + // If this selector is on, we will read/write the input/outpu values from/to memory + pol commit sel_poseidon_perm_mem_op; + sel_poseidon_perm_mem_op * (1 - sel_poseidon_perm_mem_op) = 0; + // This is used by the bytecode hashing trace where the inputs are not stored in memory + pol commit sel_poseidon_perm_immediate; + sel_poseidon_perm_immediate * (1 - sel_poseidon_perm_immediate) = 0; + + // If inactive the mem op and immediate selectors must be 0 + sel_poseidon_perm = sel_poseidon_perm_mem_op + sel_poseidon_perm_immediate; + // No relations will be checked if this identity is satisfied. #[skippable_if] sel_poseidon_perm = 0; @@ -30,16 +40,16 @@ namespace poseidon2(256); // Space Id pol commit space_id; - // Accessed read / write addresses are contiguous blocks - sel_poseidon_perm * (mem_addr_read_a - input_addr) = 0; - sel_poseidon_perm * (mem_addr_read_b - (input_addr + 1)) = 0; - sel_poseidon_perm * (mem_addr_read_c - (input_addr + 2)) = 0; - sel_poseidon_perm * (mem_addr_read_d - (input_addr + 3)) = 0; + // Accessed read / write addresses are contiguous blocks ( would be nice if we could use sel_poseidon * sel_mem_op) + sel_poseidon_perm_mem_op * (mem_addr_read_a - input_addr) = 0; + sel_poseidon_perm_mem_op * (mem_addr_read_b - (input_addr + 1)) = 0; + sel_poseidon_perm_mem_op * (mem_addr_read_c - (input_addr + 2)) = 0; + sel_poseidon_perm_mem_op * (mem_addr_read_d - (input_addr + 3)) = 0; - sel_poseidon_perm * (mem_addr_write_a - output_addr) = 0; - sel_poseidon_perm * (mem_addr_write_b - (output_addr + 1)) = 0; - sel_poseidon_perm * (mem_addr_write_c - (output_addr + 2)) = 0; - sel_poseidon_perm * (mem_addr_write_d - (output_addr + 3)) = 0; + sel_poseidon_perm_mem_op * (mem_addr_write_a - output_addr) = 0; + sel_poseidon_perm_mem_op * (mem_addr_write_b - (output_addr + 1)) = 0; + sel_poseidon_perm_mem_op * (mem_addr_write_c - (output_addr + 2)) = 0; + sel_poseidon_perm_mem_op * (mem_addr_write_d - (output_addr + 3)) = 0; // The input values are represented by a_0, a_1, a_2, a_3 pol commit a_0; @@ -55,43 +65,43 @@ namespace poseidon2(256); // ==== READ MEM OPS ===== #[PERM_POS_MEM_READ_A] - sel_poseidon_perm {clk, space_id, mem_addr_read_a, a_0, main.zeroes} + sel_poseidon_perm_mem_op {clk, space_id, mem_addr_read_a, a_0, main.zeroes} is mem.sel_op_poseidon_read_a {mem.clk, mem.space_id, mem.addr, mem.val, mem.rw}; #[PERM_POS_MEM_READ_B] - sel_poseidon_perm {clk, space_id, mem_addr_read_b, a_1, main.zeroes} + sel_poseidon_perm_mem_op {clk, space_id, mem_addr_read_b, a_1, main.zeroes} is mem.sel_op_poseidon_read_b {mem.clk, mem.space_id, mem.addr, mem.val, mem.rw}; #[PERM_POS_MEM_READ_C] - sel_poseidon_perm {clk, space_id, mem_addr_read_c, a_2, main.zeroes} + sel_poseidon_perm_mem_op {clk, space_id, mem_addr_read_c, a_2, main.zeroes} is mem.sel_op_poseidon_read_c {mem.clk, mem.space_id, mem.addr, mem.val, mem.rw}; #[PERM_POS_MEM_READ_D] - sel_poseidon_perm {clk, space_id, mem_addr_read_d, a_3, main.zeroes} + sel_poseidon_perm_mem_op {clk, space_id, mem_addr_read_d, a_3, main.zeroes} is mem.sel_op_poseidon_read_d {mem.clk, mem.space_id, mem.addr, mem.val, mem.rw}; //// ==== WRITE MEM OPS ===== #[PERM_POS_MEM_WRITE_A] - sel_poseidon_perm {clk, space_id, mem_addr_write_a, b_0, sel_poseidon_perm} + sel_poseidon_perm_mem_op {clk, space_id, mem_addr_write_a, b_0, sel_poseidon_perm} is mem.sel_op_poseidon_write_a {mem.clk, mem.space_id, mem.addr, mem.val, mem.rw}; #[PERM_POS_MEM_WRITE_B] - sel_poseidon_perm {clk, space_id, mem_addr_write_b, b_1, sel_poseidon_perm} + sel_poseidon_perm_mem_op {clk, space_id, mem_addr_write_b, b_1, sel_poseidon_perm} is mem.sel_op_poseidon_write_b {mem.clk, mem.space_id, mem.addr, mem.val, mem.rw}; #[PERM_POS_MEM_WRITE_C] - sel_poseidon_perm {clk, space_id, mem_addr_write_c, b_2, sel_poseidon_perm} + sel_poseidon_perm_mem_op {clk, space_id, mem_addr_write_c, b_2, sel_poseidon_perm} is mem.sel_op_poseidon_write_c {mem.clk, mem.space_id, mem.addr, mem.val, mem.rw}; #[PERM_POS_MEM_WRITE_D] - sel_poseidon_perm {clk, space_id, mem_addr_write_d, b_3, sel_poseidon_perm} + sel_poseidon_perm_mem_op {clk, space_id, mem_addr_write_d, b_3, sel_poseidon_perm} is mem.sel_op_poseidon_write_d {mem.clk, mem.space_id, mem.addr, mem.val, mem.rw}; diff --git a/barretenberg/cpp/pil/avm/gadgets/poseidon2_full.pil b/barretenberg/cpp/pil/avm/gadgets/poseidon2_full.pil new file mode 100644 index 00000000000..97f2eaeca0a --- /dev/null +++ b/barretenberg/cpp/pil/avm/gadgets/poseidon2_full.pil @@ -0,0 +1,89 @@ +include "./poseidon2.pil"; + +// Performs the poseidon2 full hash +// It is **mostly** well-constrained +namespace poseidon2_full(256); + pol commit clk; + // These are the inputs to be hashed this round, we hash chunks of 3 field elements + pol commit input_0; + pol commit input_1; + pol commit input_2; + + // Output of the hash it is matched with the result of the last permutation round + pol commit output; + + pol commit sel_poseidon; + sel_poseidon * (1 - sel_poseidon) = 0; + sel_poseidon = execute_poseidon_perm + end_poseidon; + pol TWOPOW64 = 18446744073709551616; + + pol commit input_len; + // Only used at the start of a new poseidon2 hash + pol IV = TWOPOW64 * input_len; + + // Start of a poseidon2 computation + pol commit start_poseidon; + start_poseidon * (1 - start_poseidon) = 0; + // When we end a poseidon, the next row must naturally have a start_poseidon + sel_poseidon' * (1 - main.sel_first) * (start_poseidon' - end_poseidon) = 0; + + // We track the num of rounds remaining, excluding the first round that has to be performed by the start_poseidon selector. + // We use the padded length to calculate the num of rounds to perform and the unpadded length is used in the IV. + pol commit num_perm_rounds_rem; + pol commit padding; + // Padding can either be 0, 1 or 2 + padding * (padding - 1) * (padding - 2) = 0; + pol PADDED_LEN = input_len + padding; + start_poseidon * ((num_perm_rounds_rem + 1) * 3 - PADDED_LEN) = 0; + + + // The row with the final result of the poseidon computation + pol commit end_poseidon; + end_poseidon * (1 - end_poseidon) = 0; + // The final result of the output of the hash should match the output from the last permutation (b_0) + end_poseidon * (output - b_0) = 0; + pol commit num_perm_rounds_rem_inv; + // end_poseidon == 1 when the num_perm_rounds_rem == 0 + sel_poseidon * (num_perm_rounds_rem * (end_poseidon * (1 - num_perm_rounds_rem_inv) + num_perm_rounds_rem_inv) - 1 + end_poseidon) = 0; + + // We perform the "squeeze" / perm operation until end_poseidon + pol commit execute_poseidon_perm; + execute_poseidon_perm * (1 - execute_poseidon_perm) = 0; + // The squeeze and end_poseidon selector must be mutually exclusive + sel_poseidon * (1 - end_poseidon - execute_poseidon_perm) = 0; + // Need an additional helper that holds the inverse of the num_perm_rounds_rem; + // If we still have rounds to perform, the num_perm_rounds_rem is decremented + execute_poseidon_perm * (num_perm_rounds_rem' - num_perm_rounds_rem + 1) = 0; + + + // The input values are represented by a_0, a_1, a_2, a_3 + // This most definitely could be simplified to a lower degree check + // the next perm input is constrained to be the previous perm output + the new values to be hashed. + // This occurs when we execute_poseidon_perm = 1 and we are not the start or the end of the poseidon perm + pol NEXT_INPUT_IS_PREV_OUTPUT_SEL = execute_poseidon_perm' * (1 - start_poseidon) * execute_poseidon_perm; + pol commit a_0; + start_poseidon * (a_0 - input_0) = 0; + sel_poseidon * NEXT_INPUT_IS_PREV_OUTPUT_SEL * (a_0' - b_0 - input_0') = 0; + pol commit a_1; + start_poseidon * (a_1 - input_1) = 0; + sel_poseidon * NEXT_INPUT_IS_PREV_OUTPUT_SEL * (a_1' - b_1 - input_1') = 0; + pol commit a_2; + start_poseidon * (a_2 - input_2) = 0; + sel_poseidon * NEXT_INPUT_IS_PREV_OUTPUT_SEL * (a_2' - b_2 - input_2') = 0; + pol commit a_3; + start_poseidon * (a_3 - IV) = 0; // IV is placed in the last slot if this is the start + sel_poseidon * NEXT_INPUT_IS_PREV_OUTPUT_SEL * (a_3' - b_3) = 0; + + // Output value represented by b_0 + pol commit b_0; + pol commit b_1; + pol commit b_2; + pol commit b_3; + + #[PERM_POS2_FIXED_POS2_PERM] + sel_poseidon {clk, a_0, a_1, a_2, a_3, b_0, b_1, b_2, b_3} + is + poseidon2.sel_poseidon_perm_immediate + { poseidon2.clk, poseidon2.a_0, poseidon2.a_1, poseidon2.a_2, poseidon2.a_3, + poseidon2.b_0, poseidon2.b_1, poseidon2.b_2, poseidon2.b_3 }; + diff --git a/barretenberg/cpp/pil/avm/main.pil b/barretenberg/cpp/pil/avm/main.pil index 89be52246ff..188f8dacca2 100644 --- a/barretenberg/cpp/pil/avm/main.pil +++ b/barretenberg/cpp/pil/avm/main.pil @@ -9,6 +9,7 @@ include "fixed/powers.pil"; include "gadgets/conversion.pil"; include "gadgets/sha256.pil"; include "gadgets/poseidon2.pil"; +include "gadgets/poseidon2_full.pil"; include "gadgets/keccakf1600.pil"; include "gadgets/mem_slice.pil"; diff --git a/barretenberg/cpp/src/barretenberg/crypto/poseidon2/poseidon2.cpp b/barretenberg/cpp/src/barretenberg/crypto/poseidon2/poseidon2.cpp index 635b8dc0896..dad8ea1d3b1 100644 --- a/barretenberg/cpp/src/barretenberg/crypto/poseidon2/poseidon2.cpp +++ b/barretenberg/cpp/src/barretenberg/crypto/poseidon2/poseidon2.cpp @@ -44,4 +44,4 @@ typename Poseidon2::FF Poseidon2::hash_buffer(const std::vector< } template class Poseidon2; -} // namespace bb::crypto \ No newline at end of file +} // namespace bb::crypto 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 9fdd479444a..99e3cad57ac 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/circuit_builder.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/circuit_builder.cpp @@ -290,7 +290,6 @@ AvmCircuitBuilder::ProverPolynomials AvmCircuitBuilder::compute_polynomials() co polys.main_sel_op_sload.set_if_valid_index(i, rows[i].main_sel_op_sload); polys.main_sel_op_sstore.set_if_valid_index(i, rows[i].main_sel_op_sstore); polys.main_sel_op_static_call.set_if_valid_index(i, rows[i].main_sel_op_static_call); - polys.main_sel_op_storage_address.set_if_valid_index(i, rows[i].main_sel_op_storage_address); polys.main_sel_op_sub.set_if_valid_index(i, rows[i].main_sel_op_sub); polys.main_sel_op_timestamp.set_if_valid_index(i, rows[i].main_sel_op_timestamp); polys.main_sel_op_transaction_fee.set_if_valid_index(i, rows[i].main_sel_op_transaction_fee); @@ -618,6 +617,30 @@ AvmCircuitBuilder::ProverPolynomials AvmCircuitBuilder::compute_polynomials() co polys.poseidon2_b_2.set_if_valid_index(i, rows[i].poseidon2_b_2); polys.poseidon2_b_3.set_if_valid_index(i, rows[i].poseidon2_b_3); polys.poseidon2_clk.set_if_valid_index(i, rows[i].poseidon2_clk); + polys.poseidon2_full_a_0.set_if_valid_index(i, rows[i].poseidon2_full_a_0); + polys.poseidon2_full_a_1.set_if_valid_index(i, rows[i].poseidon2_full_a_1); + polys.poseidon2_full_a_2.set_if_valid_index(i, rows[i].poseidon2_full_a_2); + polys.poseidon2_full_a_3.set_if_valid_index(i, rows[i].poseidon2_full_a_3); + polys.poseidon2_full_b_0.set_if_valid_index(i, rows[i].poseidon2_full_b_0); + polys.poseidon2_full_b_1.set_if_valid_index(i, rows[i].poseidon2_full_b_1); + polys.poseidon2_full_b_2.set_if_valid_index(i, rows[i].poseidon2_full_b_2); + polys.poseidon2_full_b_3.set_if_valid_index(i, rows[i].poseidon2_full_b_3); + polys.poseidon2_full_clk.set_if_valid_index(i, rows[i].poseidon2_full_clk); + polys.poseidon2_full_end_poseidon.set_if_valid_index(i, rows[i].poseidon2_full_end_poseidon); + polys.poseidon2_full_execute_poseidon_perm.set_if_valid_index( + i, rows[i].poseidon2_full_execute_poseidon_perm); + polys.poseidon2_full_input_0.set_if_valid_index(i, rows[i].poseidon2_full_input_0); + polys.poseidon2_full_input_1.set_if_valid_index(i, rows[i].poseidon2_full_input_1); + polys.poseidon2_full_input_2.set_if_valid_index(i, rows[i].poseidon2_full_input_2); + polys.poseidon2_full_input_len.set_if_valid_index(i, rows[i].poseidon2_full_input_len); + polys.poseidon2_full_num_perm_rounds_rem.set_if_valid_index(i, + rows[i].poseidon2_full_num_perm_rounds_rem); + polys.poseidon2_full_num_perm_rounds_rem_inv.set_if_valid_index( + i, rows[i].poseidon2_full_num_perm_rounds_rem_inv); + polys.poseidon2_full_output.set_if_valid_index(i, rows[i].poseidon2_full_output); + polys.poseidon2_full_padding.set_if_valid_index(i, rows[i].poseidon2_full_padding); + polys.poseidon2_full_sel_poseidon.set_if_valid_index(i, rows[i].poseidon2_full_sel_poseidon); + polys.poseidon2_full_start_poseidon.set_if_valid_index(i, rows[i].poseidon2_full_start_poseidon); polys.poseidon2_input_addr.set_if_valid_index(i, rows[i].poseidon2_input_addr); polys.poseidon2_mem_addr_read_a.set_if_valid_index(i, rows[i].poseidon2_mem_addr_read_a); polys.poseidon2_mem_addr_read_b.set_if_valid_index(i, rows[i].poseidon2_mem_addr_read_b); @@ -629,6 +652,10 @@ AvmCircuitBuilder::ProverPolynomials AvmCircuitBuilder::compute_polynomials() co polys.poseidon2_mem_addr_write_d.set_if_valid_index(i, rows[i].poseidon2_mem_addr_write_d); polys.poseidon2_output_addr.set_if_valid_index(i, rows[i].poseidon2_output_addr); polys.poseidon2_sel_poseidon_perm.set_if_valid_index(i, rows[i].poseidon2_sel_poseidon_perm); + polys.poseidon2_sel_poseidon_perm_immediate.set_if_valid_index( + i, rows[i].poseidon2_sel_poseidon_perm_immediate); + polys.poseidon2_sel_poseidon_perm_mem_op.set_if_valid_index(i, + rows[i].poseidon2_sel_poseidon_perm_mem_op); polys.poseidon2_space_id.set_if_valid_index(i, rows[i].poseidon2_space_id); polys.range_check_alu_rng_chk.set_if_valid_index(i, rows[i].range_check_alu_rng_chk); polys.range_check_clk.set_if_valid_index(i, rows[i].range_check_clk); diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp index 0ea433e4c55..d9faa840e83 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.cpp @@ -240,521 +240,555 @@ AvmFlavor::AllConstRefValues::AllConstRefValues( , main_sel_op_sload(il[232]) , main_sel_op_sstore(il[233]) , main_sel_op_static_call(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_side_effect_counter(il[251]) - , main_sload_write_offset(il[252]) - , main_space_id(il[253]) - , main_sstore_write_offset(il[254]) - , main_tag_err(il[255]) - , main_w_in_tag(il[256]) - , mem_addr(il[257]) - , mem_clk(il[258]) - , mem_diff(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_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]) - , poseidon2_B_10_0(il[294]) - , poseidon2_B_10_1(il[295]) - , poseidon2_B_10_2(il[296]) - , poseidon2_B_10_3(il[297]) - , poseidon2_B_11_0(il[298]) - , poseidon2_B_11_1(il[299]) - , poseidon2_B_11_2(il[300]) - , poseidon2_B_11_3(il[301]) - , poseidon2_B_12_0(il[302]) - , poseidon2_B_12_1(il[303]) - , poseidon2_B_12_2(il[304]) - , poseidon2_B_12_3(il[305]) - , poseidon2_B_13_0(il[306]) - , poseidon2_B_13_1(il[307]) - , poseidon2_B_13_2(il[308]) - , poseidon2_B_13_3(il[309]) - , poseidon2_B_14_0(il[310]) - , poseidon2_B_14_1(il[311]) - , poseidon2_B_14_2(il[312]) - , poseidon2_B_14_3(il[313]) - , poseidon2_B_15_0(il[314]) - , poseidon2_B_15_1(il[315]) - , poseidon2_B_15_2(il[316]) - , poseidon2_B_15_3(il[317]) - , poseidon2_B_16_0(il[318]) - , poseidon2_B_16_1(il[319]) - , poseidon2_B_16_2(il[320]) - , poseidon2_B_16_3(il[321]) - , poseidon2_B_17_0(il[322]) - , poseidon2_B_17_1(il[323]) - , poseidon2_B_17_2(il[324]) - , poseidon2_B_17_3(il[325]) - , poseidon2_B_18_0(il[326]) - , poseidon2_B_18_1(il[327]) - , poseidon2_B_18_2(il[328]) - , poseidon2_B_18_3(il[329]) - , poseidon2_B_19_0(il[330]) - , poseidon2_B_19_1(il[331]) - , poseidon2_B_19_2(il[332]) - , poseidon2_B_19_3(il[333]) - , poseidon2_B_20_0(il[334]) - , poseidon2_B_20_1(il[335]) - , poseidon2_B_20_2(il[336]) - , poseidon2_B_20_3(il[337]) - , poseidon2_B_21_0(il[338]) - , poseidon2_B_21_1(il[339]) - , poseidon2_B_21_2(il[340]) - , poseidon2_B_21_3(il[341]) - , poseidon2_B_22_0(il[342]) - , poseidon2_B_22_1(il[343]) - , poseidon2_B_22_2(il[344]) - , poseidon2_B_22_3(il[345]) - , poseidon2_B_23_0(il[346]) - , poseidon2_B_23_1(il[347]) - , poseidon2_B_23_2(il[348]) - , poseidon2_B_23_3(il[349]) - , poseidon2_B_24_0(il[350]) - , poseidon2_B_24_1(il[351]) - , poseidon2_B_24_2(il[352]) - , poseidon2_B_24_3(il[353]) - , poseidon2_B_25_0(il[354]) - , poseidon2_B_25_1(il[355]) - , poseidon2_B_25_2(il[356]) - , poseidon2_B_25_3(il[357]) - , poseidon2_B_26_0(il[358]) - , poseidon2_B_26_1(il[359]) - , poseidon2_B_26_2(il[360]) - , poseidon2_B_26_3(il[361]) - , poseidon2_B_27_0(il[362]) - , poseidon2_B_27_1(il[363]) - , poseidon2_B_27_2(il[364]) - , poseidon2_B_27_3(il[365]) - , poseidon2_B_28_0(il[366]) - , poseidon2_B_28_1(il[367]) - , poseidon2_B_28_2(il[368]) - , poseidon2_B_28_3(il[369]) - , poseidon2_B_29_0(il[370]) - , poseidon2_B_29_1(il[371]) - , poseidon2_B_29_2(il[372]) - , poseidon2_B_29_3(il[373]) - , poseidon2_B_30_0(il[374]) - , poseidon2_B_30_1(il[375]) - , poseidon2_B_30_2(il[376]) - , poseidon2_B_30_3(il[377]) - , poseidon2_B_31_0(il[378]) - , poseidon2_B_31_1(il[379]) - , poseidon2_B_31_2(il[380]) - , poseidon2_B_31_3(il[381]) - , poseidon2_B_32_0(il[382]) - , poseidon2_B_32_1(il[383]) - , poseidon2_B_32_2(il[384]) - , poseidon2_B_32_3(il[385]) - , poseidon2_B_33_0(il[386]) - , poseidon2_B_33_1(il[387]) - , poseidon2_B_33_2(il[388]) - , poseidon2_B_33_3(il[389]) - , poseidon2_B_34_0(il[390]) - , poseidon2_B_34_1(il[391]) - , poseidon2_B_34_2(il[392]) - , poseidon2_B_34_3(il[393]) - , poseidon2_B_35_0(il[394]) - , poseidon2_B_35_1(il[395]) - , poseidon2_B_35_2(il[396]) - , poseidon2_B_35_3(il[397]) - , poseidon2_B_36_0(il[398]) - , poseidon2_B_36_1(il[399]) - , poseidon2_B_36_2(il[400]) - , poseidon2_B_36_3(il[401]) - , poseidon2_B_37_0(il[402]) - , poseidon2_B_37_1(il[403]) - , poseidon2_B_37_2(il[404]) - , poseidon2_B_37_3(il[405]) - , poseidon2_B_38_0(il[406]) - , poseidon2_B_38_1(il[407]) - , poseidon2_B_38_2(il[408]) - , poseidon2_B_38_3(il[409]) - , poseidon2_B_39_0(il[410]) - , poseidon2_B_39_1(il[411]) - , poseidon2_B_39_2(il[412]) - , poseidon2_B_39_3(il[413]) - , poseidon2_B_40_0(il[414]) - , poseidon2_B_40_1(il[415]) - , poseidon2_B_40_2(il[416]) - , poseidon2_B_40_3(il[417]) - , poseidon2_B_41_0(il[418]) - , poseidon2_B_41_1(il[419]) - , poseidon2_B_41_2(il[420]) - , poseidon2_B_41_3(il[421]) - , poseidon2_B_42_0(il[422]) - , poseidon2_B_42_1(il[423]) - , poseidon2_B_42_2(il[424]) - , poseidon2_B_42_3(il[425]) - , poseidon2_B_43_0(il[426]) - , poseidon2_B_43_1(il[427]) - , poseidon2_B_43_2(il[428]) - , poseidon2_B_43_3(il[429]) - , poseidon2_B_44_0(il[430]) - , poseidon2_B_44_1(il[431]) - , poseidon2_B_44_2(il[432]) - , poseidon2_B_44_3(il[433]) - , poseidon2_B_45_0(il[434]) - , poseidon2_B_45_1(il[435]) - , poseidon2_B_45_2(il[436]) - , poseidon2_B_45_3(il[437]) - , poseidon2_B_46_0(il[438]) - , poseidon2_B_46_1(il[439]) - , poseidon2_B_46_2(il[440]) - , poseidon2_B_46_3(il[441]) - , poseidon2_B_47_0(il[442]) - , poseidon2_B_47_1(il[443]) - , poseidon2_B_47_2(il[444]) - , poseidon2_B_47_3(il[445]) - , poseidon2_B_48_0(il[446]) - , poseidon2_B_48_1(il[447]) - , poseidon2_B_48_2(il[448]) - , poseidon2_B_48_3(il[449]) - , poseidon2_B_49_0(il[450]) - , poseidon2_B_49_1(il[451]) - , poseidon2_B_49_2(il[452]) - , poseidon2_B_49_3(il[453]) - , poseidon2_B_4_0(il[454]) - , poseidon2_B_4_1(il[455]) - , poseidon2_B_4_2(il[456]) - , poseidon2_B_4_3(il[457]) - , poseidon2_B_50_0(il[458]) - , poseidon2_B_50_1(il[459]) - , poseidon2_B_50_2(il[460]) - , poseidon2_B_50_3(il[461]) - , poseidon2_B_51_0(il[462]) - , poseidon2_B_51_1(il[463]) - , poseidon2_B_51_2(il[464]) - , poseidon2_B_51_3(il[465]) - , poseidon2_B_52_0(il[466]) - , poseidon2_B_52_1(il[467]) - , poseidon2_B_52_2(il[468]) - , poseidon2_B_52_3(il[469]) - , poseidon2_B_53_0(il[470]) - , poseidon2_B_53_1(il[471]) - , poseidon2_B_53_2(il[472]) - , poseidon2_B_53_3(il[473]) - , poseidon2_B_54_0(il[474]) - , poseidon2_B_54_1(il[475]) - , poseidon2_B_54_2(il[476]) - , poseidon2_B_54_3(il[477]) - , poseidon2_B_55_0(il[478]) - , poseidon2_B_55_1(il[479]) - , poseidon2_B_55_2(il[480]) - , poseidon2_B_55_3(il[481]) - , poseidon2_B_56_0(il[482]) - , poseidon2_B_56_1(il[483]) - , poseidon2_B_56_2(il[484]) - , poseidon2_B_56_3(il[485]) - , poseidon2_B_57_0(il[486]) - , poseidon2_B_57_1(il[487]) - , poseidon2_B_57_2(il[488]) - , poseidon2_B_57_3(il[489]) - , poseidon2_B_58_0(il[490]) - , poseidon2_B_58_1(il[491]) - , poseidon2_B_58_2(il[492]) - , poseidon2_B_58_3(il[493]) - , poseidon2_B_59_0(il[494]) - , poseidon2_B_59_1(il[495]) - , poseidon2_B_59_2(il[496]) - , poseidon2_B_59_3(il[497]) - , poseidon2_B_5_0(il[498]) - , poseidon2_B_5_1(il[499]) - , poseidon2_B_5_2(il[500]) - , poseidon2_B_5_3(il[501]) - , poseidon2_B_6_0(il[502]) - , poseidon2_B_6_1(il[503]) - , poseidon2_B_6_2(il[504]) - , poseidon2_B_6_3(il[505]) - , poseidon2_B_7_0(il[506]) - , poseidon2_B_7_1(il[507]) - , poseidon2_B_7_2(il[508]) - , poseidon2_B_7_3(il[509]) - , poseidon2_B_8_0(il[510]) - , poseidon2_B_8_1(il[511]) - , poseidon2_B_8_2(il[512]) - , poseidon2_B_8_3(il[513]) - , poseidon2_B_9_0(il[514]) - , poseidon2_B_9_1(il[515]) - , poseidon2_B_9_2(il[516]) - , poseidon2_B_9_3(il[517]) - , poseidon2_EXT_LAYER_4(il[518]) - , poseidon2_EXT_LAYER_5(il[519]) - , poseidon2_EXT_LAYER_6(il[520]) - , poseidon2_EXT_LAYER_7(il[521]) - , poseidon2_T_0_4(il[522]) - , poseidon2_T_0_5(il[523]) - , poseidon2_T_0_6(il[524]) - , poseidon2_T_0_7(il[525]) - , poseidon2_T_1_4(il[526]) - , poseidon2_T_1_5(il[527]) - , poseidon2_T_1_6(il[528]) - , poseidon2_T_1_7(il[529]) - , poseidon2_T_2_4(il[530]) - , poseidon2_T_2_5(il[531]) - , poseidon2_T_2_6(il[532]) - , poseidon2_T_2_7(il[533]) - , poseidon2_T_3_4(il[534]) - , poseidon2_T_3_5(il[535]) - , poseidon2_T_3_6(il[536]) - , poseidon2_T_3_7(il[537]) - , poseidon2_T_60_4(il[538]) - , poseidon2_T_60_5(il[539]) - , poseidon2_T_60_6(il[540]) - , poseidon2_T_60_7(il[541]) - , poseidon2_T_61_4(il[542]) - , poseidon2_T_61_5(il[543]) - , poseidon2_T_61_6(il[544]) - , poseidon2_T_61_7(il[545]) - , poseidon2_T_62_4(il[546]) - , poseidon2_T_62_5(il[547]) - , poseidon2_T_62_6(il[548]) - , poseidon2_T_62_7(il[549]) - , poseidon2_T_63_4(il[550]) - , poseidon2_T_63_5(il[551]) - , poseidon2_T_63_6(il[552]) - , poseidon2_T_63_7(il[553]) - , poseidon2_a_0(il[554]) - , poseidon2_a_1(il[555]) - , poseidon2_a_2(il[556]) - , poseidon2_a_3(il[557]) - , poseidon2_b_0(il[558]) - , poseidon2_b_1(il[559]) - , poseidon2_b_2(il[560]) - , poseidon2_b_3(il[561]) - , poseidon2_clk(il[562]) - , poseidon2_input_addr(il[563]) - , poseidon2_mem_addr_read_a(il[564]) - , poseidon2_mem_addr_read_b(il[565]) - , poseidon2_mem_addr_read_c(il[566]) - , poseidon2_mem_addr_read_d(il[567]) - , poseidon2_mem_addr_write_a(il[568]) - , poseidon2_mem_addr_write_b(il[569]) - , poseidon2_mem_addr_write_c(il[570]) - , poseidon2_mem_addr_write_d(il[571]) - , poseidon2_output_addr(il[572]) - , poseidon2_sel_poseidon_perm(il[573]) - , poseidon2_space_id(il[574]) - , range_check_alu_rng_chk(il[575]) - , range_check_clk(il[576]) - , range_check_cmp_hi_bits_rng_chk(il[577]) - , range_check_cmp_lo_bits_rng_chk(il[578]) - , range_check_dyn_diff(il[579]) - , range_check_dyn_rng_chk_bits(il[580]) - , range_check_dyn_rng_chk_pow_2(il[581]) - , range_check_gas_da_rng_chk(il[582]) - , range_check_gas_l2_rng_chk(il[583]) - , range_check_is_lte_u112(il[584]) - , range_check_is_lte_u128(il[585]) - , range_check_is_lte_u16(il[586]) - , range_check_is_lte_u32(il[587]) - , range_check_is_lte_u48(il[588]) - , range_check_is_lte_u64(il[589]) - , range_check_is_lte_u80(il[590]) - , range_check_is_lte_u96(il[591]) - , range_check_mem_rng_chk(il[592]) - , range_check_rng_chk_bits(il[593]) - , range_check_sel_lookup_0(il[594]) - , range_check_sel_lookup_1(il[595]) - , range_check_sel_lookup_2(il[596]) - , range_check_sel_lookup_3(il[597]) - , range_check_sel_lookup_4(il[598]) - , range_check_sel_lookup_5(il[599]) - , range_check_sel_lookup_6(il[600]) - , range_check_sel_rng_chk(il[601]) - , range_check_u16_r0(il[602]) - , range_check_u16_r1(il[603]) - , range_check_u16_r2(il[604]) - , range_check_u16_r3(il[605]) - , range_check_u16_r4(il[606]) - , range_check_u16_r5(il[607]) - , range_check_u16_r6(il[608]) - , range_check_u16_r7(il[609]) - , range_check_value(il[610]) - , sha256_clk(il[611]) - , sha256_input(il[612]) - , sha256_output(il[613]) - , sha256_sel_sha256_compression(il[614]) - , sha256_state(il[615]) - , slice_addr(il[616]) - , slice_clk(il[617]) - , slice_cnt(il[618]) - , slice_col_offset(il[619]) - , slice_one_min_inv(il[620]) - , slice_sel_cd_cpy(il[621]) - , slice_sel_mem_active(il[622]) - , slice_sel_return(il[623]) - , slice_sel_start(il[624]) - , slice_space_id(il[625]) - , slice_val(il[626]) - , lookup_rng_chk_pow_2_counts(il[627]) - , lookup_rng_chk_diff_counts(il[628]) - , lookup_rng_chk_0_counts(il[629]) - , lookup_rng_chk_1_counts(il[630]) - , lookup_rng_chk_2_counts(il[631]) - , lookup_rng_chk_3_counts(il[632]) - , lookup_rng_chk_4_counts(il[633]) - , lookup_rng_chk_5_counts(il[634]) - , lookup_rng_chk_6_counts(il[635]) - , lookup_rng_chk_7_counts(il[636]) - , lookup_pow_2_0_counts(il[637]) - , lookup_pow_2_1_counts(il[638]) - , lookup_byte_lengths_counts(il[639]) - , lookup_byte_operations_counts(il[640]) - , lookup_opcode_gas_counts(il[641]) - , kernel_output_lookup_counts(il[642]) - , lookup_into_kernel_counts(il[643]) - , lookup_cd_value_counts(il[644]) - , lookup_ret_value_counts(il[645]) - , incl_main_tag_err_counts(il[646]) - , incl_mem_tag_err_counts(il[647]) - , perm_rng_mem_inv(il[648]) - , perm_rng_cmp_lo_inv(il[649]) - , perm_rng_cmp_hi_inv(il[650]) - , perm_rng_alu_inv(il[651]) - , perm_cmp_alu_inv(il[652]) - , perm_rng_gas_l2_inv(il[653]) - , perm_rng_gas_da_inv(il[654]) - , perm_l2_start_gas_inv(il[655]) - , perm_da_start_gas_inv(il[656]) - , perm_l2_end_gas_inv(il[657]) - , perm_da_end_gas_inv(il[658]) - , perm_pos_mem_read_a_inv(il[659]) - , perm_pos_mem_read_b_inv(il[660]) - , perm_pos_mem_read_c_inv(il[661]) - , perm_pos_mem_read_d_inv(il[662]) - , perm_pos_mem_write_a_inv(il[663]) - , perm_pos_mem_write_b_inv(il[664]) - , perm_pos_mem_write_c_inv(il[665]) - , perm_pos_mem_write_d_inv(il[666]) - , perm_slice_mem_inv(il[667]) - , perm_main_alu_inv(il[668]) - , perm_main_bin_inv(il[669]) - , perm_main_conv_inv(il[670]) - , perm_main_sha256_inv(il[671]) - , perm_main_pos2_perm_inv(il[672]) - , perm_main_slice_inv(il[673]) - , perm_main_mem_a_inv(il[674]) - , perm_main_mem_b_inv(il[675]) - , perm_main_mem_c_inv(il[676]) - , perm_main_mem_d_inv(il[677]) - , perm_main_mem_ind_addr_a_inv(il[678]) - , perm_main_mem_ind_addr_b_inv(il[679]) - , perm_main_mem_ind_addr_c_inv(il[680]) - , perm_main_mem_ind_addr_d_inv(il[681]) - , lookup_rng_chk_pow_2_inv(il[682]) - , lookup_rng_chk_diff_inv(il[683]) - , lookup_rng_chk_0_inv(il[684]) - , lookup_rng_chk_1_inv(il[685]) - , lookup_rng_chk_2_inv(il[686]) - , lookup_rng_chk_3_inv(il[687]) - , lookup_rng_chk_4_inv(il[688]) - , lookup_rng_chk_5_inv(il[689]) - , lookup_rng_chk_6_inv(il[690]) - , lookup_rng_chk_7_inv(il[691]) - , lookup_pow_2_0_inv(il[692]) - , lookup_pow_2_1_inv(il[693]) - , lookup_byte_lengths_inv(il[694]) - , lookup_byte_operations_inv(il[695]) - , lookup_opcode_gas_inv(il[696]) - , kernel_output_lookup_inv(il[697]) - , lookup_into_kernel_inv(il[698]) - , lookup_cd_value_inv(il[699]) - , lookup_ret_value_inv(il[700]) - , incl_main_tag_err_inv(il[701]) - , incl_mem_tag_err_inv(il[702]) - , binary_acc_ia_shift(il[703]) - , binary_acc_ib_shift(il[704]) - , binary_acc_ic_shift(il[705]) - , binary_mem_tag_ctr_shift(il[706]) - , binary_op_id_shift(il[707]) - , cmp_a_hi_shift(il[708]) - , cmp_a_lo_shift(il[709]) - , cmp_b_hi_shift(il[710]) - , cmp_b_lo_shift(il[711]) - , cmp_cmp_rng_ctr_shift(il[712]) - , cmp_op_gt_shift(il[713]) - , cmp_p_sub_a_hi_shift(il[714]) - , cmp_p_sub_a_lo_shift(il[715]) - , cmp_p_sub_b_hi_shift(il[716]) - , cmp_p_sub_b_lo_shift(il[717]) - , cmp_sel_rng_chk_shift(il[718]) - , main_da_gas_remaining_shift(il[719]) - , main_emit_l2_to_l1_msg_write_offset_shift(il[720]) - , main_emit_note_hash_write_offset_shift(il[721]) - , main_emit_nullifier_write_offset_shift(il[722]) - , main_emit_unencrypted_log_write_offset_shift(il[723]) - , main_internal_return_ptr_shift(il[724]) - , main_l1_to_l2_msg_exists_write_offset_shift(il[725]) - , main_l2_gas_remaining_shift(il[726]) - , main_note_hash_exist_write_offset_shift(il[727]) - , main_nullifier_exists_write_offset_shift(il[728]) - , main_nullifier_non_exists_write_offset_shift(il[729]) - , main_pc_shift(il[730]) - , main_sel_execution_end_shift(il[731]) - , main_sel_execution_row_shift(il[732]) - , main_sload_write_offset_shift(il[733]) - , main_sstore_write_offset_shift(il[734]) - , mem_glob_addr_shift(il[735]) - , mem_rw_shift(il[736]) - , mem_sel_mem_shift(il[737]) - , mem_tag_shift(il[738]) - , mem_tsp_shift(il[739]) - , mem_val_shift(il[740]) - , slice_addr_shift(il[741]) - , slice_clk_shift(il[742]) - , slice_cnt_shift(il[743]) - , slice_col_offset_shift(il[744]) - , slice_sel_cd_cpy_shift(il[745]) - , slice_sel_mem_active_shift(il[746]) - , slice_sel_return_shift(il[747]) - , slice_sel_start_shift(il[748]) - , slice_space_id_shift(il[749]) + , main_sel_op_sub(il[235]) + , main_sel_op_timestamp(il[236]) + , main_sel_op_transaction_fee(il[237]) + , main_sel_op_version(il[238]) + , main_sel_op_xor(il[239]) + , main_sel_q_kernel_lookup(il[240]) + , main_sel_q_kernel_output_lookup(il[241]) + , main_sel_resolve_ind_addr_a(il[242]) + , main_sel_resolve_ind_addr_b(il[243]) + , main_sel_resolve_ind_addr_c(il[244]) + , main_sel_resolve_ind_addr_d(il[245]) + , main_sel_returndata(il[246]) + , main_sel_rng_16(il[247]) + , main_sel_rng_8(il[248]) + , main_sel_slice_gadget(il[249]) + , main_side_effect_counter(il[250]) + , main_sload_write_offset(il[251]) + , main_space_id(il[252]) + , main_sstore_write_offset(il[253]) + , main_tag_err(il[254]) + , main_w_in_tag(il[255]) + , mem_addr(il[256]) + , mem_clk(il[257]) + , mem_diff(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_d(il[271]) + , mem_sel_op_poseidon_read_a(il[272]) + , mem_sel_op_poseidon_read_b(il[273]) + , mem_sel_op_poseidon_read_c(il[274]) + , mem_sel_op_poseidon_read_d(il[275]) + , mem_sel_op_poseidon_write_a(il[276]) + , mem_sel_op_poseidon_write_b(il[277]) + , mem_sel_op_poseidon_write_c(il[278]) + , mem_sel_op_poseidon_write_d(il[279]) + , mem_sel_op_slice(il[280]) + , mem_sel_resolve_ind_addr_a(il[281]) + , mem_sel_resolve_ind_addr_b(il[282]) + , mem_sel_resolve_ind_addr_c(il[283]) + , mem_sel_resolve_ind_addr_d(il[284]) + , mem_sel_rng_chk(il[285]) + , mem_skip_check_tag(il[286]) + , mem_space_id(il[287]) + , mem_tag(il[288]) + , mem_tag_err(il[289]) + , mem_tsp(il[290]) + , mem_val(il[291]) + , mem_w_in_tag(il[292]) + , poseidon2_B_10_0(il[293]) + , poseidon2_B_10_1(il[294]) + , poseidon2_B_10_2(il[295]) + , poseidon2_B_10_3(il[296]) + , poseidon2_B_11_0(il[297]) + , poseidon2_B_11_1(il[298]) + , poseidon2_B_11_2(il[299]) + , poseidon2_B_11_3(il[300]) + , poseidon2_B_12_0(il[301]) + , poseidon2_B_12_1(il[302]) + , poseidon2_B_12_2(il[303]) + , poseidon2_B_12_3(il[304]) + , poseidon2_B_13_0(il[305]) + , poseidon2_B_13_1(il[306]) + , poseidon2_B_13_2(il[307]) + , poseidon2_B_13_3(il[308]) + , poseidon2_B_14_0(il[309]) + , poseidon2_B_14_1(il[310]) + , poseidon2_B_14_2(il[311]) + , poseidon2_B_14_3(il[312]) + , poseidon2_B_15_0(il[313]) + , poseidon2_B_15_1(il[314]) + , poseidon2_B_15_2(il[315]) + , poseidon2_B_15_3(il[316]) + , poseidon2_B_16_0(il[317]) + , poseidon2_B_16_1(il[318]) + , poseidon2_B_16_2(il[319]) + , poseidon2_B_16_3(il[320]) + , poseidon2_B_17_0(il[321]) + , poseidon2_B_17_1(il[322]) + , poseidon2_B_17_2(il[323]) + , poseidon2_B_17_3(il[324]) + , poseidon2_B_18_0(il[325]) + , poseidon2_B_18_1(il[326]) + , poseidon2_B_18_2(il[327]) + , poseidon2_B_18_3(il[328]) + , poseidon2_B_19_0(il[329]) + , poseidon2_B_19_1(il[330]) + , poseidon2_B_19_2(il[331]) + , poseidon2_B_19_3(il[332]) + , poseidon2_B_20_0(il[333]) + , poseidon2_B_20_1(il[334]) + , poseidon2_B_20_2(il[335]) + , poseidon2_B_20_3(il[336]) + , poseidon2_B_21_0(il[337]) + , poseidon2_B_21_1(il[338]) + , poseidon2_B_21_2(il[339]) + , poseidon2_B_21_3(il[340]) + , poseidon2_B_22_0(il[341]) + , poseidon2_B_22_1(il[342]) + , poseidon2_B_22_2(il[343]) + , poseidon2_B_22_3(il[344]) + , poseidon2_B_23_0(il[345]) + , poseidon2_B_23_1(il[346]) + , poseidon2_B_23_2(il[347]) + , poseidon2_B_23_3(il[348]) + , poseidon2_B_24_0(il[349]) + , poseidon2_B_24_1(il[350]) + , poseidon2_B_24_2(il[351]) + , poseidon2_B_24_3(il[352]) + , poseidon2_B_25_0(il[353]) + , poseidon2_B_25_1(il[354]) + , poseidon2_B_25_2(il[355]) + , poseidon2_B_25_3(il[356]) + , poseidon2_B_26_0(il[357]) + , poseidon2_B_26_1(il[358]) + , poseidon2_B_26_2(il[359]) + , poseidon2_B_26_3(il[360]) + , poseidon2_B_27_0(il[361]) + , poseidon2_B_27_1(il[362]) + , poseidon2_B_27_2(il[363]) + , poseidon2_B_27_3(il[364]) + , poseidon2_B_28_0(il[365]) + , poseidon2_B_28_1(il[366]) + , poseidon2_B_28_2(il[367]) + , poseidon2_B_28_3(il[368]) + , poseidon2_B_29_0(il[369]) + , poseidon2_B_29_1(il[370]) + , poseidon2_B_29_2(il[371]) + , poseidon2_B_29_3(il[372]) + , poseidon2_B_30_0(il[373]) + , poseidon2_B_30_1(il[374]) + , poseidon2_B_30_2(il[375]) + , poseidon2_B_30_3(il[376]) + , poseidon2_B_31_0(il[377]) + , poseidon2_B_31_1(il[378]) + , poseidon2_B_31_2(il[379]) + , poseidon2_B_31_3(il[380]) + , poseidon2_B_32_0(il[381]) + , poseidon2_B_32_1(il[382]) + , poseidon2_B_32_2(il[383]) + , poseidon2_B_32_3(il[384]) + , poseidon2_B_33_0(il[385]) + , poseidon2_B_33_1(il[386]) + , poseidon2_B_33_2(il[387]) + , poseidon2_B_33_3(il[388]) + , poseidon2_B_34_0(il[389]) + , poseidon2_B_34_1(il[390]) + , poseidon2_B_34_2(il[391]) + , poseidon2_B_34_3(il[392]) + , poseidon2_B_35_0(il[393]) + , poseidon2_B_35_1(il[394]) + , poseidon2_B_35_2(il[395]) + , poseidon2_B_35_3(il[396]) + , poseidon2_B_36_0(il[397]) + , poseidon2_B_36_1(il[398]) + , poseidon2_B_36_2(il[399]) + , poseidon2_B_36_3(il[400]) + , poseidon2_B_37_0(il[401]) + , poseidon2_B_37_1(il[402]) + , poseidon2_B_37_2(il[403]) + , poseidon2_B_37_3(il[404]) + , poseidon2_B_38_0(il[405]) + , poseidon2_B_38_1(il[406]) + , poseidon2_B_38_2(il[407]) + , poseidon2_B_38_3(il[408]) + , poseidon2_B_39_0(il[409]) + , poseidon2_B_39_1(il[410]) + , poseidon2_B_39_2(il[411]) + , poseidon2_B_39_3(il[412]) + , poseidon2_B_40_0(il[413]) + , poseidon2_B_40_1(il[414]) + , poseidon2_B_40_2(il[415]) + , poseidon2_B_40_3(il[416]) + , poseidon2_B_41_0(il[417]) + , poseidon2_B_41_1(il[418]) + , poseidon2_B_41_2(il[419]) + , poseidon2_B_41_3(il[420]) + , poseidon2_B_42_0(il[421]) + , poseidon2_B_42_1(il[422]) + , poseidon2_B_42_2(il[423]) + , poseidon2_B_42_3(il[424]) + , poseidon2_B_43_0(il[425]) + , poseidon2_B_43_1(il[426]) + , poseidon2_B_43_2(il[427]) + , poseidon2_B_43_3(il[428]) + , poseidon2_B_44_0(il[429]) + , poseidon2_B_44_1(il[430]) + , poseidon2_B_44_2(il[431]) + , poseidon2_B_44_3(il[432]) + , poseidon2_B_45_0(il[433]) + , poseidon2_B_45_1(il[434]) + , poseidon2_B_45_2(il[435]) + , poseidon2_B_45_3(il[436]) + , poseidon2_B_46_0(il[437]) + , poseidon2_B_46_1(il[438]) + , poseidon2_B_46_2(il[439]) + , poseidon2_B_46_3(il[440]) + , poseidon2_B_47_0(il[441]) + , poseidon2_B_47_1(il[442]) + , poseidon2_B_47_2(il[443]) + , poseidon2_B_47_3(il[444]) + , poseidon2_B_48_0(il[445]) + , poseidon2_B_48_1(il[446]) + , poseidon2_B_48_2(il[447]) + , poseidon2_B_48_3(il[448]) + , poseidon2_B_49_0(il[449]) + , poseidon2_B_49_1(il[450]) + , poseidon2_B_49_2(il[451]) + , poseidon2_B_49_3(il[452]) + , poseidon2_B_4_0(il[453]) + , poseidon2_B_4_1(il[454]) + , poseidon2_B_4_2(il[455]) + , poseidon2_B_4_3(il[456]) + , poseidon2_B_50_0(il[457]) + , poseidon2_B_50_1(il[458]) + , poseidon2_B_50_2(il[459]) + , poseidon2_B_50_3(il[460]) + , poseidon2_B_51_0(il[461]) + , poseidon2_B_51_1(il[462]) + , poseidon2_B_51_2(il[463]) + , poseidon2_B_51_3(il[464]) + , poseidon2_B_52_0(il[465]) + , poseidon2_B_52_1(il[466]) + , poseidon2_B_52_2(il[467]) + , poseidon2_B_52_3(il[468]) + , poseidon2_B_53_0(il[469]) + , poseidon2_B_53_1(il[470]) + , poseidon2_B_53_2(il[471]) + , poseidon2_B_53_3(il[472]) + , poseidon2_B_54_0(il[473]) + , poseidon2_B_54_1(il[474]) + , poseidon2_B_54_2(il[475]) + , poseidon2_B_54_3(il[476]) + , poseidon2_B_55_0(il[477]) + , poseidon2_B_55_1(il[478]) + , poseidon2_B_55_2(il[479]) + , poseidon2_B_55_3(il[480]) + , poseidon2_B_56_0(il[481]) + , poseidon2_B_56_1(il[482]) + , poseidon2_B_56_2(il[483]) + , poseidon2_B_56_3(il[484]) + , poseidon2_B_57_0(il[485]) + , poseidon2_B_57_1(il[486]) + , poseidon2_B_57_2(il[487]) + , poseidon2_B_57_3(il[488]) + , poseidon2_B_58_0(il[489]) + , poseidon2_B_58_1(il[490]) + , poseidon2_B_58_2(il[491]) + , poseidon2_B_58_3(il[492]) + , poseidon2_B_59_0(il[493]) + , poseidon2_B_59_1(il[494]) + , poseidon2_B_59_2(il[495]) + , poseidon2_B_59_3(il[496]) + , poseidon2_B_5_0(il[497]) + , poseidon2_B_5_1(il[498]) + , poseidon2_B_5_2(il[499]) + , poseidon2_B_5_3(il[500]) + , poseidon2_B_6_0(il[501]) + , poseidon2_B_6_1(il[502]) + , poseidon2_B_6_2(il[503]) + , poseidon2_B_6_3(il[504]) + , poseidon2_B_7_0(il[505]) + , poseidon2_B_7_1(il[506]) + , poseidon2_B_7_2(il[507]) + , poseidon2_B_7_3(il[508]) + , poseidon2_B_8_0(il[509]) + , poseidon2_B_8_1(il[510]) + , poseidon2_B_8_2(il[511]) + , poseidon2_B_8_3(il[512]) + , poseidon2_B_9_0(il[513]) + , poseidon2_B_9_1(il[514]) + , poseidon2_B_9_2(il[515]) + , poseidon2_B_9_3(il[516]) + , poseidon2_EXT_LAYER_4(il[517]) + , poseidon2_EXT_LAYER_5(il[518]) + , poseidon2_EXT_LAYER_6(il[519]) + , poseidon2_EXT_LAYER_7(il[520]) + , poseidon2_T_0_4(il[521]) + , poseidon2_T_0_5(il[522]) + , poseidon2_T_0_6(il[523]) + , poseidon2_T_0_7(il[524]) + , poseidon2_T_1_4(il[525]) + , poseidon2_T_1_5(il[526]) + , poseidon2_T_1_6(il[527]) + , poseidon2_T_1_7(il[528]) + , poseidon2_T_2_4(il[529]) + , poseidon2_T_2_5(il[530]) + , poseidon2_T_2_6(il[531]) + , poseidon2_T_2_7(il[532]) + , poseidon2_T_3_4(il[533]) + , poseidon2_T_3_5(il[534]) + , poseidon2_T_3_6(il[535]) + , poseidon2_T_3_7(il[536]) + , poseidon2_T_60_4(il[537]) + , poseidon2_T_60_5(il[538]) + , poseidon2_T_60_6(il[539]) + , poseidon2_T_60_7(il[540]) + , poseidon2_T_61_4(il[541]) + , poseidon2_T_61_5(il[542]) + , poseidon2_T_61_6(il[543]) + , poseidon2_T_61_7(il[544]) + , poseidon2_T_62_4(il[545]) + , poseidon2_T_62_5(il[546]) + , poseidon2_T_62_6(il[547]) + , poseidon2_T_62_7(il[548]) + , poseidon2_T_63_4(il[549]) + , poseidon2_T_63_5(il[550]) + , poseidon2_T_63_6(il[551]) + , poseidon2_T_63_7(il[552]) + , poseidon2_a_0(il[553]) + , poseidon2_a_1(il[554]) + , poseidon2_a_2(il[555]) + , poseidon2_a_3(il[556]) + , poseidon2_b_0(il[557]) + , poseidon2_b_1(il[558]) + , poseidon2_b_2(il[559]) + , poseidon2_b_3(il[560]) + , poseidon2_clk(il[561]) + , poseidon2_full_a_0(il[562]) + , poseidon2_full_a_1(il[563]) + , poseidon2_full_a_2(il[564]) + , poseidon2_full_a_3(il[565]) + , poseidon2_full_b_0(il[566]) + , poseidon2_full_b_1(il[567]) + , poseidon2_full_b_2(il[568]) + , poseidon2_full_b_3(il[569]) + , poseidon2_full_clk(il[570]) + , poseidon2_full_end_poseidon(il[571]) + , poseidon2_full_execute_poseidon_perm(il[572]) + , poseidon2_full_input_0(il[573]) + , poseidon2_full_input_1(il[574]) + , poseidon2_full_input_2(il[575]) + , poseidon2_full_input_len(il[576]) + , poseidon2_full_num_perm_rounds_rem(il[577]) + , poseidon2_full_num_perm_rounds_rem_inv(il[578]) + , poseidon2_full_output(il[579]) + , poseidon2_full_padding(il[580]) + , poseidon2_full_sel_poseidon(il[581]) + , poseidon2_full_start_poseidon(il[582]) + , poseidon2_input_addr(il[583]) + , poseidon2_mem_addr_read_a(il[584]) + , poseidon2_mem_addr_read_b(il[585]) + , poseidon2_mem_addr_read_c(il[586]) + , poseidon2_mem_addr_read_d(il[587]) + , poseidon2_mem_addr_write_a(il[588]) + , poseidon2_mem_addr_write_b(il[589]) + , poseidon2_mem_addr_write_c(il[590]) + , poseidon2_mem_addr_write_d(il[591]) + , poseidon2_output_addr(il[592]) + , poseidon2_sel_poseidon_perm(il[593]) + , poseidon2_sel_poseidon_perm_immediate(il[594]) + , poseidon2_sel_poseidon_perm_mem_op(il[595]) + , poseidon2_space_id(il[596]) + , range_check_alu_rng_chk(il[597]) + , range_check_clk(il[598]) + , range_check_cmp_hi_bits_rng_chk(il[599]) + , range_check_cmp_lo_bits_rng_chk(il[600]) + , range_check_dyn_diff(il[601]) + , range_check_dyn_rng_chk_bits(il[602]) + , range_check_dyn_rng_chk_pow_2(il[603]) + , range_check_gas_da_rng_chk(il[604]) + , range_check_gas_l2_rng_chk(il[605]) + , range_check_is_lte_u112(il[606]) + , range_check_is_lte_u128(il[607]) + , range_check_is_lte_u16(il[608]) + , range_check_is_lte_u32(il[609]) + , range_check_is_lte_u48(il[610]) + , range_check_is_lte_u64(il[611]) + , range_check_is_lte_u80(il[612]) + , range_check_is_lte_u96(il[613]) + , range_check_mem_rng_chk(il[614]) + , range_check_rng_chk_bits(il[615]) + , range_check_sel_lookup_0(il[616]) + , range_check_sel_lookup_1(il[617]) + , range_check_sel_lookup_2(il[618]) + , range_check_sel_lookup_3(il[619]) + , range_check_sel_lookup_4(il[620]) + , range_check_sel_lookup_5(il[621]) + , range_check_sel_lookup_6(il[622]) + , range_check_sel_rng_chk(il[623]) + , range_check_u16_r0(il[624]) + , range_check_u16_r1(il[625]) + , range_check_u16_r2(il[626]) + , range_check_u16_r3(il[627]) + , range_check_u16_r4(il[628]) + , range_check_u16_r5(il[629]) + , range_check_u16_r6(il[630]) + , range_check_u16_r7(il[631]) + , range_check_value(il[632]) + , sha256_clk(il[633]) + , sha256_input(il[634]) + , sha256_output(il[635]) + , sha256_sel_sha256_compression(il[636]) + , sha256_state(il[637]) + , slice_addr(il[638]) + , slice_clk(il[639]) + , slice_cnt(il[640]) + , slice_col_offset(il[641]) + , slice_one_min_inv(il[642]) + , slice_sel_cd_cpy(il[643]) + , slice_sel_mem_active(il[644]) + , slice_sel_return(il[645]) + , slice_sel_start(il[646]) + , slice_space_id(il[647]) + , slice_val(il[648]) + , lookup_rng_chk_pow_2_counts(il[649]) + , lookup_rng_chk_diff_counts(il[650]) + , lookup_rng_chk_0_counts(il[651]) + , lookup_rng_chk_1_counts(il[652]) + , lookup_rng_chk_2_counts(il[653]) + , lookup_rng_chk_3_counts(il[654]) + , lookup_rng_chk_4_counts(il[655]) + , lookup_rng_chk_5_counts(il[656]) + , lookup_rng_chk_6_counts(il[657]) + , lookup_rng_chk_7_counts(il[658]) + , lookup_pow_2_0_counts(il[659]) + , lookup_pow_2_1_counts(il[660]) + , lookup_byte_lengths_counts(il[661]) + , lookup_byte_operations_counts(il[662]) + , lookup_opcode_gas_counts(il[663]) + , kernel_output_lookup_counts(il[664]) + , lookup_into_kernel_counts(il[665]) + , lookup_cd_value_counts(il[666]) + , lookup_ret_value_counts(il[667]) + , incl_main_tag_err_counts(il[668]) + , incl_mem_tag_err_counts(il[669]) + , perm_rng_mem_inv(il[670]) + , perm_rng_cmp_lo_inv(il[671]) + , perm_rng_cmp_hi_inv(il[672]) + , perm_rng_alu_inv(il[673]) + , perm_cmp_alu_inv(il[674]) + , perm_rng_gas_l2_inv(il[675]) + , perm_rng_gas_da_inv(il[676]) + , perm_l2_start_gas_inv(il[677]) + , perm_da_start_gas_inv(il[678]) + , perm_l2_end_gas_inv(il[679]) + , perm_da_end_gas_inv(il[680]) + , perm_pos_mem_read_a_inv(il[681]) + , perm_pos_mem_read_b_inv(il[682]) + , perm_pos_mem_read_c_inv(il[683]) + , perm_pos_mem_read_d_inv(il[684]) + , perm_pos_mem_write_a_inv(il[685]) + , perm_pos_mem_write_b_inv(il[686]) + , perm_pos_mem_write_c_inv(il[687]) + , perm_pos_mem_write_d_inv(il[688]) + , perm_pos2_fixed_pos2_perm_inv(il[689]) + , perm_slice_mem_inv(il[690]) + , perm_main_alu_inv(il[691]) + , perm_main_bin_inv(il[692]) + , perm_main_conv_inv(il[693]) + , perm_main_sha256_inv(il[694]) + , perm_main_pos2_perm_inv(il[695]) + , perm_main_slice_inv(il[696]) + , perm_main_mem_a_inv(il[697]) + , perm_main_mem_b_inv(il[698]) + , perm_main_mem_c_inv(il[699]) + , perm_main_mem_d_inv(il[700]) + , perm_main_mem_ind_addr_a_inv(il[701]) + , perm_main_mem_ind_addr_b_inv(il[702]) + , perm_main_mem_ind_addr_c_inv(il[703]) + , perm_main_mem_ind_addr_d_inv(il[704]) + , lookup_rng_chk_pow_2_inv(il[705]) + , lookup_rng_chk_diff_inv(il[706]) + , lookup_rng_chk_0_inv(il[707]) + , lookup_rng_chk_1_inv(il[708]) + , lookup_rng_chk_2_inv(il[709]) + , lookup_rng_chk_3_inv(il[710]) + , lookup_rng_chk_4_inv(il[711]) + , lookup_rng_chk_5_inv(il[712]) + , lookup_rng_chk_6_inv(il[713]) + , lookup_rng_chk_7_inv(il[714]) + , lookup_pow_2_0_inv(il[715]) + , lookup_pow_2_1_inv(il[716]) + , lookup_byte_lengths_inv(il[717]) + , lookup_byte_operations_inv(il[718]) + , lookup_opcode_gas_inv(il[719]) + , kernel_output_lookup_inv(il[720]) + , lookup_into_kernel_inv(il[721]) + , lookup_cd_value_inv(il[722]) + , lookup_ret_value_inv(il[723]) + , incl_main_tag_err_inv(il[724]) + , incl_mem_tag_err_inv(il[725]) + , binary_acc_ia_shift(il[726]) + , binary_acc_ib_shift(il[727]) + , binary_acc_ic_shift(il[728]) + , binary_mem_tag_ctr_shift(il[729]) + , binary_op_id_shift(il[730]) + , cmp_a_hi_shift(il[731]) + , cmp_a_lo_shift(il[732]) + , cmp_b_hi_shift(il[733]) + , cmp_b_lo_shift(il[734]) + , cmp_cmp_rng_ctr_shift(il[735]) + , cmp_op_gt_shift(il[736]) + , cmp_p_sub_a_hi_shift(il[737]) + , cmp_p_sub_a_lo_shift(il[738]) + , cmp_p_sub_b_hi_shift(il[739]) + , cmp_p_sub_b_lo_shift(il[740]) + , cmp_sel_rng_chk_shift(il[741]) + , main_da_gas_remaining_shift(il[742]) + , main_emit_l2_to_l1_msg_write_offset_shift(il[743]) + , main_emit_note_hash_write_offset_shift(il[744]) + , main_emit_nullifier_write_offset_shift(il[745]) + , main_emit_unencrypted_log_write_offset_shift(il[746]) + , main_internal_return_ptr_shift(il[747]) + , main_l1_to_l2_msg_exists_write_offset_shift(il[748]) + , main_l2_gas_remaining_shift(il[749]) + , main_note_hash_exist_write_offset_shift(il[750]) + , main_nullifier_exists_write_offset_shift(il[751]) + , main_nullifier_non_exists_write_offset_shift(il[752]) + , main_pc_shift(il[753]) + , main_sel_execution_end_shift(il[754]) + , main_sel_execution_row_shift(il[755]) + , main_sload_write_offset_shift(il[756]) + , main_sstore_write_offset_shift(il[757]) + , mem_glob_addr_shift(il[758]) + , mem_rw_shift(il[759]) + , mem_sel_mem_shift(il[760]) + , mem_tag_shift(il[761]) + , mem_tsp_shift(il[762]) + , mem_val_shift(il[763]) + , poseidon2_full_a_0_shift(il[764]) + , poseidon2_full_a_1_shift(il[765]) + , poseidon2_full_a_2_shift(il[766]) + , poseidon2_full_a_3_shift(il[767]) + , poseidon2_full_execute_poseidon_perm_shift(il[768]) + , poseidon2_full_input_0_shift(il[769]) + , poseidon2_full_input_1_shift(il[770]) + , poseidon2_full_input_2_shift(il[771]) + , poseidon2_full_num_perm_rounds_rem_shift(il[772]) + , poseidon2_full_sel_poseidon_shift(il[773]) + , poseidon2_full_start_poseidon_shift(il[774]) + , slice_addr_shift(il[775]) + , slice_clk_shift(il[776]) + , slice_cnt_shift(il[777]) + , slice_col_offset_shift(il[778]) + , slice_sel_cd_cpy_shift(il[779]) + , slice_sel_mem_active_shift(il[780]) + , slice_sel_return_shift(il[781]) + , slice_sel_start_shift(il[782]) + , slice_space_id_shift(il[783]) {} AvmFlavor::ProverPolynomials::ProverPolynomials(ProvingKey& proving_key) @@ -1006,7 +1040,6 @@ AvmFlavor::AllConstRefValues AvmFlavor::ProverPolynomials::get_row(size_t row_id main_sel_op_sload[row_idx], main_sel_op_sstore[row_idx], main_sel_op_static_call[row_idx], - main_sel_op_storage_address[row_idx], main_sel_op_sub[row_idx], main_sel_op_timestamp[row_idx], main_sel_op_transaction_fee[row_idx], @@ -1334,6 +1367,27 @@ AvmFlavor::AllConstRefValues AvmFlavor::ProverPolynomials::get_row(size_t row_id poseidon2_b_2[row_idx], poseidon2_b_3[row_idx], poseidon2_clk[row_idx], + poseidon2_full_a_0[row_idx], + poseidon2_full_a_1[row_idx], + poseidon2_full_a_2[row_idx], + poseidon2_full_a_3[row_idx], + poseidon2_full_b_0[row_idx], + poseidon2_full_b_1[row_idx], + poseidon2_full_b_2[row_idx], + poseidon2_full_b_3[row_idx], + poseidon2_full_clk[row_idx], + poseidon2_full_end_poseidon[row_idx], + poseidon2_full_execute_poseidon_perm[row_idx], + poseidon2_full_input_0[row_idx], + poseidon2_full_input_1[row_idx], + poseidon2_full_input_2[row_idx], + poseidon2_full_input_len[row_idx], + poseidon2_full_num_perm_rounds_rem[row_idx], + poseidon2_full_num_perm_rounds_rem_inv[row_idx], + poseidon2_full_output[row_idx], + poseidon2_full_padding[row_idx], + poseidon2_full_sel_poseidon[row_idx], + poseidon2_full_start_poseidon[row_idx], poseidon2_input_addr[row_idx], poseidon2_mem_addr_read_a[row_idx], poseidon2_mem_addr_read_b[row_idx], @@ -1345,6 +1399,8 @@ 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], + poseidon2_sel_poseidon_perm_immediate[row_idx], + poseidon2_sel_poseidon_perm_mem_op[row_idx], poseidon2_space_id[row_idx], range_check_alu_rng_chk[row_idx], range_check_clk[row_idx], @@ -1438,6 +1494,7 @@ AvmFlavor::AllConstRefValues AvmFlavor::ProverPolynomials::get_row(size_t row_id perm_pos_mem_write_b_inv[row_idx], perm_pos_mem_write_c_inv[row_idx], perm_pos_mem_write_d_inv[row_idx], + perm_pos2_fixed_pos2_perm_inv[row_idx], perm_slice_mem_inv[row_idx], perm_main_alu_inv[row_idx], perm_main_bin_inv[row_idx], @@ -1512,6 +1569,17 @@ AvmFlavor::AllConstRefValues AvmFlavor::ProverPolynomials::get_row(size_t row_id mem_tag_shift[row_idx], mem_tsp_shift[row_idx], mem_val_shift[row_idx], + poseidon2_full_a_0_shift[row_idx], + poseidon2_full_a_1_shift[row_idx], + poseidon2_full_a_2_shift[row_idx], + poseidon2_full_a_3_shift[row_idx], + poseidon2_full_execute_poseidon_perm_shift[row_idx], + poseidon2_full_input_0_shift[row_idx], + poseidon2_full_input_1_shift[row_idx], + poseidon2_full_input_2_shift[row_idx], + poseidon2_full_num_perm_rounds_rem_shift[row_idx], + poseidon2_full_sel_poseidon_shift[row_idx], + poseidon2_full_start_poseidon_shift[row_idx], slice_addr_shift[row_idx], slice_clk_shift[row_idx], slice_cnt_shift[row_idx], @@ -1760,7 +1828,6 @@ AvmFlavor::CommitmentLabels::CommitmentLabels() Base::main_sel_op_sload = "MAIN_SEL_OP_SLOAD"; Base::main_sel_op_sstore = "MAIN_SEL_OP_SSTORE"; Base::main_sel_op_static_call = "MAIN_SEL_OP_STATIC_CALL"; - Base::main_sel_op_storage_address = "MAIN_SEL_OP_STORAGE_ADDRESS"; Base::main_sel_op_sub = "MAIN_SEL_OP_SUB"; Base::main_sel_op_timestamp = "MAIN_SEL_OP_TIMESTAMP"; Base::main_sel_op_transaction_fee = "MAIN_SEL_OP_TRANSACTION_FEE"; @@ -2088,6 +2155,27 @@ AvmFlavor::CommitmentLabels::CommitmentLabels() Base::poseidon2_b_2 = "POSEIDON2_B_2"; Base::poseidon2_b_3 = "POSEIDON2_B_3"; Base::poseidon2_clk = "POSEIDON2_CLK"; + Base::poseidon2_full_a_0 = "POSEIDON2_FULL_A_0"; + Base::poseidon2_full_a_1 = "POSEIDON2_FULL_A_1"; + Base::poseidon2_full_a_2 = "POSEIDON2_FULL_A_2"; + Base::poseidon2_full_a_3 = "POSEIDON2_FULL_A_3"; + Base::poseidon2_full_b_0 = "POSEIDON2_FULL_B_0"; + Base::poseidon2_full_b_1 = "POSEIDON2_FULL_B_1"; + Base::poseidon2_full_b_2 = "POSEIDON2_FULL_B_2"; + Base::poseidon2_full_b_3 = "POSEIDON2_FULL_B_3"; + Base::poseidon2_full_clk = "POSEIDON2_FULL_CLK"; + Base::poseidon2_full_end_poseidon = "POSEIDON2_FULL_END_POSEIDON"; + Base::poseidon2_full_execute_poseidon_perm = "POSEIDON2_FULL_EXECUTE_POSEIDON_PERM"; + Base::poseidon2_full_input_0 = "POSEIDON2_FULL_INPUT_0"; + Base::poseidon2_full_input_1 = "POSEIDON2_FULL_INPUT_1"; + Base::poseidon2_full_input_2 = "POSEIDON2_FULL_INPUT_2"; + Base::poseidon2_full_input_len = "POSEIDON2_FULL_INPUT_LEN"; + Base::poseidon2_full_num_perm_rounds_rem = "POSEIDON2_FULL_NUM_PERM_ROUNDS_REM"; + Base::poseidon2_full_num_perm_rounds_rem_inv = "POSEIDON2_FULL_NUM_PERM_ROUNDS_REM_INV"; + Base::poseidon2_full_output = "POSEIDON2_FULL_OUTPUT"; + Base::poseidon2_full_padding = "POSEIDON2_FULL_PADDING"; + Base::poseidon2_full_sel_poseidon = "POSEIDON2_FULL_SEL_POSEIDON"; + Base::poseidon2_full_start_poseidon = "POSEIDON2_FULL_START_POSEIDON"; Base::poseidon2_input_addr = "POSEIDON2_INPUT_ADDR"; Base::poseidon2_mem_addr_read_a = "POSEIDON2_MEM_ADDR_READ_A"; Base::poseidon2_mem_addr_read_b = "POSEIDON2_MEM_ADDR_READ_B"; @@ -2099,6 +2187,8 @@ 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::poseidon2_sel_poseidon_perm_immediate = "POSEIDON2_SEL_POSEIDON_PERM_IMMEDIATE"; + Base::poseidon2_sel_poseidon_perm_mem_op = "POSEIDON2_SEL_POSEIDON_PERM_MEM_OP"; Base::poseidon2_space_id = "POSEIDON2_SPACE_ID"; Base::range_check_alu_rng_chk = "RANGE_CHECK_ALU_RNG_CHK"; Base::range_check_clk = "RANGE_CHECK_CLK"; @@ -2171,6 +2261,7 @@ AvmFlavor::CommitmentLabels::CommitmentLabels() Base::perm_pos_mem_write_b_inv = "PERM_POS_MEM_WRITE_B_INV"; Base::perm_pos_mem_write_c_inv = "PERM_POS_MEM_WRITE_C_INV"; Base::perm_pos_mem_write_d_inv = "PERM_POS_MEM_WRITE_D_INV"; + Base::perm_pos2_fixed_pos2_perm_inv = "PERM_POS2_FIXED_POS2_PERM_INV"; Base::perm_slice_mem_inv = "PERM_SLICE_MEM_INV"; Base::perm_main_alu_inv = "PERM_MAIN_ALU_INV"; Base::perm_main_bin_inv = "PERM_MAIN_BIN_INV"; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp index 891952fb82c..a6fd7a9331e 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp @@ -27,6 +27,7 @@ #include "barretenberg/vm/avm/generated/relations/mem.hpp" #include "barretenberg/vm/avm/generated/relations/mem_slice.hpp" #include "barretenberg/vm/avm/generated/relations/poseidon2.hpp" +#include "barretenberg/vm/avm/generated/relations/poseidon2_full.hpp" #include "barretenberg/vm/avm/generated/relations/range_check.hpp" #include "barretenberg/vm/avm/generated/relations/sha256.hpp" @@ -71,6 +72,7 @@ #include "barretenberg/vm/avm/generated/relations/perm_main_pos2_perm.hpp" #include "barretenberg/vm/avm/generated/relations/perm_main_sha256.hpp" #include "barretenberg/vm/avm/generated/relations/perm_main_slice.hpp" +#include "barretenberg/vm/avm/generated/relations/perm_pos2_fixed_pos2_perm.hpp" #include "barretenberg/vm/avm/generated/relations/perm_pos_mem_read_a.hpp" #include "barretenberg/vm/avm/generated/relations/perm_pos_mem_read_b.hpp" #include "barretenberg/vm/avm/generated/relations/perm_pos_mem_read_c.hpp" @@ -93,10 +95,10 @@ 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 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_base_da_gas_fixed_table, gas_base_l2_gas_fixed_table, gas_dyn_da_gas_fixed_table, gas_dyn_l2_gas_fixed_table, gas_sel_gas_cost, main_clk, main_sel_da_end_gas_kernel_input, main_sel_da_start_gas_kernel_input, main_sel_first, main_sel_l2_end_gas_kernel_input, main_sel_l2_start_gas_kernel_input, main_sel_start_exec, main_zeroes, powers_power_of_2 -#define WIRE_ENTITIES main_kernel_inputs, main_kernel_value_out, main_kernel_side_effect_out, main_kernel_metadata_out, main_calldata, main_returndata, alu_a_hi, alu_a_lo, alu_b_hi, alu_b_lo, alu_b_pow, alu_c_hi, alu_c_lo, alu_cf, alu_clk, alu_cmp_gadget_gt, alu_cmp_gadget_input_a, alu_cmp_gadget_input_b, alu_cmp_gadget_result, alu_cmp_gadget_sel, alu_ff_tag, alu_ia, alu_ib, alu_ic, alu_in_tag, alu_max_bits_sub_b_bits, alu_max_bits_sub_b_pow, alu_op_add, alu_op_cast, alu_op_div, alu_op_eq, alu_op_lt, alu_op_lte, alu_op_mul, alu_op_not, alu_op_shl, alu_op_shr, alu_op_sub, alu_partial_prod_hi, alu_partial_prod_lo, alu_range_check_input_value, alu_range_check_num_bits, alu_range_check_sel, alu_remainder, alu_sel_alu, alu_sel_cmp, alu_sel_shift_which, alu_u128_tag, alu_u16_tag, alu_u1_tag, alu_u32_tag, alu_u64_tag, alu_u8_tag, alu_zero_shift, 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, cmp_a_hi, cmp_a_lo, cmp_b_hi, cmp_b_lo, cmp_borrow, cmp_clk, cmp_cmp_rng_ctr, cmp_input_a, cmp_input_b, cmp_op_eq, cmp_op_eq_diff_inv, cmp_op_gt, cmp_p_a_borrow, cmp_p_b_borrow, cmp_p_sub_a_hi, cmp_p_sub_a_lo, cmp_p_sub_b_hi, cmp_p_sub_b_lo, cmp_range_chk_clk, cmp_res_hi, cmp_res_lo, cmp_result, cmp_sel_cmp, cmp_sel_rng_chk, cmp_shift_sel, conversion_clk, conversion_input, conversion_num_limbs, conversion_output_bits, conversion_radix, conversion_sel_to_radix_le, keccakf1600_clk, keccakf1600_input, keccakf1600_output, keccakf1600_sel_keccakf1600, main_abs_da_rem_gas, main_abs_l2_rem_gas, main_alu_in_tag, main_base_da_gas_op_cost, main_base_l2_gas_op_cost, main_bin_op_id, main_call_ptr, main_da_gas_remaining, main_da_out_of_gas, main_dyn_da_gas_op_cost, main_dyn_gas_multiplier, main_dyn_l2_gas_op_cost, main_emit_l2_to_l1_msg_write_offset, main_emit_note_hash_write_offset, main_emit_nullifier_write_offset, main_emit_unencrypted_log_write_offset, 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_is_fake_row, main_is_gas_accounted, main_kernel_in_offset, main_kernel_out_offset, main_l1_to_l2_msg_exists_write_offset, 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_note_hash_exist_write_offset, main_nullifier_exists_write_offset, main_nullifier_non_exists_write_offset, 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_execution_end, main_sel_execution_row, main_sel_kernel_inputs, main_sel_kernel_out, main_sel_mem_op_a, 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_dagasleft, main_sel_op_div, main_sel_op_ecadd, 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_external_revert, 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_internal_call, main_sel_op_internal_return, main_sel_op_is_static_call, 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_msm, 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_poseidon2, main_sel_op_radix_le, main_sel_op_sender, main_sel_op_set, main_sel_op_sha256, main_sel_op_shl, main_sel_op_shr, main_sel_op_sload, main_sel_op_sstore, main_sel_op_static_call, 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_side_effect_counter, main_sload_write_offset, main_space_id, main_sstore_write_offset, main_tag_err, main_w_in_tag, mem_addr, mem_clk, mem_diff, 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_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, 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, poseidon2_space_id, range_check_alu_rng_chk, range_check_clk, range_check_cmp_hi_bits_rng_chk, range_check_cmp_lo_bits_rng_chk, range_check_dyn_diff, range_check_dyn_rng_chk_bits, range_check_dyn_rng_chk_pow_2, range_check_gas_da_rng_chk, range_check_gas_l2_rng_chk, range_check_is_lte_u112, range_check_is_lte_u128, range_check_is_lte_u16, range_check_is_lte_u32, range_check_is_lte_u48, range_check_is_lte_u64, range_check_is_lte_u80, range_check_is_lte_u96, range_check_mem_rng_chk, range_check_rng_chk_bits, range_check_sel_lookup_0, range_check_sel_lookup_1, range_check_sel_lookup_2, range_check_sel_lookup_3, range_check_sel_lookup_4, range_check_sel_lookup_5, range_check_sel_lookup_6, range_check_sel_rng_chk, range_check_u16_r0, range_check_u16_r1, range_check_u16_r2, range_check_u16_r3, range_check_u16_r4, range_check_u16_r5, range_check_u16_r6, range_check_u16_r7, range_check_value, 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_rng_chk_pow_2_counts, lookup_rng_chk_diff_counts, lookup_rng_chk_0_counts, lookup_rng_chk_1_counts, lookup_rng_chk_2_counts, lookup_rng_chk_3_counts, lookup_rng_chk_4_counts, lookup_rng_chk_5_counts, lookup_rng_chk_6_counts, lookup_rng_chk_7_counts, lookup_pow_2_0_counts, lookup_pow_2_1_counts, lookup_byte_lengths_counts, lookup_byte_operations_counts, lookup_opcode_gas_counts, kernel_output_lookup_counts, lookup_into_kernel_counts, lookup_cd_value_counts, lookup_ret_value_counts, incl_main_tag_err_counts, incl_mem_tag_err_counts -#define DERIVED_WITNESS_ENTITIES perm_rng_mem_inv, perm_rng_cmp_lo_inv, perm_rng_cmp_hi_inv, perm_rng_alu_inv, perm_cmp_alu_inv, perm_rng_gas_l2_inv, perm_rng_gas_da_inv, perm_l2_start_gas_inv, perm_da_start_gas_inv, perm_l2_end_gas_inv, perm_da_end_gas_inv, perm_pos_mem_read_a_inv, perm_pos_mem_read_b_inv, perm_pos_mem_read_c_inv, perm_pos_mem_read_d_inv, perm_pos_mem_write_a_inv, perm_pos_mem_write_b_inv, perm_pos_mem_write_c_inv, perm_pos_mem_write_d_inv, perm_slice_mem_inv, perm_main_alu_inv, perm_main_bin_inv, perm_main_conv_inv, perm_main_sha256_inv, perm_main_pos2_perm_inv, perm_main_slice_inv, perm_main_mem_a_inv, perm_main_mem_b_inv, perm_main_mem_c_inv, perm_main_mem_d_inv, perm_main_mem_ind_addr_a_inv, perm_main_mem_ind_addr_b_inv, perm_main_mem_ind_addr_c_inv, perm_main_mem_ind_addr_d_inv, lookup_rng_chk_pow_2_inv, lookup_rng_chk_diff_inv, lookup_rng_chk_0_inv, lookup_rng_chk_1_inv, lookup_rng_chk_2_inv, lookup_rng_chk_3_inv, lookup_rng_chk_4_inv, lookup_rng_chk_5_inv, lookup_rng_chk_6_inv, lookup_rng_chk_7_inv, lookup_pow_2_0_inv, lookup_pow_2_1_inv, lookup_byte_lengths_inv, lookup_byte_operations_inv, lookup_opcode_gas_inv, kernel_output_lookup_inv, lookup_into_kernel_inv, lookup_cd_value_inv, lookup_ret_value_inv, incl_main_tag_err_inv, incl_mem_tag_err_inv -#define SHIFTED_ENTITIES binary_acc_ia_shift, binary_acc_ib_shift, binary_acc_ic_shift, binary_mem_tag_ctr_shift, binary_op_id_shift, cmp_a_hi_shift, cmp_a_lo_shift, cmp_b_hi_shift, cmp_b_lo_shift, cmp_cmp_rng_ctr_shift, cmp_op_gt_shift, cmp_p_sub_a_hi_shift, cmp_p_sub_a_lo_shift, cmp_p_sub_b_hi_shift, cmp_p_sub_b_lo_shift, cmp_sel_rng_chk_shift, main_da_gas_remaining_shift, main_emit_l2_to_l1_msg_write_offset_shift, main_emit_note_hash_write_offset_shift, main_emit_nullifier_write_offset_shift, main_emit_unencrypted_log_write_offset_shift, main_internal_return_ptr_shift, main_l1_to_l2_msg_exists_write_offset_shift, main_l2_gas_remaining_shift, main_note_hash_exist_write_offset_shift, main_nullifier_exists_write_offset_shift, main_nullifier_non_exists_write_offset_shift, main_pc_shift, main_sel_execution_end_shift, main_sel_execution_row_shift, main_sload_write_offset_shift, main_sstore_write_offset_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.binary_acc_ia, e.binary_acc_ib, e.binary_acc_ic, e.binary_mem_tag_ctr, e.binary_op_id, e.cmp_a_hi, e.cmp_a_lo, e.cmp_b_hi, e.cmp_b_lo, e.cmp_cmp_rng_ctr, e.cmp_op_gt, e.cmp_p_sub_a_hi, e.cmp_p_sub_a_lo, e.cmp_p_sub_b_hi, e.cmp_p_sub_b_lo, e.cmp_sel_rng_chk, e.main_da_gas_remaining, e.main_emit_l2_to_l1_msg_write_offset, e.main_emit_note_hash_write_offset, e.main_emit_nullifier_write_offset, e.main_emit_unencrypted_log_write_offset, e.main_internal_return_ptr, e.main_l1_to_l2_msg_exists_write_offset, e.main_l2_gas_remaining, e.main_note_hash_exist_write_offset, e.main_nullifier_exists_write_offset, e.main_nullifier_non_exists_write_offset, e.main_pc, e.main_sel_execution_end, e.main_sel_execution_row, e.main_sload_write_offset, e.main_sstore_write_offset, 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 +#define WIRE_ENTITIES main_kernel_inputs, main_kernel_value_out, main_kernel_side_effect_out, main_kernel_metadata_out, main_calldata, main_returndata, alu_a_hi, alu_a_lo, alu_b_hi, alu_b_lo, alu_b_pow, alu_c_hi, alu_c_lo, alu_cf, alu_clk, alu_cmp_gadget_gt, alu_cmp_gadget_input_a, alu_cmp_gadget_input_b, alu_cmp_gadget_result, alu_cmp_gadget_sel, alu_ff_tag, alu_ia, alu_ib, alu_ic, alu_in_tag, alu_max_bits_sub_b_bits, alu_max_bits_sub_b_pow, alu_op_add, alu_op_cast, alu_op_div, alu_op_eq, alu_op_lt, alu_op_lte, alu_op_mul, alu_op_not, alu_op_shl, alu_op_shr, alu_op_sub, alu_partial_prod_hi, alu_partial_prod_lo, alu_range_check_input_value, alu_range_check_num_bits, alu_range_check_sel, alu_remainder, alu_sel_alu, alu_sel_cmp, alu_sel_shift_which, alu_u128_tag, alu_u16_tag, alu_u1_tag, alu_u32_tag, alu_u64_tag, alu_u8_tag, alu_zero_shift, 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, cmp_a_hi, cmp_a_lo, cmp_b_hi, cmp_b_lo, cmp_borrow, cmp_clk, cmp_cmp_rng_ctr, cmp_input_a, cmp_input_b, cmp_op_eq, cmp_op_eq_diff_inv, cmp_op_gt, cmp_p_a_borrow, cmp_p_b_borrow, cmp_p_sub_a_hi, cmp_p_sub_a_lo, cmp_p_sub_b_hi, cmp_p_sub_b_lo, cmp_range_chk_clk, cmp_res_hi, cmp_res_lo, cmp_result, cmp_sel_cmp, cmp_sel_rng_chk, cmp_shift_sel, conversion_clk, conversion_input, conversion_num_limbs, conversion_output_bits, conversion_radix, conversion_sel_to_radix_le, keccakf1600_clk, keccakf1600_input, keccakf1600_output, keccakf1600_sel_keccakf1600, main_abs_da_rem_gas, main_abs_l2_rem_gas, main_alu_in_tag, main_base_da_gas_op_cost, main_base_l2_gas_op_cost, main_bin_op_id, main_call_ptr, main_da_gas_remaining, main_da_out_of_gas, main_dyn_da_gas_op_cost, main_dyn_gas_multiplier, main_dyn_l2_gas_op_cost, main_emit_l2_to_l1_msg_write_offset, main_emit_note_hash_write_offset, main_emit_nullifier_write_offset, main_emit_unencrypted_log_write_offset, 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_is_fake_row, main_is_gas_accounted, main_kernel_in_offset, main_kernel_out_offset, main_l1_to_l2_msg_exists_write_offset, 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_note_hash_exist_write_offset, main_nullifier_exists_write_offset, main_nullifier_non_exists_write_offset, 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_execution_end, main_sel_execution_row, main_sel_kernel_inputs, main_sel_kernel_out, main_sel_mem_op_a, 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_dagasleft, main_sel_op_div, main_sel_op_ecadd, 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_external_revert, 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_internal_call, main_sel_op_internal_return, main_sel_op_is_static_call, 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_msm, 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_poseidon2, main_sel_op_radix_le, main_sel_op_sender, main_sel_op_set, main_sel_op_sha256, main_sel_op_shl, main_sel_op_shr, main_sel_op_sload, main_sel_op_sstore, main_sel_op_static_call, 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_side_effect_counter, main_sload_write_offset, main_space_id, main_sstore_write_offset, main_tag_err, main_w_in_tag, mem_addr, mem_clk, mem_diff, 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_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, 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_full_a_0, poseidon2_full_a_1, poseidon2_full_a_2, poseidon2_full_a_3, poseidon2_full_b_0, poseidon2_full_b_1, poseidon2_full_b_2, poseidon2_full_b_3, poseidon2_full_clk, poseidon2_full_end_poseidon, poseidon2_full_execute_poseidon_perm, poseidon2_full_input_0, poseidon2_full_input_1, poseidon2_full_input_2, poseidon2_full_input_len, poseidon2_full_num_perm_rounds_rem, poseidon2_full_num_perm_rounds_rem_inv, poseidon2_full_output, poseidon2_full_padding, poseidon2_full_sel_poseidon, poseidon2_full_start_poseidon, 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, poseidon2_sel_poseidon_perm_immediate, poseidon2_sel_poseidon_perm_mem_op, poseidon2_space_id, range_check_alu_rng_chk, range_check_clk, range_check_cmp_hi_bits_rng_chk, range_check_cmp_lo_bits_rng_chk, range_check_dyn_diff, range_check_dyn_rng_chk_bits, range_check_dyn_rng_chk_pow_2, range_check_gas_da_rng_chk, range_check_gas_l2_rng_chk, range_check_is_lte_u112, range_check_is_lte_u128, range_check_is_lte_u16, range_check_is_lte_u32, range_check_is_lte_u48, range_check_is_lte_u64, range_check_is_lte_u80, range_check_is_lte_u96, range_check_mem_rng_chk, range_check_rng_chk_bits, range_check_sel_lookup_0, range_check_sel_lookup_1, range_check_sel_lookup_2, range_check_sel_lookup_3, range_check_sel_lookup_4, range_check_sel_lookup_5, range_check_sel_lookup_6, range_check_sel_rng_chk, range_check_u16_r0, range_check_u16_r1, range_check_u16_r2, range_check_u16_r3, range_check_u16_r4, range_check_u16_r5, range_check_u16_r6, range_check_u16_r7, range_check_value, 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_rng_chk_pow_2_counts, lookup_rng_chk_diff_counts, lookup_rng_chk_0_counts, lookup_rng_chk_1_counts, lookup_rng_chk_2_counts, lookup_rng_chk_3_counts, lookup_rng_chk_4_counts, lookup_rng_chk_5_counts, lookup_rng_chk_6_counts, lookup_rng_chk_7_counts, lookup_pow_2_0_counts, lookup_pow_2_1_counts, lookup_byte_lengths_counts, lookup_byte_operations_counts, lookup_opcode_gas_counts, kernel_output_lookup_counts, lookup_into_kernel_counts, lookup_cd_value_counts, lookup_ret_value_counts, incl_main_tag_err_counts, incl_mem_tag_err_counts +#define DERIVED_WITNESS_ENTITIES perm_rng_mem_inv, perm_rng_cmp_lo_inv, perm_rng_cmp_hi_inv, perm_rng_alu_inv, perm_cmp_alu_inv, perm_rng_gas_l2_inv, perm_rng_gas_da_inv, perm_l2_start_gas_inv, perm_da_start_gas_inv, perm_l2_end_gas_inv, perm_da_end_gas_inv, perm_pos_mem_read_a_inv, perm_pos_mem_read_b_inv, perm_pos_mem_read_c_inv, perm_pos_mem_read_d_inv, perm_pos_mem_write_a_inv, perm_pos_mem_write_b_inv, perm_pos_mem_write_c_inv, perm_pos_mem_write_d_inv, perm_pos2_fixed_pos2_perm_inv, perm_slice_mem_inv, perm_main_alu_inv, perm_main_bin_inv, perm_main_conv_inv, perm_main_sha256_inv, perm_main_pos2_perm_inv, perm_main_slice_inv, perm_main_mem_a_inv, perm_main_mem_b_inv, perm_main_mem_c_inv, perm_main_mem_d_inv, perm_main_mem_ind_addr_a_inv, perm_main_mem_ind_addr_b_inv, perm_main_mem_ind_addr_c_inv, perm_main_mem_ind_addr_d_inv, lookup_rng_chk_pow_2_inv, lookup_rng_chk_diff_inv, lookup_rng_chk_0_inv, lookup_rng_chk_1_inv, lookup_rng_chk_2_inv, lookup_rng_chk_3_inv, lookup_rng_chk_4_inv, lookup_rng_chk_5_inv, lookup_rng_chk_6_inv, lookup_rng_chk_7_inv, lookup_pow_2_0_inv, lookup_pow_2_1_inv, lookup_byte_lengths_inv, lookup_byte_operations_inv, lookup_opcode_gas_inv, kernel_output_lookup_inv, lookup_into_kernel_inv, lookup_cd_value_inv, lookup_ret_value_inv, incl_main_tag_err_inv, incl_mem_tag_err_inv +#define SHIFTED_ENTITIES binary_acc_ia_shift, binary_acc_ib_shift, binary_acc_ic_shift, binary_mem_tag_ctr_shift, binary_op_id_shift, cmp_a_hi_shift, cmp_a_lo_shift, cmp_b_hi_shift, cmp_b_lo_shift, cmp_cmp_rng_ctr_shift, cmp_op_gt_shift, cmp_p_sub_a_hi_shift, cmp_p_sub_a_lo_shift, cmp_p_sub_b_hi_shift, cmp_p_sub_b_lo_shift, cmp_sel_rng_chk_shift, main_da_gas_remaining_shift, main_emit_l2_to_l1_msg_write_offset_shift, main_emit_note_hash_write_offset_shift, main_emit_nullifier_write_offset_shift, main_emit_unencrypted_log_write_offset_shift, main_internal_return_ptr_shift, main_l1_to_l2_msg_exists_write_offset_shift, main_l2_gas_remaining_shift, main_note_hash_exist_write_offset_shift, main_nullifier_exists_write_offset_shift, main_nullifier_non_exists_write_offset_shift, main_pc_shift, main_sel_execution_end_shift, main_sel_execution_row_shift, main_sload_write_offset_shift, main_sstore_write_offset_shift, mem_glob_addr_shift, mem_rw_shift, mem_sel_mem_shift, mem_tag_shift, mem_tsp_shift, mem_val_shift, poseidon2_full_a_0_shift, poseidon2_full_a_1_shift, poseidon2_full_a_2_shift, poseidon2_full_a_3_shift, poseidon2_full_execute_poseidon_perm_shift, poseidon2_full_input_0_shift, poseidon2_full_input_1_shift, poseidon2_full_input_2_shift, poseidon2_full_num_perm_rounds_rem_shift, poseidon2_full_sel_poseidon_shift, poseidon2_full_start_poseidon_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.binary_acc_ia, e.binary_acc_ib, e.binary_acc_ic, e.binary_mem_tag_ctr, e.binary_op_id, e.cmp_a_hi, e.cmp_a_lo, e.cmp_b_hi, e.cmp_b_lo, e.cmp_cmp_rng_ctr, e.cmp_op_gt, e.cmp_p_sub_a_hi, e.cmp_p_sub_a_lo, e.cmp_p_sub_b_hi, e.cmp_p_sub_b_lo, e.cmp_sel_rng_chk, e.main_da_gas_remaining, e.main_emit_l2_to_l1_msg_write_offset, e.main_emit_note_hash_write_offset, e.main_emit_nullifier_write_offset, e.main_emit_unencrypted_log_write_offset, e.main_internal_return_ptr, e.main_l1_to_l2_msg_exists_write_offset, e.main_l2_gas_remaining, e.main_note_hash_exist_write_offset, e.main_nullifier_exists_write_offset, e.main_nullifier_non_exists_write_offset, e.main_pc, e.main_sel_execution_end, e.main_sel_execution_row, e.main_sload_write_offset, e.main_sstore_write_offset, e.mem_glob_addr, e.mem_rw, e.mem_sel_mem, e.mem_tag, e.mem_tsp, e.mem_val, e.poseidon2_full_a_0, e.poseidon2_full_a_1, e.poseidon2_full_a_2, e.poseidon2_full_a_3, e.poseidon2_full_execute_poseidon_perm, e.poseidon2_full_input_0, e.poseidon2_full_input_1, e.poseidon2_full_input_2, e.poseidon2_full_num_perm_rounds_rem, e.poseidon2_full_sel_poseidon, e.poseidon2_full_start_poseidon, 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 #define ALL_ENTITIES PRECOMPUTED_ENTITIES, WIRE_ENTITIES, DERIVED_WITNESS_ENTITIES, SHIFTED_ENTITIES // clang-format on @@ -122,12 +124,12 @@ class AvmFlavor { static constexpr bool HasZK = false; static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 21; - static constexpr size_t NUM_WITNESS_ENTITIES = 682; - static constexpr size_t NUM_SHIFTED_ENTITIES = 47; + static constexpr size_t NUM_WITNESS_ENTITIES = 705; + static constexpr size_t NUM_SHIFTED_ENTITIES = 58; 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 - static constexpr size_t NUM_ALL_ENTITIES = 750; + static constexpr size_t NUM_ALL_ENTITIES = 784; // The total number of witnesses including shifts and derived entities. static constexpr size_t NUM_ALL_WITNESS_ENTITIES = NUM_WITNESS_ENTITIES + NUM_SHIFTED_ENTITIES; @@ -146,6 +148,7 @@ class AvmFlavor { Avm_vm::mem, Avm_vm::mem_slice, Avm_vm::poseidon2, + Avm_vm::poseidon2_full, Avm_vm::range_check, Avm_vm::sha256>; @@ -195,6 +198,7 @@ class AvmFlavor { perm_main_pos2_perm_relation, perm_main_sha256_relation, perm_main_slice_relation, + perm_pos2_fixed_pos2_perm_relation, perm_pos_mem_read_a_relation, perm_pos_mem_read_b_relation, perm_pos_mem_read_c_relation, 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 304dcde4352..f27062c3865 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/full_row.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/full_row.cpp @@ -254,7 +254,6 @@ template std::vector AvmFullRow::names() "main_sel_op_sload", "main_sel_op_sstore", "main_sel_op_static_call", - "main_sel_op_storage_address", "main_sel_op_sub", "main_sel_op_timestamp", "main_sel_op_transaction_fee", @@ -582,6 +581,27 @@ template std::vector AvmFullRow::names() "poseidon2_b_2", "poseidon2_b_3", "poseidon2_clk", + "poseidon2_full_a_0", + "poseidon2_full_a_1", + "poseidon2_full_a_2", + "poseidon2_full_a_3", + "poseidon2_full_b_0", + "poseidon2_full_b_1", + "poseidon2_full_b_2", + "poseidon2_full_b_3", + "poseidon2_full_clk", + "poseidon2_full_end_poseidon", + "poseidon2_full_execute_poseidon_perm", + "poseidon2_full_input_0", + "poseidon2_full_input_1", + "poseidon2_full_input_2", + "poseidon2_full_input_len", + "poseidon2_full_num_perm_rounds_rem", + "poseidon2_full_num_perm_rounds_rem_inv", + "poseidon2_full_output", + "poseidon2_full_padding", + "poseidon2_full_sel_poseidon", + "poseidon2_full_start_poseidon", "poseidon2_input_addr", "poseidon2_mem_addr_read_a", "poseidon2_mem_addr_read_b", @@ -593,6 +613,8 @@ template std::vector AvmFullRow::names() "poseidon2_mem_addr_write_d", "poseidon2_output_addr", "poseidon2_sel_poseidon_perm", + "poseidon2_sel_poseidon_perm_immediate", + "poseidon2_sel_poseidon_perm_mem_op", "poseidon2_space_id", "range_check_alu_rng_chk", "range_check_clk", @@ -665,6 +687,7 @@ template std::vector AvmFullRow::names() "perm_pos_mem_write_b_inv", "perm_pos_mem_write_c_inv", "perm_pos_mem_write_d_inv", + "perm_pos2_fixed_pos2_perm_inv", "perm_slice_mem_inv", "perm_main_alu_inv", "perm_main_bin_inv", @@ -962,7 +985,6 @@ template RefVector AvmFullRow::as_vector() const main_sel_op_sload, main_sel_op_sstore, main_sel_op_static_call, - main_sel_op_storage_address, main_sel_op_sub, main_sel_op_timestamp, main_sel_op_transaction_fee, @@ -1290,6 +1312,27 @@ template RefVector AvmFullRow::as_vector() const poseidon2_b_2, poseidon2_b_3, poseidon2_clk, + poseidon2_full_a_0, + poseidon2_full_a_1, + poseidon2_full_a_2, + poseidon2_full_a_3, + poseidon2_full_b_0, + poseidon2_full_b_1, + poseidon2_full_b_2, + poseidon2_full_b_3, + poseidon2_full_clk, + poseidon2_full_end_poseidon, + poseidon2_full_execute_poseidon_perm, + poseidon2_full_input_0, + poseidon2_full_input_1, + poseidon2_full_input_2, + poseidon2_full_input_len, + poseidon2_full_num_perm_rounds_rem, + poseidon2_full_num_perm_rounds_rem_inv, + poseidon2_full_output, + poseidon2_full_padding, + poseidon2_full_sel_poseidon, + poseidon2_full_start_poseidon, poseidon2_input_addr, poseidon2_mem_addr_read_a, poseidon2_mem_addr_read_b, @@ -1301,6 +1344,8 @@ template RefVector AvmFullRow::as_vector() const poseidon2_mem_addr_write_d, poseidon2_output_addr, poseidon2_sel_poseidon_perm, + poseidon2_sel_poseidon_perm_immediate, + poseidon2_sel_poseidon_perm_mem_op, poseidon2_space_id, range_check_alu_rng_chk, range_check_clk, @@ -1373,6 +1418,7 @@ template RefVector AvmFullRow::as_vector() const perm_pos_mem_write_b_inv, perm_pos_mem_write_c_inv, perm_pos_mem_write_d_inv, + perm_pos2_fixed_pos2_perm_inv, perm_slice_mem_inv, perm_main_alu_inv, perm_main_bin_inv, 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 ffce87c5b36..b2775561aac 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/full_row.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/full_row.hpp @@ -245,7 +245,6 @@ template struct AvmFullRow { FF main_sel_op_sload{}; FF main_sel_op_sstore{}; FF main_sel_op_static_call{}; - FF main_sel_op_storage_address{}; FF main_sel_op_sub{}; FF main_sel_op_timestamp{}; FF main_sel_op_transaction_fee{}; @@ -573,6 +572,27 @@ template struct AvmFullRow { FF poseidon2_b_2{}; FF poseidon2_b_3{}; FF poseidon2_clk{}; + FF poseidon2_full_a_0{}; + FF poseidon2_full_a_1{}; + FF poseidon2_full_a_2{}; + FF poseidon2_full_a_3{}; + FF poseidon2_full_b_0{}; + FF poseidon2_full_b_1{}; + FF poseidon2_full_b_2{}; + FF poseidon2_full_b_3{}; + FF poseidon2_full_clk{}; + FF poseidon2_full_end_poseidon{}; + FF poseidon2_full_execute_poseidon_perm{}; + FF poseidon2_full_input_0{}; + FF poseidon2_full_input_1{}; + FF poseidon2_full_input_2{}; + FF poseidon2_full_input_len{}; + FF poseidon2_full_num_perm_rounds_rem{}; + FF poseidon2_full_num_perm_rounds_rem_inv{}; + FF poseidon2_full_output{}; + FF poseidon2_full_padding{}; + FF poseidon2_full_sel_poseidon{}; + FF poseidon2_full_start_poseidon{}; FF poseidon2_input_addr{}; FF poseidon2_mem_addr_read_a{}; FF poseidon2_mem_addr_read_b{}; @@ -584,6 +604,8 @@ template struct AvmFullRow { FF poseidon2_mem_addr_write_d{}; FF poseidon2_output_addr{}; FF poseidon2_sel_poseidon_perm{}; + FF poseidon2_sel_poseidon_perm_immediate{}; + FF poseidon2_sel_poseidon_perm_mem_op{}; FF poseidon2_space_id{}; FF range_check_alu_rng_chk{}; FF range_check_clk{}; @@ -656,6 +678,7 @@ template struct AvmFullRow { FF perm_pos_mem_write_b_inv{}; FF perm_pos_mem_write_c_inv{}; FF perm_pos_mem_write_d_inv{}; + FF perm_pos2_fixed_pos2_perm_inv{}; FF perm_slice_mem_inv{}; FF perm_main_alu_inv{}; FF perm_main_bin_inv{}; @@ -717,7 +740,7 @@ template struct AvmFullRow { RefVector as_vector() const; static std::vector names(); - static constexpr size_t SIZE = 703; + static constexpr size_t SIZE = 726; }; template std::ostream& operator<<(std::ostream& os, AvmFullRow const& row); diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel.hpp index 25607e0e926..3f00d3edafc 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/kernel.hpp @@ -10,9 +10,9 @@ template class kernelImpl { public: using FF = FF_; - static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }; + static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }; template void static accumulate(ContainerOverSubrelations& evals, @@ -22,7 +22,6 @@ template class kernelImpl { { const auto constants_SENDER_KERNEL_INPUTS_COL_OFFSET = FF(0); const auto constants_ADDRESS_KERNEL_INPUTS_COL_OFFSET = FF(1); - const auto constants_STORAGE_ADDRESS_KERNEL_INPUTS_COL_OFFSET = FF(1); const auto constants_FUNCTION_SELECTOR_KERNEL_INPUTS_COL_OFFSET = FF(2); const auto constants_IS_STATIC_CALL_KERNEL_INPUTS_COL_OFFSET = FF(3); const auto constants_CHAIN_ID_KERNEL_INPUTS_COL_OFFSET = FF(4); @@ -42,18 +41,16 @@ template class kernelImpl { const auto constants_START_EMIT_NULLIFIER_WRITE_OFFSET = FF(144); const auto constants_START_EMIT_L2_TO_L1_MSG_WRITE_OFFSET = FF(160); const auto constants_START_EMIT_UNENCRYPTED_LOG_WRITE_OFFSET = FF(162); - const auto main_KERNEL_INPUT_SELECTORS = - (((((((((((new_term.main_sel_op_address + new_term.main_sel_op_storage_address) + - new_term.main_sel_op_sender) + - new_term.main_sel_op_function_selector) + - new_term.main_sel_op_transaction_fee) + - new_term.main_sel_op_chain_id) + - new_term.main_sel_op_version) + - new_term.main_sel_op_block_number) + - new_term.main_sel_op_timestamp) + - new_term.main_sel_op_fee_per_l2_gas) + - new_term.main_sel_op_fee_per_da_gas) + - new_term.main_sel_op_is_static_call); + const auto main_KERNEL_INPUT_SELECTORS = ((((((((((new_term.main_sel_op_address + new_term.main_sel_op_sender) + + new_term.main_sel_op_function_selector) + + new_term.main_sel_op_transaction_fee) + + new_term.main_sel_op_chain_id) + + new_term.main_sel_op_version) + + new_term.main_sel_op_block_number) + + new_term.main_sel_op_timestamp) + + new_term.main_sel_op_fee_per_l2_gas) + + new_term.main_sel_op_fee_per_da_gas) + + new_term.main_sel_op_is_static_call); const auto main_KERNEL_OUTPUT_SELECTORS = ((((((((new_term.main_sel_op_note_hash_exists + new_term.main_sel_op_emit_note_hash) + new_term.main_sel_op_nullifier_exists) + @@ -156,111 +153,104 @@ template class kernelImpl { } { using Accumulator = typename std::tuple_element_t<11, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_storage_address * - (new_term.main_kernel_in_offset - constants_STORAGE_ADDRESS_KERNEL_INPUTS_COL_OFFSET)); - tmp *= scaling_factor; - std::get<11>(evals) += typename Accumulator::View(tmp); - } - { - using Accumulator = typename std::tuple_element_t<12, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_sender * (new_term.main_kernel_in_offset - constants_SENDER_KERNEL_INPUTS_COL_OFFSET)); tmp *= scaling_factor; - std::get<12>(evals) += typename Accumulator::View(tmp); + std::get<11>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<13, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<12, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_function_selector * (new_term.main_kernel_in_offset - constants_FUNCTION_SELECTOR_KERNEL_INPUTS_COL_OFFSET)); tmp *= scaling_factor; - std::get<13>(evals) += typename Accumulator::View(tmp); + std::get<12>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<14, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<13, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_transaction_fee * (new_term.main_kernel_in_offset - constants_TRANSACTION_FEE_KERNEL_INPUTS_COL_OFFSET)); tmp *= scaling_factor; - std::get<14>(evals) += typename Accumulator::View(tmp); + std::get<13>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<15, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<14, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_is_static_call * (new_term.main_kernel_in_offset - constants_IS_STATIC_CALL_KERNEL_INPUTS_COL_OFFSET)); tmp *= scaling_factor; - std::get<15>(evals) += typename Accumulator::View(tmp); + std::get<14>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<16, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<15, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_chain_id * (new_term.main_kernel_in_offset - constants_CHAIN_ID_KERNEL_INPUTS_COL_OFFSET)); tmp *= scaling_factor; - std::get<16>(evals) += typename Accumulator::View(tmp); + std::get<15>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<17, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<16, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_version * (new_term.main_kernel_in_offset - constants_VERSION_KERNEL_INPUTS_COL_OFFSET)); tmp *= scaling_factor; - std::get<17>(evals) += typename Accumulator::View(tmp); + std::get<16>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<18, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<17, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_block_number * (new_term.main_kernel_in_offset - constants_BLOCK_NUMBER_KERNEL_INPUTS_COL_OFFSET)); tmp *= scaling_factor; - std::get<18>(evals) += typename Accumulator::View(tmp); + std::get<17>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<19, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<18, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_timestamp * (new_term.main_kernel_in_offset - constants_TIMESTAMP_KERNEL_INPUTS_COL_OFFSET)); tmp *= scaling_factor; - std::get<19>(evals) += typename Accumulator::View(tmp); + std::get<18>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<20, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<19, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_fee_per_da_gas * (new_term.main_kernel_in_offset - constants_FEE_PER_DA_GAS_KERNEL_INPUTS_COL_OFFSET)); tmp *= scaling_factor; - std::get<20>(evals) += typename Accumulator::View(tmp); + std::get<19>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<21, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<20, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_fee_per_l2_gas * (new_term.main_kernel_in_offset - constants_FEE_PER_L2_GAS_KERNEL_INPUTS_COL_OFFSET)); tmp *= scaling_factor; - std::get<21>(evals) += typename Accumulator::View(tmp); + std::get<20>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<22, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<21, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_note_hash_exists * (new_term.main_kernel_out_offset - (constants_START_NOTE_HASH_EXISTS_WRITE_OFFSET + new_term.main_note_hash_exist_write_offset))); tmp *= scaling_factor; - std::get<22>(evals) += typename Accumulator::View(tmp); + std::get<21>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<23, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<22, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_first * new_term.main_note_hash_exist_write_offset); tmp *= scaling_factor; - std::get<23>(evals) += typename Accumulator::View(tmp); + std::get<22>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<24, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<23, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_emit_note_hash * (new_term.main_kernel_out_offset - (constants_START_EMIT_NOTE_HASH_WRITE_OFFSET + new_term.main_emit_note_hash_write_offset))); tmp *= scaling_factor; - std::get<24>(evals) += typename Accumulator::View(tmp); + std::get<23>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<25, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<24, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_first * new_term.main_emit_note_hash_write_offset); tmp *= scaling_factor; - std::get<25>(evals) += typename Accumulator::View(tmp); + std::get<24>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<26, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<25, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_nullifier_exists * (new_term.main_kernel_out_offset - ((new_term.main_ib * @@ -268,115 +258,115 @@ template class kernelImpl { ((FF(1) - new_term.main_ib) * (constants_START_NULLIFIER_NON_EXISTS_OFFSET + new_term.main_nullifier_non_exists_write_offset))))); tmp *= scaling_factor; - std::get<26>(evals) += typename Accumulator::View(tmp); + std::get<25>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<27, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<26, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_first * new_term.main_nullifier_exists_write_offset); tmp *= scaling_factor; - std::get<27>(evals) += typename Accumulator::View(tmp); + std::get<26>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<28, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<27, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_first * new_term.main_nullifier_non_exists_write_offset); tmp *= scaling_factor; - std::get<28>(evals) += typename Accumulator::View(tmp); + std::get<27>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<29, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<28, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_emit_nullifier * (new_term.main_kernel_out_offset - (constants_START_EMIT_NULLIFIER_WRITE_OFFSET + new_term.main_emit_nullifier_write_offset))); tmp *= scaling_factor; - std::get<29>(evals) += typename Accumulator::View(tmp); + std::get<28>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<30, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<29, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_first * new_term.main_emit_nullifier_write_offset); tmp *= scaling_factor; - std::get<30>(evals) += typename Accumulator::View(tmp); + std::get<29>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<31, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<30, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_l1_to_l2_msg_exists * (new_term.main_kernel_out_offset - (constants_START_L1_TO_L2_MSG_EXISTS_WRITE_OFFSET + new_term.main_l1_to_l2_msg_exists_write_offset))); tmp *= scaling_factor; - std::get<31>(evals) += typename Accumulator::View(tmp); + std::get<30>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<32, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<31, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_first * new_term.main_l1_to_l2_msg_exists_write_offset); tmp *= scaling_factor; - std::get<32>(evals) += typename Accumulator::View(tmp); + std::get<31>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<33, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<32, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_emit_unencrypted_log * (new_term.main_kernel_out_offset - (constants_START_EMIT_UNENCRYPTED_LOG_WRITE_OFFSET + new_term.main_emit_unencrypted_log_write_offset))); tmp *= scaling_factor; - std::get<33>(evals) += typename Accumulator::View(tmp); + std::get<32>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<34, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<33, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_first * new_term.main_emit_unencrypted_log_write_offset); tmp *= scaling_factor; - std::get<34>(evals) += typename Accumulator::View(tmp); + std::get<33>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<35, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<34, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_emit_l2_to_l1_msg * (new_term.main_kernel_out_offset - (constants_START_EMIT_L2_TO_L1_MSG_WRITE_OFFSET + new_term.main_emit_l2_to_l1_msg_write_offset))); tmp *= scaling_factor; - std::get<35>(evals) += typename Accumulator::View(tmp); + std::get<34>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<36, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<35, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_first * new_term.main_emit_l2_to_l1_msg_write_offset); tmp *= scaling_factor; - std::get<36>(evals) += typename Accumulator::View(tmp); + std::get<35>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<37, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<36, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_sload * (new_term.main_kernel_out_offset - (constants_START_SLOAD_WRITE_OFFSET + new_term.main_sload_write_offset))); tmp *= scaling_factor; - std::get<37>(evals) += typename Accumulator::View(tmp); + std::get<36>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<38, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<37, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_first * new_term.main_sload_write_offset); tmp *= scaling_factor; - std::get<38>(evals) += typename Accumulator::View(tmp); + std::get<37>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<39, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<38, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_sstore * (new_term.main_kernel_out_offset - (constants_START_SSTORE_WRITE_OFFSET + new_term.main_sstore_write_offset))); tmp *= scaling_factor; - std::get<39>(evals) += typename Accumulator::View(tmp); + std::get<38>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<40, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<39, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_first * new_term.main_sstore_write_offset); tmp *= scaling_factor; - std::get<40>(evals) += typename Accumulator::View(tmp); + std::get<39>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<41, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<40, ContainerOverSubrelations>; auto tmp = (main_KERNEL_INPUT_SELECTORS * (FF(1) - new_term.main_sel_q_kernel_lookup)); tmp *= scaling_factor; - std::get<41>(evals) += typename Accumulator::View(tmp); + std::get<40>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<42, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<41, ContainerOverSubrelations>; auto tmp = (main_KERNEL_OUTPUT_SELECTORS * (FF(1) - new_term.main_sel_q_kernel_output_lookup)); tmp *= scaling_factor; - std::get<42>(evals) += typename Accumulator::View(tmp); + std::get<41>(evals) += typename Accumulator::View(tmp); } } }; @@ -411,48 +401,46 @@ template class kernel : public Relation> { case 10: return "ADDRESS_KERNEL"; case 11: - return "STORAGE_ADDRESS_KERNEL"; - case 12: return "SENDER_KERNEL"; - case 13: + case 12: return "FUNCTION_SELECTOR_KERNEL"; - case 14: + case 13: return "FEE_TRANSACTION_FEE_KERNEL"; - case 15: + case 14: return "IS_STATIC_CALL_KERNEL"; - case 16: + case 15: return "CHAIN_ID_KERNEL"; - case 17: + case 16: return "VERSION_KERNEL"; - case 18: + case 17: return "BLOCK_NUMBER_KERNEL"; - case 19: + case 18: return "TIMESTAMP_KERNEL"; - case 20: + case 19: return "FEE_DA_GAS_KERNEL"; - case 21: + case 20: return "FEE_L2_GAS_KERNEL"; - case 22: + case 21: return "NOTE_HASH_KERNEL_OUTPUT"; - case 24: + case 23: return "EMIT_NOTE_HASH_KERNEL_OUTPUT"; - case 26: + case 25: return "NULLIFIER_EXISTS_KERNEL_OUTPUT"; - case 29: + case 28: return "EMIT_NULLIFIER_KERNEL_OUTPUT"; - case 31: + case 30: return "L1_TO_L2_MSG_EXISTS_KERNEL_OUTPUT"; - case 33: + case 32: return "EMIT_UNENCRYPTED_LOG_KERNEL_OUTPUT"; - case 35: + case 34: return "EMIT_L2_TO_L1_MSGS_KERNEL_OUTPUT"; - case 37: + case 36: return "SLOAD_KERNEL_OUTPUT"; - case 39: + case 38: return "SSTORE_KERNEL_OUTPUT"; - case 41: + case 40: return "KERNEL_INPUT_ACTIVE_CHECK"; - case 42: + case 41: return "KERNEL_OUTPUT_ACTIVE_CHECK"; } return std::to_string(index); diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/main.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/main.hpp index d387d759c7e..8869a0fb847 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/main.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/main.hpp @@ -10,11 +10,10 @@ template class mainImpl { public: using FF = FF_; - static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { - 2, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, 4, 3, 3, 3, 3, 4, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 3, 3, 4, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 2, 2 + static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { + 2, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 5, 4, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 3, 3, 4, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 2, 2 }; template @@ -26,18 +25,16 @@ template class mainImpl { const auto constants_MEM_TAG_FF = FF(0); const auto constants_MEM_TAG_U1 = FF(1); const auto constants_misc_INTERNAL_CALL_SPACE_ID = FF(255); - const auto main_KERNEL_INPUT_SELECTORS = - (((((((((((new_term.main_sel_op_address + new_term.main_sel_op_storage_address) + - new_term.main_sel_op_sender) + - new_term.main_sel_op_function_selector) + - new_term.main_sel_op_transaction_fee) + - new_term.main_sel_op_chain_id) + - new_term.main_sel_op_version) + - new_term.main_sel_op_block_number) + - new_term.main_sel_op_timestamp) + - new_term.main_sel_op_fee_per_l2_gas) + - new_term.main_sel_op_fee_per_da_gas) + - new_term.main_sel_op_is_static_call); + const auto main_KERNEL_INPUT_SELECTORS = ((((((((((new_term.main_sel_op_address + new_term.main_sel_op_sender) + + new_term.main_sel_op_function_selector) + + new_term.main_sel_op_transaction_fee) + + new_term.main_sel_op_chain_id) + + new_term.main_sel_op_version) + + new_term.main_sel_op_block_number) + + new_term.main_sel_op_timestamp) + + new_term.main_sel_op_fee_per_l2_gas) + + new_term.main_sel_op_fee_per_da_gas) + + new_term.main_sel_op_is_static_call); const auto main_KERNEL_OUTPUT_SELECTORS = ((((((((new_term.main_sel_op_note_hash_exists + new_term.main_sel_op_emit_note_hash) + new_term.main_sel_op_nullifier_exists) + @@ -114,672 +111,666 @@ template class mainImpl { } { using Accumulator = typename std::tuple_element_t<4, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_storage_address * (FF(1) - new_term.main_sel_op_storage_address)); + auto tmp = (new_term.main_sel_op_sender * (FF(1) - new_term.main_sel_op_sender)); tmp *= scaling_factor; std::get<4>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<5, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_sender * (FF(1) - new_term.main_sel_op_sender)); + auto tmp = (new_term.main_sel_op_function_selector * (FF(1) - new_term.main_sel_op_function_selector)); tmp *= scaling_factor; std::get<5>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<6, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_function_selector * (FF(1) - new_term.main_sel_op_function_selector)); + auto tmp = (new_term.main_sel_op_transaction_fee * (FF(1) - new_term.main_sel_op_transaction_fee)); tmp *= scaling_factor; std::get<6>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<7, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_transaction_fee * (FF(1) - new_term.main_sel_op_transaction_fee)); + auto tmp = (new_term.main_sel_op_chain_id * (FF(1) - new_term.main_sel_op_chain_id)); tmp *= scaling_factor; std::get<7>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<8, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_chain_id * (FF(1) - new_term.main_sel_op_chain_id)); + auto tmp = (new_term.main_sel_op_version * (FF(1) - new_term.main_sel_op_version)); tmp *= scaling_factor; std::get<8>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<9, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_version * (FF(1) - new_term.main_sel_op_version)); + auto tmp = (new_term.main_sel_op_block_number * (FF(1) - new_term.main_sel_op_block_number)); tmp *= scaling_factor; std::get<9>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<10, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_block_number * (FF(1) - new_term.main_sel_op_block_number)); + auto tmp = (new_term.main_sel_op_timestamp * (FF(1) - new_term.main_sel_op_timestamp)); tmp *= scaling_factor; std::get<10>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<11, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_timestamp * (FF(1) - new_term.main_sel_op_timestamp)); + auto tmp = (new_term.main_sel_op_fee_per_l2_gas * (FF(1) - new_term.main_sel_op_fee_per_l2_gas)); tmp *= scaling_factor; std::get<11>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<12, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_fee_per_l2_gas * (FF(1) - new_term.main_sel_op_fee_per_l2_gas)); + auto tmp = (new_term.main_sel_op_fee_per_da_gas * (FF(1) - new_term.main_sel_op_fee_per_da_gas)); tmp *= scaling_factor; std::get<12>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<13, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_fee_per_da_gas * (FF(1) - new_term.main_sel_op_fee_per_da_gas)); + auto tmp = (new_term.main_sel_op_is_static_call * (FF(1) - new_term.main_sel_op_is_static_call)); tmp *= scaling_factor; std::get<13>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<14, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_is_static_call * (FF(1) - new_term.main_sel_op_is_static_call)); + auto tmp = (new_term.main_sel_op_l2gasleft * (FF(1) - new_term.main_sel_op_l2gasleft)); tmp *= scaling_factor; std::get<14>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<15, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_l2gasleft * (FF(1) - new_term.main_sel_op_l2gasleft)); + auto tmp = (new_term.main_sel_op_dagasleft * (FF(1) - new_term.main_sel_op_dagasleft)); tmp *= scaling_factor; std::get<15>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<16, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_dagasleft * (FF(1) - new_term.main_sel_op_dagasleft)); + auto tmp = (new_term.main_sel_op_note_hash_exists * (FF(1) - new_term.main_sel_op_note_hash_exists)); tmp *= scaling_factor; std::get<16>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<17, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_note_hash_exists * (FF(1) - new_term.main_sel_op_note_hash_exists)); + auto tmp = (new_term.main_sel_op_emit_note_hash * (FF(1) - new_term.main_sel_op_emit_note_hash)); tmp *= scaling_factor; std::get<17>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<18, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_emit_note_hash * (FF(1) - new_term.main_sel_op_emit_note_hash)); + auto tmp = (new_term.main_sel_op_nullifier_exists * (FF(1) - new_term.main_sel_op_nullifier_exists)); tmp *= scaling_factor; std::get<18>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<19, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_nullifier_exists * (FF(1) - new_term.main_sel_op_nullifier_exists)); + auto tmp = (new_term.main_sel_op_emit_nullifier * (FF(1) - new_term.main_sel_op_emit_nullifier)); tmp *= scaling_factor; std::get<19>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<20, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_emit_nullifier * (FF(1) - new_term.main_sel_op_emit_nullifier)); + auto tmp = (new_term.main_sel_op_l1_to_l2_msg_exists * (FF(1) - new_term.main_sel_op_l1_to_l2_msg_exists)); tmp *= scaling_factor; std::get<20>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<21, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_l1_to_l2_msg_exists * (FF(1) - new_term.main_sel_op_l1_to_l2_msg_exists)); + auto tmp = + (new_term.main_sel_op_emit_unencrypted_log * (FF(1) - new_term.main_sel_op_emit_unencrypted_log)); tmp *= scaling_factor; std::get<21>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<22, ContainerOverSubrelations>; - auto tmp = - (new_term.main_sel_op_emit_unencrypted_log * (FF(1) - new_term.main_sel_op_emit_unencrypted_log)); + auto tmp = (new_term.main_sel_op_emit_l2_to_l1_msg * (FF(1) - new_term.main_sel_op_emit_l2_to_l1_msg)); tmp *= scaling_factor; std::get<22>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<23, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_emit_l2_to_l1_msg * (FF(1) - new_term.main_sel_op_emit_l2_to_l1_msg)); + auto tmp = + (new_term.main_sel_op_get_contract_instance * (FF(1) - new_term.main_sel_op_get_contract_instance)); tmp *= scaling_factor; std::get<23>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<24, ContainerOverSubrelations>; - auto tmp = - (new_term.main_sel_op_get_contract_instance * (FF(1) - new_term.main_sel_op_get_contract_instance)); + auto tmp = (new_term.main_sel_op_sload * (FF(1) - new_term.main_sel_op_sload)); tmp *= scaling_factor; std::get<24>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<25, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_sload * (FF(1) - new_term.main_sel_op_sload)); + auto tmp = (new_term.main_sel_op_sstore * (FF(1) - new_term.main_sel_op_sstore)); tmp *= scaling_factor; std::get<25>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<26, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_sstore * (FF(1) - new_term.main_sel_op_sstore)); + auto tmp = (new_term.main_sel_op_radix_le * (FF(1) - new_term.main_sel_op_radix_le)); tmp *= scaling_factor; std::get<26>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<27, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_radix_le * (FF(1) - new_term.main_sel_op_radix_le)); + auto tmp = (new_term.main_sel_op_sha256 * (FF(1) - new_term.main_sel_op_sha256)); tmp *= scaling_factor; std::get<27>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<28, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_sha256 * (FF(1) - new_term.main_sel_op_sha256)); + auto tmp = (new_term.main_sel_op_poseidon2 * (FF(1) - new_term.main_sel_op_poseidon2)); tmp *= scaling_factor; std::get<28>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<29, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_poseidon2 * (FF(1) - new_term.main_sel_op_poseidon2)); + auto tmp = (new_term.main_sel_op_keccak * (FF(1) - new_term.main_sel_op_keccak)); tmp *= scaling_factor; std::get<29>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<30, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_keccak * (FF(1) - new_term.main_sel_op_keccak)); + auto tmp = (new_term.main_sel_op_ecadd * (FF(1) - new_term.main_sel_op_ecadd)); tmp *= scaling_factor; std::get<30>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<31, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_ecadd * (FF(1) - new_term.main_sel_op_ecadd)); + auto tmp = (new_term.main_sel_op_msm * (FF(1) - new_term.main_sel_op_msm)); tmp *= scaling_factor; std::get<31>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<32, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_msm * (FF(1) - new_term.main_sel_op_msm)); + auto tmp = (new_term.main_sel_op_add * (FF(1) - new_term.main_sel_op_add)); tmp *= scaling_factor; std::get<32>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<33, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_add * (FF(1) - new_term.main_sel_op_add)); + auto tmp = (new_term.main_sel_op_sub * (FF(1) - new_term.main_sel_op_sub)); tmp *= scaling_factor; std::get<33>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<34, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_sub * (FF(1) - new_term.main_sel_op_sub)); + auto tmp = (new_term.main_sel_op_mul * (FF(1) - new_term.main_sel_op_mul)); tmp *= scaling_factor; std::get<34>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<35, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_mul * (FF(1) - new_term.main_sel_op_mul)); + auto tmp = (new_term.main_sel_op_div * (FF(1) - new_term.main_sel_op_div)); tmp *= scaling_factor; std::get<35>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<36, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_div * (FF(1) - new_term.main_sel_op_div)); + auto tmp = (new_term.main_sel_op_fdiv * (FF(1) - new_term.main_sel_op_fdiv)); tmp *= scaling_factor; std::get<36>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<37, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_fdiv * (FF(1) - new_term.main_sel_op_fdiv)); + auto tmp = (new_term.main_sel_op_not * (FF(1) - new_term.main_sel_op_not)); tmp *= scaling_factor; std::get<37>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<38, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_not * (FF(1) - new_term.main_sel_op_not)); + auto tmp = (new_term.main_sel_op_eq * (FF(1) - new_term.main_sel_op_eq)); tmp *= scaling_factor; std::get<38>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<39, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_eq * (FF(1) - new_term.main_sel_op_eq)); + auto tmp = (new_term.main_sel_op_and * (FF(1) - new_term.main_sel_op_and)); tmp *= scaling_factor; std::get<39>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<40, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_and * (FF(1) - new_term.main_sel_op_and)); + auto tmp = (new_term.main_sel_op_or * (FF(1) - new_term.main_sel_op_or)); tmp *= scaling_factor; std::get<40>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<41, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_or * (FF(1) - new_term.main_sel_op_or)); + auto tmp = (new_term.main_sel_op_xor * (FF(1) - new_term.main_sel_op_xor)); tmp *= scaling_factor; std::get<41>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<42, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_xor * (FF(1) - new_term.main_sel_op_xor)); + auto tmp = (new_term.main_sel_op_cast * (FF(1) - new_term.main_sel_op_cast)); tmp *= scaling_factor; std::get<42>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<43, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_cast * (FF(1) - new_term.main_sel_op_cast)); + auto tmp = (new_term.main_sel_op_lt * (FF(1) - new_term.main_sel_op_lt)); tmp *= scaling_factor; std::get<43>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<44, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_lt * (FF(1) - new_term.main_sel_op_lt)); + auto tmp = (new_term.main_sel_op_lte * (FF(1) - new_term.main_sel_op_lte)); tmp *= scaling_factor; std::get<44>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<45, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_lte * (FF(1) - new_term.main_sel_op_lte)); + auto tmp = (new_term.main_sel_op_shl * (FF(1) - new_term.main_sel_op_shl)); tmp *= scaling_factor; std::get<45>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<46, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_shl * (FF(1) - new_term.main_sel_op_shl)); + auto tmp = (new_term.main_sel_op_shr * (FF(1) - new_term.main_sel_op_shr)); tmp *= scaling_factor; std::get<46>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<47, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_shr * (FF(1) - new_term.main_sel_op_shr)); + auto tmp = (new_term.main_sel_op_internal_call * (FF(1) - new_term.main_sel_op_internal_call)); tmp *= scaling_factor; std::get<47>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<48, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_internal_call * (FF(1) - new_term.main_sel_op_internal_call)); + auto tmp = (new_term.main_sel_op_internal_return * (FF(1) - new_term.main_sel_op_internal_return)); tmp *= scaling_factor; std::get<48>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<49, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_internal_return * (FF(1) - new_term.main_sel_op_internal_return)); + auto tmp = (new_term.main_sel_op_jump * (FF(1) - new_term.main_sel_op_jump)); tmp *= scaling_factor; std::get<49>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<50, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_jump * (FF(1) - new_term.main_sel_op_jump)); + auto tmp = (new_term.main_sel_op_jumpi * (FF(1) - new_term.main_sel_op_jumpi)); tmp *= scaling_factor; std::get<50>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<51, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_jumpi * (FF(1) - new_term.main_sel_op_jumpi)); + auto tmp = (new_term.main_sel_op_external_call * (FF(1) - new_term.main_sel_op_external_call)); tmp *= scaling_factor; std::get<51>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<52, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_external_call * (FF(1) - new_term.main_sel_op_external_call)); + auto tmp = (new_term.main_sel_op_static_call * (FF(1) - new_term.main_sel_op_static_call)); tmp *= scaling_factor; std::get<52>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<53, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_static_call * (FF(1) - new_term.main_sel_op_static_call)); + auto tmp = (new_term.main_sel_op_calldata_copy * (FF(1) - new_term.main_sel_op_calldata_copy)); tmp *= scaling_factor; std::get<53>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<54, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_calldata_copy * (FF(1) - new_term.main_sel_op_calldata_copy)); + auto tmp = (new_term.main_sel_op_external_return * (FF(1) - new_term.main_sel_op_external_return)); tmp *= scaling_factor; std::get<54>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<55, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_external_return * (FF(1) - new_term.main_sel_op_external_return)); + auto tmp = (new_term.main_sel_op_external_revert * (FF(1) - new_term.main_sel_op_external_revert)); tmp *= scaling_factor; std::get<55>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<56, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_external_revert * (FF(1) - new_term.main_sel_op_external_revert)); + auto tmp = (new_term.main_sel_op_set * (FF(1) - new_term.main_sel_op_set)); tmp *= scaling_factor; std::get<56>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<57, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_set * (FF(1) - new_term.main_sel_op_set)); + auto tmp = (new_term.main_sel_op_mov * (FF(1) - new_term.main_sel_op_mov)); tmp *= scaling_factor; std::get<57>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<58, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_mov * (FF(1) - new_term.main_sel_op_mov)); + auto tmp = (new_term.main_op_err * (FF(1) - new_term.main_op_err)); tmp *= scaling_factor; std::get<58>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<59, ContainerOverSubrelations>; - auto tmp = (new_term.main_op_err * (FF(1) - new_term.main_op_err)); + auto tmp = (new_term.main_tag_err * (FF(1) - new_term.main_tag_err)); tmp *= scaling_factor; std::get<59>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<60, ContainerOverSubrelations>; - auto tmp = (new_term.main_tag_err * (FF(1) - new_term.main_tag_err)); + auto tmp = (new_term.main_id_zero * (FF(1) - new_term.main_id_zero)); tmp *= scaling_factor; std::get<60>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<61, ContainerOverSubrelations>; - auto tmp = (new_term.main_id_zero * (FF(1) - new_term.main_id_zero)); + auto tmp = (new_term.main_sel_mem_op_a * (FF(1) - new_term.main_sel_mem_op_a)); tmp *= scaling_factor; std::get<61>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<62, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_mem_op_a * (FF(1) - new_term.main_sel_mem_op_a)); + auto tmp = (new_term.main_sel_mem_op_b * (FF(1) - new_term.main_sel_mem_op_b)); tmp *= scaling_factor; std::get<62>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<63, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_mem_op_b * (FF(1) - new_term.main_sel_mem_op_b)); + auto tmp = (new_term.main_sel_mem_op_c * (FF(1) - new_term.main_sel_mem_op_c)); tmp *= scaling_factor; std::get<63>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<64, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_mem_op_c * (FF(1) - new_term.main_sel_mem_op_c)); + auto tmp = (new_term.main_sel_mem_op_d * (FF(1) - new_term.main_sel_mem_op_d)); tmp *= scaling_factor; std::get<64>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<65, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_mem_op_d * (FF(1) - new_term.main_sel_mem_op_d)); + auto tmp = (new_term.main_rwa * (FF(1) - new_term.main_rwa)); tmp *= scaling_factor; std::get<65>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<66, ContainerOverSubrelations>; - auto tmp = (new_term.main_rwa * (FF(1) - new_term.main_rwa)); + auto tmp = (new_term.main_rwb * (FF(1) - new_term.main_rwb)); tmp *= scaling_factor; std::get<66>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<67, ContainerOverSubrelations>; - auto tmp = (new_term.main_rwb * (FF(1) - new_term.main_rwb)); + auto tmp = (new_term.main_rwc * (FF(1) - new_term.main_rwc)); tmp *= scaling_factor; std::get<67>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<68, ContainerOverSubrelations>; - auto tmp = (new_term.main_rwc * (FF(1) - new_term.main_rwc)); + auto tmp = (new_term.main_rwd * (FF(1) - new_term.main_rwd)); tmp *= scaling_factor; std::get<68>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<69, ContainerOverSubrelations>; - auto tmp = (new_term.main_rwd * (FF(1) - new_term.main_rwd)); + auto tmp = (new_term.main_sel_resolve_ind_addr_a * (FF(1) - new_term.main_sel_resolve_ind_addr_a)); tmp *= scaling_factor; std::get<69>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<70, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_resolve_ind_addr_a * (FF(1) - new_term.main_sel_resolve_ind_addr_a)); + auto tmp = (new_term.main_sel_resolve_ind_addr_b * (FF(1) - new_term.main_sel_resolve_ind_addr_b)); tmp *= scaling_factor; std::get<70>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<71, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_resolve_ind_addr_b * (FF(1) - new_term.main_sel_resolve_ind_addr_b)); + auto tmp = (new_term.main_sel_resolve_ind_addr_c * (FF(1) - new_term.main_sel_resolve_ind_addr_c)); tmp *= scaling_factor; std::get<71>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<72, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_resolve_ind_addr_c * (FF(1) - new_term.main_sel_resolve_ind_addr_c)); + auto tmp = (new_term.main_sel_resolve_ind_addr_d * (FF(1) - new_term.main_sel_resolve_ind_addr_d)); tmp *= scaling_factor; std::get<72>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<73, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_resolve_ind_addr_d * (FF(1) - new_term.main_sel_resolve_ind_addr_d)); + auto tmp = (((new_term.main_sel_op_eq + new_term.main_sel_op_lte) + new_term.main_sel_op_lt) * + (new_term.main_w_in_tag - constants_MEM_TAG_U1)); tmp *= scaling_factor; std::get<73>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<74, ContainerOverSubrelations>; - auto tmp = (((new_term.main_sel_op_eq + new_term.main_sel_op_lte) + new_term.main_sel_op_lt) * - (new_term.main_w_in_tag - constants_MEM_TAG_U1)); + auto tmp = ((new_term.main_sel_op_fdiv * (FF(1) - new_term.main_op_err)) * + ((new_term.main_ic * new_term.main_ib) - new_term.main_ia)); tmp *= scaling_factor; std::get<74>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<75, ContainerOverSubrelations>; - auto tmp = ((new_term.main_sel_op_fdiv * (FF(1) - new_term.main_op_err)) * - ((new_term.main_ic * new_term.main_ib) - new_term.main_ia)); + auto tmp = ((new_term.main_sel_op_fdiv + new_term.main_sel_op_div) * + (((new_term.main_ib * new_term.main_inv) - FF(1)) + new_term.main_op_err)); tmp *= scaling_factor; std::get<75>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<76, ContainerOverSubrelations>; - auto tmp = ((new_term.main_sel_op_fdiv + new_term.main_sel_op_div) * - (((new_term.main_ib * new_term.main_inv) - FF(1)) + new_term.main_op_err)); + auto tmp = (((new_term.main_sel_op_fdiv + new_term.main_sel_op_div) * new_term.main_op_err) * + (FF(1) - new_term.main_inv)); tmp *= scaling_factor; std::get<76>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<77, ContainerOverSubrelations>; - auto tmp = (((new_term.main_sel_op_fdiv + new_term.main_sel_op_div) * new_term.main_op_err) * - (FF(1) - new_term.main_inv)); + auto tmp = (new_term.main_sel_op_fdiv * (new_term.main_r_in_tag - constants_MEM_TAG_FF)); tmp *= scaling_factor; std::get<77>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<78, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_fdiv * (new_term.main_r_in_tag - constants_MEM_TAG_FF)); + auto tmp = (new_term.main_sel_op_fdiv * (new_term.main_w_in_tag - constants_MEM_TAG_FF)); tmp *= scaling_factor; std::get<78>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<79, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_fdiv * (new_term.main_w_in_tag - constants_MEM_TAG_FF)); + auto tmp = (new_term.main_op_err * ((new_term.main_sel_op_fdiv + new_term.main_sel_op_div) - FF(1))); tmp *= scaling_factor; std::get<79>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<80, ContainerOverSubrelations>; - auto tmp = (new_term.main_op_err * ((new_term.main_sel_op_fdiv + new_term.main_sel_op_div) - FF(1))); + auto tmp = (new_term.main_sel_op_jump * (new_term.main_pc_shift - new_term.main_ia)); tmp *= scaling_factor; std::get<80>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<81, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_jump * (new_term.main_pc_shift - new_term.main_ia)); + auto tmp = (new_term.main_sel_op_jumpi * + (((FF(1) - new_term.main_id_zero) * (new_term.main_pc_shift - new_term.main_ia)) + + (new_term.main_id_zero * ((new_term.main_pc_shift - new_term.main_pc) - FF(1))))); tmp *= scaling_factor; std::get<81>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<82, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_jumpi * - (((FF(1) - new_term.main_id_zero) * (new_term.main_pc_shift - new_term.main_ia)) + - (new_term.main_id_zero * ((new_term.main_pc_shift - new_term.main_pc) - FF(1))))); + auto tmp = (new_term.main_sel_op_internal_call * + (new_term.main_internal_return_ptr_shift - (new_term.main_internal_return_ptr + FF(1)))); tmp *= scaling_factor; std::get<82>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<83, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_internal_call * - (new_term.main_internal_return_ptr_shift - (new_term.main_internal_return_ptr + FF(1)))); + auto tmp = + (new_term.main_sel_op_internal_call * (new_term.main_internal_return_ptr - new_term.main_mem_addr_b)); tmp *= scaling_factor; std::get<83>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<84, ContainerOverSubrelations>; - auto tmp = - (new_term.main_sel_op_internal_call * (new_term.main_internal_return_ptr - new_term.main_mem_addr_b)); + auto tmp = (new_term.main_sel_op_internal_call * (new_term.main_pc_shift - new_term.main_ia)); tmp *= scaling_factor; std::get<84>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<85, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_internal_call * (new_term.main_pc_shift - new_term.main_ia)); + auto tmp = (new_term.main_sel_op_internal_call * ((new_term.main_pc + FF(1)) - new_term.main_ib)); tmp *= scaling_factor; std::get<85>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<86, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_internal_call * ((new_term.main_pc + FF(1)) - new_term.main_ib)); + auto tmp = (new_term.main_sel_op_internal_call * (new_term.main_rwb - FF(1))); tmp *= scaling_factor; std::get<86>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<87, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_internal_call * (new_term.main_rwb - FF(1))); + auto tmp = (new_term.main_sel_op_internal_call * (new_term.main_sel_mem_op_b - FF(1))); tmp *= scaling_factor; std::get<87>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<88, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_internal_call * (new_term.main_sel_mem_op_b - FF(1))); + auto tmp = (new_term.main_sel_op_internal_return * + (new_term.main_internal_return_ptr_shift - (new_term.main_internal_return_ptr - FF(1)))); tmp *= scaling_factor; std::get<88>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<89, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_op_internal_return * - (new_term.main_internal_return_ptr_shift - (new_term.main_internal_return_ptr - FF(1)))); + ((new_term.main_internal_return_ptr - FF(1)) - new_term.main_mem_addr_a)); tmp *= scaling_factor; std::get<89>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<90, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_internal_return * - ((new_term.main_internal_return_ptr - FF(1)) - new_term.main_mem_addr_a)); + auto tmp = (new_term.main_sel_op_internal_return * (new_term.main_pc_shift - new_term.main_ia)); tmp *= scaling_factor; std::get<90>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<91, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_internal_return * (new_term.main_pc_shift - new_term.main_ia)); + auto tmp = (new_term.main_sel_op_internal_return * new_term.main_rwa); tmp *= scaling_factor; std::get<91>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<92, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_internal_return * new_term.main_rwa); + auto tmp = (new_term.main_sel_op_internal_return * (new_term.main_sel_mem_op_a - FF(1))); tmp *= scaling_factor; std::get<92>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<93, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_internal_return * (new_term.main_sel_mem_op_a - FF(1))); + auto tmp = ((main_CUR_AND_NEXT_ARE_MAIN * (FF(1) - main_SEL_ALL_CTRL_FLOW)) * + (new_term.main_pc_shift - (new_term.main_pc + FF(1)))); tmp *= scaling_factor; std::get<93>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<94, ContainerOverSubrelations>; auto tmp = ((main_CUR_AND_NEXT_ARE_MAIN * (FF(1) - main_SEL_ALL_CTRL_FLOW)) * - (new_term.main_pc_shift - (new_term.main_pc + FF(1)))); + (new_term.main_internal_return_ptr_shift - new_term.main_internal_return_ptr)); tmp *= scaling_factor; std::get<94>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<95, ContainerOverSubrelations>; - auto tmp = ((main_CUR_AND_NEXT_ARE_MAIN * (FF(1) - main_SEL_ALL_CTRL_FLOW)) * - (new_term.main_internal_return_ptr_shift - new_term.main_internal_return_ptr)); + auto tmp = ((new_term.main_sel_op_internal_call + new_term.main_sel_op_internal_return) * + (new_term.main_space_id - constants_misc_INTERNAL_CALL_SPACE_ID)); tmp *= scaling_factor; std::get<95>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<96, ContainerOverSubrelations>; - auto tmp = ((new_term.main_sel_op_internal_call + new_term.main_sel_op_internal_return) * - (new_term.main_space_id - constants_misc_INTERNAL_CALL_SPACE_ID)); + auto tmp = (((FF(1) - new_term.main_sel_op_internal_call) - new_term.main_sel_op_internal_return) * + (new_term.main_call_ptr - new_term.main_space_id)); tmp *= scaling_factor; std::get<96>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<97, ContainerOverSubrelations>; - auto tmp = (((FF(1) - new_term.main_sel_op_internal_call) - new_term.main_sel_op_internal_return) * - (new_term.main_call_ptr - new_term.main_space_id)); + auto tmp = (new_term.main_sel_op_jumpi * + (((new_term.main_id * new_term.main_inv) - FF(1)) + new_term.main_id_zero)); tmp *= scaling_factor; std::get<97>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<98, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_jumpi * - (((new_term.main_id * new_term.main_inv) - FF(1)) + new_term.main_id_zero)); + auto tmp = ((new_term.main_sel_op_jumpi * new_term.main_id_zero) * (FF(1) - new_term.main_inv)); tmp *= scaling_factor; std::get<98>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<99, ContainerOverSubrelations>; - auto tmp = ((new_term.main_sel_op_jumpi * new_term.main_id_zero) * (FF(1) - new_term.main_inv)); + auto tmp = (new_term.main_sel_mov_ia_to_ic - (new_term.main_sel_op_mov * (FF(1) - new_term.main_id_zero))); tmp *= scaling_factor; std::get<99>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<100, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_mov_ia_to_ic - (new_term.main_sel_op_mov * (FF(1) - new_term.main_id_zero))); + auto tmp = (new_term.main_sel_mov_ia_to_ic * (new_term.main_ia - new_term.main_ic)); tmp *= scaling_factor; std::get<100>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<101, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_mov_ia_to_ic * (new_term.main_ia - new_term.main_ic)); + auto tmp = (new_term.main_sel_mov_ib_to_ic * (new_term.main_ib - new_term.main_ic)); tmp *= scaling_factor; std::get<101>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<102, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_mov_ib_to_ic * (new_term.main_ib - new_term.main_ic)); + auto tmp = (new_term.main_sel_op_mov * (new_term.main_r_in_tag - new_term.main_w_in_tag)); tmp *= scaling_factor; std::get<102>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<103, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_mov * (new_term.main_r_in_tag - new_term.main_w_in_tag)); + auto tmp = (new_term.main_sel_alu - + ((main_SEL_ALL_ALU * (FF(1) - new_term.main_tag_err)) * (FF(1) - new_term.main_op_err))); tmp *= scaling_factor; std::get<103>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<104, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_alu - - ((main_SEL_ALL_ALU * (FF(1) - new_term.main_tag_err)) * (FF(1) - new_term.main_op_err))); + auto tmp = (main_SEL_ALU_R_TAG * (new_term.main_alu_in_tag - new_term.main_r_in_tag)); tmp *= scaling_factor; std::get<104>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<105, ContainerOverSubrelations>; - auto tmp = (main_SEL_ALU_R_TAG * (new_term.main_alu_in_tag - new_term.main_r_in_tag)); + auto tmp = (main_SEL_ALU_W_TAG * (new_term.main_alu_in_tag - new_term.main_w_in_tag)); tmp *= scaling_factor; std::get<105>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<106, ContainerOverSubrelations>; - auto tmp = (main_SEL_ALU_W_TAG * (new_term.main_alu_in_tag - new_term.main_w_in_tag)); + auto tmp = (new_term.main_sel_op_l2gasleft * (new_term.main_ia - new_term.main_l2_gas_remaining_shift)); tmp *= scaling_factor; std::get<106>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<107, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_l2gasleft * (new_term.main_ia - new_term.main_l2_gas_remaining_shift)); + auto tmp = (new_term.main_sel_op_dagasleft * (new_term.main_ia - new_term.main_da_gas_remaining_shift)); tmp *= scaling_factor; std::get<107>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<108, ContainerOverSubrelations>; - auto tmp = (new_term.main_sel_op_dagasleft * (new_term.main_ia - new_term.main_da_gas_remaining_shift)); - tmp *= scaling_factor; - std::get<108>(evals) += typename Accumulator::View(tmp); - } - { - using Accumulator = typename std::tuple_element_t<109, ContainerOverSubrelations>; auto tmp = ((new_term.main_ib * (FF(1) - new_term.main_tag_err)) * ((new_term.main_sel_op_calldata_copy + new_term.main_sel_op_external_return) - new_term.main_sel_slice_gadget)); tmp *= scaling_factor; - std::get<109>(evals) += typename Accumulator::View(tmp); + std::get<108>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<110, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<109, ContainerOverSubrelations>; auto tmp = (new_term.main_bin_op_id - (new_term.main_sel_op_or + (FF(2) * new_term.main_sel_op_xor))); tmp *= scaling_factor; - std::get<110>(evals) += typename Accumulator::View(tmp); + std::get<109>(evals) += typename Accumulator::View(tmp); } { - using Accumulator = typename std::tuple_element_t<111, ContainerOverSubrelations>; + using Accumulator = typename std::tuple_element_t<110, ContainerOverSubrelations>; auto tmp = (new_term.main_sel_bin - ((new_term.main_sel_op_and + new_term.main_sel_op_or) + new_term.main_sel_op_xor)); tmp *= scaling_factor; - std::get<111>(evals) += typename Accumulator::View(tmp); + std::get<110>(evals) += typename Accumulator::View(tmp); } } }; @@ -793,53 +784,53 @@ template class main : public Relation> { switch (index) { case 0: return "OPCODE_SELECTORS"; - case 74: + case 73: return "OUTPUT_U1"; - case 75: + case 74: return "SUBOP_FDIV"; - case 76: + case 75: return "SUBOP_FDIV_ZERO_ERR1"; - case 77: + case 76: return "SUBOP_FDIV_ZERO_ERR2"; - case 78: + case 77: return "SUBOP_FDIV_R_IN_TAG_FF"; - case 79: + case 78: return "SUBOP_FDIV_W_IN_TAG_FF"; - case 80: + case 79: return "SUBOP_ERROR_RELEVANT_OP"; - case 81: + case 80: return "PC_JUMP"; - case 82: + case 81: return "PC_JUMPI"; - case 83: + case 82: return "RETURN_POINTER_INCREMENT"; - case 89: + case 88: return "RETURN_POINTER_DECREMENT"; - case 94: + case 93: return "PC_INCREMENT"; - case 95: + case 94: return "INTERNAL_RETURN_POINTER_CONSISTENCY"; - case 96: + case 95: return "SPACE_ID_INTERNAL"; - case 97: + case 96: return "SPACE_ID_STANDARD_OPCODES"; - case 98: + case 97: return "JMP_CONDITION_RES_1"; - case 99: + case 98: return "JMP_CONDITION_RES_2"; - case 101: + case 100: return "MOV_SAME_VALUE_A"; - case 102: + case 101: return "MOV_SAME_VALUE_B"; - case 103: + case 102: return "MOV_MAIN_SAME_TAG"; - case 107: + case 106: return "L2GASLEFT"; - case 108: + case 107: return "DAGASLEFT"; - case 110: + case 109: return "BIN_SEL_1"; - case 111: + case 110: return "BIN_SEL_2"; } return std::to_string(index); diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos2_fixed_pos2_perm.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos2_fixed_pos2_perm.hpp new file mode 100644 index 00000000000..9eba290a6c8 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos2_fixed_pos2_perm.hpp @@ -0,0 +1,83 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" + +#include +#include + +namespace bb { + +class perm_pos2_fixed_pos2_perm_permutation_settings { + public: + // This constant defines how many columns are bundled together to form each set. + constexpr static size_t COLUMNS_PER_SET = 9; + + template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) + { + return (in.poseidon2_full_sel_poseidon == 1 || in.poseidon2_sel_poseidon_perm_immediate == 1); + } + + template static inline auto get_const_entities(const AllEntities& in) + { + return std::forward_as_tuple(in.perm_pos2_fixed_pos2_perm_inv, + in.poseidon2_full_sel_poseidon, + in.poseidon2_full_sel_poseidon, + in.poseidon2_sel_poseidon_perm_immediate, + in.poseidon2_full_clk, + in.poseidon2_full_a_0, + in.poseidon2_full_a_1, + in.poseidon2_full_a_2, + in.poseidon2_full_a_3, + in.poseidon2_full_b_0, + in.poseidon2_full_b_1, + in.poseidon2_full_b_2, + in.poseidon2_full_b_3, + in.poseidon2_clk, + in.poseidon2_a_0, + in.poseidon2_a_1, + in.poseidon2_a_2, + in.poseidon2_a_3, + in.poseidon2_b_0, + in.poseidon2_b_1, + in.poseidon2_b_2, + in.poseidon2_b_3); + } + + template static inline auto get_nonconst_entities(AllEntities& in) + { + return std::forward_as_tuple(in.perm_pos2_fixed_pos2_perm_inv, + in.poseidon2_full_sel_poseidon, + in.poseidon2_full_sel_poseidon, + in.poseidon2_sel_poseidon_perm_immediate, + in.poseidon2_full_clk, + in.poseidon2_full_a_0, + in.poseidon2_full_a_1, + in.poseidon2_full_a_2, + in.poseidon2_full_a_3, + in.poseidon2_full_b_0, + in.poseidon2_full_b_1, + in.poseidon2_full_b_2, + in.poseidon2_full_b_3, + in.poseidon2_clk, + in.poseidon2_a_0, + in.poseidon2_a_1, + in.poseidon2_a_2, + in.poseidon2_a_3, + in.poseidon2_b_0, + in.poseidon2_b_1, + in.poseidon2_b_2, + in.poseidon2_b_3); + } +}; + +template +class perm_pos2_fixed_pos2_perm_relation + : public GenericPermutationRelation { + public: + static constexpr const char* NAME = "PERM_POS2_FIXED_POS2_PERM"; +}; +template +using perm_pos2_fixed_pos2_perm = GenericPermutation; + +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_a.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_a.hpp index 8b13fd79341..65ff522c5f9 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_a.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_a.hpp @@ -15,14 +15,14 @@ class perm_pos_mem_read_a_permutation_settings { template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { - return (in.poseidon2_sel_poseidon_perm == 1 || in.mem_sel_op_poseidon_read_a == 1); + return (in.poseidon2_sel_poseidon_perm_mem_op == 1 || in.mem_sel_op_poseidon_read_a == 1); } template static inline auto get_const_entities(const AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_read_a_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_read_a, in.poseidon2_clk, in.poseidon2_space_id, @@ -39,8 +39,8 @@ class perm_pos_mem_read_a_permutation_settings { template static inline auto get_nonconst_entities(AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_read_a_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_read_a, in.poseidon2_clk, in.poseidon2_space_id, diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_b.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_b.hpp index e30bf25fecb..11a5994172e 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_b.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_b.hpp @@ -15,14 +15,14 @@ class perm_pos_mem_read_b_permutation_settings { template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { - return (in.poseidon2_sel_poseidon_perm == 1 || in.mem_sel_op_poseidon_read_b == 1); + return (in.poseidon2_sel_poseidon_perm_mem_op == 1 || in.mem_sel_op_poseidon_read_b == 1); } template static inline auto get_const_entities(const AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_read_b_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_read_b, in.poseidon2_clk, in.poseidon2_space_id, @@ -39,8 +39,8 @@ class perm_pos_mem_read_b_permutation_settings { template static inline auto get_nonconst_entities(AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_read_b_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_read_b, in.poseidon2_clk, in.poseidon2_space_id, diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_c.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_c.hpp index c228ef2707e..15eb3374b9e 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_c.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_c.hpp @@ -15,14 +15,14 @@ class perm_pos_mem_read_c_permutation_settings { template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { - return (in.poseidon2_sel_poseidon_perm == 1 || in.mem_sel_op_poseidon_read_c == 1); + return (in.poseidon2_sel_poseidon_perm_mem_op == 1 || in.mem_sel_op_poseidon_read_c == 1); } template static inline auto get_const_entities(const AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_read_c_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_read_c, in.poseidon2_clk, in.poseidon2_space_id, @@ -39,8 +39,8 @@ class perm_pos_mem_read_c_permutation_settings { template static inline auto get_nonconst_entities(AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_read_c_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_read_c, in.poseidon2_clk, in.poseidon2_space_id, diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_d.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_d.hpp index 1ae2f45e493..a50d7dbeb00 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_d.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_read_d.hpp @@ -15,14 +15,14 @@ class perm_pos_mem_read_d_permutation_settings { template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { - return (in.poseidon2_sel_poseidon_perm == 1 || in.mem_sel_op_poseidon_read_d == 1); + return (in.poseidon2_sel_poseidon_perm_mem_op == 1 || in.mem_sel_op_poseidon_read_d == 1); } template static inline auto get_const_entities(const AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_read_d_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_read_d, in.poseidon2_clk, in.poseidon2_space_id, @@ -39,8 +39,8 @@ class perm_pos_mem_read_d_permutation_settings { template static inline auto get_nonconst_entities(AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_read_d_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_read_d, in.poseidon2_clk, in.poseidon2_space_id, diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_a.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_a.hpp index 1701904f286..696b7f0a94c 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_a.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_a.hpp @@ -15,14 +15,14 @@ class perm_pos_mem_write_a_permutation_settings { template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { - return (in.poseidon2_sel_poseidon_perm == 1 || in.mem_sel_op_poseidon_write_a == 1); + return (in.poseidon2_sel_poseidon_perm_mem_op == 1 || in.mem_sel_op_poseidon_write_a == 1); } template static inline auto get_const_entities(const AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_write_a_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_write_a, in.poseidon2_clk, in.poseidon2_space_id, @@ -39,8 +39,8 @@ class perm_pos_mem_write_a_permutation_settings { template static inline auto get_nonconst_entities(AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_write_a_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_write_a, in.poseidon2_clk, in.poseidon2_space_id, diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_b.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_b.hpp index d516072c318..293e01ee1e1 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_b.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_b.hpp @@ -15,14 +15,14 @@ class perm_pos_mem_write_b_permutation_settings { template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { - return (in.poseidon2_sel_poseidon_perm == 1 || in.mem_sel_op_poseidon_write_b == 1); + return (in.poseidon2_sel_poseidon_perm_mem_op == 1 || in.mem_sel_op_poseidon_write_b == 1); } template static inline auto get_const_entities(const AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_write_b_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_write_b, in.poseidon2_clk, in.poseidon2_space_id, @@ -39,8 +39,8 @@ class perm_pos_mem_write_b_permutation_settings { template static inline auto get_nonconst_entities(AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_write_b_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_write_b, in.poseidon2_clk, in.poseidon2_space_id, diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_c.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_c.hpp index 352efe17030..e21fc3381c3 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_c.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_c.hpp @@ -15,14 +15,14 @@ class perm_pos_mem_write_c_permutation_settings { template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { - return (in.poseidon2_sel_poseidon_perm == 1 || in.mem_sel_op_poseidon_write_c == 1); + return (in.poseidon2_sel_poseidon_perm_mem_op == 1 || in.mem_sel_op_poseidon_write_c == 1); } template static inline auto get_const_entities(const AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_write_c_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_write_c, in.poseidon2_clk, in.poseidon2_space_id, @@ -39,8 +39,8 @@ class perm_pos_mem_write_c_permutation_settings { template static inline auto get_nonconst_entities(AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_write_c_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_write_c, in.poseidon2_clk, in.poseidon2_space_id, diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_d.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_d.hpp index 0f8e34f9365..182752c65fa 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_d.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/perm_pos_mem_write_d.hpp @@ -15,14 +15,14 @@ class perm_pos_mem_write_d_permutation_settings { template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { - return (in.poseidon2_sel_poseidon_perm == 1 || in.mem_sel_op_poseidon_write_d == 1); + return (in.poseidon2_sel_poseidon_perm_mem_op == 1 || in.mem_sel_op_poseidon_write_d == 1); } template static inline auto get_const_entities(const AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_write_d_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_write_d, in.poseidon2_clk, in.poseidon2_space_id, @@ -39,8 +39,8 @@ class perm_pos_mem_write_d_permutation_settings { template static inline auto get_nonconst_entities(AllEntities& in) { return std::forward_as_tuple(in.perm_pos_mem_write_d_inv, - in.poseidon2_sel_poseidon_perm, - in.poseidon2_sel_poseidon_perm, + in.poseidon2_sel_poseidon_perm_mem_op, + in.poseidon2_sel_poseidon_perm_mem_op, in.mem_sel_op_poseidon_write_d, in.poseidon2_clk, in.poseidon2_space_id, diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2.hpp index 5523bd984c3..d71c6962ca1 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2.hpp @@ -10,15 +10,15 @@ template class poseidon2Impl { public: using FF = FF_; - static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { + 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 3, 3, 3, 3 + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 3, 3, 3, 3 }; template inline static bool skip(const AllEntities& in) @@ -1152,1904 +1152,1925 @@ template class poseidon2Impl { } { using Accumulator = typename std::tuple_element_t<1, ContainerOverSubrelations>; - auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_mem_addr_read_a - new_term.poseidon2_input_addr)); + auto tmp = + (new_term.poseidon2_sel_poseidon_perm_mem_op * (FF(1) - new_term.poseidon2_sel_poseidon_perm_mem_op)); tmp *= scaling_factor; std::get<1>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<2, ContainerOverSubrelations>; - auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_mem_addr_read_b - (new_term.poseidon2_input_addr + FF(1)))); + auto tmp = (new_term.poseidon2_sel_poseidon_perm_immediate * + (FF(1) - new_term.poseidon2_sel_poseidon_perm_immediate)); tmp *= scaling_factor; std::get<2>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<3, ContainerOverSubrelations>; - auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_mem_addr_read_c - (new_term.poseidon2_input_addr + FF(2)))); + auto tmp = (new_term.poseidon2_sel_poseidon_perm - + (new_term.poseidon2_sel_poseidon_perm_mem_op + new_term.poseidon2_sel_poseidon_perm_immediate)); tmp *= scaling_factor; std::get<3>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<4, ContainerOverSubrelations>; - auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_mem_addr_read_d - (new_term.poseidon2_input_addr + FF(3)))); + auto tmp = (new_term.poseidon2_sel_poseidon_perm_mem_op * + (new_term.poseidon2_mem_addr_read_a - new_term.poseidon2_input_addr)); tmp *= scaling_factor; std::get<4>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<5, ContainerOverSubrelations>; - auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_mem_addr_write_a - new_term.poseidon2_output_addr)); + auto tmp = (new_term.poseidon2_sel_poseidon_perm_mem_op * + (new_term.poseidon2_mem_addr_read_b - (new_term.poseidon2_input_addr + FF(1)))); tmp *= scaling_factor; std::get<5>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<6, ContainerOverSubrelations>; - auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_mem_addr_write_b - (new_term.poseidon2_output_addr + FF(1)))); + auto tmp = (new_term.poseidon2_sel_poseidon_perm_mem_op * + (new_term.poseidon2_mem_addr_read_c - (new_term.poseidon2_input_addr + FF(2)))); tmp *= scaling_factor; std::get<6>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<7, ContainerOverSubrelations>; - auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_mem_addr_write_c - (new_term.poseidon2_output_addr + FF(2)))); + auto tmp = (new_term.poseidon2_sel_poseidon_perm_mem_op * + (new_term.poseidon2_mem_addr_read_d - (new_term.poseidon2_input_addr + FF(3)))); tmp *= scaling_factor; std::get<7>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<8, ContainerOverSubrelations>; - auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_mem_addr_write_d - (new_term.poseidon2_output_addr + FF(3)))); + auto tmp = (new_term.poseidon2_sel_poseidon_perm_mem_op * + (new_term.poseidon2_mem_addr_write_a - new_term.poseidon2_output_addr)); tmp *= scaling_factor; std::get<8>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<9, ContainerOverSubrelations>; - auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_EXT_LAYER_4 - ((FF(4) * poseidon2_EXT_LAYER_1) + poseidon2_EXT_LAYER_3))); + auto tmp = (new_term.poseidon2_sel_poseidon_perm_mem_op * + (new_term.poseidon2_mem_addr_write_b - (new_term.poseidon2_output_addr + FF(1)))); tmp *= scaling_factor; std::get<9>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<10, ContainerOverSubrelations>; - auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_EXT_LAYER_5 - ((FF(4) * poseidon2_EXT_LAYER_0) + poseidon2_EXT_LAYER_2))); + auto tmp = (new_term.poseidon2_sel_poseidon_perm_mem_op * + (new_term.poseidon2_mem_addr_write_c - (new_term.poseidon2_output_addr + FF(2)))); tmp *= scaling_factor; std::get<10>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<11, ContainerOverSubrelations>; - auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_EXT_LAYER_6 - (poseidon2_EXT_LAYER_3 + new_term.poseidon2_EXT_LAYER_5))); + auto tmp = (new_term.poseidon2_sel_poseidon_perm_mem_op * + (new_term.poseidon2_mem_addr_write_d - (new_term.poseidon2_output_addr + FF(3)))); tmp *= scaling_factor; std::get<11>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<12, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_EXT_LAYER_7 - (poseidon2_EXT_LAYER_2 + new_term.poseidon2_EXT_LAYER_4))); + (new_term.poseidon2_EXT_LAYER_4 - ((FF(4) * poseidon2_EXT_LAYER_1) + poseidon2_EXT_LAYER_3))); tmp *= scaling_factor; std::get<12>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<13, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_0_4 - ((FF(4) * poseidon2_T_0_1) + poseidon2_T_0_3))); + (new_term.poseidon2_EXT_LAYER_5 - ((FF(4) * poseidon2_EXT_LAYER_0) + poseidon2_EXT_LAYER_2))); tmp *= scaling_factor; std::get<13>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<14, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_0_5 - ((FF(4) * poseidon2_T_0_0) + poseidon2_T_0_2))); + (new_term.poseidon2_EXT_LAYER_6 - (poseidon2_EXT_LAYER_3 + new_term.poseidon2_EXT_LAYER_5))); tmp *= scaling_factor; std::get<14>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<15, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_0_6 - (poseidon2_T_0_3 + new_term.poseidon2_T_0_5))); + (new_term.poseidon2_EXT_LAYER_7 - (poseidon2_EXT_LAYER_2 + new_term.poseidon2_EXT_LAYER_4))); tmp *= scaling_factor; std::get<15>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<16, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_0_7 - (poseidon2_T_0_2 + new_term.poseidon2_T_0_4))); + (new_term.poseidon2_T_0_4 - ((FF(4) * poseidon2_T_0_1) + poseidon2_T_0_3))); tmp *= scaling_factor; std::get<16>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<17, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_1_4 - ((FF(4) * poseidon2_T_1_1) + poseidon2_T_1_3))); + (new_term.poseidon2_T_0_5 - ((FF(4) * poseidon2_T_0_0) + poseidon2_T_0_2))); tmp *= scaling_factor; std::get<17>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<18, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_1_5 - ((FF(4) * poseidon2_T_1_0) + poseidon2_T_1_2))); + (new_term.poseidon2_T_0_6 - (poseidon2_T_0_3 + new_term.poseidon2_T_0_5))); tmp *= scaling_factor; std::get<18>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<19, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_1_6 - (poseidon2_T_1_3 + new_term.poseidon2_T_1_5))); + (new_term.poseidon2_T_0_7 - (poseidon2_T_0_2 + new_term.poseidon2_T_0_4))); tmp *= scaling_factor; std::get<19>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<20, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_1_7 - (poseidon2_T_1_2 + new_term.poseidon2_T_1_4))); + (new_term.poseidon2_T_1_4 - ((FF(4) * poseidon2_T_1_1) + poseidon2_T_1_3))); tmp *= scaling_factor; std::get<20>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<21, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_2_4 - ((FF(4) * poseidon2_T_2_1) + poseidon2_T_2_3))); + (new_term.poseidon2_T_1_5 - ((FF(4) * poseidon2_T_1_0) + poseidon2_T_1_2))); tmp *= scaling_factor; std::get<21>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<22, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_2_5 - ((FF(4) * poseidon2_T_2_0) + poseidon2_T_2_2))); + (new_term.poseidon2_T_1_6 - (poseidon2_T_1_3 + new_term.poseidon2_T_1_5))); tmp *= scaling_factor; std::get<22>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<23, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_2_6 - (poseidon2_T_2_3 + new_term.poseidon2_T_2_5))); + (new_term.poseidon2_T_1_7 - (poseidon2_T_1_2 + new_term.poseidon2_T_1_4))); tmp *= scaling_factor; std::get<23>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<24, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_2_7 - (poseidon2_T_2_2 + new_term.poseidon2_T_2_4))); + (new_term.poseidon2_T_2_4 - ((FF(4) * poseidon2_T_2_1) + poseidon2_T_2_3))); tmp *= scaling_factor; std::get<24>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<25, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_3_4 - ((FF(4) * poseidon2_T_3_1) + poseidon2_T_3_3))); + (new_term.poseidon2_T_2_5 - ((FF(4) * poseidon2_T_2_0) + poseidon2_T_2_2))); tmp *= scaling_factor; std::get<25>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<26, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_3_5 - ((FF(4) * poseidon2_T_3_0) + poseidon2_T_3_2))); + (new_term.poseidon2_T_2_6 - (poseidon2_T_2_3 + new_term.poseidon2_T_2_5))); tmp *= scaling_factor; std::get<26>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<27, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_3_6 - (poseidon2_T_3_3 + new_term.poseidon2_T_3_5))); + (new_term.poseidon2_T_2_7 - (poseidon2_T_2_2 + new_term.poseidon2_T_2_4))); tmp *= scaling_factor; std::get<27>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<28, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_3_7 - (poseidon2_T_3_2 + new_term.poseidon2_T_3_4))); + (new_term.poseidon2_T_3_4 - ((FF(4) * poseidon2_T_3_1) + poseidon2_T_3_3))); tmp *= scaling_factor; std::get<28>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<29, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_4_0 - ((poseidon2_params_MU_0 * poseidon2_A_4_0) + poseidon2_SUM_4))); + (new_term.poseidon2_T_3_5 - ((FF(4) * poseidon2_T_3_0) + poseidon2_T_3_2))); tmp *= scaling_factor; std::get<29>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<30, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_4_1 - ((poseidon2_params_MU_1 * poseidon2_A_4_1) + poseidon2_SUM_4))); + (new_term.poseidon2_T_3_6 - (poseidon2_T_3_3 + new_term.poseidon2_T_3_5))); tmp *= scaling_factor; std::get<30>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<31, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_4_2 - ((poseidon2_params_MU_2 * poseidon2_A_4_2) + poseidon2_SUM_4))); + (new_term.poseidon2_T_3_7 - (poseidon2_T_3_2 + new_term.poseidon2_T_3_4))); tmp *= scaling_factor; std::get<31>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<32, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_4_3 - ((poseidon2_params_MU_3 * poseidon2_A_4_3) + poseidon2_SUM_4))); + (new_term.poseidon2_B_4_0 - ((poseidon2_params_MU_0 * poseidon2_A_4_0) + poseidon2_SUM_4))); tmp *= scaling_factor; std::get<32>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<33, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_5_0 - ((poseidon2_params_MU_0 * poseidon2_A_5_0) + poseidon2_SUM_5))); + (new_term.poseidon2_B_4_1 - ((poseidon2_params_MU_1 * poseidon2_A_4_1) + poseidon2_SUM_4))); tmp *= scaling_factor; std::get<33>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<34, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_5_1 - ((poseidon2_params_MU_1 * poseidon2_A_5_1) + poseidon2_SUM_5))); + (new_term.poseidon2_B_4_2 - ((poseidon2_params_MU_2 * poseidon2_A_4_2) + poseidon2_SUM_4))); tmp *= scaling_factor; std::get<34>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<35, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_5_2 - ((poseidon2_params_MU_2 * poseidon2_A_5_2) + poseidon2_SUM_5))); + (new_term.poseidon2_B_4_3 - ((poseidon2_params_MU_3 * poseidon2_A_4_3) + poseidon2_SUM_4))); tmp *= scaling_factor; std::get<35>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<36, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_5_3 - ((poseidon2_params_MU_3 * poseidon2_A_5_3) + poseidon2_SUM_5))); + (new_term.poseidon2_B_5_0 - ((poseidon2_params_MU_0 * poseidon2_A_5_0) + poseidon2_SUM_5))); tmp *= scaling_factor; std::get<36>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<37, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_6_0 - ((poseidon2_params_MU_0 * poseidon2_A_6_0) + poseidon2_SUM_6))); + (new_term.poseidon2_B_5_1 - ((poseidon2_params_MU_1 * poseidon2_A_5_1) + poseidon2_SUM_5))); tmp *= scaling_factor; std::get<37>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<38, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_6_1 - ((poseidon2_params_MU_1 * poseidon2_A_6_1) + poseidon2_SUM_6))); + (new_term.poseidon2_B_5_2 - ((poseidon2_params_MU_2 * poseidon2_A_5_2) + poseidon2_SUM_5))); tmp *= scaling_factor; std::get<38>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<39, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_6_2 - ((poseidon2_params_MU_2 * poseidon2_A_6_2) + poseidon2_SUM_6))); + (new_term.poseidon2_B_5_3 - ((poseidon2_params_MU_3 * poseidon2_A_5_3) + poseidon2_SUM_5))); tmp *= scaling_factor; std::get<39>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<40, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_6_3 - ((poseidon2_params_MU_3 * poseidon2_A_6_3) + poseidon2_SUM_6))); + (new_term.poseidon2_B_6_0 - ((poseidon2_params_MU_0 * poseidon2_A_6_0) + poseidon2_SUM_6))); tmp *= scaling_factor; std::get<40>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<41, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_7_0 - ((poseidon2_params_MU_0 * poseidon2_A_7_0) + poseidon2_SUM_7))); + (new_term.poseidon2_B_6_1 - ((poseidon2_params_MU_1 * poseidon2_A_6_1) + poseidon2_SUM_6))); tmp *= scaling_factor; std::get<41>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<42, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_7_1 - ((poseidon2_params_MU_1 * poseidon2_A_7_1) + poseidon2_SUM_7))); + (new_term.poseidon2_B_6_2 - ((poseidon2_params_MU_2 * poseidon2_A_6_2) + poseidon2_SUM_6))); tmp *= scaling_factor; std::get<42>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<43, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_7_2 - ((poseidon2_params_MU_2 * poseidon2_A_7_2) + poseidon2_SUM_7))); + (new_term.poseidon2_B_6_3 - ((poseidon2_params_MU_3 * poseidon2_A_6_3) + poseidon2_SUM_6))); tmp *= scaling_factor; std::get<43>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<44, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_7_3 - ((poseidon2_params_MU_3 * poseidon2_A_7_3) + poseidon2_SUM_7))); + (new_term.poseidon2_B_7_0 - ((poseidon2_params_MU_0 * poseidon2_A_7_0) + poseidon2_SUM_7))); tmp *= scaling_factor; std::get<44>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<45, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_8_0 - ((poseidon2_params_MU_0 * poseidon2_A_8_0) + poseidon2_SUM_8))); + (new_term.poseidon2_B_7_1 - ((poseidon2_params_MU_1 * poseidon2_A_7_1) + poseidon2_SUM_7))); tmp *= scaling_factor; std::get<45>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<46, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_8_1 - ((poseidon2_params_MU_1 * poseidon2_A_8_1) + poseidon2_SUM_8))); + (new_term.poseidon2_B_7_2 - ((poseidon2_params_MU_2 * poseidon2_A_7_2) + poseidon2_SUM_7))); tmp *= scaling_factor; std::get<46>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<47, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_8_2 - ((poseidon2_params_MU_2 * poseidon2_A_8_2) + poseidon2_SUM_8))); + (new_term.poseidon2_B_7_3 - ((poseidon2_params_MU_3 * poseidon2_A_7_3) + poseidon2_SUM_7))); tmp *= scaling_factor; std::get<47>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<48, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_8_3 - ((poseidon2_params_MU_3 * poseidon2_A_8_3) + poseidon2_SUM_8))); + (new_term.poseidon2_B_8_0 - ((poseidon2_params_MU_0 * poseidon2_A_8_0) + poseidon2_SUM_8))); tmp *= scaling_factor; std::get<48>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<49, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_9_0 - ((poseidon2_params_MU_0 * poseidon2_A_9_0) + poseidon2_SUM_9))); + (new_term.poseidon2_B_8_1 - ((poseidon2_params_MU_1 * poseidon2_A_8_1) + poseidon2_SUM_8))); tmp *= scaling_factor; std::get<49>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<50, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_9_1 - ((poseidon2_params_MU_1 * poseidon2_A_9_1) + poseidon2_SUM_9))); + (new_term.poseidon2_B_8_2 - ((poseidon2_params_MU_2 * poseidon2_A_8_2) + poseidon2_SUM_8))); tmp *= scaling_factor; std::get<50>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<51, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_9_2 - ((poseidon2_params_MU_2 * poseidon2_A_9_2) + poseidon2_SUM_9))); + (new_term.poseidon2_B_8_3 - ((poseidon2_params_MU_3 * poseidon2_A_8_3) + poseidon2_SUM_8))); tmp *= scaling_factor; std::get<51>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<52, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_9_3 - ((poseidon2_params_MU_3 * poseidon2_A_9_3) + poseidon2_SUM_9))); + (new_term.poseidon2_B_9_0 - ((poseidon2_params_MU_0 * poseidon2_A_9_0) + poseidon2_SUM_9))); tmp *= scaling_factor; std::get<52>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<53, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_10_0 - ((poseidon2_params_MU_0 * poseidon2_A_10_0) + poseidon2_SUM_10))); + (new_term.poseidon2_B_9_1 - ((poseidon2_params_MU_1 * poseidon2_A_9_1) + poseidon2_SUM_9))); tmp *= scaling_factor; std::get<53>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<54, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_10_1 - ((poseidon2_params_MU_1 * poseidon2_A_10_1) + poseidon2_SUM_10))); + (new_term.poseidon2_B_9_2 - ((poseidon2_params_MU_2 * poseidon2_A_9_2) + poseidon2_SUM_9))); tmp *= scaling_factor; std::get<54>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<55, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_10_2 - ((poseidon2_params_MU_2 * poseidon2_A_10_2) + poseidon2_SUM_10))); + (new_term.poseidon2_B_9_3 - ((poseidon2_params_MU_3 * poseidon2_A_9_3) + poseidon2_SUM_9))); tmp *= scaling_factor; std::get<55>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<56, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_10_3 - ((poseidon2_params_MU_3 * poseidon2_A_10_3) + poseidon2_SUM_10))); + (new_term.poseidon2_B_10_0 - ((poseidon2_params_MU_0 * poseidon2_A_10_0) + poseidon2_SUM_10))); tmp *= scaling_factor; std::get<56>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<57, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_11_0 - ((poseidon2_params_MU_0 * poseidon2_A_11_0) + poseidon2_SUM_11))); + (new_term.poseidon2_B_10_1 - ((poseidon2_params_MU_1 * poseidon2_A_10_1) + poseidon2_SUM_10))); tmp *= scaling_factor; std::get<57>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<58, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_11_1 - ((poseidon2_params_MU_1 * poseidon2_A_11_1) + poseidon2_SUM_11))); + (new_term.poseidon2_B_10_2 - ((poseidon2_params_MU_2 * poseidon2_A_10_2) + poseidon2_SUM_10))); tmp *= scaling_factor; std::get<58>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<59, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_11_2 - ((poseidon2_params_MU_2 * poseidon2_A_11_2) + poseidon2_SUM_11))); + (new_term.poseidon2_B_10_3 - ((poseidon2_params_MU_3 * poseidon2_A_10_3) + poseidon2_SUM_10))); tmp *= scaling_factor; std::get<59>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<60, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_11_3 - ((poseidon2_params_MU_3 * poseidon2_A_11_3) + poseidon2_SUM_11))); + (new_term.poseidon2_B_11_0 - ((poseidon2_params_MU_0 * poseidon2_A_11_0) + poseidon2_SUM_11))); tmp *= scaling_factor; std::get<60>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<61, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_12_0 - ((poseidon2_params_MU_0 * poseidon2_A_12_0) + poseidon2_SUM_12))); + (new_term.poseidon2_B_11_1 - ((poseidon2_params_MU_1 * poseidon2_A_11_1) + poseidon2_SUM_11))); tmp *= scaling_factor; std::get<61>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<62, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_12_1 - ((poseidon2_params_MU_1 * poseidon2_A_12_1) + poseidon2_SUM_12))); + (new_term.poseidon2_B_11_2 - ((poseidon2_params_MU_2 * poseidon2_A_11_2) + poseidon2_SUM_11))); tmp *= scaling_factor; std::get<62>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<63, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_12_2 - ((poseidon2_params_MU_2 * poseidon2_A_12_2) + poseidon2_SUM_12))); + (new_term.poseidon2_B_11_3 - ((poseidon2_params_MU_3 * poseidon2_A_11_3) + poseidon2_SUM_11))); tmp *= scaling_factor; std::get<63>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<64, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_12_3 - ((poseidon2_params_MU_3 * poseidon2_A_12_3) + poseidon2_SUM_12))); + (new_term.poseidon2_B_12_0 - ((poseidon2_params_MU_0 * poseidon2_A_12_0) + poseidon2_SUM_12))); tmp *= scaling_factor; std::get<64>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<65, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_13_0 - ((poseidon2_params_MU_0 * poseidon2_A_13_0) + poseidon2_SUM_13))); + (new_term.poseidon2_B_12_1 - ((poseidon2_params_MU_1 * poseidon2_A_12_1) + poseidon2_SUM_12))); tmp *= scaling_factor; std::get<65>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<66, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_13_1 - ((poseidon2_params_MU_1 * poseidon2_A_13_1) + poseidon2_SUM_13))); + (new_term.poseidon2_B_12_2 - ((poseidon2_params_MU_2 * poseidon2_A_12_2) + poseidon2_SUM_12))); tmp *= scaling_factor; std::get<66>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<67, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_13_2 - ((poseidon2_params_MU_2 * poseidon2_A_13_2) + poseidon2_SUM_13))); + (new_term.poseidon2_B_12_3 - ((poseidon2_params_MU_3 * poseidon2_A_12_3) + poseidon2_SUM_12))); tmp *= scaling_factor; std::get<67>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<68, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_13_3 - ((poseidon2_params_MU_3 * poseidon2_A_13_3) + poseidon2_SUM_13))); + (new_term.poseidon2_B_13_0 - ((poseidon2_params_MU_0 * poseidon2_A_13_0) + poseidon2_SUM_13))); tmp *= scaling_factor; std::get<68>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<69, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_14_0 - ((poseidon2_params_MU_0 * poseidon2_A_14_0) + poseidon2_SUM_14))); + (new_term.poseidon2_B_13_1 - ((poseidon2_params_MU_1 * poseidon2_A_13_1) + poseidon2_SUM_13))); tmp *= scaling_factor; std::get<69>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<70, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_14_1 - ((poseidon2_params_MU_1 * poseidon2_A_14_1) + poseidon2_SUM_14))); + (new_term.poseidon2_B_13_2 - ((poseidon2_params_MU_2 * poseidon2_A_13_2) + poseidon2_SUM_13))); tmp *= scaling_factor; std::get<70>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<71, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_14_2 - ((poseidon2_params_MU_2 * poseidon2_A_14_2) + poseidon2_SUM_14))); + (new_term.poseidon2_B_13_3 - ((poseidon2_params_MU_3 * poseidon2_A_13_3) + poseidon2_SUM_13))); tmp *= scaling_factor; std::get<71>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<72, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_14_3 - ((poseidon2_params_MU_3 * poseidon2_A_14_3) + poseidon2_SUM_14))); + (new_term.poseidon2_B_14_0 - ((poseidon2_params_MU_0 * poseidon2_A_14_0) + poseidon2_SUM_14))); tmp *= scaling_factor; std::get<72>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<73, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_15_0 - ((poseidon2_params_MU_0 * poseidon2_A_15_0) + poseidon2_SUM_15))); + (new_term.poseidon2_B_14_1 - ((poseidon2_params_MU_1 * poseidon2_A_14_1) + poseidon2_SUM_14))); tmp *= scaling_factor; std::get<73>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<74, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_15_1 - ((poseidon2_params_MU_1 * poseidon2_A_15_1) + poseidon2_SUM_15))); + (new_term.poseidon2_B_14_2 - ((poseidon2_params_MU_2 * poseidon2_A_14_2) + poseidon2_SUM_14))); tmp *= scaling_factor; std::get<74>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<75, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_15_2 - ((poseidon2_params_MU_2 * poseidon2_A_15_2) + poseidon2_SUM_15))); + (new_term.poseidon2_B_14_3 - ((poseidon2_params_MU_3 * poseidon2_A_14_3) + poseidon2_SUM_14))); tmp *= scaling_factor; std::get<75>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<76, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_15_3 - ((poseidon2_params_MU_3 * poseidon2_A_15_3) + poseidon2_SUM_15))); + (new_term.poseidon2_B_15_0 - ((poseidon2_params_MU_0 * poseidon2_A_15_0) + poseidon2_SUM_15))); tmp *= scaling_factor; std::get<76>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<77, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_16_0 - ((poseidon2_params_MU_0 * poseidon2_A_16_0) + poseidon2_SUM_16))); + (new_term.poseidon2_B_15_1 - ((poseidon2_params_MU_1 * poseidon2_A_15_1) + poseidon2_SUM_15))); tmp *= scaling_factor; std::get<77>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<78, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_16_1 - ((poseidon2_params_MU_1 * poseidon2_A_16_1) + poseidon2_SUM_16))); + (new_term.poseidon2_B_15_2 - ((poseidon2_params_MU_2 * poseidon2_A_15_2) + poseidon2_SUM_15))); tmp *= scaling_factor; std::get<78>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<79, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_16_2 - ((poseidon2_params_MU_2 * poseidon2_A_16_2) + poseidon2_SUM_16))); + (new_term.poseidon2_B_15_3 - ((poseidon2_params_MU_3 * poseidon2_A_15_3) + poseidon2_SUM_15))); tmp *= scaling_factor; std::get<79>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<80, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_16_3 - ((poseidon2_params_MU_3 * poseidon2_A_16_3) + poseidon2_SUM_16))); + (new_term.poseidon2_B_16_0 - ((poseidon2_params_MU_0 * poseidon2_A_16_0) + poseidon2_SUM_16))); tmp *= scaling_factor; std::get<80>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<81, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_17_0 - ((poseidon2_params_MU_0 * poseidon2_A_17_0) + poseidon2_SUM_17))); + (new_term.poseidon2_B_16_1 - ((poseidon2_params_MU_1 * poseidon2_A_16_1) + poseidon2_SUM_16))); tmp *= scaling_factor; std::get<81>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<82, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_17_1 - ((poseidon2_params_MU_1 * poseidon2_A_17_1) + poseidon2_SUM_17))); + (new_term.poseidon2_B_16_2 - ((poseidon2_params_MU_2 * poseidon2_A_16_2) + poseidon2_SUM_16))); tmp *= scaling_factor; std::get<82>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<83, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_17_2 - ((poseidon2_params_MU_2 * poseidon2_A_17_2) + poseidon2_SUM_17))); + (new_term.poseidon2_B_16_3 - ((poseidon2_params_MU_3 * poseidon2_A_16_3) + poseidon2_SUM_16))); tmp *= scaling_factor; std::get<83>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<84, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_17_3 - ((poseidon2_params_MU_3 * poseidon2_A_17_3) + poseidon2_SUM_17))); + (new_term.poseidon2_B_17_0 - ((poseidon2_params_MU_0 * poseidon2_A_17_0) + poseidon2_SUM_17))); tmp *= scaling_factor; std::get<84>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<85, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_18_0 - ((poseidon2_params_MU_0 * poseidon2_A_18_0) + poseidon2_SUM_18))); + (new_term.poseidon2_B_17_1 - ((poseidon2_params_MU_1 * poseidon2_A_17_1) + poseidon2_SUM_17))); tmp *= scaling_factor; std::get<85>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<86, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_18_1 - ((poseidon2_params_MU_1 * poseidon2_A_18_1) + poseidon2_SUM_18))); + (new_term.poseidon2_B_17_2 - ((poseidon2_params_MU_2 * poseidon2_A_17_2) + poseidon2_SUM_17))); tmp *= scaling_factor; std::get<86>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<87, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_18_2 - ((poseidon2_params_MU_2 * poseidon2_A_18_2) + poseidon2_SUM_18))); + (new_term.poseidon2_B_17_3 - ((poseidon2_params_MU_3 * poseidon2_A_17_3) + poseidon2_SUM_17))); tmp *= scaling_factor; std::get<87>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<88, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_18_3 - ((poseidon2_params_MU_3 * poseidon2_A_18_3) + poseidon2_SUM_18))); + (new_term.poseidon2_B_18_0 - ((poseidon2_params_MU_0 * poseidon2_A_18_0) + poseidon2_SUM_18))); tmp *= scaling_factor; std::get<88>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<89, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_19_0 - ((poseidon2_params_MU_0 * poseidon2_A_19_0) + poseidon2_SUM_19))); + (new_term.poseidon2_B_18_1 - ((poseidon2_params_MU_1 * poseidon2_A_18_1) + poseidon2_SUM_18))); tmp *= scaling_factor; std::get<89>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<90, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_19_1 - ((poseidon2_params_MU_1 * poseidon2_A_19_1) + poseidon2_SUM_19))); + (new_term.poseidon2_B_18_2 - ((poseidon2_params_MU_2 * poseidon2_A_18_2) + poseidon2_SUM_18))); tmp *= scaling_factor; std::get<90>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<91, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_19_2 - ((poseidon2_params_MU_2 * poseidon2_A_19_2) + poseidon2_SUM_19))); + (new_term.poseidon2_B_18_3 - ((poseidon2_params_MU_3 * poseidon2_A_18_3) + poseidon2_SUM_18))); tmp *= scaling_factor; std::get<91>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<92, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_19_3 - ((poseidon2_params_MU_3 * poseidon2_A_19_3) + poseidon2_SUM_19))); + (new_term.poseidon2_B_19_0 - ((poseidon2_params_MU_0 * poseidon2_A_19_0) + poseidon2_SUM_19))); tmp *= scaling_factor; std::get<92>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<93, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_20_0 - ((poseidon2_params_MU_0 * poseidon2_A_20_0) + poseidon2_SUM_20))); + (new_term.poseidon2_B_19_1 - ((poseidon2_params_MU_1 * poseidon2_A_19_1) + poseidon2_SUM_19))); tmp *= scaling_factor; std::get<93>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<94, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_20_1 - ((poseidon2_params_MU_1 * poseidon2_A_20_1) + poseidon2_SUM_20))); + (new_term.poseidon2_B_19_2 - ((poseidon2_params_MU_2 * poseidon2_A_19_2) + poseidon2_SUM_19))); tmp *= scaling_factor; std::get<94>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<95, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_20_2 - ((poseidon2_params_MU_2 * poseidon2_A_20_2) + poseidon2_SUM_20))); + (new_term.poseidon2_B_19_3 - ((poseidon2_params_MU_3 * poseidon2_A_19_3) + poseidon2_SUM_19))); tmp *= scaling_factor; std::get<95>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<96, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_20_3 - ((poseidon2_params_MU_3 * poseidon2_A_20_3) + poseidon2_SUM_20))); + (new_term.poseidon2_B_20_0 - ((poseidon2_params_MU_0 * poseidon2_A_20_0) + poseidon2_SUM_20))); tmp *= scaling_factor; std::get<96>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<97, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_21_0 - ((poseidon2_params_MU_0 * poseidon2_A_21_0) + poseidon2_SUM_21))); + (new_term.poseidon2_B_20_1 - ((poseidon2_params_MU_1 * poseidon2_A_20_1) + poseidon2_SUM_20))); tmp *= scaling_factor; std::get<97>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<98, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_21_1 - ((poseidon2_params_MU_1 * poseidon2_A_21_1) + poseidon2_SUM_21))); + (new_term.poseidon2_B_20_2 - ((poseidon2_params_MU_2 * poseidon2_A_20_2) + poseidon2_SUM_20))); tmp *= scaling_factor; std::get<98>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<99, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_21_2 - ((poseidon2_params_MU_2 * poseidon2_A_21_2) + poseidon2_SUM_21))); + (new_term.poseidon2_B_20_3 - ((poseidon2_params_MU_3 * poseidon2_A_20_3) + poseidon2_SUM_20))); tmp *= scaling_factor; std::get<99>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<100, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_21_3 - ((poseidon2_params_MU_3 * poseidon2_A_21_3) + poseidon2_SUM_21))); + (new_term.poseidon2_B_21_0 - ((poseidon2_params_MU_0 * poseidon2_A_21_0) + poseidon2_SUM_21))); tmp *= scaling_factor; std::get<100>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<101, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_22_0 - ((poseidon2_params_MU_0 * poseidon2_A_22_0) + poseidon2_SUM_22))); + (new_term.poseidon2_B_21_1 - ((poseidon2_params_MU_1 * poseidon2_A_21_1) + poseidon2_SUM_21))); tmp *= scaling_factor; std::get<101>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<102, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_22_1 - ((poseidon2_params_MU_1 * poseidon2_A_22_1) + poseidon2_SUM_22))); + (new_term.poseidon2_B_21_2 - ((poseidon2_params_MU_2 * poseidon2_A_21_2) + poseidon2_SUM_21))); tmp *= scaling_factor; std::get<102>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<103, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_22_2 - ((poseidon2_params_MU_2 * poseidon2_A_22_2) + poseidon2_SUM_22))); + (new_term.poseidon2_B_21_3 - ((poseidon2_params_MU_3 * poseidon2_A_21_3) + poseidon2_SUM_21))); tmp *= scaling_factor; std::get<103>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<104, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_22_3 - ((poseidon2_params_MU_3 * poseidon2_A_22_3) + poseidon2_SUM_22))); + (new_term.poseidon2_B_22_0 - ((poseidon2_params_MU_0 * poseidon2_A_22_0) + poseidon2_SUM_22))); tmp *= scaling_factor; std::get<104>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<105, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_23_0 - ((poseidon2_params_MU_0 * poseidon2_A_23_0) + poseidon2_SUM_23))); + (new_term.poseidon2_B_22_1 - ((poseidon2_params_MU_1 * poseidon2_A_22_1) + poseidon2_SUM_22))); tmp *= scaling_factor; std::get<105>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<106, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_23_1 - ((poseidon2_params_MU_1 * poseidon2_A_23_1) + poseidon2_SUM_23))); + (new_term.poseidon2_B_22_2 - ((poseidon2_params_MU_2 * poseidon2_A_22_2) + poseidon2_SUM_22))); tmp *= scaling_factor; std::get<106>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<107, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_23_2 - ((poseidon2_params_MU_2 * poseidon2_A_23_2) + poseidon2_SUM_23))); + (new_term.poseidon2_B_22_3 - ((poseidon2_params_MU_3 * poseidon2_A_22_3) + poseidon2_SUM_22))); tmp *= scaling_factor; std::get<107>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<108, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_23_3 - ((poseidon2_params_MU_3 * poseidon2_A_23_3) + poseidon2_SUM_23))); + (new_term.poseidon2_B_23_0 - ((poseidon2_params_MU_0 * poseidon2_A_23_0) + poseidon2_SUM_23))); tmp *= scaling_factor; std::get<108>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<109, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_24_0 - ((poseidon2_params_MU_0 * poseidon2_A_24_0) + poseidon2_SUM_24))); + (new_term.poseidon2_B_23_1 - ((poseidon2_params_MU_1 * poseidon2_A_23_1) + poseidon2_SUM_23))); tmp *= scaling_factor; std::get<109>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<110, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_24_1 - ((poseidon2_params_MU_1 * poseidon2_A_24_1) + poseidon2_SUM_24))); + (new_term.poseidon2_B_23_2 - ((poseidon2_params_MU_2 * poseidon2_A_23_2) + poseidon2_SUM_23))); tmp *= scaling_factor; std::get<110>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<111, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_24_2 - ((poseidon2_params_MU_2 * poseidon2_A_24_2) + poseidon2_SUM_24))); + (new_term.poseidon2_B_23_3 - ((poseidon2_params_MU_3 * poseidon2_A_23_3) + poseidon2_SUM_23))); tmp *= scaling_factor; std::get<111>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<112, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_24_3 - ((poseidon2_params_MU_3 * poseidon2_A_24_3) + poseidon2_SUM_24))); + (new_term.poseidon2_B_24_0 - ((poseidon2_params_MU_0 * poseidon2_A_24_0) + poseidon2_SUM_24))); tmp *= scaling_factor; std::get<112>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<113, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_25_0 - ((poseidon2_params_MU_0 * poseidon2_A_25_0) + poseidon2_SUM_25))); + (new_term.poseidon2_B_24_1 - ((poseidon2_params_MU_1 * poseidon2_A_24_1) + poseidon2_SUM_24))); tmp *= scaling_factor; std::get<113>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<114, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_25_1 - ((poseidon2_params_MU_1 * poseidon2_A_25_1) + poseidon2_SUM_25))); + (new_term.poseidon2_B_24_2 - ((poseidon2_params_MU_2 * poseidon2_A_24_2) + poseidon2_SUM_24))); tmp *= scaling_factor; std::get<114>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<115, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_25_2 - ((poseidon2_params_MU_2 * poseidon2_A_25_2) + poseidon2_SUM_25))); + (new_term.poseidon2_B_24_3 - ((poseidon2_params_MU_3 * poseidon2_A_24_3) + poseidon2_SUM_24))); tmp *= scaling_factor; std::get<115>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<116, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_25_3 - ((poseidon2_params_MU_3 * poseidon2_A_25_3) + poseidon2_SUM_25))); + (new_term.poseidon2_B_25_0 - ((poseidon2_params_MU_0 * poseidon2_A_25_0) + poseidon2_SUM_25))); tmp *= scaling_factor; std::get<116>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<117, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_26_0 - ((poseidon2_params_MU_0 * poseidon2_A_26_0) + poseidon2_SUM_26))); + (new_term.poseidon2_B_25_1 - ((poseidon2_params_MU_1 * poseidon2_A_25_1) + poseidon2_SUM_25))); tmp *= scaling_factor; std::get<117>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<118, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_26_1 - ((poseidon2_params_MU_1 * poseidon2_A_26_1) + poseidon2_SUM_26))); + (new_term.poseidon2_B_25_2 - ((poseidon2_params_MU_2 * poseidon2_A_25_2) + poseidon2_SUM_25))); tmp *= scaling_factor; std::get<118>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<119, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_26_2 - ((poseidon2_params_MU_2 * poseidon2_A_26_2) + poseidon2_SUM_26))); + (new_term.poseidon2_B_25_3 - ((poseidon2_params_MU_3 * poseidon2_A_25_3) + poseidon2_SUM_25))); tmp *= scaling_factor; std::get<119>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<120, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_26_3 - ((poseidon2_params_MU_3 * poseidon2_A_26_3) + poseidon2_SUM_26))); + (new_term.poseidon2_B_26_0 - ((poseidon2_params_MU_0 * poseidon2_A_26_0) + poseidon2_SUM_26))); tmp *= scaling_factor; std::get<120>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<121, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_27_0 - ((poseidon2_params_MU_0 * poseidon2_A_27_0) + poseidon2_SUM_27))); + (new_term.poseidon2_B_26_1 - ((poseidon2_params_MU_1 * poseidon2_A_26_1) + poseidon2_SUM_26))); tmp *= scaling_factor; std::get<121>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<122, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_27_1 - ((poseidon2_params_MU_1 * poseidon2_A_27_1) + poseidon2_SUM_27))); + (new_term.poseidon2_B_26_2 - ((poseidon2_params_MU_2 * poseidon2_A_26_2) + poseidon2_SUM_26))); tmp *= scaling_factor; std::get<122>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<123, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_27_2 - ((poseidon2_params_MU_2 * poseidon2_A_27_2) + poseidon2_SUM_27))); + (new_term.poseidon2_B_26_3 - ((poseidon2_params_MU_3 * poseidon2_A_26_3) + poseidon2_SUM_26))); tmp *= scaling_factor; std::get<123>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<124, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_27_3 - ((poseidon2_params_MU_3 * poseidon2_A_27_3) + poseidon2_SUM_27))); + (new_term.poseidon2_B_27_0 - ((poseidon2_params_MU_0 * poseidon2_A_27_0) + poseidon2_SUM_27))); tmp *= scaling_factor; std::get<124>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<125, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_28_0 - ((poseidon2_params_MU_0 * poseidon2_A_28_0) + poseidon2_SUM_28))); + (new_term.poseidon2_B_27_1 - ((poseidon2_params_MU_1 * poseidon2_A_27_1) + poseidon2_SUM_27))); tmp *= scaling_factor; std::get<125>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<126, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_28_1 - ((poseidon2_params_MU_1 * poseidon2_A_28_1) + poseidon2_SUM_28))); + (new_term.poseidon2_B_27_2 - ((poseidon2_params_MU_2 * poseidon2_A_27_2) + poseidon2_SUM_27))); tmp *= scaling_factor; std::get<126>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<127, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_28_2 - ((poseidon2_params_MU_2 * poseidon2_A_28_2) + poseidon2_SUM_28))); + (new_term.poseidon2_B_27_3 - ((poseidon2_params_MU_3 * poseidon2_A_27_3) + poseidon2_SUM_27))); tmp *= scaling_factor; std::get<127>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<128, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_28_3 - ((poseidon2_params_MU_3 * poseidon2_A_28_3) + poseidon2_SUM_28))); + (new_term.poseidon2_B_28_0 - ((poseidon2_params_MU_0 * poseidon2_A_28_0) + poseidon2_SUM_28))); tmp *= scaling_factor; std::get<128>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<129, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_29_0 - ((poseidon2_params_MU_0 * poseidon2_A_29_0) + poseidon2_SUM_29))); + (new_term.poseidon2_B_28_1 - ((poseidon2_params_MU_1 * poseidon2_A_28_1) + poseidon2_SUM_28))); tmp *= scaling_factor; std::get<129>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<130, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_29_1 - ((poseidon2_params_MU_1 * poseidon2_A_29_1) + poseidon2_SUM_29))); + (new_term.poseidon2_B_28_2 - ((poseidon2_params_MU_2 * poseidon2_A_28_2) + poseidon2_SUM_28))); tmp *= scaling_factor; std::get<130>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<131, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_29_2 - ((poseidon2_params_MU_2 * poseidon2_A_29_2) + poseidon2_SUM_29))); + (new_term.poseidon2_B_28_3 - ((poseidon2_params_MU_3 * poseidon2_A_28_3) + poseidon2_SUM_28))); tmp *= scaling_factor; std::get<131>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<132, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_29_3 - ((poseidon2_params_MU_3 * poseidon2_A_29_3) + poseidon2_SUM_29))); + (new_term.poseidon2_B_29_0 - ((poseidon2_params_MU_0 * poseidon2_A_29_0) + poseidon2_SUM_29))); tmp *= scaling_factor; std::get<132>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<133, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_30_0 - ((poseidon2_params_MU_0 * poseidon2_A_30_0) + poseidon2_SUM_30))); + (new_term.poseidon2_B_29_1 - ((poseidon2_params_MU_1 * poseidon2_A_29_1) + poseidon2_SUM_29))); tmp *= scaling_factor; std::get<133>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<134, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_30_1 - ((poseidon2_params_MU_1 * poseidon2_A_30_1) + poseidon2_SUM_30))); + (new_term.poseidon2_B_29_2 - ((poseidon2_params_MU_2 * poseidon2_A_29_2) + poseidon2_SUM_29))); tmp *= scaling_factor; std::get<134>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<135, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_30_2 - ((poseidon2_params_MU_2 * poseidon2_A_30_2) + poseidon2_SUM_30))); + (new_term.poseidon2_B_29_3 - ((poseidon2_params_MU_3 * poseidon2_A_29_3) + poseidon2_SUM_29))); tmp *= scaling_factor; std::get<135>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<136, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_30_3 - ((poseidon2_params_MU_3 * poseidon2_A_30_3) + poseidon2_SUM_30))); + (new_term.poseidon2_B_30_0 - ((poseidon2_params_MU_0 * poseidon2_A_30_0) + poseidon2_SUM_30))); tmp *= scaling_factor; std::get<136>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<137, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_31_0 - ((poseidon2_params_MU_0 * poseidon2_A_31_0) + poseidon2_SUM_31))); + (new_term.poseidon2_B_30_1 - ((poseidon2_params_MU_1 * poseidon2_A_30_1) + poseidon2_SUM_30))); tmp *= scaling_factor; std::get<137>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<138, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_31_1 - ((poseidon2_params_MU_1 * poseidon2_A_31_1) + poseidon2_SUM_31))); + (new_term.poseidon2_B_30_2 - ((poseidon2_params_MU_2 * poseidon2_A_30_2) + poseidon2_SUM_30))); tmp *= scaling_factor; std::get<138>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<139, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_31_2 - ((poseidon2_params_MU_2 * poseidon2_A_31_2) + poseidon2_SUM_31))); + (new_term.poseidon2_B_30_3 - ((poseidon2_params_MU_3 * poseidon2_A_30_3) + poseidon2_SUM_30))); tmp *= scaling_factor; std::get<139>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<140, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_31_3 - ((poseidon2_params_MU_3 * poseidon2_A_31_3) + poseidon2_SUM_31))); + (new_term.poseidon2_B_31_0 - ((poseidon2_params_MU_0 * poseidon2_A_31_0) + poseidon2_SUM_31))); tmp *= scaling_factor; std::get<140>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<141, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_32_0 - ((poseidon2_params_MU_0 * poseidon2_A_32_0) + poseidon2_SUM_32))); + (new_term.poseidon2_B_31_1 - ((poseidon2_params_MU_1 * poseidon2_A_31_1) + poseidon2_SUM_31))); tmp *= scaling_factor; std::get<141>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<142, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_32_1 - ((poseidon2_params_MU_1 * poseidon2_A_32_1) + poseidon2_SUM_32))); + (new_term.poseidon2_B_31_2 - ((poseidon2_params_MU_2 * poseidon2_A_31_2) + poseidon2_SUM_31))); tmp *= scaling_factor; std::get<142>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<143, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_32_2 - ((poseidon2_params_MU_2 * poseidon2_A_32_2) + poseidon2_SUM_32))); + (new_term.poseidon2_B_31_3 - ((poseidon2_params_MU_3 * poseidon2_A_31_3) + poseidon2_SUM_31))); tmp *= scaling_factor; std::get<143>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<144, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_32_3 - ((poseidon2_params_MU_3 * poseidon2_A_32_3) + poseidon2_SUM_32))); + (new_term.poseidon2_B_32_0 - ((poseidon2_params_MU_0 * poseidon2_A_32_0) + poseidon2_SUM_32))); tmp *= scaling_factor; std::get<144>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<145, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_33_0 - ((poseidon2_params_MU_0 * poseidon2_A_33_0) + poseidon2_SUM_33))); + (new_term.poseidon2_B_32_1 - ((poseidon2_params_MU_1 * poseidon2_A_32_1) + poseidon2_SUM_32))); tmp *= scaling_factor; std::get<145>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<146, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_33_1 - ((poseidon2_params_MU_1 * poseidon2_A_33_1) + poseidon2_SUM_33))); + (new_term.poseidon2_B_32_2 - ((poseidon2_params_MU_2 * poseidon2_A_32_2) + poseidon2_SUM_32))); tmp *= scaling_factor; std::get<146>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<147, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_33_2 - ((poseidon2_params_MU_2 * poseidon2_A_33_2) + poseidon2_SUM_33))); + (new_term.poseidon2_B_32_3 - ((poseidon2_params_MU_3 * poseidon2_A_32_3) + poseidon2_SUM_32))); tmp *= scaling_factor; std::get<147>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<148, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_33_3 - ((poseidon2_params_MU_3 * poseidon2_A_33_3) + poseidon2_SUM_33))); + (new_term.poseidon2_B_33_0 - ((poseidon2_params_MU_0 * poseidon2_A_33_0) + poseidon2_SUM_33))); tmp *= scaling_factor; std::get<148>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<149, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_34_0 - ((poseidon2_params_MU_0 * poseidon2_A_34_0) + poseidon2_SUM_34))); + (new_term.poseidon2_B_33_1 - ((poseidon2_params_MU_1 * poseidon2_A_33_1) + poseidon2_SUM_33))); tmp *= scaling_factor; std::get<149>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<150, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_34_1 - ((poseidon2_params_MU_1 * poseidon2_A_34_1) + poseidon2_SUM_34))); + (new_term.poseidon2_B_33_2 - ((poseidon2_params_MU_2 * poseidon2_A_33_2) + poseidon2_SUM_33))); tmp *= scaling_factor; std::get<150>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<151, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_34_2 - ((poseidon2_params_MU_2 * poseidon2_A_34_2) + poseidon2_SUM_34))); + (new_term.poseidon2_B_33_3 - ((poseidon2_params_MU_3 * poseidon2_A_33_3) + poseidon2_SUM_33))); tmp *= scaling_factor; std::get<151>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<152, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_34_3 - ((poseidon2_params_MU_3 * poseidon2_A_34_3) + poseidon2_SUM_34))); + (new_term.poseidon2_B_34_0 - ((poseidon2_params_MU_0 * poseidon2_A_34_0) + poseidon2_SUM_34))); tmp *= scaling_factor; std::get<152>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<153, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_35_0 - ((poseidon2_params_MU_0 * poseidon2_A_35_0) + poseidon2_SUM_35))); + (new_term.poseidon2_B_34_1 - ((poseidon2_params_MU_1 * poseidon2_A_34_1) + poseidon2_SUM_34))); tmp *= scaling_factor; std::get<153>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<154, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_35_1 - ((poseidon2_params_MU_1 * poseidon2_A_35_1) + poseidon2_SUM_35))); + (new_term.poseidon2_B_34_2 - ((poseidon2_params_MU_2 * poseidon2_A_34_2) + poseidon2_SUM_34))); tmp *= scaling_factor; std::get<154>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<155, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_35_2 - ((poseidon2_params_MU_2 * poseidon2_A_35_2) + poseidon2_SUM_35))); + (new_term.poseidon2_B_34_3 - ((poseidon2_params_MU_3 * poseidon2_A_34_3) + poseidon2_SUM_34))); tmp *= scaling_factor; std::get<155>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<156, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_35_3 - ((poseidon2_params_MU_3 * poseidon2_A_35_3) + poseidon2_SUM_35))); + (new_term.poseidon2_B_35_0 - ((poseidon2_params_MU_0 * poseidon2_A_35_0) + poseidon2_SUM_35))); tmp *= scaling_factor; std::get<156>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<157, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_36_0 - ((poseidon2_params_MU_0 * poseidon2_A_36_0) + poseidon2_SUM_36))); + (new_term.poseidon2_B_35_1 - ((poseidon2_params_MU_1 * poseidon2_A_35_1) + poseidon2_SUM_35))); tmp *= scaling_factor; std::get<157>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<158, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_36_1 - ((poseidon2_params_MU_1 * poseidon2_A_36_1) + poseidon2_SUM_36))); + (new_term.poseidon2_B_35_2 - ((poseidon2_params_MU_2 * poseidon2_A_35_2) + poseidon2_SUM_35))); tmp *= scaling_factor; std::get<158>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<159, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_36_2 - ((poseidon2_params_MU_2 * poseidon2_A_36_2) + poseidon2_SUM_36))); + (new_term.poseidon2_B_35_3 - ((poseidon2_params_MU_3 * poseidon2_A_35_3) + poseidon2_SUM_35))); tmp *= scaling_factor; std::get<159>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<160, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_36_3 - ((poseidon2_params_MU_3 * poseidon2_A_36_3) + poseidon2_SUM_36))); + (new_term.poseidon2_B_36_0 - ((poseidon2_params_MU_0 * poseidon2_A_36_0) + poseidon2_SUM_36))); tmp *= scaling_factor; std::get<160>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<161, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_37_0 - ((poseidon2_params_MU_0 * poseidon2_A_37_0) + poseidon2_SUM_37))); + (new_term.poseidon2_B_36_1 - ((poseidon2_params_MU_1 * poseidon2_A_36_1) + poseidon2_SUM_36))); tmp *= scaling_factor; std::get<161>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<162, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_37_1 - ((poseidon2_params_MU_1 * poseidon2_A_37_1) + poseidon2_SUM_37))); + (new_term.poseidon2_B_36_2 - ((poseidon2_params_MU_2 * poseidon2_A_36_2) + poseidon2_SUM_36))); tmp *= scaling_factor; std::get<162>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<163, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_37_2 - ((poseidon2_params_MU_2 * poseidon2_A_37_2) + poseidon2_SUM_37))); + (new_term.poseidon2_B_36_3 - ((poseidon2_params_MU_3 * poseidon2_A_36_3) + poseidon2_SUM_36))); tmp *= scaling_factor; std::get<163>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<164, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_37_3 - ((poseidon2_params_MU_3 * poseidon2_A_37_3) + poseidon2_SUM_37))); + (new_term.poseidon2_B_37_0 - ((poseidon2_params_MU_0 * poseidon2_A_37_0) + poseidon2_SUM_37))); tmp *= scaling_factor; std::get<164>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<165, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_38_0 - ((poseidon2_params_MU_0 * poseidon2_A_38_0) + poseidon2_SUM_38))); + (new_term.poseidon2_B_37_1 - ((poseidon2_params_MU_1 * poseidon2_A_37_1) + poseidon2_SUM_37))); tmp *= scaling_factor; std::get<165>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<166, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_38_1 - ((poseidon2_params_MU_1 * poseidon2_A_38_1) + poseidon2_SUM_38))); + (new_term.poseidon2_B_37_2 - ((poseidon2_params_MU_2 * poseidon2_A_37_2) + poseidon2_SUM_37))); tmp *= scaling_factor; std::get<166>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<167, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_38_2 - ((poseidon2_params_MU_2 * poseidon2_A_38_2) + poseidon2_SUM_38))); + (new_term.poseidon2_B_37_3 - ((poseidon2_params_MU_3 * poseidon2_A_37_3) + poseidon2_SUM_37))); tmp *= scaling_factor; std::get<167>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<168, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_38_3 - ((poseidon2_params_MU_3 * poseidon2_A_38_3) + poseidon2_SUM_38))); + (new_term.poseidon2_B_38_0 - ((poseidon2_params_MU_0 * poseidon2_A_38_0) + poseidon2_SUM_38))); tmp *= scaling_factor; std::get<168>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<169, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_39_0 - ((poseidon2_params_MU_0 * poseidon2_A_39_0) + poseidon2_SUM_39))); + (new_term.poseidon2_B_38_1 - ((poseidon2_params_MU_1 * poseidon2_A_38_1) + poseidon2_SUM_38))); tmp *= scaling_factor; std::get<169>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<170, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_39_1 - ((poseidon2_params_MU_1 * poseidon2_A_39_1) + poseidon2_SUM_39))); + (new_term.poseidon2_B_38_2 - ((poseidon2_params_MU_2 * poseidon2_A_38_2) + poseidon2_SUM_38))); tmp *= scaling_factor; std::get<170>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<171, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_39_2 - ((poseidon2_params_MU_2 * poseidon2_A_39_2) + poseidon2_SUM_39))); + (new_term.poseidon2_B_38_3 - ((poseidon2_params_MU_3 * poseidon2_A_38_3) + poseidon2_SUM_38))); tmp *= scaling_factor; std::get<171>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<172, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_39_3 - ((poseidon2_params_MU_3 * poseidon2_A_39_3) + poseidon2_SUM_39))); + (new_term.poseidon2_B_39_0 - ((poseidon2_params_MU_0 * poseidon2_A_39_0) + poseidon2_SUM_39))); tmp *= scaling_factor; std::get<172>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<173, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_40_0 - ((poseidon2_params_MU_0 * poseidon2_A_40_0) + poseidon2_SUM_40))); + (new_term.poseidon2_B_39_1 - ((poseidon2_params_MU_1 * poseidon2_A_39_1) + poseidon2_SUM_39))); tmp *= scaling_factor; std::get<173>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<174, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_40_1 - ((poseidon2_params_MU_1 * poseidon2_A_40_1) + poseidon2_SUM_40))); + (new_term.poseidon2_B_39_2 - ((poseidon2_params_MU_2 * poseidon2_A_39_2) + poseidon2_SUM_39))); tmp *= scaling_factor; std::get<174>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<175, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_40_2 - ((poseidon2_params_MU_2 * poseidon2_A_40_2) + poseidon2_SUM_40))); + (new_term.poseidon2_B_39_3 - ((poseidon2_params_MU_3 * poseidon2_A_39_3) + poseidon2_SUM_39))); tmp *= scaling_factor; std::get<175>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<176, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_40_3 - ((poseidon2_params_MU_3 * poseidon2_A_40_3) + poseidon2_SUM_40))); + (new_term.poseidon2_B_40_0 - ((poseidon2_params_MU_0 * poseidon2_A_40_0) + poseidon2_SUM_40))); tmp *= scaling_factor; std::get<176>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<177, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_41_0 - ((poseidon2_params_MU_0 * poseidon2_A_41_0) + poseidon2_SUM_41))); + (new_term.poseidon2_B_40_1 - ((poseidon2_params_MU_1 * poseidon2_A_40_1) + poseidon2_SUM_40))); tmp *= scaling_factor; std::get<177>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<178, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_41_1 - ((poseidon2_params_MU_1 * poseidon2_A_41_1) + poseidon2_SUM_41))); + (new_term.poseidon2_B_40_2 - ((poseidon2_params_MU_2 * poseidon2_A_40_2) + poseidon2_SUM_40))); tmp *= scaling_factor; std::get<178>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<179, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_41_2 - ((poseidon2_params_MU_2 * poseidon2_A_41_2) + poseidon2_SUM_41))); + (new_term.poseidon2_B_40_3 - ((poseidon2_params_MU_3 * poseidon2_A_40_3) + poseidon2_SUM_40))); tmp *= scaling_factor; std::get<179>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<180, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_41_3 - ((poseidon2_params_MU_3 * poseidon2_A_41_3) + poseidon2_SUM_41))); + (new_term.poseidon2_B_41_0 - ((poseidon2_params_MU_0 * poseidon2_A_41_0) + poseidon2_SUM_41))); tmp *= scaling_factor; std::get<180>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<181, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_42_0 - ((poseidon2_params_MU_0 * poseidon2_A_42_0) + poseidon2_SUM_42))); + (new_term.poseidon2_B_41_1 - ((poseidon2_params_MU_1 * poseidon2_A_41_1) + poseidon2_SUM_41))); tmp *= scaling_factor; std::get<181>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<182, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_42_1 - ((poseidon2_params_MU_1 * poseidon2_A_42_1) + poseidon2_SUM_42))); + (new_term.poseidon2_B_41_2 - ((poseidon2_params_MU_2 * poseidon2_A_41_2) + poseidon2_SUM_41))); tmp *= scaling_factor; std::get<182>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<183, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_42_2 - ((poseidon2_params_MU_2 * poseidon2_A_42_2) + poseidon2_SUM_42))); + (new_term.poseidon2_B_41_3 - ((poseidon2_params_MU_3 * poseidon2_A_41_3) + poseidon2_SUM_41))); tmp *= scaling_factor; std::get<183>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<184, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_42_3 - ((poseidon2_params_MU_3 * poseidon2_A_42_3) + poseidon2_SUM_42))); + (new_term.poseidon2_B_42_0 - ((poseidon2_params_MU_0 * poseidon2_A_42_0) + poseidon2_SUM_42))); tmp *= scaling_factor; std::get<184>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<185, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_43_0 - ((poseidon2_params_MU_0 * poseidon2_A_43_0) + poseidon2_SUM_43))); + (new_term.poseidon2_B_42_1 - ((poseidon2_params_MU_1 * poseidon2_A_42_1) + poseidon2_SUM_42))); tmp *= scaling_factor; std::get<185>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<186, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_43_1 - ((poseidon2_params_MU_1 * poseidon2_A_43_1) + poseidon2_SUM_43))); + (new_term.poseidon2_B_42_2 - ((poseidon2_params_MU_2 * poseidon2_A_42_2) + poseidon2_SUM_42))); tmp *= scaling_factor; std::get<186>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<187, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_43_2 - ((poseidon2_params_MU_2 * poseidon2_A_43_2) + poseidon2_SUM_43))); + (new_term.poseidon2_B_42_3 - ((poseidon2_params_MU_3 * poseidon2_A_42_3) + poseidon2_SUM_42))); tmp *= scaling_factor; std::get<187>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<188, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_43_3 - ((poseidon2_params_MU_3 * poseidon2_A_43_3) + poseidon2_SUM_43))); + (new_term.poseidon2_B_43_0 - ((poseidon2_params_MU_0 * poseidon2_A_43_0) + poseidon2_SUM_43))); tmp *= scaling_factor; std::get<188>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<189, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_44_0 - ((poseidon2_params_MU_0 * poseidon2_A_44_0) + poseidon2_SUM_44))); + (new_term.poseidon2_B_43_1 - ((poseidon2_params_MU_1 * poseidon2_A_43_1) + poseidon2_SUM_43))); tmp *= scaling_factor; std::get<189>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<190, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_44_1 - ((poseidon2_params_MU_1 * poseidon2_A_44_1) + poseidon2_SUM_44))); + (new_term.poseidon2_B_43_2 - ((poseidon2_params_MU_2 * poseidon2_A_43_2) + poseidon2_SUM_43))); tmp *= scaling_factor; std::get<190>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<191, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_44_2 - ((poseidon2_params_MU_2 * poseidon2_A_44_2) + poseidon2_SUM_44))); + (new_term.poseidon2_B_43_3 - ((poseidon2_params_MU_3 * poseidon2_A_43_3) + poseidon2_SUM_43))); tmp *= scaling_factor; std::get<191>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<192, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_44_3 - ((poseidon2_params_MU_3 * poseidon2_A_44_3) + poseidon2_SUM_44))); + (new_term.poseidon2_B_44_0 - ((poseidon2_params_MU_0 * poseidon2_A_44_0) + poseidon2_SUM_44))); tmp *= scaling_factor; std::get<192>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<193, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_45_0 - ((poseidon2_params_MU_0 * poseidon2_A_45_0) + poseidon2_SUM_45))); + (new_term.poseidon2_B_44_1 - ((poseidon2_params_MU_1 * poseidon2_A_44_1) + poseidon2_SUM_44))); tmp *= scaling_factor; std::get<193>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<194, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_45_1 - ((poseidon2_params_MU_1 * poseidon2_A_45_1) + poseidon2_SUM_45))); + (new_term.poseidon2_B_44_2 - ((poseidon2_params_MU_2 * poseidon2_A_44_2) + poseidon2_SUM_44))); tmp *= scaling_factor; std::get<194>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<195, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_45_2 - ((poseidon2_params_MU_2 * poseidon2_A_45_2) + poseidon2_SUM_45))); + (new_term.poseidon2_B_44_3 - ((poseidon2_params_MU_3 * poseidon2_A_44_3) + poseidon2_SUM_44))); tmp *= scaling_factor; std::get<195>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<196, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_45_3 - ((poseidon2_params_MU_3 * poseidon2_A_45_3) + poseidon2_SUM_45))); + (new_term.poseidon2_B_45_0 - ((poseidon2_params_MU_0 * poseidon2_A_45_0) + poseidon2_SUM_45))); tmp *= scaling_factor; std::get<196>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<197, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_46_0 - ((poseidon2_params_MU_0 * poseidon2_A_46_0) + poseidon2_SUM_46))); + (new_term.poseidon2_B_45_1 - ((poseidon2_params_MU_1 * poseidon2_A_45_1) + poseidon2_SUM_45))); tmp *= scaling_factor; std::get<197>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<198, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_46_1 - ((poseidon2_params_MU_1 * poseidon2_A_46_1) + poseidon2_SUM_46))); + (new_term.poseidon2_B_45_2 - ((poseidon2_params_MU_2 * poseidon2_A_45_2) + poseidon2_SUM_45))); tmp *= scaling_factor; std::get<198>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<199, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_46_2 - ((poseidon2_params_MU_2 * poseidon2_A_46_2) + poseidon2_SUM_46))); + (new_term.poseidon2_B_45_3 - ((poseidon2_params_MU_3 * poseidon2_A_45_3) + poseidon2_SUM_45))); tmp *= scaling_factor; std::get<199>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<200, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_46_3 - ((poseidon2_params_MU_3 * poseidon2_A_46_3) + poseidon2_SUM_46))); + (new_term.poseidon2_B_46_0 - ((poseidon2_params_MU_0 * poseidon2_A_46_0) + poseidon2_SUM_46))); tmp *= scaling_factor; std::get<200>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<201, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_47_0 - ((poseidon2_params_MU_0 * poseidon2_A_47_0) + poseidon2_SUM_47))); + (new_term.poseidon2_B_46_1 - ((poseidon2_params_MU_1 * poseidon2_A_46_1) + poseidon2_SUM_46))); tmp *= scaling_factor; std::get<201>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<202, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_47_1 - ((poseidon2_params_MU_1 * poseidon2_A_47_1) + poseidon2_SUM_47))); + (new_term.poseidon2_B_46_2 - ((poseidon2_params_MU_2 * poseidon2_A_46_2) + poseidon2_SUM_46))); tmp *= scaling_factor; std::get<202>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<203, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_47_2 - ((poseidon2_params_MU_2 * poseidon2_A_47_2) + poseidon2_SUM_47))); + (new_term.poseidon2_B_46_3 - ((poseidon2_params_MU_3 * poseidon2_A_46_3) + poseidon2_SUM_46))); tmp *= scaling_factor; std::get<203>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<204, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_47_3 - ((poseidon2_params_MU_3 * poseidon2_A_47_3) + poseidon2_SUM_47))); + (new_term.poseidon2_B_47_0 - ((poseidon2_params_MU_0 * poseidon2_A_47_0) + poseidon2_SUM_47))); tmp *= scaling_factor; std::get<204>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<205, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_48_0 - ((poseidon2_params_MU_0 * poseidon2_A_48_0) + poseidon2_SUM_48))); + (new_term.poseidon2_B_47_1 - ((poseidon2_params_MU_1 * poseidon2_A_47_1) + poseidon2_SUM_47))); tmp *= scaling_factor; std::get<205>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<206, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_48_1 - ((poseidon2_params_MU_1 * poseidon2_A_48_1) + poseidon2_SUM_48))); + (new_term.poseidon2_B_47_2 - ((poseidon2_params_MU_2 * poseidon2_A_47_2) + poseidon2_SUM_47))); tmp *= scaling_factor; std::get<206>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<207, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_48_2 - ((poseidon2_params_MU_2 * poseidon2_A_48_2) + poseidon2_SUM_48))); + (new_term.poseidon2_B_47_3 - ((poseidon2_params_MU_3 * poseidon2_A_47_3) + poseidon2_SUM_47))); tmp *= scaling_factor; std::get<207>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<208, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_48_3 - ((poseidon2_params_MU_3 * poseidon2_A_48_3) + poseidon2_SUM_48))); + (new_term.poseidon2_B_48_0 - ((poseidon2_params_MU_0 * poseidon2_A_48_0) + poseidon2_SUM_48))); tmp *= scaling_factor; std::get<208>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<209, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_49_0 - ((poseidon2_params_MU_0 * poseidon2_A_49_0) + poseidon2_SUM_49))); + (new_term.poseidon2_B_48_1 - ((poseidon2_params_MU_1 * poseidon2_A_48_1) + poseidon2_SUM_48))); tmp *= scaling_factor; std::get<209>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<210, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_49_1 - ((poseidon2_params_MU_1 * poseidon2_A_49_1) + poseidon2_SUM_49))); + (new_term.poseidon2_B_48_2 - ((poseidon2_params_MU_2 * poseidon2_A_48_2) + poseidon2_SUM_48))); tmp *= scaling_factor; std::get<210>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<211, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_49_2 - ((poseidon2_params_MU_2 * poseidon2_A_49_2) + poseidon2_SUM_49))); + (new_term.poseidon2_B_48_3 - ((poseidon2_params_MU_3 * poseidon2_A_48_3) + poseidon2_SUM_48))); tmp *= scaling_factor; std::get<211>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<212, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_49_3 - ((poseidon2_params_MU_3 * poseidon2_A_49_3) + poseidon2_SUM_49))); + (new_term.poseidon2_B_49_0 - ((poseidon2_params_MU_0 * poseidon2_A_49_0) + poseidon2_SUM_49))); tmp *= scaling_factor; std::get<212>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<213, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_50_0 - ((poseidon2_params_MU_0 * poseidon2_A_50_0) + poseidon2_SUM_50))); + (new_term.poseidon2_B_49_1 - ((poseidon2_params_MU_1 * poseidon2_A_49_1) + poseidon2_SUM_49))); tmp *= scaling_factor; std::get<213>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<214, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_50_1 - ((poseidon2_params_MU_1 * poseidon2_A_50_1) + poseidon2_SUM_50))); + (new_term.poseidon2_B_49_2 - ((poseidon2_params_MU_2 * poseidon2_A_49_2) + poseidon2_SUM_49))); tmp *= scaling_factor; std::get<214>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<215, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_50_2 - ((poseidon2_params_MU_2 * poseidon2_A_50_2) + poseidon2_SUM_50))); + (new_term.poseidon2_B_49_3 - ((poseidon2_params_MU_3 * poseidon2_A_49_3) + poseidon2_SUM_49))); tmp *= scaling_factor; std::get<215>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<216, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_50_3 - ((poseidon2_params_MU_3 * poseidon2_A_50_3) + poseidon2_SUM_50))); + (new_term.poseidon2_B_50_0 - ((poseidon2_params_MU_0 * poseidon2_A_50_0) + poseidon2_SUM_50))); tmp *= scaling_factor; std::get<216>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<217, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_51_0 - ((poseidon2_params_MU_0 * poseidon2_A_51_0) + poseidon2_SUM_51))); + (new_term.poseidon2_B_50_1 - ((poseidon2_params_MU_1 * poseidon2_A_50_1) + poseidon2_SUM_50))); tmp *= scaling_factor; std::get<217>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<218, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_51_1 - ((poseidon2_params_MU_1 * poseidon2_A_51_1) + poseidon2_SUM_51))); + (new_term.poseidon2_B_50_2 - ((poseidon2_params_MU_2 * poseidon2_A_50_2) + poseidon2_SUM_50))); tmp *= scaling_factor; std::get<218>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<219, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_51_2 - ((poseidon2_params_MU_2 * poseidon2_A_51_2) + poseidon2_SUM_51))); + (new_term.poseidon2_B_50_3 - ((poseidon2_params_MU_3 * poseidon2_A_50_3) + poseidon2_SUM_50))); tmp *= scaling_factor; std::get<219>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<220, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_51_3 - ((poseidon2_params_MU_3 * poseidon2_A_51_3) + poseidon2_SUM_51))); + (new_term.poseidon2_B_51_0 - ((poseidon2_params_MU_0 * poseidon2_A_51_0) + poseidon2_SUM_51))); tmp *= scaling_factor; std::get<220>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<221, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_52_0 - ((poseidon2_params_MU_0 * poseidon2_A_52_0) + poseidon2_SUM_52))); + (new_term.poseidon2_B_51_1 - ((poseidon2_params_MU_1 * poseidon2_A_51_1) + poseidon2_SUM_51))); tmp *= scaling_factor; std::get<221>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<222, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_52_1 - ((poseidon2_params_MU_1 * poseidon2_A_52_1) + poseidon2_SUM_52))); + (new_term.poseidon2_B_51_2 - ((poseidon2_params_MU_2 * poseidon2_A_51_2) + poseidon2_SUM_51))); tmp *= scaling_factor; std::get<222>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<223, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_52_2 - ((poseidon2_params_MU_2 * poseidon2_A_52_2) + poseidon2_SUM_52))); + (new_term.poseidon2_B_51_3 - ((poseidon2_params_MU_3 * poseidon2_A_51_3) + poseidon2_SUM_51))); tmp *= scaling_factor; std::get<223>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<224, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_52_3 - ((poseidon2_params_MU_3 * poseidon2_A_52_3) + poseidon2_SUM_52))); + (new_term.poseidon2_B_52_0 - ((poseidon2_params_MU_0 * poseidon2_A_52_0) + poseidon2_SUM_52))); tmp *= scaling_factor; std::get<224>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<225, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_53_0 - ((poseidon2_params_MU_0 * poseidon2_A_53_0) + poseidon2_SUM_53))); + (new_term.poseidon2_B_52_1 - ((poseidon2_params_MU_1 * poseidon2_A_52_1) + poseidon2_SUM_52))); tmp *= scaling_factor; std::get<225>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<226, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_53_1 - ((poseidon2_params_MU_1 * poseidon2_A_53_1) + poseidon2_SUM_53))); + (new_term.poseidon2_B_52_2 - ((poseidon2_params_MU_2 * poseidon2_A_52_2) + poseidon2_SUM_52))); tmp *= scaling_factor; std::get<226>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<227, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_53_2 - ((poseidon2_params_MU_2 * poseidon2_A_53_2) + poseidon2_SUM_53))); + (new_term.poseidon2_B_52_3 - ((poseidon2_params_MU_3 * poseidon2_A_52_3) + poseidon2_SUM_52))); tmp *= scaling_factor; std::get<227>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<228, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_53_3 - ((poseidon2_params_MU_3 * poseidon2_A_53_3) + poseidon2_SUM_53))); + (new_term.poseidon2_B_53_0 - ((poseidon2_params_MU_0 * poseidon2_A_53_0) + poseidon2_SUM_53))); tmp *= scaling_factor; std::get<228>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<229, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_54_0 - ((poseidon2_params_MU_0 * poseidon2_A_54_0) + poseidon2_SUM_54))); + (new_term.poseidon2_B_53_1 - ((poseidon2_params_MU_1 * poseidon2_A_53_1) + poseidon2_SUM_53))); tmp *= scaling_factor; std::get<229>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<230, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_54_1 - ((poseidon2_params_MU_1 * poseidon2_A_54_1) + poseidon2_SUM_54))); + (new_term.poseidon2_B_53_2 - ((poseidon2_params_MU_2 * poseidon2_A_53_2) + poseidon2_SUM_53))); tmp *= scaling_factor; std::get<230>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<231, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_54_2 - ((poseidon2_params_MU_2 * poseidon2_A_54_2) + poseidon2_SUM_54))); + (new_term.poseidon2_B_53_3 - ((poseidon2_params_MU_3 * poseidon2_A_53_3) + poseidon2_SUM_53))); tmp *= scaling_factor; std::get<231>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<232, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_54_3 - ((poseidon2_params_MU_3 * poseidon2_A_54_3) + poseidon2_SUM_54))); + (new_term.poseidon2_B_54_0 - ((poseidon2_params_MU_0 * poseidon2_A_54_0) + poseidon2_SUM_54))); tmp *= scaling_factor; std::get<232>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<233, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_55_0 - ((poseidon2_params_MU_0 * poseidon2_A_55_0) + poseidon2_SUM_55))); + (new_term.poseidon2_B_54_1 - ((poseidon2_params_MU_1 * poseidon2_A_54_1) + poseidon2_SUM_54))); tmp *= scaling_factor; std::get<233>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<234, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_55_1 - ((poseidon2_params_MU_1 * poseidon2_A_55_1) + poseidon2_SUM_55))); + (new_term.poseidon2_B_54_2 - ((poseidon2_params_MU_2 * poseidon2_A_54_2) + poseidon2_SUM_54))); tmp *= scaling_factor; std::get<234>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<235, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_55_2 - ((poseidon2_params_MU_2 * poseidon2_A_55_2) + poseidon2_SUM_55))); + (new_term.poseidon2_B_54_3 - ((poseidon2_params_MU_3 * poseidon2_A_54_3) + poseidon2_SUM_54))); tmp *= scaling_factor; std::get<235>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<236, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_55_3 - ((poseidon2_params_MU_3 * poseidon2_A_55_3) + poseidon2_SUM_55))); + (new_term.poseidon2_B_55_0 - ((poseidon2_params_MU_0 * poseidon2_A_55_0) + poseidon2_SUM_55))); tmp *= scaling_factor; std::get<236>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<237, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_56_0 - ((poseidon2_params_MU_0 * poseidon2_A_56_0) + poseidon2_SUM_56))); + (new_term.poseidon2_B_55_1 - ((poseidon2_params_MU_1 * poseidon2_A_55_1) + poseidon2_SUM_55))); tmp *= scaling_factor; std::get<237>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<238, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_56_1 - ((poseidon2_params_MU_1 * poseidon2_A_56_1) + poseidon2_SUM_56))); + (new_term.poseidon2_B_55_2 - ((poseidon2_params_MU_2 * poseidon2_A_55_2) + poseidon2_SUM_55))); tmp *= scaling_factor; std::get<238>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<239, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_56_2 - ((poseidon2_params_MU_2 * poseidon2_A_56_2) + poseidon2_SUM_56))); + (new_term.poseidon2_B_55_3 - ((poseidon2_params_MU_3 * poseidon2_A_55_3) + poseidon2_SUM_55))); tmp *= scaling_factor; std::get<239>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<240, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_56_3 - ((poseidon2_params_MU_3 * poseidon2_A_56_3) + poseidon2_SUM_56))); + (new_term.poseidon2_B_56_0 - ((poseidon2_params_MU_0 * poseidon2_A_56_0) + poseidon2_SUM_56))); tmp *= scaling_factor; std::get<240>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<241, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_57_0 - ((poseidon2_params_MU_0 * poseidon2_A_57_0) + poseidon2_SUM_57))); + (new_term.poseidon2_B_56_1 - ((poseidon2_params_MU_1 * poseidon2_A_56_1) + poseidon2_SUM_56))); tmp *= scaling_factor; std::get<241>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<242, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_57_1 - ((poseidon2_params_MU_1 * poseidon2_A_57_1) + poseidon2_SUM_57))); + (new_term.poseidon2_B_56_2 - ((poseidon2_params_MU_2 * poseidon2_A_56_2) + poseidon2_SUM_56))); tmp *= scaling_factor; std::get<242>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<243, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_57_2 - ((poseidon2_params_MU_2 * poseidon2_A_57_2) + poseidon2_SUM_57))); + (new_term.poseidon2_B_56_3 - ((poseidon2_params_MU_3 * poseidon2_A_56_3) + poseidon2_SUM_56))); tmp *= scaling_factor; std::get<243>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<244, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_57_3 - ((poseidon2_params_MU_3 * poseidon2_A_57_3) + poseidon2_SUM_57))); + (new_term.poseidon2_B_57_0 - ((poseidon2_params_MU_0 * poseidon2_A_57_0) + poseidon2_SUM_57))); tmp *= scaling_factor; std::get<244>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<245, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_58_0 - ((poseidon2_params_MU_0 * poseidon2_A_58_0) + poseidon2_SUM_58))); + (new_term.poseidon2_B_57_1 - ((poseidon2_params_MU_1 * poseidon2_A_57_1) + poseidon2_SUM_57))); tmp *= scaling_factor; std::get<245>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<246, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_58_1 - ((poseidon2_params_MU_1 * poseidon2_A_58_1) + poseidon2_SUM_58))); + (new_term.poseidon2_B_57_2 - ((poseidon2_params_MU_2 * poseidon2_A_57_2) + poseidon2_SUM_57))); tmp *= scaling_factor; std::get<246>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<247, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_58_2 - ((poseidon2_params_MU_2 * poseidon2_A_58_2) + poseidon2_SUM_58))); + (new_term.poseidon2_B_57_3 - ((poseidon2_params_MU_3 * poseidon2_A_57_3) + poseidon2_SUM_57))); tmp *= scaling_factor; std::get<247>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<248, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_58_3 - ((poseidon2_params_MU_3 * poseidon2_A_58_3) + poseidon2_SUM_58))); + (new_term.poseidon2_B_58_0 - ((poseidon2_params_MU_0 * poseidon2_A_58_0) + poseidon2_SUM_58))); tmp *= scaling_factor; std::get<248>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<249, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_59_0 - ((poseidon2_params_MU_0 * poseidon2_A_59_0) + poseidon2_SUM_59))); + (new_term.poseidon2_B_58_1 - ((poseidon2_params_MU_1 * poseidon2_A_58_1) + poseidon2_SUM_58))); tmp *= scaling_factor; std::get<249>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<250, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_59_1 - ((poseidon2_params_MU_1 * poseidon2_A_59_1) + poseidon2_SUM_59))); + (new_term.poseidon2_B_58_2 - ((poseidon2_params_MU_2 * poseidon2_A_58_2) + poseidon2_SUM_58))); tmp *= scaling_factor; std::get<250>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<251, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_59_2 - ((poseidon2_params_MU_2 * poseidon2_A_59_2) + poseidon2_SUM_59))); + (new_term.poseidon2_B_58_3 - ((poseidon2_params_MU_3 * poseidon2_A_58_3) + poseidon2_SUM_58))); tmp *= scaling_factor; std::get<251>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<252, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_B_59_3 - ((poseidon2_params_MU_3 * poseidon2_A_59_3) + poseidon2_SUM_59))); + (new_term.poseidon2_B_59_0 - ((poseidon2_params_MU_0 * poseidon2_A_59_0) + poseidon2_SUM_59))); tmp *= scaling_factor; std::get<252>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<253, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_60_4 - ((FF(4) * poseidon2_T_60_1) + poseidon2_T_60_3))); + (new_term.poseidon2_B_59_1 - ((poseidon2_params_MU_1 * poseidon2_A_59_1) + poseidon2_SUM_59))); tmp *= scaling_factor; std::get<253>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<254, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_60_5 - ((FF(4) * poseidon2_T_60_0) + poseidon2_T_60_2))); + (new_term.poseidon2_B_59_2 - ((poseidon2_params_MU_2 * poseidon2_A_59_2) + poseidon2_SUM_59))); tmp *= scaling_factor; std::get<254>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<255, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_60_6 - (poseidon2_T_60_3 + new_term.poseidon2_T_60_5))); + (new_term.poseidon2_B_59_3 - ((poseidon2_params_MU_3 * poseidon2_A_59_3) + poseidon2_SUM_59))); tmp *= scaling_factor; std::get<255>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<256, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_60_7 - (poseidon2_T_60_2 + new_term.poseidon2_T_60_4))); + (new_term.poseidon2_T_60_4 - ((FF(4) * poseidon2_T_60_1) + poseidon2_T_60_3))); tmp *= scaling_factor; std::get<256>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<257, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_61_4 - ((FF(4) * poseidon2_T_61_1) + poseidon2_T_61_3))); + (new_term.poseidon2_T_60_5 - ((FF(4) * poseidon2_T_60_0) + poseidon2_T_60_2))); tmp *= scaling_factor; std::get<257>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<258, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_61_5 - ((FF(4) * poseidon2_T_61_0) + poseidon2_T_61_2))); + (new_term.poseidon2_T_60_6 - (poseidon2_T_60_3 + new_term.poseidon2_T_60_5))); tmp *= scaling_factor; std::get<258>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<259, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_61_6 - (poseidon2_T_61_3 + new_term.poseidon2_T_61_5))); + (new_term.poseidon2_T_60_7 - (poseidon2_T_60_2 + new_term.poseidon2_T_60_4))); tmp *= scaling_factor; std::get<259>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<260, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_61_7 - (poseidon2_T_61_2 + new_term.poseidon2_T_61_4))); + (new_term.poseidon2_T_61_4 - ((FF(4) * poseidon2_T_61_1) + poseidon2_T_61_3))); tmp *= scaling_factor; std::get<260>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<261, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_62_4 - ((FF(4) * poseidon2_T_62_1) + poseidon2_T_62_3))); + (new_term.poseidon2_T_61_5 - ((FF(4) * poseidon2_T_61_0) + poseidon2_T_61_2))); tmp *= scaling_factor; std::get<261>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<262, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_62_5 - ((FF(4) * poseidon2_T_62_0) + poseidon2_T_62_2))); + (new_term.poseidon2_T_61_6 - (poseidon2_T_61_3 + new_term.poseidon2_T_61_5))); tmp *= scaling_factor; std::get<262>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<263, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_62_6 - (poseidon2_T_62_3 + new_term.poseidon2_T_62_5))); + (new_term.poseidon2_T_61_7 - (poseidon2_T_61_2 + new_term.poseidon2_T_61_4))); tmp *= scaling_factor; std::get<263>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<264, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_62_7 - (poseidon2_T_62_2 + new_term.poseidon2_T_62_4))); + (new_term.poseidon2_T_62_4 - ((FF(4) * poseidon2_T_62_1) + poseidon2_T_62_3))); tmp *= scaling_factor; std::get<264>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<265, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_63_4 - ((FF(4) * poseidon2_T_63_1) + poseidon2_T_63_3))); + (new_term.poseidon2_T_62_5 - ((FF(4) * poseidon2_T_62_0) + poseidon2_T_62_2))); tmp *= scaling_factor; std::get<265>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<266, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_63_5 - ((FF(4) * poseidon2_T_63_0) + poseidon2_T_63_2))); + (new_term.poseidon2_T_62_6 - (poseidon2_T_62_3 + new_term.poseidon2_T_62_5))); tmp *= scaling_factor; std::get<266>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<267, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_63_6 - (poseidon2_T_63_3 + new_term.poseidon2_T_63_5))); + (new_term.poseidon2_T_62_7 - (poseidon2_T_62_2 + new_term.poseidon2_T_62_4))); tmp *= scaling_factor; std::get<267>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<268, ContainerOverSubrelations>; auto tmp = (new_term.poseidon2_sel_poseidon_perm * - (new_term.poseidon2_T_63_7 - (poseidon2_T_63_2 + new_term.poseidon2_T_63_4))); + (new_term.poseidon2_T_63_4 - ((FF(4) * poseidon2_T_63_1) + poseidon2_T_63_3))); tmp *= scaling_factor; std::get<268>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<269, ContainerOverSubrelations>; - auto tmp = (new_term.poseidon2_sel_poseidon_perm * (new_term.poseidon2_b_0 - new_term.poseidon2_T_63_6)); + auto tmp = (new_term.poseidon2_sel_poseidon_perm * + (new_term.poseidon2_T_63_5 - ((FF(4) * poseidon2_T_63_0) + poseidon2_T_63_2))); tmp *= scaling_factor; std::get<269>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<270, ContainerOverSubrelations>; - auto tmp = (new_term.poseidon2_sel_poseidon_perm * (new_term.poseidon2_b_1 - new_term.poseidon2_T_63_5)); + auto tmp = (new_term.poseidon2_sel_poseidon_perm * + (new_term.poseidon2_T_63_6 - (poseidon2_T_63_3 + new_term.poseidon2_T_63_5))); tmp *= scaling_factor; std::get<270>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<271, ContainerOverSubrelations>; - auto tmp = (new_term.poseidon2_sel_poseidon_perm * (new_term.poseidon2_b_2 - new_term.poseidon2_T_63_7)); + auto tmp = (new_term.poseidon2_sel_poseidon_perm * + (new_term.poseidon2_T_63_7 - (poseidon2_T_63_2 + new_term.poseidon2_T_63_4))); tmp *= scaling_factor; std::get<271>(evals) += typename Accumulator::View(tmp); } { using Accumulator = typename std::tuple_element_t<272, ContainerOverSubrelations>; - auto tmp = (new_term.poseidon2_sel_poseidon_perm * (new_term.poseidon2_b_3 - new_term.poseidon2_T_63_4)); + auto tmp = (new_term.poseidon2_sel_poseidon_perm * (new_term.poseidon2_b_0 - new_term.poseidon2_T_63_6)); tmp *= scaling_factor; std::get<272>(evals) += typename Accumulator::View(tmp); } + { + using Accumulator = typename std::tuple_element_t<273, ContainerOverSubrelations>; + auto tmp = (new_term.poseidon2_sel_poseidon_perm * (new_term.poseidon2_b_1 - new_term.poseidon2_T_63_5)); + tmp *= scaling_factor; + std::get<273>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<274, ContainerOverSubrelations>; + auto tmp = (new_term.poseidon2_sel_poseidon_perm * (new_term.poseidon2_b_2 - new_term.poseidon2_T_63_7)); + tmp *= scaling_factor; + std::get<274>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<275, ContainerOverSubrelations>; + auto tmp = (new_term.poseidon2_sel_poseidon_perm * (new_term.poseidon2_b_3 - new_term.poseidon2_T_63_4)); + tmp *= scaling_factor; + std::get<275>(evals) += typename Accumulator::View(tmp); + } } }; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2_full.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2_full.hpp new file mode 100644 index 00000000000..7c8e5c33758 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/generated/relations/poseidon2_full.hpp @@ -0,0 +1,189 @@ +// AUTOGENERATED FILE +#pragma once + +#include "barretenberg/relations/relation_parameters.hpp" +#include "barretenberg/relations/relation_types.hpp" + +namespace bb::Avm_vm { + +template class poseidon2_fullImpl { + public: + using FF = FF_; + + static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { 3, 2, 3, 4, 4, 3, 3, 3, 5, 3, + 3, 3, 3, 6, 3, 6, 3, 6, 3, 6 }; + + template + void static accumulate(ContainerOverSubrelations& evals, + const AllEntities& new_term, + [[maybe_unused]] const RelationParameters&, + [[maybe_unused]] const FF& scaling_factor) + { + const auto poseidon2_full_TWOPOW64 = FF(uint256_t{ 0UL, 1UL, 0UL, 0UL }); + const auto poseidon2_full_IV = (poseidon2_full_TWOPOW64 * new_term.poseidon2_full_input_len); + const auto poseidon2_full_PADDED_LEN = (new_term.poseidon2_full_input_len + new_term.poseidon2_full_padding); + const auto poseidon2_full_NEXT_INPUT_IS_PREV_OUTPUT_SEL = + ((new_term.poseidon2_full_execute_poseidon_perm_shift * (FF(1) - new_term.poseidon2_full_start_poseidon)) * + new_term.poseidon2_full_execute_poseidon_perm); + + { + using Accumulator = typename std::tuple_element_t<0, ContainerOverSubrelations>; + auto tmp = (new_term.poseidon2_full_sel_poseidon * (FF(1) - new_term.poseidon2_full_sel_poseidon)); + tmp *= scaling_factor; + std::get<0>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<1, ContainerOverSubrelations>; + auto tmp = (new_term.poseidon2_full_sel_poseidon - + (new_term.poseidon2_full_execute_poseidon_perm + new_term.poseidon2_full_end_poseidon)); + tmp *= scaling_factor; + std::get<1>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<2, ContainerOverSubrelations>; + auto tmp = (new_term.poseidon2_full_start_poseidon * (FF(1) - new_term.poseidon2_full_start_poseidon)); + tmp *= scaling_factor; + std::get<2>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<3, ContainerOverSubrelations>; + auto tmp = ((new_term.poseidon2_full_sel_poseidon_shift * (FF(1) - new_term.main_sel_first)) * + (new_term.poseidon2_full_start_poseidon_shift - new_term.poseidon2_full_end_poseidon)); + tmp *= scaling_factor; + std::get<3>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<4, ContainerOverSubrelations>; + auto tmp = ((new_term.poseidon2_full_padding * (new_term.poseidon2_full_padding - FF(1))) * + (new_term.poseidon2_full_padding - FF(2))); + tmp *= scaling_factor; + std::get<4>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<5, ContainerOverSubrelations>; + auto tmp = (new_term.poseidon2_full_start_poseidon * + (((new_term.poseidon2_full_num_perm_rounds_rem + FF(1)) * FF(3)) - poseidon2_full_PADDED_LEN)); + tmp *= scaling_factor; + std::get<5>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<6, ContainerOverSubrelations>; + auto tmp = (new_term.poseidon2_full_end_poseidon * (FF(1) - new_term.poseidon2_full_end_poseidon)); + tmp *= scaling_factor; + std::get<6>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<7, ContainerOverSubrelations>; + auto tmp = + (new_term.poseidon2_full_end_poseidon * (new_term.poseidon2_full_output - new_term.poseidon2_full_b_0)); + tmp *= scaling_factor; + std::get<7>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<8, ContainerOverSubrelations>; + auto tmp = (new_term.poseidon2_full_sel_poseidon * + (((new_term.poseidon2_full_num_perm_rounds_rem * + ((new_term.poseidon2_full_end_poseidon * + (FF(1) - new_term.poseidon2_full_num_perm_rounds_rem_inv)) + + new_term.poseidon2_full_num_perm_rounds_rem_inv)) - + FF(1)) + + new_term.poseidon2_full_end_poseidon)); + tmp *= scaling_factor; + std::get<8>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<9, ContainerOverSubrelations>; + auto tmp = (new_term.poseidon2_full_execute_poseidon_perm * + (FF(1) - new_term.poseidon2_full_execute_poseidon_perm)); + tmp *= scaling_factor; + std::get<9>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<10, ContainerOverSubrelations>; + auto tmp = (new_term.poseidon2_full_sel_poseidon * ((FF(1) - new_term.poseidon2_full_end_poseidon) - + new_term.poseidon2_full_execute_poseidon_perm)); + tmp *= scaling_factor; + std::get<10>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<11, ContainerOverSubrelations>; + auto tmp = + (new_term.poseidon2_full_execute_poseidon_perm * + ((new_term.poseidon2_full_num_perm_rounds_rem_shift - new_term.poseidon2_full_num_perm_rounds_rem) + + FF(1))); + tmp *= scaling_factor; + std::get<11>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<12, ContainerOverSubrelations>; + auto tmp = (new_term.poseidon2_full_start_poseidon * + (new_term.poseidon2_full_a_0 - new_term.poseidon2_full_input_0)); + tmp *= scaling_factor; + std::get<12>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<13, ContainerOverSubrelations>; + auto tmp = ((new_term.poseidon2_full_sel_poseidon * poseidon2_full_NEXT_INPUT_IS_PREV_OUTPUT_SEL) * + ((new_term.poseidon2_full_a_0_shift - new_term.poseidon2_full_b_0) - + new_term.poseidon2_full_input_0_shift)); + tmp *= scaling_factor; + std::get<13>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<14, ContainerOverSubrelations>; + auto tmp = (new_term.poseidon2_full_start_poseidon * + (new_term.poseidon2_full_a_1 - new_term.poseidon2_full_input_1)); + tmp *= scaling_factor; + std::get<14>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<15, ContainerOverSubrelations>; + auto tmp = ((new_term.poseidon2_full_sel_poseidon * poseidon2_full_NEXT_INPUT_IS_PREV_OUTPUT_SEL) * + ((new_term.poseidon2_full_a_1_shift - new_term.poseidon2_full_b_1) - + new_term.poseidon2_full_input_1_shift)); + tmp *= scaling_factor; + std::get<15>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<16, ContainerOverSubrelations>; + auto tmp = (new_term.poseidon2_full_start_poseidon * + (new_term.poseidon2_full_a_2 - new_term.poseidon2_full_input_2)); + tmp *= scaling_factor; + std::get<16>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<17, ContainerOverSubrelations>; + auto tmp = ((new_term.poseidon2_full_sel_poseidon * poseidon2_full_NEXT_INPUT_IS_PREV_OUTPUT_SEL) * + ((new_term.poseidon2_full_a_2_shift - new_term.poseidon2_full_b_2) - + new_term.poseidon2_full_input_2_shift)); + tmp *= scaling_factor; + std::get<17>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<18, ContainerOverSubrelations>; + auto tmp = (new_term.poseidon2_full_start_poseidon * (new_term.poseidon2_full_a_3 - poseidon2_full_IV)); + tmp *= scaling_factor; + std::get<18>(evals) += typename Accumulator::View(tmp); + } + { + using Accumulator = typename std::tuple_element_t<19, ContainerOverSubrelations>; + auto tmp = ((new_term.poseidon2_full_sel_poseidon * poseidon2_full_NEXT_INPUT_IS_PREV_OUTPUT_SEL) * + (new_term.poseidon2_full_a_3_shift - new_term.poseidon2_full_b_3)); + tmp *= scaling_factor; + std::get<19>(evals) += typename Accumulator::View(tmp); + } + } +}; + +template class poseidon2_full : public Relation> { + public: + static constexpr const char* NAME = "poseidon2_full"; + + 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/tests/full_poseidon2.test.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/tests/full_poseidon2.test.cpp new file mode 100644 index 00000000000..3083fc6d610 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/vm/avm/tests/full_poseidon2.test.cpp @@ -0,0 +1,106 @@ + +#include "barretenberg/common/thread.hpp" +#include "barretenberg/crypto/poseidon2/poseidon2.hpp" +#include "barretenberg/crypto/poseidon2/poseidon2_params.hpp" +#include "barretenberg/vm/avm/generated/circuit_builder.hpp" +#include "barretenberg/vm/avm/generated/flavor.hpp" +#include "barretenberg/vm/avm/generated/full_row.hpp" +#include "barretenberg/vm/avm/trace/fixed_powers.hpp" + +#include "barretenberg/vm/avm/trace/gadgets/poseidon2.hpp" +#include +#include + +namespace tests_avm { +using namespace bb; +using namespace bb::Avm_vm; + +TEST(AvmFullPoseidon2, shouldHashCorrectly) +{ + + using FF = AvmFlavor::FF; + constexpr size_t TRACE_SIZE = 1 << 8; + + std::vector> trace(TRACE_SIZE); + + bb::avm_trace::AvmPoseidon2TraceBuilder poseidon2_builder; + std::cerr << "Generating trace of size " << TRACE_SIZE << "..." << std::endl; + + // Create a bunch of random elements and hash them. + size_t num_elems = 10; + std::vector random_elems; + for (uint32_t i = 0; i < 8; ++i) { + for (size_t i = 0; i < num_elems; ++i) { + random_elems.push_back(FF::random_element()); + } + FF builder_result = poseidon2_builder.poseidon2_hash(random_elems, i); + FF expected_result = crypto::Poseidon2::hash(random_elems); + EXPECT_EQ(builder_result, expected_result); + } + + poseidon2_builder.finalize_full(trace); + auto finalised_builder = poseidon2_builder.finalize(); + for (size_t i = 0; i < finalised_builder.size(); i++) { + auto& dest = trace.at(i); + auto const& src = finalised_builder.at(i); + dest.poseidon2_clk = FF(src.clk); + merge_into(dest, src); + } + + trace.insert(trace.begin(), bb::AvmFullRow{ .main_sel_first = FF(1), .mem_lastAccess = FF(1) }); + // We build the polynomials needed to run "sumcheck". + AvmCircuitBuilder cb; + cb.set_trace(std::move(trace)); + auto polys = cb.compute_polynomials(); + const size_t num_rows = polys.get_polynomial_size(); + std::cerr << "Done computing polynomials..." << std::endl; + + std::cerr << "Accumulating relations..." << std::endl; + using Relation = Avm_vm::poseidon2_full; + + typename Relation::SumcheckArrayOfValuesOverSubrelations result; + for (auto& r : result) { + r = 0; + } + + // We set the conditions up there. + for (size_t r = 0; r < num_rows; ++r) { + Relation::accumulate(result, polys.get_row(r), {}, 1); + } + + for (size_t j = 0; j < result.size(); ++j) { + if (result[j] != 0) { + EXPECT_EQ(result[j], 0) << "Relation " << Relation::NAME << " subrelation " + << Relation::get_subrelation_label(j) << " was expected to be zero."; + } + } + + std::cerr << "Accumulating permutation relations..." << std::endl; + + const FF gamma = FF::random_element(); + const FF beta = FF::random_element(); + bb::RelationParameters params{ + .beta = beta, + .gamma = gamma, + }; + using PermRelations = perm_pos2_fixed_pos2_perm_relation; + + // Check the logderivative relation + bb::compute_logderivative_inverse(polys, params, num_rows); + + typename PermRelations::SumcheckArrayOfValuesOverSubrelations lookup_result; + + for (auto& r : lookup_result) { + r = 0; + } + for (size_t r = 0; r < num_rows; ++r) { + PermRelations::accumulate(lookup_result, polys.get_row(r), params, 1); + } + for (const auto& j : lookup_result) { + if (j != 0) { + EXPECT_EQ(j, 0) << "Lookup Relation " << PermRelations::NAME << " subrelation "; + } + } +} + +} // namespace tests_avm diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/tests/fuzz_skippable.test.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/tests/fuzz_skippable.test.cpp index 15b13751168..6dc6e89bac7 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/tests/fuzz_skippable.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/tests/fuzz_skippable.test.cpp @@ -37,6 +37,8 @@ TEST(AvmSkippableTests, shouldSkipCorrectly) // Set the conditions for skippable to return true. row.poseidon2_sel_poseidon_perm = 0; + row.poseidon2_sel_poseidon_perm_mem_op = 0; + row.poseidon2_sel_poseidon_perm_immediate = 0; }); // We build the polynomials needed to run "sumcheck". diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/trace/gadgets/poseidon2.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/trace/gadgets/poseidon2.cpp index d4c8c5e3307..4f73557b105 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/trace/gadgets/poseidon2.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/trace/gadgets/poseidon2.cpp @@ -1,8 +1,11 @@ #include "barretenberg/vm/avm/trace/gadgets/poseidon2.hpp" +#include "barretenberg/crypto/poseidon2/poseidon2.hpp" #include "barretenberg/crypto/poseidon2/poseidon2_permutation.hpp" +#include "barretenberg/ecc/curves/bn254/fr.hpp" #include "barretenberg/vm/avm/trace/common.hpp" namespace bb::avm_trace { +using Poseidon2 = crypto::Poseidon2Permutation; std::vector AvmPoseidon2TraceBuilder::finalize() { @@ -15,14 +18,12 @@ void AvmPoseidon2TraceBuilder::reset() poseidon2_trace.shrink_to_fit(); // Reclaim memory. } -std::array AvmPoseidon2TraceBuilder::poseidon2_permutation( - std::array const& input, uint32_t space_id, uint32_t clk, uint32_t input_addr, uint32_t output_addr) +AvmPoseidon2TraceBuilder::Poseidon2TraceEntry gen_poseidon_perm_entry(const std::array& input, uint32_t clk) { // Currently we commit to intermediate round values, changes to codegen might reduce the number of committed polys // This is lifted from bb::poeidon2, we need to extract the intermediate round values here. using State = std::array; - using Poseidon2 = crypto::Poseidon2Permutation; std::array interm_round_vals; State current_state(input); @@ -59,10 +60,110 @@ std::array AvmPoseidon2TraceBuilder::poseidon2_permutation( } // Current state is the output - poseidon2_trace.push_back(Poseidon2TraceEntry{ - space_id, clk, input, current_state, first_ext, interm_round_vals, input_addr, output_addr }); + return AvmPoseidon2TraceBuilder::Poseidon2TraceEntry{ + .clk = clk, + .input = input, + .output = current_state, + .first_ext = first_ext, + .interm_round_vals = interm_round_vals, + }; +} - return current_state; +std::array AvmPoseidon2TraceBuilder::poseidon2_permutation( + std::array const& input, uint32_t space_id, uint32_t clk, uint32_t input_addr, uint32_t output_addr) +{ + auto entry = gen_poseidon_perm_entry(input, clk); + entry.input_addr = input_addr; + entry.output_addr = output_addr; + entry.is_mem_op = true; + entry.space_id = space_id; + poseidon2_trace.push_back(entry); + + return entry.output; } +FF AvmPoseidon2TraceBuilder::poseidon2_hash(std::vector input, uint32_t clk) +{ + using Poseidon2 = crypto::Poseidon2; + FF output = Poseidon2::hash(input); + // 64 rounds of hashing should be enough (1 << 6 == 64) per full hash invocation + // This completely arbitrary and we might change this in the future + // But we need a way to allow multiple rows of poseidon2 permutation per poseidon2 full call + auto entry_clk = clk << 6; + // Add the full hash trace event + poseidon2_hash_trace.push_back(Poseidon2FullTraceEntry{ + .clk = entry_clk, + .input = input, + .output = output, + .input_length = input.size(), + }); + + const FF iv = (static_cast(input.size()) << 64); + std::array input_array = { 0, 0, 0, iv }; + + size_t padded_size = 3 * ((input.size() + 2) / 3); + input.resize(padded_size, FF::zero()); + for (size_t i = 0; i < input.size(); i += 3) { + input_array[0] += input[i]; + input_array[1] += input[i + 1]; + input_array[2] += input[i + 2]; + + auto entry_idx = entry_clk + (i / 3); + auto entry = gen_poseidon_perm_entry(input_array, static_cast(entry_idx)); + entry.is_immediate = true; + poseidon2_trace.push_back(entry); + input_array = entry.output; + } + return output; +} + +void AvmPoseidon2TraceBuilder::finalize_full(std::vector>& main_trace) +{ + size_t main_trace_counter = 0; + + for (const auto& src : poseidon2_hash_trace) { + size_t padded_size = 3 * ((src.input_length + 2) / 3); + auto num_rounds = padded_size / 3; + auto num_rounds_rem = num_rounds - 1; + // Get the permutation event associated with the first round of the full hash + auto perm_event = std::find_if( + poseidon2_trace.begin(), poseidon2_trace.end(), [src](auto const& entry) { return entry.clk == src.clk; }); + ASSERT(perm_event != poseidon2_trace.end()); // "Could not find corresponding permutation event" + + for (size_t j = 0; j < num_rounds; j++) { + auto& dest = main_trace.at(main_trace_counter++); + dest.poseidon2_full_input_len = src.input_length; + dest.poseidon2_full_sel_poseidon = FF::one(); + dest.poseidon2_full_clk = src.clk + j; + dest.poseidon2_full_input_0 = src.input[3 * j]; + dest.poseidon2_full_input_1 = src.input[3 * j + 1]; + dest.poseidon2_full_input_2 = src.input[3 * j + 2]; + dest.poseidon2_full_output = src.output; + dest.poseidon2_full_num_perm_rounds_rem = num_rounds_rem; + dest.poseidon2_full_padding = padded_size - src.input_length; + dest.poseidon2_full_num_perm_rounds_rem_inv = num_rounds_rem == 0 ? 0 : FF(num_rounds_rem).invert(); + + dest.poseidon2_full_a_0 = perm_event->input[0]; + dest.poseidon2_full_a_1 = perm_event->input[1]; + dest.poseidon2_full_a_2 = perm_event->input[2]; + dest.poseidon2_full_a_3 = perm_event->input[3]; + dest.poseidon2_full_b_0 = perm_event->output[0]; + dest.poseidon2_full_b_1 = perm_event->output[1]; + dest.poseidon2_full_b_2 = perm_event->output[2]; + dest.poseidon2_full_b_3 = perm_event->output[3]; + + if (j == 0) { + dest.poseidon2_full_start_poseidon = FF::one(); + } + if (num_rounds_rem == 0) { + dest.poseidon2_full_end_poseidon = FF::one(); + } else { + dest.poseidon2_full_execute_poseidon_perm = FF::one(); + num_rounds_rem--; + } + // Careful - we assume here that the permutation events are in order + perm_event++; + } + } +} } // namespace bb::avm_trace diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/trace/gadgets/poseidon2.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/trace/gadgets/poseidon2.hpp index b023e7c4049..0f68c641eb0 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/trace/gadgets/poseidon2.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/trace/gadgets/poseidon2.hpp @@ -11,15 +11,25 @@ namespace bb::avm_trace { class AvmPoseidon2TraceBuilder { public: + struct Poseidon2FullTraceEntry { + uint32_t clk = 0; + std::vector input; + FF output{}; + size_t input_length = 0; + }; struct Poseidon2TraceEntry { uint32_t space_id = 0; uint32_t clk = 0; - std::array input; - std::array output; - std::array first_ext; - std::array, 64> interm_round_vals; - uint32_t input_addr; - uint32_t output_addr; + std::array input{}; + std::array output{}; + std::array first_ext{}; + std::array, 64> interm_round_vals{}; + uint32_t input_addr = 0; + uint32_t output_addr = 0; + // If we are using the permutation gadget internally (no mem access) + bool is_immediate = false; + // If we are using the permutation gadget against mem offsets + bool is_mem_op = false; }; AvmPoseidon2TraceBuilder() = default; @@ -28,10 +38,14 @@ class AvmPoseidon2TraceBuilder { std::vector finalize(); std::array poseidon2_permutation( - std::array const& input, uint32_t space_id, uint32_t clk, uint32_t input_addr, uint32_t output_addr); + const std::array& input, uint32_t space_id, uint32_t clk, uint32_t input_addr, uint32_t output_addr); + FF poseidon2_hash(std::vector input, uint32_t clk); + // Finalize for the full poseidon hash + void finalize_full(std::vector>& main_trace); private: std::vector poseidon2_trace; + std::vector poseidon2_hash_trace; }; template void merge_into(DestRow& dest, const AvmPoseidon2TraceBuilder::Poseidon2TraceEntry& src) @@ -57,6 +71,8 @@ template void merge_into(DestRow& dest, const AvmPoseidon2Tra dest.poseidon2_mem_addr_write_d = src.output_addr + 3; dest.poseidon2_space_id = src.space_id; dest.poseidon2_sel_poseidon_perm = FF(1); + dest.poseidon2_sel_poseidon_perm_immediate = src.is_immediate ? FF(1) : FF(0); + dest.poseidon2_sel_poseidon_perm_mem_op = src.is_mem_op ? FF(1) : FF(0); // First Ext Round dest.poseidon2_EXT_LAYER_6 = src.first_ext[0]; dest.poseidon2_EXT_LAYER_5 = src.first_ext[1]; diff --git a/barretenberg/cpp/src/barretenberg/vm/aztec_constants.hpp b/barretenberg/cpp/src/barretenberg/vm/aztec_constants.hpp index 20286f4db87..aa35d864f5e 100644 --- a/barretenberg/cpp/src/barretenberg/vm/aztec_constants.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/aztec_constants.hpp @@ -35,7 +35,7 @@ #define PUBLIC_CIRCUIT_PUBLIC_INPUTS_LENGTH 674 #define PUBLIC_CONTEXT_INPUTS_LENGTH 41 #define AVM_VERIFICATION_KEY_LENGTH_IN_FIELDS 86 -#define AVM_PROOF_LENGTH_IN_FIELDS 3823 +#define AVM_PROOF_LENGTH_IN_FIELDS 3949 #define AVM_PUBLIC_COLUMN_MAX_SIZE 1024 #define AVM_PUBLIC_INPUTS_FLATTENED_SIZE 2722 #define MEM_TAG_FF 0 diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr b/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr index 311b47a8264..ae51e49b698 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr @@ -332,7 +332,7 @@ global AVM_VERIFICATION_KEY_LENGTH_IN_FIELDS: u32 = 2 + 21 * 4; // `AVM_PROOF_LENGTH_IN_FIELDS` must be updated when AVM circuit changes. // To determine latest value, hover `COMPUTED_AVM_PROOF_LENGTH_IN_FIELDS` // in barretenberg/cpp/src/barretenberg/vm/avm/generated/flavor.hpp -global AVM_PROOF_LENGTH_IN_FIELDS: u32 = 3823; +global AVM_PROOF_LENGTH_IN_FIELDS: u32 = 3949; global AVM_PUBLIC_COLUMN_MAX_SIZE : u32 = 1024; global AVM_PUBLIC_INPUTS_FLATTENED_SIZE : u32 = 2 * AVM_PUBLIC_COLUMN_MAX_SIZE + PUBLIC_CIRCUIT_PUBLIC_INPUTS_LENGTH; /** diff --git a/yarn-project/circuits.js/src/constants.gen.ts b/yarn-project/circuits.js/src/constants.gen.ts index 625bc5c45d3..73680d79e42 100644 --- a/yarn-project/circuits.js/src/constants.gen.ts +++ b/yarn-project/circuits.js/src/constants.gen.ts @@ -216,7 +216,7 @@ export const TUBE_PROOF_LENGTH = 463; export const HONK_VERIFICATION_KEY_LENGTH_IN_FIELDS = 128; export const CLIENT_IVC_VERIFICATION_KEY_LENGTH_IN_FIELDS = 145; export const AVM_VERIFICATION_KEY_LENGTH_IN_FIELDS = 86; -export const AVM_PROOF_LENGTH_IN_FIELDS = 3823; +export const AVM_PROOF_LENGTH_IN_FIELDS = 3949; export const AVM_PUBLIC_COLUMN_MAX_SIZE = 1024; export const AVM_PUBLIC_INPUTS_FLATTENED_SIZE = 2722; export const MEM_TAG_FF = 0;