Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
merkle_check_event.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <cstdint>
6#include <vector>
7
8namespace bb::avm2::simulation {
9
10/* A Merkle check event has 2 flavors: READ (assert membership) or WRITE (write a new leaf).
11 * The distinction between the two flavors in the event is not explicit but relies on the `new_leaf_value` field.
12 * If `new_leaf_value` is present, it means the event is a WRITE event.
13 * If `new_leaf_value` is absent, it means the event is a READ event.
14 * Same for `new_root` field.
15 * leaf_value, leaf_index, sibling_path, root are common to both flavors and are explicitly set for both flavors.
16 */
20 uint64_t leaf_index = 0;
21 std::vector<FF> sibling_path;
22 FF root = 0;
24
25 bool operator==(const MerkleCheckEvent& other) const = default;
26};
27
28} // namespace bb::avm2::simulation
AvmFlavorSettings::FF FF
Definition field.hpp:10
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
bool operator==(const MerkleCheckEvent &other) const =default