diff --git a/barretenberg/cpp/pil/vm2/keccak_memory.pil b/barretenberg/cpp/pil/vm2/keccak_memory.pil index 717c70204861..850f315abbf7 100644 --- a/barretenberg/cpp/pil/vm2/keccak_memory.pil +++ b/barretenberg/cpp/pil/vm2/keccak_memory.pil @@ -145,6 +145,7 @@ sel * (1 - last) * (ctr' - ctr - 1) = 0; pol commit rw; // @boolean (constrained by memory.pil) pol commit single_tag_error; // @boolean +#[SINGLE_TAG_ERROR_BOOLEAN] single_tag_error * (1 - single_tag_error) = 0; #[NO_TAG_ERROR_ON_WRITE] @@ -177,9 +178,6 @@ pol TAG_MIN_U64 = tag - constants.MEM_TAG_U64; #[SINGLE_TAG_ERROR] sel * (TAG_MIN_U64 * ((1 - single_tag_error) * (1 - tag_min_u64_inv) + tag_min_u64_inv) - single_tag_error) = 0; -#[SINGLE_TAG_ERROR_BOOLEAN] -single_tag_error * (1 - single_tag_error) = 0; - #[VAL01] val[1] = (1 - last) * val[0]'; #[VAL02] diff --git a/barretenberg/cpp/pil/vm2/trees/l1_to_l2_message_tree_check.pil b/barretenberg/cpp/pil/vm2/trees/l1_to_l2_message_tree_check.pil index 251852bca6cc..79046f238572 100644 --- a/barretenberg/cpp/pil/vm2/trees/l1_to_l2_message_tree_check.pil +++ b/barretenberg/cpp/pil/vm2/trees/l1_to_l2_message_tree_check.pil @@ -17,14 +17,15 @@ include "../constants_gen.pil"; * }; **/ namespace l1_to_l2_message_tree_check; - pol commit sel; + pol commit sel; // @boolean sel * (1 - sel) = 0; #[skippable_if] sel = 0; // Inputs to the gadget - pol commit exists; + pol commit exists; // @boolean + exists * (1 - exists) = 0; pol commit msg_hash; pol commit leaf_index; diff --git a/barretenberg/cpp/pil/vm2/trees/note_hash_tree_check.pil b/barretenberg/cpp/pil/vm2/trees/note_hash_tree_check.pil index 1fcd78381079..170baf192e8b 100644 --- a/barretenberg/cpp/pil/vm2/trees/note_hash_tree_check.pil +++ b/barretenberg/cpp/pil/vm2/trees/note_hash_tree_check.pil @@ -29,29 +29,30 @@ include "../public_inputs.pil"; * As write variant usage, we can omit the address column whenever we pass should_silo == 0. **/ namespace note_hash_tree_check; - pol commit sel; + pol commit sel; // @boolean sel * (1 - sel) = 0; #[skippable_if] sel = 0; // Inputs to the gadget - pol commit write; + pol commit write; // @boolean write * (1 - write) = 0; pol READ = 1 - write; - pol commit exists; + pol commit exists; // @boolean + exists * (1 - exists) = 0; pol commit note_hash; pol commit leaf_index; pol commit prev_root; // Write specific inputs - pol commit should_silo; + pol commit should_silo; // @boolean should_silo * (1 - should_silo) = 0; pol commit address; - pol commit should_unique; + pol commit should_unique; // @boolean should_unique * (1 - should_unique) = 0; pol commit note_hash_index; diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/keccak_memory.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/keccak_memory.hpp index 8dd3d44c0d63..53f79ff832b6 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/keccak_memory.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/keccak_memory.hpp @@ -14,10 +14,10 @@ template class keccak_memoryImpl { public: using FF = FF_; - static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { 3, 3, 3, 3, 3, 3, 4, 3, 5, 3, 4, 3, - 3, 3, 3, 4, 3, 3, 3, 5, 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 }; + static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { + 3, 3, 3, 3, 3, 3, 4, 3, 5, 3, 4, 3, 3, 3, 3, 4, 3, 3, 3, 5, 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 + }; template inline static bool skip(const AllEntities& in) { @@ -45,6 +45,7 @@ template class keccak_memory : public Relation class keccak_memory : public Relation class keccak_memory : public Relation class keccak_memory : public Relation::accumulate(ContainerOverSubrelations& evals, FF(1)); std::get<10>(evals) += (tmp * scaling_factor); } - { + { // SINGLE_TAG_ERROR_BOOLEAN using View = typename std::tuple_element_t<11, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::keccak_memory_single_tag_error)) * (FF(1) - static_cast(in.get(C::keccak_memory_single_tag_error))); @@ -164,186 +164,180 @@ void keccak_memoryImpl::accumulate(ContainerOverSubrelations& evals, static_cast(in.get(C::keccak_memory_single_tag_error))); std::get<19>(evals) += (tmp * scaling_factor); } - { // SINGLE_TAG_ERROR_BOOLEAN - using View = typename std::tuple_element_t<20, ContainerOverSubrelations>::View; - auto tmp = static_cast(in.get(C::keccak_memory_single_tag_error)) * - (FF(1) - static_cast(in.get(C::keccak_memory_single_tag_error))); - std::get<20>(evals) += (tmp * scaling_factor); - } { // VAL01 - using View = typename std::tuple_element_t<21, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<20, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_1_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_0__shift))); - std::get<21>(evals) += (tmp * scaling_factor); + std::get<20>(evals) += (tmp * scaling_factor); } { // VAL02 - using View = typename std::tuple_element_t<22, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<21, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_2_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_1__shift))); - std::get<22>(evals) += (tmp * scaling_factor); + std::get<21>(evals) += (tmp * scaling_factor); } { // VAL03 - using View = typename std::tuple_element_t<23, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<22, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_3_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_2__shift))); - std::get<23>(evals) += (tmp * scaling_factor); + std::get<22>(evals) += (tmp * scaling_factor); } { // VAL04 - using View = typename std::tuple_element_t<24, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<23, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_4_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_3__shift))); - std::get<24>(evals) += (tmp * scaling_factor); + std::get<23>(evals) += (tmp * scaling_factor); } { // VAL05 - using View = typename std::tuple_element_t<25, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<24, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_5_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_4__shift))); - std::get<25>(evals) += (tmp * scaling_factor); + std::get<24>(evals) += (tmp * scaling_factor); } { // VAL06 - using View = typename std::tuple_element_t<26, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<25, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_6_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_5__shift))); - std::get<26>(evals) += (tmp * scaling_factor); + std::get<25>(evals) += (tmp * scaling_factor); } { // VAL07 - using View = typename std::tuple_element_t<27, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<26, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_7_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_6__shift))); - std::get<27>(evals) += (tmp * scaling_factor); + std::get<26>(evals) += (tmp * scaling_factor); } { // VAL8 - using View = typename std::tuple_element_t<28, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<27, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_8_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_7__shift))); - std::get<28>(evals) += (tmp * scaling_factor); + std::get<27>(evals) += (tmp * scaling_factor); } { // VAL09 - using View = typename std::tuple_element_t<29, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<28, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_9_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_8__shift))); - std::get<29>(evals) += (tmp * scaling_factor); + std::get<28>(evals) += (tmp * scaling_factor); } { // VAL10 - using View = typename std::tuple_element_t<30, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<29, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_10_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_9__shift))); - std::get<30>(evals) += (tmp * scaling_factor); + std::get<29>(evals) += (tmp * scaling_factor); } { // VAL11 - using View = typename std::tuple_element_t<31, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<30, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_11_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_10__shift))); - std::get<31>(evals) += (tmp * scaling_factor); + std::get<30>(evals) += (tmp * scaling_factor); } { // VAL12 - using View = typename std::tuple_element_t<32, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<31, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_12_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_11__shift))); - std::get<32>(evals) += (tmp * scaling_factor); + std::get<31>(evals) += (tmp * scaling_factor); } { // VAL13 - using View = typename std::tuple_element_t<33, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<32, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_13_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_12__shift))); - std::get<33>(evals) += (tmp * scaling_factor); + std::get<32>(evals) += (tmp * scaling_factor); } { // VAL14 - using View = typename std::tuple_element_t<34, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<33, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_14_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_13__shift))); - std::get<34>(evals) += (tmp * scaling_factor); + std::get<33>(evals) += (tmp * scaling_factor); } { // VAL15 - using View = typename std::tuple_element_t<35, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<34, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_15_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_14__shift))); - std::get<35>(evals) += (tmp * scaling_factor); + std::get<34>(evals) += (tmp * scaling_factor); } { // VAL41 - using View = typename std::tuple_element_t<36, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<35, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_16_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_15__shift))); - std::get<36>(evals) += (tmp * scaling_factor); + std::get<35>(evals) += (tmp * scaling_factor); } { // VAL17 - using View = typename std::tuple_element_t<37, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<36, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_17_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_16__shift))); - std::get<37>(evals) += (tmp * scaling_factor); + std::get<36>(evals) += (tmp * scaling_factor); } { // VAL18 - using View = typename std::tuple_element_t<38, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<37, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_18_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_17__shift))); - std::get<38>(evals) += (tmp * scaling_factor); + std::get<37>(evals) += (tmp * scaling_factor); } { // VAL19 - using View = typename std::tuple_element_t<39, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<38, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_19_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_18__shift))); - std::get<39>(evals) += (tmp * scaling_factor); + std::get<38>(evals) += (tmp * scaling_factor); } { // VAL20 - using View = typename std::tuple_element_t<40, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<39, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_20_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_19__shift))); - std::get<40>(evals) += (tmp * scaling_factor); + std::get<39>(evals) += (tmp * scaling_factor); } { // VAL21 - using View = typename std::tuple_element_t<41, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<40, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_21_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_20__shift))); - std::get<41>(evals) += (tmp * scaling_factor); + std::get<40>(evals) += (tmp * scaling_factor); } { // VAL22 - using View = typename std::tuple_element_t<42, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<41, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_22_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_21__shift))); - std::get<42>(evals) += (tmp * scaling_factor); + std::get<41>(evals) += (tmp * scaling_factor); } { // VAL23 - using View = typename std::tuple_element_t<43, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<42, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_23_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_22__shift))); - std::get<43>(evals) += (tmp * scaling_factor); + std::get<42>(evals) += (tmp * scaling_factor); } { // VAL24 - using View = typename std::tuple_element_t<44, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<43, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::keccak_memory_val_24_)) - (FF(1) - static_cast(in.get(C::keccak_memory_last))) * static_cast(in.get(C::keccak_memory_val_23__shift))); - std::get<44>(evals) += (tmp * scaling_factor); + std::get<43>(evals) += (tmp * scaling_factor); } { - using View = typename std::tuple_element_t<45, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<44, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::keccak_memory_sel)) * (static_cast(in.get(C::keccak_memory_num_rounds)) - CView(constants_AVM_KECCAKF1600_NUM_ROUNDS)); - std::get<45>(evals) += (tmp * scaling_factor); + std::get<44>(evals) += (tmp * scaling_factor); } } diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/l1_to_l2_message_tree_check.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/l1_to_l2_message_tree_check.hpp index c5e4736b4962..9b3b4b9ba43e 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/l1_to_l2_message_tree_check.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/l1_to_l2_message_tree_check.hpp @@ -14,7 +14,7 @@ template class l1_to_l2_message_tree_checkImpl { public: using FF = FF_; - static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { 3, 5, 3 }; + static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { 3, 3, 5, 3 }; template inline static bool skip(const AllEntities& in) { diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/l1_to_l2_message_tree_check_impl.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/l1_to_l2_message_tree_check_impl.hpp index 170349441ef4..30def71be1c4 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/l1_to_l2_message_tree_check_impl.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/l1_to_l2_message_tree_check_impl.hpp @@ -27,6 +27,12 @@ void l1_to_l2_message_tree_checkImpl::accumulate(ContainerOverSubrelations& } { using View = typename std::tuple_element_t<1, ContainerOverSubrelations>::View; + auto tmp = static_cast(in.get(C::l1_to_l2_message_tree_check_exists)) * + (FF(1) - static_cast(in.get(C::l1_to_l2_message_tree_check_exists))); + std::get<1>(evals) += (tmp * scaling_factor); + } + { + using View = typename std::tuple_element_t<2, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::l1_to_l2_message_tree_check_sel)) * ((CView(l1_to_l2_message_tree_check_LEAF_VALUE_MSG_HASH_DIFF) * (static_cast(in.get(C::l1_to_l2_message_tree_check_exists)) * @@ -35,14 +41,14 @@ void l1_to_l2_message_tree_checkImpl::accumulate(ContainerOverSubrelations& static_cast(in.get(C::l1_to_l2_message_tree_check_leaf_value_msg_hash_diff_inv))) - FF(1)) + static_cast(in.get(C::l1_to_l2_message_tree_check_exists))); - std::get<1>(evals) += (tmp * scaling_factor); + std::get<2>(evals) += (tmp * scaling_factor); } { - using View = typename std::tuple_element_t<2, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<3, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::l1_to_l2_message_tree_check_sel)) * (CView(constants_L1_TO_L2_MSG_TREE_HEIGHT) - static_cast(in.get(C::l1_to_l2_message_tree_check_l1_to_l2_message_tree_height))); - std::get<2>(evals) += (tmp * scaling_factor); + std::get<3>(evals) += (tmp * scaling_factor); } } diff --git a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/note_hash_tree_check.hpp b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/note_hash_tree_check.hpp index c619c4c224dd..9fbb5c9455cc 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/generated/relations/note_hash_tree_check.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/generated/relations/note_hash_tree_check.hpp @@ -14,8 +14,8 @@ template class note_hash_tree_checkImpl { public: using FF = FF_; - static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, - 4, 3, 3, 3, 5, 3, 3, 3, 3 }; + static constexpr std::array SUBRELATION_PARTIAL_LENGTHS = { 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, + 3, 4, 3, 3, 3, 5, 3, 3, 3, 3 }; template inline static bool skip(const AllEntities& in) { @@ -36,10 +36,10 @@ template class note_hash_tree_check : public Relation::accumulate(ContainerOverSubrelations& evals, } { using View = typename std::tuple_element_t<2, ContainerOverSubrelations>::View; - auto tmp = static_cast(in.get(C::note_hash_tree_check_should_silo)) * - (FF(1) - static_cast(in.get(C::note_hash_tree_check_should_silo))); + auto tmp = static_cast(in.get(C::note_hash_tree_check_exists)) * + (FF(1) - static_cast(in.get(C::note_hash_tree_check_exists))); std::get<2>(evals) += (tmp * scaling_factor); } { using View = typename std::tuple_element_t<3, ContainerOverSubrelations>::View; - auto tmp = static_cast(in.get(C::note_hash_tree_check_should_unique)) * - (FF(1) - static_cast(in.get(C::note_hash_tree_check_should_unique))); + auto tmp = static_cast(in.get(C::note_hash_tree_check_should_silo)) * + (FF(1) - static_cast(in.get(C::note_hash_tree_check_should_silo))); std::get<3>(evals) += (tmp * scaling_factor); } { using View = typename std::tuple_element_t<4, ContainerOverSubrelations>::View; + auto tmp = static_cast(in.get(C::note_hash_tree_check_should_unique)) * + (FF(1) - static_cast(in.get(C::note_hash_tree_check_should_unique))); + std::get<4>(evals) += (tmp * scaling_factor); + } + { + using View = typename std::tuple_element_t<5, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::note_hash_tree_check_write)) * (FF(1) - static_cast(in.get(C::note_hash_tree_check_sel))); - std::get<4>(evals) += (tmp * scaling_factor); + std::get<5>(evals) += (tmp * scaling_factor); } { // DISABLE_SILOING_ON_READ - using View = typename std::tuple_element_t<5, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<6, ContainerOverSubrelations>::View; auto tmp = CView(note_hash_tree_check_READ) * static_cast(in.get(C::note_hash_tree_check_should_silo)); - std::get<5>(evals) += (tmp * scaling_factor); + std::get<6>(evals) += (tmp * scaling_factor); } { - using View = typename std::tuple_element_t<6, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<7, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::note_hash_tree_check_should_silo)) * (FF(1) - static_cast(in.get(C::note_hash_tree_check_should_unique))); - std::get<6>(evals) += (tmp * scaling_factor); + std::get<7>(evals) += (tmp * scaling_factor); } { // PASSTHROUGH_SILOING - using View = typename std::tuple_element_t<7, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<8, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::note_hash_tree_check_sel)) * (FF(1) - static_cast(in.get(C::note_hash_tree_check_should_silo))) * (static_cast(in.get(C::note_hash_tree_check_note_hash)) - static_cast(in.get(C::note_hash_tree_check_siloed_note_hash))); - std::get<7>(evals) += (tmp * scaling_factor); + std::get<8>(evals) += (tmp * scaling_factor); } { - using View = typename std::tuple_element_t<8, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<9, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::note_hash_tree_check_sel)) * (CView(constants_DOM_SEP__SILOED_NOTE_HASH) - static_cast(in.get(C::note_hash_tree_check_siloing_separator))); - std::get<8>(evals) += (tmp * scaling_factor); + std::get<9>(evals) += (tmp * scaling_factor); } { // DISABLE_UNIQUENESS_ON_READ - using View = typename std::tuple_element_t<9, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<10, ContainerOverSubrelations>::View; auto tmp = CView(note_hash_tree_check_READ) * static_cast(in.get(C::note_hash_tree_check_should_unique)); - std::get<9>(evals) += (tmp * scaling_factor); + std::get<10>(evals) += (tmp * scaling_factor); } { // PASSTHROUGH_UNIQUENESS - using View = typename std::tuple_element_t<10, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<11, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::note_hash_tree_check_sel)) * (FF(1) - static_cast(in.get(C::note_hash_tree_check_should_unique))) * (static_cast(in.get(C::note_hash_tree_check_siloed_note_hash)) - static_cast(in.get(C::note_hash_tree_check_unique_note_hash))); - std::get<10>(evals) += (tmp * scaling_factor); + std::get<11>(evals) += (tmp * scaling_factor); } { - using View = typename std::tuple_element_t<11, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<12, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::note_hash_tree_check_sel)) * (CView(constants_AVM_PUBLIC_INPUTS_PREVIOUS_NON_REVERTIBLE_ACCUMULATED_DATA_NULLIFIERS_ROW_IDX) - static_cast(in.get(C::note_hash_tree_check_first_nullifier_pi_index))); - std::get<11>(evals) += (tmp * scaling_factor); + std::get<12>(evals) += (tmp * scaling_factor); } { - using View = typename std::tuple_element_t<12, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<13, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::note_hash_tree_check_sel)) * (CView(constants_DOM_SEP__NOTE_HASH_NONCE) - static_cast(in.get(C::note_hash_tree_check_nonce_separator))); - std::get<12>(evals) += (tmp * scaling_factor); + std::get<13>(evals) += (tmp * scaling_factor); } { - using View = typename std::tuple_element_t<13, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<14, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::note_hash_tree_check_sel)) * (CView(constants_DOM_SEP__UNIQUE_NOTE_HASH) - static_cast(in.get(C::note_hash_tree_check_unique_note_hash_separator))); - std::get<13>(evals) += (tmp * scaling_factor); + std::get<14>(evals) += (tmp * scaling_factor); } { - using View = typename std::tuple_element_t<14, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<15, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::note_hash_tree_check_sel)) * ((CView(note_hash_tree_check_PREV_LEAF_VALUE_UNIQUE_NOTE_HASH_DIFF) * @@ -126,36 +132,36 @@ void note_hash_tree_checkImpl::accumulate(ContainerOverSubrelations& evals, static_cast(in.get(C::note_hash_tree_check_prev_leaf_value_unique_note_hash_diff_inv))) - FF(1)) + static_cast(in.get(C::note_hash_tree_check_exists))); - std::get<14>(evals) += (tmp * scaling_factor); + std::get<15>(evals) += (tmp * scaling_factor); } { - using View = typename std::tuple_element_t<15, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<16, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::note_hash_tree_check_write)) * (static_cast(in.get(C::note_hash_tree_check_unique_note_hash)) - static_cast(in.get(C::note_hash_tree_check_next_leaf_value))); - std::get<15>(evals) += (tmp * scaling_factor); + std::get<16>(evals) += (tmp * scaling_factor); } { - using View = typename std::tuple_element_t<16, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<17, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::note_hash_tree_check_sel)) * (CView(constants_NOTE_HASH_TREE_HEIGHT) - static_cast(in.get(C::note_hash_tree_check_note_hash_tree_height))); - std::get<16>(evals) += (tmp * scaling_factor); + std::get<17>(evals) += (tmp * scaling_factor); } { - using View = typename std::tuple_element_t<17, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<18, ContainerOverSubrelations>::View; auto tmp = (static_cast(in.get(C::note_hash_tree_check_write)) * (FF(1) - static_cast(in.get(C::note_hash_tree_check_discard))) - static_cast(in.get(C::note_hash_tree_check_should_write_to_public_inputs))); - std::get<17>(evals) += (tmp * scaling_factor); + std::get<18>(evals) += (tmp * scaling_factor); } { - using View = typename std::tuple_element_t<18, ContainerOverSubrelations>::View; + using View = typename std::tuple_element_t<19, ContainerOverSubrelations>::View; auto tmp = static_cast(in.get(C::note_hash_tree_check_should_write_to_public_inputs)) * ((CView(constants_AVM_PUBLIC_INPUTS_AVM_ACCUMULATED_DATA_NOTE_HASHES_ROW_IDX) + static_cast(in.get(C::note_hash_tree_check_note_hash_index))) - static_cast(in.get(C::note_hash_tree_check_public_inputs_index))); - std::get<18>(evals) += (tmp * scaling_factor); + std::get<19>(evals) += (tmp * scaling_factor); } }