Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
merkle_check.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <memory>
5#include <span>
6
13
14namespace bb::avm2::simulation {
15
17 public:
18 virtual ~MerkleCheckInterface() = default;
19 virtual void assert_membership(const FF& leaf_value,
20 const uint64_t leaf_index,
21 std::span<const FF> sibling_path,
22 const FF& root) = 0;
23 virtual FF write(const FF& current_value,
24 const FF& new_value,
25 const uint64_t leaf_index,
26 std::span<const FF> sibling_path,
27 const FF& current_root) = 0;
28};
29
31 public:
36
37 void assert_membership(const FF& leaf_value,
38 const uint64_t leaf_index,
39 std::span<const FF> sibling_path,
40 const FF& root) override;
41
42 FF write(const FF& current_value,
43 const FF& new_value,
44 const uint64_t leaf_index,
45 std::span<const FF> sibling_path,
46 const FF& current_root) override;
47
48 private:
51};
52
53} // namespace bb::avm2::simulation
FF write(const FF &current_value, const FF &new_value, const uint64_t leaf_index, std::span< const FF > sibling_path, const FF &current_root) override
void assert_membership(const FF &leaf_value, const uint64_t leaf_index, std::span< const FF > sibling_path, const FF &root) override
MerkleCheck(Poseidon2Interface &poseidon2, EventEmitterInterface< MerkleCheckEvent > &event_emitter)
EventEmitterInterface< MerkleCheckEvent > & events
virtual void assert_membership(const FF &leaf_value, const uint64_t leaf_index, std::span< const FF > sibling_path, const FF &root)=0
virtual FF write(const FF &current_value, const FF &new_value, const uint64_t leaf_index, std::span< const FF > sibling_path, const FF &current_root)=0
EventEmitter< DataCopyEvent > event_emitter
AvmFlavorSettings::FF FF
Definition field.hpp:10
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13