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.
2
4
5namespace bb::avm2::simulation {
6
22 const FF& leaf_value,
23 uint64_t leaf_index,
24 std::span<const FF> sibling_path,
25 const AppendOnlyTreeSnapshot& snapshot)
26{
27 merkle_check.assert_membership(DOM_SEP__MERKLE_HASH, leaf_value, leaf_index, sibling_path, snapshot.root);
29 .msg_hash = msg_hash, .leaf_value = leaf_value, .leaf_index = leaf_index, .snapshot = snapshot });
30 return msg_hash == leaf_value;
31}
32
33} // namespace bb::avm2::simulation
#define DOM_SEP__MERKLE_HASH
bool exists(const FF &msg_hash, const FF &leaf_value, uint64_t leaf_index, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &snapshot) override
Checks whether an L1-to-L2 message exists in the message tree via Merkle membership proof.
EventEmitterInterface< L1ToL2MessageTreeCheckEvent > & events
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