39 uint64_t note_hash_counter,
43 uint64_t note_hash_counter,
47 uint64_t note_hash_counter,
61 bool should_make_unique,
62 uint64_t note_hash_counter,
Interface for a checkpoint notifiable.
void on_checkpoint_created() override
Emits a checkpoint creation event for the note hash tree.
AppendOnlyTreeSnapshot append_siloed_note_hash(const FF &siloed_note_hash, uint64_t note_hash_counter, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &prev_snapshot) override
Appends a pre-siloed note hash to the tree after making it unique.
EventEmitterInterface< NoteHashTreeCheckEvent > & events
AppendOnlyTreeSnapshot append_note_hash(const FF ¬e_hash, AztecAddress contract_address, uint64_t note_hash_counter, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &prev_snapshot) override
Appends a raw (inner) note hash to the tree after siloing and making it unique.
NoteHashTreeCheck(const FF &first_nullifier, Poseidon2Interface &poseidon2, MerkleCheckInterface &merkle_check, EventEmitterInterface< NoteHashTreeCheckEvent > &event_emitter)
FF make_nonce(uint64_t note_hash_counter) const
Derives a nonce for a note hash from the transaction's first nullifier and the note hash counter.
FF make_unique(const FF &siloed_note_hash, const FF &nonce) const
Computes a unique note hash by combining a siloed note hash with its nonce.
MerkleCheckInterface & merkle_check
FF make_siloed(AztecAddress contract_address, const FF ¬e_hash) const
Computes the siloed note hash by hashing the contract address with the note hash.
FF get_first_nullifier() const override
void on_checkpoint_committed() override
Emits a checkpoint commit event, finalizing pending note hash tree changes.
void on_checkpoint_reverted() override
Emits a checkpoint revert event, rolling back pending note hash tree changes.
Poseidon2Interface & poseidon2
AppendOnlyTreeSnapshot append_note_hash_internal(FF note_hash, std::optional< AztecAddress > contract_address, bool should_make_unique, uint64_t note_hash_counter, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &prev_snapshot)
Internal implementation for all note hash append variants.
bool note_hash_exists(const FF &unique_note_hash, const FF &leaf_value, uint64_t leaf_index, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &snapshot) override
Checks whether a note hash exists in the note hash tree via Merkle membership proof.
AppendOnlyTreeSnapshot append_unique_note_hash(const FF &unique_note_hash, uint64_t note_hash_counter, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &prev_snapshot) override
Appends a pre-computed unique note hash directly to the tree.
EventEmitter< DataCopyEvent > event_emitter
AVM range check gadget for witness generation.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept