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
3#include <optional>
4#include <span>
5
9
10namespace bb::avm2::simulation {
11
13 public:
14 virtual ~NullifierTreeCheckInterface() = default;
15 virtual void assert_read(const FF& nullifier,
17 bool exists,
18 const NullifierTreeLeafPreimage& low_leaf_preimage,
19 uint64_t low_leaf_index,
20 std::span<const FF> sibling_path,
21 const AppendOnlyTreeSnapshot& snapshot) = 0;
24 uint64_t nullifier_counter,
25 const NullifierTreeLeafPreimage& low_leaf_preimage,
26 uint64_t low_leaf_index,
27 std::span<const FF> low_leaf_sibling_path,
28 const AppendOnlyTreeSnapshot& prev_snapshot,
29 // Null if this is a failing write.
30 std::optional<std::span<const FF>> insertion_sibling_path) = 0;
31};
32
33} // namespace bb::avm2::simulation
virtual 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)=0
virtual 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)=0
AvmFlavorSettings::FF FF
Definition field.hpp:10
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13