From 806cea410fab8e8352adeb1fc31022d59dd98b45 Mon Sep 17 00:00:00 2001 From: jeanmon Date: Thu, 11 Apr 2024 06:43:25 +0000 Subject: [PATCH] 5557: rebase on master fixing conflicts --- .../relations/generated/avm/avm_alu.hpp | 33 +-- .../relations/generated/avm/avm_main.hpp | 240 +++++++++++------- .../barretenberg/vm/avm_trace/avm_trace.cpp | 8 +- .../vm/generated/avm_circuit_builder.hpp | 37 +-- .../barretenberg/vm/generated/avm_flavor.hpp | 77 +----- .../barretenberg/vm/generated/avm_prover.cpp | 66 ----- .../vm/generated/avm_verifier.cpp | 13 - 7 files changed, 167 insertions(+), 307 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/avm_alu.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/avm_alu.hpp index 84612d3fe23..fc4fcff7998 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/avm_alu.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/avm_alu.hpp @@ -271,18 +271,10 @@ template class avm_aluImpl { { Avm_DECLARE_VIEWS(9); - auto tmp = - (((avm_alu_op_add + avm_alu_op_sub) * - ((((((((((avm_alu_u8_r0 + (avm_alu_u8_r1 * FF(256))) + (avm_alu_u16_r0 * FF(65536))) + - (avm_alu_u16_r1 * FF(4294967296UL))) + - (avm_alu_u16_r2 * FF(281474976710656UL))) + - (avm_alu_u16_r3 * FF(uint256_t{ 0, 1, 0, 0 }))) + - (avm_alu_u16_r4 * FF(uint256_t{ 0, 65536, 0, 0 }))) + - (avm_alu_u16_r5 * FF(uint256_t{ 0, 4294967296, 0, 0 }))) + - (avm_alu_u16_r6 * FF(uint256_t{ 0, 281474976710656, 0, 0 }))) - - avm_alu_ia) + - (avm_alu_ff_tag * avm_alu_ic))) + - ((avm_alu_op_add - avm_alu_op_sub) * ((avm_alu_cf * FF(uint256_t{ 0, 0, 1, 0 })) - avm_alu_ib))); + auto tmp = (avm_alu_in_tag - (((((avm_alu_u8_tag + (avm_alu_u16_tag * FF(2))) + (avm_alu_u32_tag * FF(3))) + + (avm_alu_u64_tag * FF(4))) + + (avm_alu_u128_tag * FF(5))) + + (avm_alu_ff_tag * FF(6)))); tmp *= scaling_factor; std::get<9>(evals) += tmp; } @@ -336,15 +328,7 @@ template class avm_aluImpl { { Avm_DECLARE_VIEWS(12); - auto tmp = ((((-avm_alu_ff_tag + FF(1)) - avm_alu_u128_tag) * avm_alu_op_mul) * - (((((((((avm_alu_u8_r0 + (avm_alu_u8_r1 * FF(256))) + (avm_alu_u16_r0 * FF(65536))) + - (avm_alu_u16_r1 * FF(4294967296UL))) + - (avm_alu_u16_r2 * FF(281474976710656UL))) + - (avm_alu_u16_r3 * FF(uint256_t{ 0, 1, 0, 0 }))) + - (avm_alu_u16_r4 * FF(uint256_t{ 0, 65536, 0, 0 }))) + - (avm_alu_u16_r5 * FF(uint256_t{ 0, 4294967296, 0, 0 }))) + - (avm_alu_u16_r6 * FF(uint256_t{ 0, 281474976710656, 0, 0 }))) - - (avm_alu_ia * avm_alu_ib))); + auto tmp = ((avm_alu_ff_tag * avm_alu_op_mul) * ((avm_alu_ia * avm_alu_ib) - avm_alu_ic)); tmp *= scaling_factor; std::get<12>(evals) += tmp; } @@ -434,12 +418,7 @@ template class avm_aluImpl { { Avm_DECLARE_VIEWS(18); - auto tmp = (avm_alu_op_not * - ((avm_alu_ia + avm_alu_ic) - ((((((avm_alu_u8_tag * FF(256)) + (avm_alu_u16_tag * FF(65536))) + - (avm_alu_u32_tag * FF(4294967296UL))) + - (avm_alu_u64_tag * FF(uint256_t{ 0, 1, 0, 0 }))) + - (avm_alu_u128_tag * FF(uint256_t{ 0, 0, 1, 0 }))) - - FF(1)))); + auto tmp = (avm_alu_op_not * avm_alu_ff_tag); tmp *= scaling_factor; std::get<18>(evals) += tmp; } diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/avm_main.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/avm_main.hpp index dffbb6e62b9..74e611ac699 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/avm_main.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/avm_main.hpp @@ -63,52 +63,52 @@ template struct Avm_mainRow { inline std::string get_relation_label_avm_main(int index) { switch (index) { - case 28: - return "EQ_OUTPUT_U8"; + case 32: + return "OUTPUT_U8"; - case 31: + case 33: return "SUBOP_DIVISION_FF"; - case 32: + case 34: return "SUBOP_DIVISION_ZERO_ERR1"; - case 33: + case 35: return "SUBOP_DIVISION_ZERO_ERR2"; - case 34: + case 36: return "SUBOP_ERROR_RELEVANT_OP"; - case 36: + case 38: return "RETURN_POINTER_INCREMENT"; - case 42: + case 44: return "RETURN_POINTER_DECREMENT"; - case 47: + case 49: return "PC_INCREMENT"; - case 48: + case 50: return "INTERNAL_RETURN_POINTER_CONSISTENCY"; - case 49: + case 51: return "CMOV_CONDITION_RES_1"; - case 50: + case 52: return "CMOV_CONDITION_RES_2"; - case 53: + case 55: return "MOV_SAME_VALUE_A"; - case 54: + case 56: return "MOV_SAME_VALUE_B"; - case 55: + case 57: return "MOV_MAIN_SAME_TAG"; - case 57: + case 59: return "BIN_SEL_1"; - case 51: + case 60: return "BIN_SEL_2"; } return std::to_string(index); @@ -118,9 +118,9 @@ template class avm_mainImpl { public: using FF = FF_; - static constexpr std::array SUBRELATION_PARTIAL_LENGTHS{ - 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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, 3, 3, 2, + static constexpr std::array SUBRELATION_PARTIAL_LENGTHS{ + 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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, }; template @@ -246,7 +246,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(14); - auto tmp = (avm_main_op_err * (-avm_main_op_err + FF(1))); + auto tmp = (avm_main_sel_halt * (-avm_main_sel_halt + FF(1))); tmp *= scaling_factor; std::get<14>(evals) += tmp; } @@ -254,7 +254,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(15); - auto tmp = (avm_main_tag_err * (-avm_main_tag_err + FF(1))); + auto tmp = (avm_main_sel_mov * (-avm_main_sel_mov + FF(1))); tmp *= scaling_factor; std::get<15>(evals) += tmp; } @@ -262,7 +262,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(16); - auto tmp = (avm_main_mem_op_a * (-avm_main_mem_op_a + FF(1))); + auto tmp = (avm_main_sel_cmov * (-avm_main_sel_cmov + FF(1))); tmp *= scaling_factor; std::get<16>(evals) += tmp; } @@ -270,7 +270,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(17); - auto tmp = (avm_main_mem_op_b * (-avm_main_mem_op_b + FF(1))); + auto tmp = (avm_main_op_err * (-avm_main_op_err + FF(1))); tmp *= scaling_factor; std::get<17>(evals) += tmp; } @@ -278,7 +278,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(18); - auto tmp = (avm_main_mem_op_a * (-avm_main_mem_op_a + FF(1))); + auto tmp = (avm_main_tag_err * (-avm_main_tag_err + FF(1))); tmp *= scaling_factor; std::get<18>(evals) += tmp; } @@ -286,7 +286,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(19); - auto tmp = (avm_main_mem_op_d * (-avm_main_mem_op_d + FF(1))); + auto tmp = (avm_main_id_zero * (-avm_main_id_zero + FF(1))); tmp *= scaling_factor; std::get<19>(evals) += tmp; } @@ -294,7 +294,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(20); - auto tmp = (avm_main_rwa * (-avm_main_rwa + FF(1))); + auto tmp = (avm_main_mem_op_a * (-avm_main_mem_op_a + FF(1))); tmp *= scaling_factor; std::get<20>(evals) += tmp; } @@ -302,7 +302,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(21); - auto tmp = (avm_main_rwb * (-avm_main_rwb + FF(1))); + auto tmp = (avm_main_mem_op_b * (-avm_main_mem_op_b + FF(1))); tmp *= scaling_factor; std::get<21>(evals) += tmp; } @@ -310,7 +310,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(22); - auto tmp = (avm_main_rwc * (-avm_main_rwc + FF(1))); + auto tmp = (avm_main_mem_op_c * (-avm_main_mem_op_c + FF(1))); tmp *= scaling_factor; std::get<22>(evals) += tmp; } @@ -318,7 +318,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(23); - auto tmp = (avm_main_rwd * (-avm_main_rwd + FF(1))); + auto tmp = (avm_main_mem_op_d * (-avm_main_mem_op_d + FF(1))); tmp *= scaling_factor; std::get<23>(evals) += tmp; } @@ -326,7 +326,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(24); - auto tmp = (avm_main_rwc * (-avm_main_rwc + FF(1))); + auto tmp = (avm_main_rwa * (-avm_main_rwa + FF(1))); tmp *= scaling_factor; std::get<24>(evals) += tmp; } @@ -334,7 +334,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(25); - auto tmp = (avm_main_rwd * (-avm_main_rwd + FF(1))); + auto tmp = (avm_main_rwb * (-avm_main_rwb + FF(1))); tmp *= scaling_factor; std::get<25>(evals) += tmp; } @@ -342,7 +342,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(26); - auto tmp = (avm_main_ind_op_a * (-avm_main_ind_op_a + FF(1))); + auto tmp = (avm_main_rwc * (-avm_main_rwc + FF(1))); tmp *= scaling_factor; std::get<26>(evals) += tmp; } @@ -350,7 +350,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(27); - auto tmp = (avm_main_ind_op_d * (-avm_main_ind_op_d + FF(1))); + auto tmp = (avm_main_rwd * (-avm_main_rwd + FF(1))); tmp *= scaling_factor; std::get<27>(evals) += tmp; } @@ -358,7 +358,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(28); - auto tmp = (avm_main_sel_op_eq * (avm_main_w_in_tag - FF(1))); + auto tmp = (avm_main_ind_op_a * (-avm_main_ind_op_a + FF(1))); tmp *= scaling_factor; std::get<28>(evals) += tmp; } @@ -366,8 +366,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(29); - auto tmp = - ((avm_main_sel_op_div * (-avm_main_op_err + FF(1))) * ((avm_main_ic * avm_main_ib) - avm_main_ia)); + auto tmp = (avm_main_ind_op_b * (-avm_main_ind_op_b + FF(1))); tmp *= scaling_factor; std::get<29>(evals) += tmp; } @@ -375,7 +374,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(30); - auto tmp = (avm_main_sel_op_div * (((avm_main_ib * avm_main_inv) - FF(1)) + avm_main_op_err)); + auto tmp = (avm_main_ind_op_c * (-avm_main_ind_op_c + FF(1))); tmp *= scaling_factor; std::get<30>(evals) += tmp; } @@ -383,7 +382,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(31); - auto tmp = ((avm_main_sel_op_div * avm_main_op_err) * (-avm_main_inv + FF(1))); + auto tmp = (avm_main_ind_op_d * (-avm_main_ind_op_d + FF(1))); tmp *= scaling_factor; std::get<31>(evals) += tmp; } @@ -391,7 +390,8 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(32); - auto tmp = (avm_main_op_err * (avm_main_sel_op_div - FF(1))); + auto tmp = + (((avm_main_sel_op_eq + avm_main_sel_op_lte) + avm_main_sel_op_lt) * (avm_main_w_in_tag - FF(1))); tmp *= scaling_factor; std::get<32>(evals) += tmp; } @@ -399,7 +399,8 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(33); - auto tmp = (avm_main_sel_jump * (avm_main_pc_shift - avm_main_ia)); + auto tmp = + ((avm_main_sel_op_div * (-avm_main_op_err + FF(1))) * ((avm_main_ic * avm_main_ib) - avm_main_ia)); tmp *= scaling_factor; std::get<33>(evals) += tmp; } @@ -407,8 +408,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(34); - auto tmp = (avm_main_sel_internal_call * - (avm_main_internal_return_ptr_shift - (avm_main_internal_return_ptr + FF(1)))); + auto tmp = (avm_main_sel_op_div * (((avm_main_ib * avm_main_inv) - FF(1)) + avm_main_op_err)); tmp *= scaling_factor; std::get<34>(evals) += tmp; } @@ -416,7 +416,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(35); - auto tmp = (avm_main_sel_internal_call * (avm_main_internal_return_ptr - avm_main_mem_idx_b)); + auto tmp = ((avm_main_sel_op_div * avm_main_op_err) * (-avm_main_inv + FF(1))); tmp *= scaling_factor; std::get<35>(evals) += tmp; } @@ -424,7 +424,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(36); - auto tmp = (avm_main_sel_internal_call * (avm_main_pc_shift - avm_main_ia)); + auto tmp = (avm_main_op_err * (avm_main_sel_op_div - FF(1))); tmp *= scaling_factor; std::get<36>(evals) += tmp; } @@ -432,7 +432,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(37); - auto tmp = (avm_main_sel_internal_call * ((avm_main_pc + FF(1)) - avm_main_ib)); + auto tmp = (avm_main_sel_jump * (avm_main_pc_shift - avm_main_ia)); tmp *= scaling_factor; std::get<37>(evals) += tmp; } @@ -440,7 +440,8 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(38); - auto tmp = (avm_main_sel_internal_call * (avm_main_rwb - FF(1))); + auto tmp = (avm_main_sel_internal_call * + (avm_main_internal_return_ptr_shift - (avm_main_internal_return_ptr + FF(1)))); tmp *= scaling_factor; std::get<38>(evals) += tmp; } @@ -448,7 +449,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(39); - auto tmp = (avm_main_sel_internal_call * (avm_main_mem_op_b - FF(1))); + auto tmp = (avm_main_sel_internal_call * (avm_main_internal_return_ptr - avm_main_mem_idx_b)); tmp *= scaling_factor; std::get<39>(evals) += tmp; } @@ -456,8 +457,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(40); - auto tmp = (avm_main_sel_internal_return * - (avm_main_internal_return_ptr_shift - (avm_main_internal_return_ptr - FF(1)))); + auto tmp = (avm_main_sel_internal_call * (avm_main_pc_shift - avm_main_ia)); tmp *= scaling_factor; std::get<40>(evals) += tmp; } @@ -465,7 +465,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(41); - auto tmp = (avm_main_sel_internal_return * ((avm_main_internal_return_ptr - FF(1)) - avm_main_mem_idx_a)); + auto tmp = (avm_main_sel_internal_call * ((avm_main_pc + FF(1)) - avm_main_ib)); tmp *= scaling_factor; std::get<41>(evals) += tmp; } @@ -473,7 +473,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(42); - auto tmp = (avm_main_sel_internal_return * (avm_main_pc_shift - avm_main_ia)); + auto tmp = (avm_main_sel_internal_call * (avm_main_rwb - FF(1))); tmp *= scaling_factor; std::get<42>(evals) += tmp; } @@ -481,7 +481,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(43); - auto tmp = (avm_main_sel_internal_return * avm_main_rwa); + auto tmp = (avm_main_sel_internal_call * (avm_main_mem_op_b - FF(1))); tmp *= scaling_factor; std::get<43>(evals) += tmp; } @@ -489,48 +489,24 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(44); - auto tmp = (avm_main_sel_internal_return * (avm_main_mem_op_a - FF(1))); - tmp *= scaling_factor; - std::get<44>(evals) += tmp; - } - // Contribution 45 - { - Avm_DECLARE_VIEWS(45); - - auto tmp = - ((((-avm_main_first + FF(1)) * (-avm_main_sel_halt + FF(1))) * - ((((((((avm_main_sel_op_add + avm_main_sel_op_sub) + avm_main_sel_op_div) + avm_main_sel_op_mul) + - avm_main_sel_op_not) + - avm_main_sel_op_eq) + - avm_main_sel_op_and) + - avm_main_sel_op_or) + - avm_main_sel_op_xor)) * - (avm_main_pc_shift - (avm_main_pc + FF(1)))); + auto tmp = (avm_main_sel_internal_return * + (avm_main_internal_return_ptr_shift - (avm_main_internal_return_ptr - FF(1)))); tmp *= scaling_factor; -<<<<<<< HEAD std::get<44>(evals) += tmp; } // Contribution 45 { Avm_DECLARE_VIEWS(45); - auto tmp = ((-(((avm_main_first + avm_main_sel_internal_call) + avm_main_sel_internal_return) + - avm_main_sel_halt) + - FF(1)) * - (avm_main_internal_return_ptr_shift - avm_main_internal_return_ptr)); + auto tmp = (avm_main_sel_internal_return * ((avm_main_internal_return_ptr - FF(1)) - avm_main_mem_idx_a)); tmp *= scaling_factor; -======= ->>>>>>> d0b1584f6 (5557: Add an additional intermediate register id) std::get<45>(evals) += tmp; } // Contribution 46 { Avm_DECLARE_VIEWS(46); - auto tmp = ((-(((avm_main_first + avm_main_sel_internal_call) + avm_main_sel_internal_return) + - avm_main_sel_halt) + - FF(1)) * - (avm_main_internal_return_ptr_shift - avm_main_internal_return_ptr)); + auto tmp = (avm_main_sel_internal_return * (avm_main_pc_shift - avm_main_ia)); tmp *= scaling_factor; std::get<46>(evals) += tmp; } @@ -538,7 +514,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(47); - auto tmp = (avm_main_sel_mov * (avm_main_ia - avm_main_ic)); + auto tmp = (avm_main_sel_internal_return * avm_main_rwa); tmp *= scaling_factor; std::get<47>(evals) += tmp; } @@ -546,7 +522,7 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(48); - auto tmp = (avm_main_sel_mov * (avm_main_r_in_tag - avm_main_w_in_tag)); + auto tmp = (avm_main_sel_internal_return * (avm_main_mem_op_a - FF(1))); tmp *= scaling_factor; std::get<48>(evals) += tmp; } @@ -554,10 +530,15 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(49); - auto tmp = (avm_main_alu_sel - - (((((avm_main_sel_op_add + avm_main_sel_op_sub) + avm_main_sel_op_mul) + avm_main_sel_op_not) + - avm_main_sel_op_eq) * - (-avm_main_tag_err + FF(1)))); + auto tmp = + ((((-avm_main_first + FF(1)) * (-avm_main_sel_halt + FF(1))) * + ((((((((avm_main_sel_op_add + avm_main_sel_op_sub) + avm_main_sel_op_div) + avm_main_sel_op_mul) + + avm_main_sel_op_not) + + avm_main_sel_op_eq) + + avm_main_sel_op_and) + + avm_main_sel_op_or) + + avm_main_sel_op_xor)) * + (avm_main_pc_shift - (avm_main_pc + FF(1)))); tmp *= scaling_factor; std::get<49>(evals) += tmp; } @@ -565,7 +546,10 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(50); - auto tmp = (avm_main_bin_op_id - (avm_main_sel_op_or + (avm_main_sel_op_xor * FF(2)))); + auto tmp = ((-(((avm_main_first + avm_main_sel_internal_call) + avm_main_sel_internal_return) + + avm_main_sel_halt) + + FF(1)) * + (avm_main_internal_return_ptr_shift - avm_main_internal_return_ptr)); tmp *= scaling_factor; std::get<50>(evals) += tmp; } @@ -573,10 +557,88 @@ template class avm_mainImpl { { Avm_DECLARE_VIEWS(51); - auto tmp = (avm_main_sel_mov_a - (avm_main_sel_mov + (avm_main_sel_cmov * (-avm_main_id_zero + FF(1))))); + auto tmp = (avm_main_sel_cmov * (((avm_main_id * avm_main_inv) - FF(1)) + avm_main_id_zero)); tmp *= scaling_factor; std::get<51>(evals) += tmp; } + // Contribution 52 + { + Avm_DECLARE_VIEWS(52); + + auto tmp = ((avm_main_sel_cmov * avm_main_id_zero) * (-avm_main_inv + FF(1))); + tmp *= scaling_factor; + std::get<52>(evals) += tmp; + } + // Contribution 53 + { + Avm_DECLARE_VIEWS(53); + + auto tmp = (avm_main_sel_mov_a - (avm_main_sel_mov + (avm_main_sel_cmov * (-avm_main_id_zero + FF(1))))); + tmp *= scaling_factor; + std::get<53>(evals) += tmp; + } + // Contribution 54 + { + Avm_DECLARE_VIEWS(54); + + auto tmp = (avm_main_sel_mov_b - (avm_main_sel_cmov * avm_main_id_zero)); + tmp *= scaling_factor; + std::get<54>(evals) += tmp; + } + // Contribution 55 + { + Avm_DECLARE_VIEWS(55); + + auto tmp = (avm_main_sel_mov_a * (avm_main_ia - avm_main_ic)); + tmp *= scaling_factor; + std::get<55>(evals) += tmp; + } + // Contribution 56 + { + Avm_DECLARE_VIEWS(56); + + auto tmp = (avm_main_sel_mov_b * (avm_main_ib - avm_main_ic)); + tmp *= scaling_factor; + std::get<56>(evals) += tmp; + } + // Contribution 57 + { + Avm_DECLARE_VIEWS(57); + + auto tmp = ((avm_main_sel_mov + avm_main_sel_cmov) * (avm_main_r_in_tag - avm_main_w_in_tag)); + tmp *= scaling_factor; + std::get<57>(evals) += tmp; + } + // Contribution 58 + { + Avm_DECLARE_VIEWS(58); + + auto tmp = + (avm_main_alu_sel - + (((((((avm_main_sel_op_add + avm_main_sel_op_sub) + avm_main_sel_op_mul) + avm_main_sel_op_not) + + avm_main_sel_op_eq) + + avm_main_sel_op_lt) + + avm_main_sel_op_lte) * + (-avm_main_tag_err + FF(1)))); + tmp *= scaling_factor; + std::get<58>(evals) += tmp; + } + // Contribution 59 + { + Avm_DECLARE_VIEWS(59); + + auto tmp = (avm_main_bin_op_id - (avm_main_sel_op_or + (avm_main_sel_op_xor * FF(2)))); + tmp *= scaling_factor; + std::get<59>(evals) += tmp; + } + // Contribution 60 + { + Avm_DECLARE_VIEWS(60); + + auto tmp = (avm_main_bin_sel - ((avm_main_sel_op_and + avm_main_sel_op_or) + avm_main_sel_op_xor)); + tmp *= scaling_factor; + std::get<60>(evals) += tmp; + } } }; diff --git a/barretenberg/cpp/src/barretenberg/vm/avm_trace/avm_trace.cpp b/barretenberg/cpp/src/barretenberg/vm/avm_trace/avm_trace.cpp index 5dded97a92d..5c4a20515ad 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm_trace/avm_trace.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm_trace/avm_trace.cpp @@ -650,7 +650,7 @@ void AvmTraceBuilder::op_lt( range_checked_required = true; // Write into memory value c from intermediate register ic. - mem_trace_builder.write_into_memory(clk, IntermRegister::IC, res.direct_dst_offset, c, in_tag, AvmMemoryTag::U8); + mem_trace_builder.write_into_memory(clk, IntermRegister::IC, res.direct_c_offset, c, in_tag, AvmMemoryTag::U8); main_trace.push_back(Row{ .avm_main_clk = clk, @@ -666,7 +666,7 @@ void AvmTraceBuilder::op_lt( .avm_main_internal_return_ptr = FF(internal_return_ptr), .avm_main_mem_idx_a = FF(res.direct_a_offset), .avm_main_mem_idx_b = FF(res.direct_b_offset), - .avm_main_mem_idx_c = FF(res.direct_dst_offset), + .avm_main_mem_idx_c = FF(res.direct_c_offset), .avm_main_mem_op_a = FF(1), .avm_main_mem_op_b = FF(1), .avm_main_mem_op_c = FF(1), @@ -701,7 +701,7 @@ void AvmTraceBuilder::op_lte( range_checked_required = true; // Write into memory value c from intermediate register ic. - mem_trace_builder.write_into_memory(clk, IntermRegister::IC, res.direct_dst_offset, c, in_tag, AvmMemoryTag::U8); + mem_trace_builder.write_into_memory(clk, IntermRegister::IC, res.direct_c_offset, c, in_tag, AvmMemoryTag::U8); main_trace.push_back(Row{ .avm_main_clk = clk, @@ -717,7 +717,7 @@ void AvmTraceBuilder::op_lte( .avm_main_internal_return_ptr = FF(internal_return_ptr), .avm_main_mem_idx_a = FF(res.direct_a_offset), .avm_main_mem_idx_b = FF(res.direct_b_offset), - .avm_main_mem_idx_c = FF(res.direct_dst_offset), + .avm_main_mem_idx_c = FF(res.direct_c_offset), .avm_main_mem_op_a = FF(1), .avm_main_mem_op_b = FF(1), .avm_main_mem_op_c = FF(1), diff --git a/barretenberg/cpp/src/barretenberg/vm/generated/avm_circuit_builder.hpp b/barretenberg/cpp/src/barretenberg/vm/generated/avm_circuit_builder.hpp index cbd04d1d75f..fe2b81f0e34 100644 --- a/barretenberg/cpp/src/barretenberg/vm/generated/avm_circuit_builder.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/generated/avm_circuit_builder.hpp @@ -304,23 +304,8 @@ class AvmCircuitBuilder { using Polynomial = Flavor::Polynomial; using ProverPolynomials = Flavor::ProverPolynomials; -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD - static constexpr size_t num_fixed_columns = 224; - static constexpr size_t num_polys = 195; -======= - static constexpr size_t num_fixed_columns = 169; - static constexpr size_t num_polys = 150; ->>>>>>> d0b1584f6 (5557: Add an additional intermediate register id) -======= - static constexpr size_t num_fixed_columns = 174; - static constexpr size_t num_polys = 155; ->>>>>>> 220457275 (5557: PIL relations for CMOV opcode) -======= - static constexpr size_t num_fixed_columns = 176; - static constexpr size_t num_polys = 157; ->>>>>>> bdc8f5a57 (5557: several bug fixes for CMOV opcode and first unit test) + static constexpr size_t num_fixed_columns = 241; + static constexpr size_t num_polys = 212; std::vector rows; void set_trace(std::vector&& trace) { rows = std::move(trace); } @@ -496,24 +481,6 @@ class AvmCircuitBuilder { polys.avm_mem_tag_err[i] = rows[i].avm_mem_tag_err; polys.avm_mem_val[i] = rows[i].avm_mem_val; polys.avm_mem_w_in_tag[i] = rows[i].avm_mem_w_in_tag; - polys.perm_main_alu[i] = rows[i].perm_main_alu; -<<<<<<< HEAD - -======= - polys.perm_main_bin[i] = rows[i].perm_main_bin; - polys.perm_main_mem_a[i] = rows[i].perm_main_mem_a; - polys.perm_main_mem_b[i] = rows[i].perm_main_mem_b; - polys.perm_main_mem_c[i] = rows[i].perm_main_mem_c; - polys.perm_main_mem_d[i] = rows[i].perm_main_mem_d; - polys.perm_main_mem_ind_a[i] = rows[i].perm_main_mem_ind_a; - polys.perm_main_mem_ind_b[i] = rows[i].perm_main_mem_ind_b; - polys.perm_main_mem_ind_c[i] = rows[i].perm_main_mem_ind_c; - polys.perm_main_mem_ind_d[i] = rows[i].perm_main_mem_ind_d; - polys.lookup_byte_lengths[i] = rows[i].lookup_byte_lengths; - polys.lookup_byte_operations[i] = rows[i].lookup_byte_operations; - polys.incl_main_tag_err[i] = rows[i].incl_main_tag_err; - polys.incl_mem_tag_err[i] = rows[i].incl_mem_tag_err; ->>>>>>> 7c841655b (5557: Add an additional intermediate register id) polys.lookup_byte_lengths_counts[i] = rows[i].lookup_byte_lengths_counts; polys.lookup_byte_operations_counts[i] = rows[i].lookup_byte_operations_counts; polys.incl_main_tag_err_counts[i] = rows[i].incl_main_tag_err_counts; diff --git a/barretenberg/cpp/src/barretenberg/vm/generated/avm_flavor.hpp b/barretenberg/cpp/src/barretenberg/vm/generated/avm_flavor.hpp index d778d062e42..0964aa33632 100644 --- a/barretenberg/cpp/src/barretenberg/vm/generated/avm_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/generated/avm_flavor.hpp @@ -69,35 +69,11 @@ class AvmFlavor { using RelationSeparator = FF; static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 2; -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD - static constexpr size_t NUM_WITNESS_ENTITIES = 193; + static constexpr size_t NUM_WITNESS_ENTITIES = 210; 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 = 224; -======= - static constexpr size_t NUM_WITNESS_ENTITIES = 148; - 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 = 169; ->>>>>>> d0b1584f6 (5557: Add an additional intermediate register id) -======= - static constexpr size_t NUM_WITNESS_ENTITIES = 153; - 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 = 174; ->>>>>>> 220457275 (5557: PIL relations for CMOV opcode) -======= - static constexpr size_t NUM_WITNESS_ENTITIES = 155; - 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 = 176; ->>>>>>> bdc8f5a57 (5557: several bug fixes for CMOV opcode and first unit test) + static constexpr size_t NUM_ALL_ENTITIES = 241; using GrandProductRelations = std::tuple, perm_main_bin_relation, @@ -108,7 +84,7 @@ class AvmFlavor { perm_main_mem_ind_a_relation, perm_main_mem_ind_b_relation, perm_main_mem_ind_c_relation, -<<<<<<< HEAD + perm_main_mem_ind_d_relation, lookup_byte_lengths_relation, lookup_byte_operations_relation, incl_main_tag_err_relation, @@ -130,13 +106,6 @@ class AvmFlavor { lookup_u16_12_relation, lookup_u16_13_relation, lookup_u16_14_relation>; -======= - perm_main_mem_ind_d_relation, - lookup_byte_lengths_relation, - lookup_byte_operations_relation, - incl_main_tag_err_relation, - incl_mem_tag_err_relation>; ->>>>>>> e353f6a7d (5557: fixes after master rebase) using Relations = std::tuple, Avm_vm::avm_binary, @@ -151,8 +120,7 @@ class AvmFlavor { perm_main_mem_ind_a_relation, perm_main_mem_ind_b_relation, perm_main_mem_ind_c_relation, -<<<<<<< HEAD -<<<<<<< HEAD + perm_main_mem_ind_d_relation, lookup_byte_lengths_relation, lookup_byte_operations_relation, incl_main_tag_err_relation, @@ -174,23 +142,6 @@ class AvmFlavor { lookup_u16_12_relation, lookup_u16_13_relation, lookup_u16_14_relation>; -======= -<<<<<<< HEAD - incl_main_tag_err_relation, - incl_mem_tag_err_relation, - lookup_byte_lengths_relation, - lookup_byte_operations_relation>; -======= - perm_main_mem_ind_d_relation>; ->>>>>>> 7c841655b (5557: Add an additional intermediate register id) ->>>>>>> d0b1584f6 (5557: Add an additional intermediate register id) -======= - perm_main_mem_ind_d_relation, - lookup_byte_lengths_relation, - lookup_byte_operations_relation, - incl_main_tag_err_relation, - incl_mem_tag_err_relation>; ->>>>>>> e353f6a7d (5557: fixes after master rebase) static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length(); @@ -1426,11 +1377,8 @@ class AvmFlavor { prover_polynomials, relation_parameters, this->circuit_size); bb::compute_logderivative_inverse>( prover_polynomials, relation_parameters, this->circuit_size); -<<<<<<< HEAD -======= bb::compute_logderivative_inverse>( prover_polynomials, relation_parameters, this->circuit_size); ->>>>>>> e353f6a7d (5557: fixes after master rebase) bb::compute_logderivative_inverse>( prover_polynomials, relation_parameters, this->circuit_size); bb::compute_logderivative_inverse>( @@ -1439,7 +1387,6 @@ class AvmFlavor { prover_polynomials, relation_parameters, this->circuit_size); bb::compute_logderivative_inverse>( prover_polynomials, relation_parameters, this->circuit_size); -<<<<<<< HEAD bb::compute_logderivative_inverse>( prover_polynomials, relation_parameters, this->circuit_size); bb::compute_logderivative_inverse>( @@ -1474,8 +1421,6 @@ class AvmFlavor { prover_polynomials, relation_parameters, this->circuit_size); bb::compute_logderivative_inverse>( prover_polynomials, relation_parameters, this->circuit_size); -======= ->>>>>>> e353f6a7d (5557: fixes after master rebase) } }; @@ -1966,23 +1911,11 @@ class AvmFlavor { Commitment perm_main_mem_ind_a; Commitment perm_main_mem_ind_b; Commitment perm_main_mem_ind_c; -<<<<<<< HEAD -<<<<<<< HEAD -======= -<<<<<<< HEAD - // Lookup inverses -======= - Commitment perm_main_mem_ind_d; ->>>>>>> 7c841655b (5557: Add an additional intermediate register id) ->>>>>>> d0b1584f6 (5557: Add an additional intermediate register id) -======= Commitment perm_main_mem_ind_d; ->>>>>>> e353f6a7d (5557: fixes after master rebase) Commitment lookup_byte_lengths; Commitment lookup_byte_operations; Commitment incl_main_tag_err; Commitment incl_mem_tag_err; -<<<<<<< HEAD Commitment lookup_u8_0; Commitment lookup_u8_1; Commitment lookup_u16_0; @@ -2000,8 +1933,6 @@ class AvmFlavor { Commitment lookup_u16_12; Commitment lookup_u16_13; Commitment lookup_u16_14; -======= ->>>>>>> e353f6a7d (5557: fixes after master rebase) Commitment lookup_byte_lengths_counts; Commitment lookup_byte_operations_counts; Commitment incl_main_tag_err_counts; diff --git a/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.cpp b/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.cpp index 2617809c13f..f204511330f 100644 --- a/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/generated/avm_prover.cpp @@ -59,11 +59,8 @@ void AvmProver::execute_wire_commitments_round() // Commit to all polynomials (apart from logderivative inverse polynomials, which are committed to in the later // logderivative phase) -<<<<<<< HEAD witness_commitments.avm_alu_a_hi = commitment_key->commit(key->avm_alu_a_hi); witness_commitments.avm_alu_a_lo = commitment_key->commit(key->avm_alu_a_lo); -======= ->>>>>>> e353f6a7d (5557: fixes after master rebase) witness_commitments.avm_alu_alu_sel = commitment_key->commit(key->avm_alu_alu_sel); witness_commitments.avm_alu_b_hi = commitment_key->commit(key->avm_alu_b_hi); witness_commitments.avm_alu_b_lo = commitment_key->commit(key->avm_alu_b_lo); @@ -244,7 +241,6 @@ void AvmProver::execute_wire_commitments_round() witness_commitments.lookup_u16_14_counts = commitment_key->commit(key->lookup_u16_14_counts); // Send all commitments to the verifier -<<<<<<< HEAD transcript->send_to_verifier(commitment_labels.avm_alu_a_hi, witness_commitments.avm_alu_a_hi); transcript->send_to_verifier(commitment_labels.avm_alu_a_lo, witness_commitments.avm_alu_a_lo); transcript->send_to_verifier(commitment_labels.avm_alu_alu_sel, witness_commitments.avm_alu_alu_sel); @@ -255,11 +251,6 @@ void AvmProver::execute_wire_commitments_round() transcript->send_to_verifier(commitment_labels.avm_alu_clk, witness_commitments.avm_alu_clk); transcript->send_to_verifier(commitment_labels.avm_alu_cmp_rng_ctr, witness_commitments.avm_alu_cmp_rng_ctr); transcript->send_to_verifier(commitment_labels.avm_alu_cmp_sel, witness_commitments.avm_alu_cmp_sel); -======= - transcript->send_to_verifier(commitment_labels.avm_alu_alu_sel, witness_commitments.avm_alu_alu_sel); - transcript->send_to_verifier(commitment_labels.avm_alu_cf, witness_commitments.avm_alu_cf); - transcript->send_to_verifier(commitment_labels.avm_alu_clk, witness_commitments.avm_alu_clk); ->>>>>>> e353f6a7d (5557: fixes after master rebase) transcript->send_to_verifier(commitment_labels.avm_alu_ff_tag, witness_commitments.avm_alu_ff_tag); transcript->send_to_verifier(commitment_labels.avm_alu_ia, witness_commitments.avm_alu_ia); transcript->send_to_verifier(commitment_labels.avm_alu_ib, witness_commitments.avm_alu_ib); @@ -269,7 +260,6 @@ void AvmProver::execute_wire_commitments_round() transcript->send_to_verifier(commitment_labels.avm_alu_op_div, witness_commitments.avm_alu_op_div); transcript->send_to_verifier(commitment_labels.avm_alu_op_eq, witness_commitments.avm_alu_op_eq); transcript->send_to_verifier(commitment_labels.avm_alu_op_eq_diff_inv, witness_commitments.avm_alu_op_eq_diff_inv); -<<<<<<< HEAD transcript->send_to_verifier(commitment_labels.avm_alu_op_lt, witness_commitments.avm_alu_op_lt); transcript->send_to_verifier(commitment_labels.avm_alu_op_lte, witness_commitments.avm_alu_op_lte); transcript->send_to_verifier(commitment_labels.avm_alu_op_mul, witness_commitments.avm_alu_op_mul); @@ -286,11 +276,6 @@ void AvmProver::execute_wire_commitments_round() transcript->send_to_verifier(commitment_labels.avm_alu_rng_chk_lookup_selector, witness_commitments.avm_alu_rng_chk_lookup_selector); transcript->send_to_verifier(commitment_labels.avm_alu_rng_chk_sel, witness_commitments.avm_alu_rng_chk_sel); -======= - transcript->send_to_verifier(commitment_labels.avm_alu_op_mul, witness_commitments.avm_alu_op_mul); - transcript->send_to_verifier(commitment_labels.avm_alu_op_not, witness_commitments.avm_alu_op_not); - transcript->send_to_verifier(commitment_labels.avm_alu_op_sub, witness_commitments.avm_alu_op_sub); ->>>>>>> e353f6a7d (5557: fixes after master rebase) transcript->send_to_verifier(commitment_labels.avm_alu_u128_tag, witness_commitments.avm_alu_u128_tag); transcript->send_to_verifier(commitment_labels.avm_alu_u16_r0, witness_commitments.avm_alu_u16_r0); transcript->send_to_verifier(commitment_labels.avm_alu_u16_r1, witness_commitments.avm_alu_u16_r1); @@ -348,14 +333,6 @@ void AvmProver::execute_wire_commitments_round() transcript->send_to_verifier(commitment_labels.avm_main_ia, witness_commitments.avm_main_ia); transcript->send_to_verifier(commitment_labels.avm_main_ib, witness_commitments.avm_main_ib); transcript->send_to_verifier(commitment_labels.avm_main_ic, witness_commitments.avm_main_ic); -<<<<<<< HEAD - transcript->send_to_verifier(commitment_labels.avm_main_ind_a, witness_commitments.avm_main_ind_a); - transcript->send_to_verifier(commitment_labels.avm_main_ind_b, witness_commitments.avm_main_ind_b); - transcript->send_to_verifier(commitment_labels.avm_main_ind_c, witness_commitments.avm_main_ind_c); - transcript->send_to_verifier(commitment_labels.avm_main_ind_op_a, witness_commitments.avm_main_ind_op_a); - transcript->send_to_verifier(commitment_labels.avm_main_ind_op_b, witness_commitments.avm_main_ind_op_b); - transcript->send_to_verifier(commitment_labels.avm_main_ind_op_c, witness_commitments.avm_main_ind_op_c); -======= transcript->send_to_verifier(commitment_labels.avm_main_id, witness_commitments.avm_main_id); transcript->send_to_verifier(commitment_labels.avm_main_id_zero, witness_commitments.avm_main_id_zero); transcript->send_to_verifier(commitment_labels.avm_main_ind_a, witness_commitments.avm_main_ind_a); @@ -366,7 +343,6 @@ void AvmProver::execute_wire_commitments_round() transcript->send_to_verifier(commitment_labels.avm_main_ind_op_b, witness_commitments.avm_main_ind_op_b); transcript->send_to_verifier(commitment_labels.avm_main_ind_op_c, witness_commitments.avm_main_ind_op_c); transcript->send_to_verifier(commitment_labels.avm_main_ind_op_d, witness_commitments.avm_main_ind_op_d); ->>>>>>> e353f6a7d (5557: fixes after master rebase) transcript->send_to_verifier(commitment_labels.avm_main_internal_return_ptr, witness_commitments.avm_main_internal_return_ptr); transcript->send_to_verifier(commitment_labels.avm_main_inv, witness_commitments.avm_main_inv); @@ -374,28 +350,19 @@ void AvmProver::execute_wire_commitments_round() transcript->send_to_verifier(commitment_labels.avm_main_mem_idx_a, witness_commitments.avm_main_mem_idx_a); transcript->send_to_verifier(commitment_labels.avm_main_mem_idx_b, witness_commitments.avm_main_mem_idx_b); transcript->send_to_verifier(commitment_labels.avm_main_mem_idx_c, witness_commitments.avm_main_mem_idx_c); -<<<<<<< HEAD - transcript->send_to_verifier(commitment_labels.avm_main_mem_op_a, witness_commitments.avm_main_mem_op_a); - transcript->send_to_verifier(commitment_labels.avm_main_mem_op_b, witness_commitments.avm_main_mem_op_b); - transcript->send_to_verifier(commitment_labels.avm_main_mem_op_c, witness_commitments.avm_main_mem_op_c); -======= transcript->send_to_verifier(commitment_labels.avm_main_mem_idx_d, witness_commitments.avm_main_mem_idx_d); transcript->send_to_verifier(commitment_labels.avm_main_mem_op_a, witness_commitments.avm_main_mem_op_a); transcript->send_to_verifier(commitment_labels.avm_main_mem_op_b, witness_commitments.avm_main_mem_op_b); transcript->send_to_verifier(commitment_labels.avm_main_mem_op_c, witness_commitments.avm_main_mem_op_c); transcript->send_to_verifier(commitment_labels.avm_main_mem_op_d, witness_commitments.avm_main_mem_op_d); ->>>>>>> e353f6a7d (5557: fixes after master rebase) transcript->send_to_verifier(commitment_labels.avm_main_op_err, witness_commitments.avm_main_op_err); transcript->send_to_verifier(commitment_labels.avm_main_pc, witness_commitments.avm_main_pc); transcript->send_to_verifier(commitment_labels.avm_main_r_in_tag, witness_commitments.avm_main_r_in_tag); transcript->send_to_verifier(commitment_labels.avm_main_rwa, witness_commitments.avm_main_rwa); transcript->send_to_verifier(commitment_labels.avm_main_rwb, witness_commitments.avm_main_rwb); transcript->send_to_verifier(commitment_labels.avm_main_rwc, witness_commitments.avm_main_rwc); -<<<<<<< HEAD -======= transcript->send_to_verifier(commitment_labels.avm_main_rwd, witness_commitments.avm_main_rwd); transcript->send_to_verifier(commitment_labels.avm_main_sel_cmov, witness_commitments.avm_main_sel_cmov); ->>>>>>> e353f6a7d (5557: fixes after master rebase) transcript->send_to_verifier(commitment_labels.avm_main_sel_halt, witness_commitments.avm_main_sel_halt); transcript->send_to_verifier(commitment_labels.avm_main_sel_internal_call, witness_commitments.avm_main_sel_internal_call); @@ -403,20 +370,14 @@ void AvmProver::execute_wire_commitments_round() witness_commitments.avm_main_sel_internal_return); transcript->send_to_verifier(commitment_labels.avm_main_sel_jump, witness_commitments.avm_main_sel_jump); transcript->send_to_verifier(commitment_labels.avm_main_sel_mov, witness_commitments.avm_main_sel_mov); -<<<<<<< HEAD -======= transcript->send_to_verifier(commitment_labels.avm_main_sel_mov_a, witness_commitments.avm_main_sel_mov_a); transcript->send_to_verifier(commitment_labels.avm_main_sel_mov_b, witness_commitments.avm_main_sel_mov_b); ->>>>>>> e353f6a7d (5557: fixes after master rebase) transcript->send_to_verifier(commitment_labels.avm_main_sel_op_add, witness_commitments.avm_main_sel_op_add); transcript->send_to_verifier(commitment_labels.avm_main_sel_op_and, witness_commitments.avm_main_sel_op_and); transcript->send_to_verifier(commitment_labels.avm_main_sel_op_div, witness_commitments.avm_main_sel_op_div); transcript->send_to_verifier(commitment_labels.avm_main_sel_op_eq, witness_commitments.avm_main_sel_op_eq); -<<<<<<< HEAD transcript->send_to_verifier(commitment_labels.avm_main_sel_op_lt, witness_commitments.avm_main_sel_op_lt); transcript->send_to_verifier(commitment_labels.avm_main_sel_op_lte, witness_commitments.avm_main_sel_op_lte); -======= ->>>>>>> e353f6a7d (5557: fixes after master rebase) transcript->send_to_verifier(commitment_labels.avm_main_sel_op_mul, witness_commitments.avm_main_sel_op_mul); transcript->send_to_verifier(commitment_labels.avm_main_sel_op_not, witness_commitments.avm_main_sel_op_not); transcript->send_to_verifier(commitment_labels.avm_main_sel_op_or, witness_commitments.avm_main_sel_op_or); @@ -431,21 +392,13 @@ void AvmProver::execute_wire_commitments_round() transcript->send_to_verifier(commitment_labels.avm_mem_ind_op_a, witness_commitments.avm_mem_ind_op_a); transcript->send_to_verifier(commitment_labels.avm_mem_ind_op_b, witness_commitments.avm_mem_ind_op_b); transcript->send_to_verifier(commitment_labels.avm_mem_ind_op_c, witness_commitments.avm_mem_ind_op_c); -<<<<<<< HEAD -======= transcript->send_to_verifier(commitment_labels.avm_mem_ind_op_d, witness_commitments.avm_mem_ind_op_d); ->>>>>>> e353f6a7d (5557: fixes after master rebase) transcript->send_to_verifier(commitment_labels.avm_mem_last, witness_commitments.avm_mem_last); transcript->send_to_verifier(commitment_labels.avm_mem_lastAccess, witness_commitments.avm_mem_lastAccess); transcript->send_to_verifier(commitment_labels.avm_mem_one_min_inv, witness_commitments.avm_mem_one_min_inv); transcript->send_to_verifier(commitment_labels.avm_mem_op_a, witness_commitments.avm_mem_op_a); transcript->send_to_verifier(commitment_labels.avm_mem_op_b, witness_commitments.avm_mem_op_b); transcript->send_to_verifier(commitment_labels.avm_mem_op_c, witness_commitments.avm_mem_op_c); -<<<<<<< HEAD - transcript->send_to_verifier(commitment_labels.avm_mem_r_in_tag, witness_commitments.avm_mem_r_in_tag); - transcript->send_to_verifier(commitment_labels.avm_mem_rw, witness_commitments.avm_mem_rw); - transcript->send_to_verifier(commitment_labels.avm_mem_sel_mov, witness_commitments.avm_mem_sel_mov); -======= transcript->send_to_verifier(commitment_labels.avm_mem_op_d, witness_commitments.avm_mem_op_d); transcript->send_to_verifier(commitment_labels.avm_mem_r_in_tag, witness_commitments.avm_mem_r_in_tag); transcript->send_to_verifier(commitment_labels.avm_mem_rw, witness_commitments.avm_mem_rw); @@ -453,7 +406,6 @@ void AvmProver::execute_wire_commitments_round() transcript->send_to_verifier(commitment_labels.avm_mem_sel_mov_a, witness_commitments.avm_mem_sel_mov_a); transcript->send_to_verifier(commitment_labels.avm_mem_sel_mov_b, witness_commitments.avm_mem_sel_mov_b); transcript->send_to_verifier(commitment_labels.avm_mem_skip_check_tag, witness_commitments.avm_mem_skip_check_tag); ->>>>>>> e353f6a7d (5557: fixes after master rebase) transcript->send_to_verifier(commitment_labels.avm_mem_sub_clk, witness_commitments.avm_mem_sub_clk); transcript->send_to_verifier(commitment_labels.avm_mem_tag, witness_commitments.avm_mem_tag); transcript->send_to_verifier(commitment_labels.avm_mem_tag_err, witness_commitments.avm_mem_tag_err); @@ -467,7 +419,6 @@ void AvmProver::execute_wire_commitments_round() witness_commitments.incl_main_tag_err_counts); transcript->send_to_verifier(commitment_labels.incl_mem_tag_err_counts, witness_commitments.incl_mem_tag_err_counts); -<<<<<<< HEAD transcript->send_to_verifier(commitment_labels.lookup_u8_0_counts, witness_commitments.lookup_u8_0_counts); transcript->send_to_verifier(commitment_labels.lookup_u8_1_counts, witness_commitments.lookup_u8_1_counts); transcript->send_to_verifier(commitment_labels.lookup_u16_0_counts, witness_commitments.lookup_u16_0_counts); @@ -485,8 +436,6 @@ void AvmProver::execute_wire_commitments_round() transcript->send_to_verifier(commitment_labels.lookup_u16_12_counts, witness_commitments.lookup_u16_12_counts); transcript->send_to_verifier(commitment_labels.lookup_u16_13_counts, witness_commitments.lookup_u16_13_counts); transcript->send_to_verifier(commitment_labels.lookup_u16_14_counts, witness_commitments.lookup_u16_14_counts); -======= ->>>>>>> e353f6a7d (5557: fixes after master rebase) } void AvmProver::execute_log_derivative_inverse_round() @@ -508,15 +457,11 @@ void AvmProver::execute_log_derivative_inverse_round() witness_commitments.perm_main_mem_ind_a = commitment_key->commit(key->perm_main_mem_ind_a); witness_commitments.perm_main_mem_ind_b = commitment_key->commit(key->perm_main_mem_ind_b); witness_commitments.perm_main_mem_ind_c = commitment_key->commit(key->perm_main_mem_ind_c); -<<<<<<< HEAD -======= witness_commitments.perm_main_mem_ind_d = commitment_key->commit(key->perm_main_mem_ind_d); ->>>>>>> e353f6a7d (5557: fixes after master rebase) witness_commitments.lookup_byte_lengths = commitment_key->commit(key->lookup_byte_lengths); witness_commitments.lookup_byte_operations = commitment_key->commit(key->lookup_byte_operations); witness_commitments.incl_main_tag_err = commitment_key->commit(key->incl_main_tag_err); witness_commitments.incl_mem_tag_err = commitment_key->commit(key->incl_mem_tag_err); -<<<<<<< HEAD witness_commitments.lookup_u8_0 = commitment_key->commit(key->lookup_u8_0); witness_commitments.lookup_u8_1 = commitment_key->commit(key->lookup_u8_1); witness_commitments.lookup_u16_0 = commitment_key->commit(key->lookup_u16_0); @@ -534,8 +479,6 @@ void AvmProver::execute_log_derivative_inverse_round() witness_commitments.lookup_u16_12 = commitment_key->commit(key->lookup_u16_12); witness_commitments.lookup_u16_13 = commitment_key->commit(key->lookup_u16_13); witness_commitments.lookup_u16_14 = commitment_key->commit(key->lookup_u16_14); -======= ->>>>>>> e353f6a7d (5557: fixes after master rebase) // Send all commitments to the verifier transcript->send_to_verifier(commitment_labels.perm_main_alu, witness_commitments.perm_main_alu); @@ -543,22 +486,15 @@ void AvmProver::execute_log_derivative_inverse_round() transcript->send_to_verifier(commitment_labels.perm_main_mem_a, witness_commitments.perm_main_mem_a); transcript->send_to_verifier(commitment_labels.perm_main_mem_b, witness_commitments.perm_main_mem_b); transcript->send_to_verifier(commitment_labels.perm_main_mem_c, witness_commitments.perm_main_mem_c); -<<<<<<< HEAD - transcript->send_to_verifier(commitment_labels.perm_main_mem_ind_a, witness_commitments.perm_main_mem_ind_a); - transcript->send_to_verifier(commitment_labels.perm_main_mem_ind_b, witness_commitments.perm_main_mem_ind_b); - transcript->send_to_verifier(commitment_labels.perm_main_mem_ind_c, witness_commitments.perm_main_mem_ind_c); -======= transcript->send_to_verifier(commitment_labels.perm_main_mem_d, witness_commitments.perm_main_mem_d); transcript->send_to_verifier(commitment_labels.perm_main_mem_ind_a, witness_commitments.perm_main_mem_ind_a); transcript->send_to_verifier(commitment_labels.perm_main_mem_ind_b, witness_commitments.perm_main_mem_ind_b); transcript->send_to_verifier(commitment_labels.perm_main_mem_ind_c, witness_commitments.perm_main_mem_ind_c); transcript->send_to_verifier(commitment_labels.perm_main_mem_ind_d, witness_commitments.perm_main_mem_ind_d); ->>>>>>> e353f6a7d (5557: fixes after master rebase) transcript->send_to_verifier(commitment_labels.lookup_byte_lengths, witness_commitments.lookup_byte_lengths); transcript->send_to_verifier(commitment_labels.lookup_byte_operations, witness_commitments.lookup_byte_operations); transcript->send_to_verifier(commitment_labels.incl_main_tag_err, witness_commitments.incl_main_tag_err); transcript->send_to_verifier(commitment_labels.incl_mem_tag_err, witness_commitments.incl_mem_tag_err); -<<<<<<< HEAD transcript->send_to_verifier(commitment_labels.lookup_u8_0, witness_commitments.lookup_u8_0); transcript->send_to_verifier(commitment_labels.lookup_u8_1, witness_commitments.lookup_u8_1); transcript->send_to_verifier(commitment_labels.lookup_u16_0, witness_commitments.lookup_u16_0); @@ -576,8 +512,6 @@ void AvmProver::execute_log_derivative_inverse_round() transcript->send_to_verifier(commitment_labels.lookup_u16_12, witness_commitments.lookup_u16_12); transcript->send_to_verifier(commitment_labels.lookup_u16_13, witness_commitments.lookup_u16_13); transcript->send_to_verifier(commitment_labels.lookup_u16_14, witness_commitments.lookup_u16_14); -======= ->>>>>>> e353f6a7d (5557: fixes after master rebase) } /** diff --git a/barretenberg/cpp/src/barretenberg/vm/generated/avm_verifier.cpp b/barretenberg/cpp/src/barretenberg/vm/generated/avm_verifier.cpp index 6584ac3943a..e195267791b 100644 --- a/barretenberg/cpp/src/barretenberg/vm/generated/avm_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/generated/avm_verifier.cpp @@ -369,21 +369,8 @@ bool AvmVerifier::verify_proof(const HonkProof& proof) transcript->template receive_from_prover(commitment_labels.perm_main_mem_ind_b); commitments.perm_main_mem_ind_c = transcript->template receive_from_prover(commitment_labels.perm_main_mem_ind_c); -<<<<<<< HEAD -<<<<<<< HEAD -======= -<<<<<<< HEAD - - // Lookups -======= - commitments.perm_main_mem_ind_d = - transcript->template receive_from_prover(commitment_labels.perm_main_mem_ind_d); ->>>>>>> 7c841655b (5557: Add an additional intermediate register id) ->>>>>>> d0b1584f6 (5557: Add an additional intermediate register id) -======= commitments.perm_main_mem_ind_d = transcript->template receive_from_prover(commitment_labels.perm_main_mem_ind_d); ->>>>>>> e353f6a7d (5557: fixes after master rebase) commitments.lookup_byte_lengths = transcript->template receive_from_prover(commitment_labels.lookup_byte_lengths); commitments.lookup_byte_operations =