Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
l1_to_l2_message_tree_check.cpp
Go to the documentation of this file.
1
#include "
barretenberg/vm2/simulation/l1_to_l2_message_tree_check.hpp
"
2
3
#include "
barretenberg/vm2/common/aztec_types.hpp
"
4
#include "
barretenberg/vm2/simulation/events/l1_to_l2_message_tree_check_event.hpp
"
5
6
namespace
bb::avm2::simulation
{
7
8
bool
L1ToL2MessageTreeCheck::exists
(
const
FF
& msg_hash,
9
const
FF
& leaf_value,
10
uint64_t leaf_index,
11
std::span<const FF>
sibling_path,
12
const
AppendOnlyTreeSnapshot
& snapshot)
13
{
14
merkle_check
.assert_membership(leaf_value, leaf_index, sibling_path, snapshot.
root
);
15
events
.emit(
L1ToL2MessageTreeCheckEvent
{
16
.
msg_hash
= msg_hash, .leaf_value = leaf_value, .leaf_index = leaf_index, .snapshot = snapshot });
17
return
msg_hash == leaf_value;
18
}
19
20
}
// namespace bb::avm2::simulation
aztec_types.hpp
bb::avm2::merkle_check
Definition
merkle_check.hpp:34
bb::avm2::simulation::L1ToL2MessageTreeCheck::exists
bool exists(const FF &msg_hash, const FF &leaf_value, uint64_t leaf_index, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &snapshot) override
Definition
l1_to_l2_message_tree_check.cpp:8
bb::avm2::simulation::L1ToL2MessageTreeCheck::events
EventEmitterInterface< L1ToL2MessageTreeCheckEvent > & events
Definition
l1_to_l2_message_tree_check.hpp:37
l1_to_l2_message_tree_check_event.hpp
bb::avm2::simulation
Definition
address_derivation.cpp:8
bb::avm2::FF
AvmFlavorSettings::FF FF
Definition
field.hpp:10
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
l1_to_l2_message_tree_check.hpp
bb::avm2::AppendOnlyTreeSnapshot
Definition
aztec_types.hpp:273
bb::avm2::AppendOnlyTreeSnapshot::root
FF root
Definition
aztec_types.hpp:274
bb::avm2::simulation::L1ToL2MessageTreeCheckEvent
Definition
l1_to_l2_message_tree_check_event.hpp:12
bb::avm2::simulation::L1ToL2MessageTreeCheckEvent::msg_hash
FF msg_hash
Definition
l1_to_l2_message_tree_check_event.hpp:13
src
barretenberg
vm2
simulation
l1_to_l2_message_tree_check.cpp
Generated by
1.9.8