27 bool write =
event.append_data.has_value();
30 FF siloed_note_hash =
event.note_hash;
31 FF unique_note_hash =
event.note_hash;
33 bool should_silo =
false;
37 bool should_unique =
false;
38 uint64_t note_hash_counter = 0;
47 siloed_note_hash = append_data.
siloing_data->siloed_note_hash;
59 FF prev_leaf_value =
event.existing_leaf_value;
60 bool exists = prev_leaf_value == unique_note_hash;
61 FF prev_leaf_value_unique_note_hash_diff = prev_leaf_value - unique_note_hash;
64 { { { C::note_hash_tree_check_sel, 1 },
65 { C::note_hash_tree_check_const_three, 3 },
66 { C::note_hash_tree_check_write,
write },
67 { C::note_hash_tree_check_exists,
exists },
68 { C::note_hash_tree_check_note_hash,
note_hash },
69 { C::note_hash_tree_check_leaf_index,
event.leaf_index },
70 { C::note_hash_tree_check_prev_root,
event.prev_snapshot.root },
71 { C::note_hash_tree_check_should_silo, should_silo },
72 { C::note_hash_tree_check_address,
address },
73 { C::note_hash_tree_check_should_unique, should_unique },
74 { C::note_hash_tree_check_note_hash_index, note_hash_counter },
75 { C::note_hash_tree_check_discard,
discard },
76 { C::note_hash_tree_check_next_root, next_root },
77 { C::note_hash_tree_check_siloed_note_hash, siloed_note_hash },
79 { C::note_hash_tree_check_unique_note_hash, unique_note_hash },
80 { C::note_hash_tree_check_first_nullifier_pi_index,
83 { C::note_hash_tree_check_nonce, nonce },
86 { C::note_hash_tree_check_prev_leaf_value, prev_leaf_value },
87 { C::note_hash_tree_check_prev_leaf_value_unique_note_hash_diff_inv,
88 prev_leaf_value_unique_note_hash_diff },
89 { C::note_hash_tree_check_next_leaf_value,
write ? unique_note_hash : 0 },
91 { C::note_hash_tree_check_should_write_to_public_inputs,
write && (!
discard) },
92 { C::note_hash_tree_check_public_inputs_index,
98 trace.invert_columns({ { C::note_hash_tree_check_prev_leaf_value_unique_note_hash_diff_inv } });