Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
nullifier_tree.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: not started, auditors: [], date: YYYY-MM-DD }
3// external_1: { status: not started, auditors: [], date: YYYY-MM-DD }
4// external_2: { status: not started, auditors: [], date: YYYY-MM-DD }
5// =====================
6
7#pragma once
8#include "../hash.hpp"
9#include "../merkle_tree.hpp"
10#include "nullifier_leaf.hpp"
11
13
14template <typename Store, typename HashingPolicy> class NullifierTree : public MerkleTree<Store, HashingPolicy> {
15 public:
17
18 NullifierTree(Store& store, size_t depth, size_t initial_size = 1, uint8_t tree_id = 0);
19 NullifierTree(NullifierTree const& other) = delete;
22
23 using MerkleTree<Store, HashingPolicy>::get_hash_path;
24 using MerkleTree<Store, HashingPolicy>::root;
25 using MerkleTree<Store, HashingPolicy>::size;
26 using MerkleTree<Store, HashingPolicy>::depth;
27
28 fr update_element(fr const& value);
29
30 private:
31 using MerkleTree<Store, HashingPolicy>::update_element;
32 using MerkleTree<Store, HashingPolicy>::get_element;
33 using MerkleTree<Store, HashingPolicy>::compute_zero_path_hash;
34
35 private:
36 using MerkleTree<Store, HashingPolicy>::store_;
37 using MerkleTree<Store, HashingPolicy>::zero_hashes_;
38 using MerkleTree<Store, HashingPolicy>::depth_;
39 using MerkleTree<Store, HashingPolicy>::tree_id_;
41};
42
43} // namespace bb::crypto::merkle_tree
fr_hash_path get_hash_path(index_t index)
fr compute_zero_path_hash(size_t height, index_t index, fr const &value)
fr get_element(fr const &root, index_t index, size_t height)
NullifierTree(NullifierTree const &other)=delete
std::vector< WrappedNullifierLeaf< HashingPolicy > > leaves
ContentAddressedCachedTreeStore< bb::fr > Store
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13