Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
note_hash_tree_check.hpp
Go to the documentation of this file.
1#pragma once
2
9
10namespace bb::avm2::simulation {
11
13 public:
23
24 FF get_first_nullifier() const override { return first_nullifier; }
25
26 bool note_hash_exists(const FF& unique_note_hash,
27 const FF& leaf_value,
28 uint64_t leaf_index,
29 std::span<const FF> sibling_path,
30 const AppendOnlyTreeSnapshot& snapshot) override;
33 uint64_t note_hash_counter,
34 std::span<const FF> sibling_path,
35 const AppendOnlyTreeSnapshot& prev_snapshot) override;
37 uint64_t note_hash_counter,
38 std::span<const FF> sibling_path,
39 const AppendOnlyTreeSnapshot& prev_snapshot) override;
41 uint64_t note_hash_counter,
42 std::span<const FF> sibling_path,
43 const AppendOnlyTreeSnapshot& prev_snapshot) override;
44
45 void on_checkpoint_created() override;
46 void on_checkpoint_committed() override;
47 void on_checkpoint_reverted() override;
48
49 private:
50 FF make_siloed(AztecAddress contract_address, const FF& note_hash) const;
51 FF make_nonce(uint64_t note_hash_counter) const;
52 FF make_unique(const FF& siloed_note_hash, const FF& nonce) const;
55 bool should_make_unique,
56 uint64_t note_hash_counter,
57 std::span<const FF> sibling_path,
58 const AppendOnlyTreeSnapshot& prev_snapshot);
59
64};
65
66} // namespace bb::avm2::simulation
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
EventEmitterInterface< NoteHashTreeCheckEvent > & events
AppendOnlyTreeSnapshot append_note_hash(const FF &note_hash, AztecAddress contract_address, uint64_t note_hash_counter, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &prev_snapshot) override
NoteHashTreeCheck(const FF &first_nullifier, Poseidon2Interface &poseidon2, MerkleCheckInterface &merkle_check, EventEmitterInterface< NoteHashTreeCheckEvent > &event_emitter)
FF make_nonce(uint64_t note_hash_counter) const
FF make_unique(const FF &siloed_note_hash, const FF &nonce) const
FF make_siloed(AztecAddress contract_address, const FF &note_hash) const
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)
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
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
EventEmitter< DataCopyEvent > event_emitter
AvmFlavorSettings::FF FF
Definition field.hpp:10
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13