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(const FF& leaf_value,
22 const uint64_t leaf_index,
23 std::span<const FF> sibling_path,
24 const FF& root) override;
25
26 FF write(const FF& current_value,
27 const FF& new_value,
28 const uint64_t leaf_index,
29 std::span<const FF> sibling_path,
30 const FF& current_root) override;
31
32 private:
35};
36
37} // 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
Assert the membership of the current leaf value (same logic as assert_membership())....
void assert_membership(const FF &leaf_value, const 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,...
MerkleCheck(Poseidon2Interface &poseidon2, EventEmitterInterface< MerkleCheckEvent > &event_emitter)
EventEmitterInterface< MerkleCheckEvent > & events
EventEmitter< DataCopyEvent > event_emitter
AvmFlavorSettings::FF FF
Definition field.hpp:10
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13