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 <span>
5
11
12namespace bb::avm2::simulation {
13
15 public:
20
21 void assert_membership(uint64_t domain_separator,
22 const FF& leaf_value,
23 uint64_t leaf_index,
24 std::span<const FF> sibling_path,
25 const FF& root) override;
26
27 FF write(uint64_t domain_separator,
28 const FF& current_value,
29 const FF& new_value,
30 uint64_t leaf_index,
31 std::span<const FF> sibling_path,
32 const FF& current_root) override;
33
34 private:
37};
38
39} // namespace bb::avm2::simulation
FF write(uint64_t domain_separator, const FF &current_value, const FF &new_value, uint64_t leaf_index, std::span< const FF > sibling_path, const FF &current_root) override
Assert the membership of the current leaf value (same logic as assert_membership())....
MerkleCheck(Poseidon2Interface &poseidon2, EventEmitterInterface< MerkleCheckEvent > &event_emitter)
EventEmitterInterface< MerkleCheckEvent > & events
void assert_membership(uint64_t domain_separator, const FF &leaf_value, uint64_t leaf_index, std::span< const FF > sibling_path, const FF &root) override
Assert membership of a leaf in a Merkle tree, i.e., verify that the leaf value, leaf index,...
EventEmitter< DataCopyEvent > event_emitter
AVM range check gadget for witness generation.
AvmFlavorSettings::FF FF
Definition field.hpp:10
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13