36 bool write =
event.append_data.has_value();
39 FF siloed_note_hash =
event.note_hash;
40 FF unique_note_hash =
event.note_hash;
42 bool should_silo =
false;
46 bool should_unique =
false;
47 uint64_t note_hash_counter = 0;
56 siloed_note_hash = append_data.
siloing_data->siloed_note_hash;
68 FF prev_leaf_value =
event.existing_leaf_value;
69 bool exists = prev_leaf_value == unique_note_hash;
70 FF prev_leaf_value_unique_note_hash_diff = prev_leaf_value - unique_note_hash;
73 { { { C::note_hash_tree_check_sel, 1 },
74 { C::note_hash_tree_check_const_three, 3 },
75 { C::note_hash_tree_check_write,
write },
76 { C::note_hash_tree_check_exists,
exists },
77 { C::note_hash_tree_check_note_hash,
note_hash },
78 { C::note_hash_tree_check_leaf_index,
event.leaf_index },
79 { C::note_hash_tree_check_prev_root,
event.prev_snapshot.root },
80 { C::note_hash_tree_check_sel_silo, should_silo },
81 { C::note_hash_tree_check_address,
address },
82 { C::note_hash_tree_check_sel_unique, should_unique },
83 { C::note_hash_tree_check_note_hash_index, note_hash_counter },
84 { C::note_hash_tree_check_discard,
discard },
85 { C::note_hash_tree_check_next_root, next_root },
86 { C::note_hash_tree_check_siloed_note_hash, siloed_note_hash },
88 { C::note_hash_tree_check_unique_note_hash, unique_note_hash },
89 { C::note_hash_tree_check_first_nullifier_pi_index,
92 { C::note_hash_tree_check_nonce, nonce },
95 { C::note_hash_tree_check_prev_leaf_value, prev_leaf_value },
96 { C::note_hash_tree_check_prev_leaf_value_unique_note_hash_diff_inv,
97 prev_leaf_value_unique_note_hash_diff },
98 { C::note_hash_tree_check_next_leaf_value,
write ? unique_note_hash : 0 },
100 { C::note_hash_tree_check_sel_write_to_public_inputs,
write && (!
discard) },
101 { C::note_hash_tree_check_public_inputs_index,
107 trace.invert_columns({ { C::note_hash_tree_check_prev_leaf_value_unique_note_hash_diff_inv } });