Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
nullifier_tree_check.hpp
Go to the documentation of this file.
1#pragma once
2
10
11namespace bb::avm2::simulation {
12
14 public:
24
25 void assert_read(const FF& nullifier,
27 bool exists,
28 const NullifierTreeLeafPreimage& low_leaf_preimage,
29 uint64_t low_leaf_index,
30 std::span<const FF> sibling_path,
31 const AppendOnlyTreeSnapshot& snapshot) override;
34 uint64_t nullifier_counter,
35 const NullifierTreeLeafPreimage& low_leaf_preimage,
36 uint64_t low_leaf_index,
37 std::span<const FF> low_leaf_sibling_path,
38 const AppendOnlyTreeSnapshot& prev_snapshot,
39 std::optional<std::span<const FF>> insertion_sibling_path) override;
40
41 void on_checkpoint_created() override;
42 void on_checkpoint_committed() override;
43 void on_checkpoint_reverted() override;
44
45 private:
47 void validate_low_leaf(const FF& nullifier, const NullifierTreeLeafPreimage& low_leaf_preimage, bool exists);
48
53};
54
55} // namespace bb::avm2::simulation
void validate_low_leaf(const FF &nullifier, const NullifierTreeLeafPreimage &low_leaf_preimage, bool exists)
AppendOnlyTreeSnapshot write(const FF &nullifier, std::optional< AztecAddress > contract_address, uint64_t nullifier_counter, const NullifierTreeLeafPreimage &low_leaf_preimage, uint64_t low_leaf_index, std::span< const FF > low_leaf_sibling_path, const AppendOnlyTreeSnapshot &prev_snapshot, std::optional< std::span< const FF > > insertion_sibling_path) override
FF silo_nullifier(const FF &nullifier, AztecAddress contract_address)
void assert_read(const FF &nullifier, std::optional< AztecAddress > contract_address, bool exists, const NullifierTreeLeafPreimage &low_leaf_preimage, uint64_t low_leaf_index, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &snapshot) override
EventEmitterInterface< NullifierTreeCheckEvent > & events
NullifierTreeCheck(Poseidon2Interface &poseidon2, MerkleCheckInterface &merkle_check, FieldGreaterThanInterface &field_gt, EventEmitterInterface< NullifierTreeCheckEvent > &event_emitter)
EventEmitter< DataCopyEvent > event_emitter
AvmFlavorSettings::FF FF
Definition field.hpp:10
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13