barretenberg
Loading...
Searching...
No Matches
memory_tree.hpp
1#pragma once
2#include "hash_path.hpp"
3
4namespace proof_system::plonk {
5namespace stdlib {
6namespace merkle_tree {
7
8using namespace barretenberg;
9
28 public:
29 MemoryTree(size_t depth);
30
31 fr_hash_path get_hash_path(size_t index);
32
33 fr_sibling_path get_sibling_path(size_t index);
34
35 fr update_element(size_t index, fr const& value);
36
37 fr root() const { return root_; }
38
39 public:
40 size_t depth_;
41 size_t total_size_;
42 barretenberg::fr root_;
43 std::vector<barretenberg::fr> hashes_;
44};
45
46} // namespace merkle_tree
47} // namespace stdlib
48} // namespace proof_system::plonk
constexpr_utils defines some helper methods that perform some stl-equivalent operations but in a cons...
Definition: constexpr_utils.hpp:16
Definition: widget.bench.cpp:13