#include <l1_to_l2_message_tree_check.hpp>
◆ L1ToL2MessageTreeCheck()
◆ exists()
| bool bb::avm2::simulation::L1ToL2MessageTreeCheck::exists |
( |
const FF & |
msg_hash, |
|
|
const FF & |
leaf_value, |
|
|
uint64_t |
leaf_index, |
|
|
std::span< const FF > |
sibling_path, |
|
|
const AppendOnlyTreeSnapshot & |
snapshot |
|
) |
| |
|
overridevirtual |
Checks whether an L1-to-L2 message exists in the message tree via Merkle membership proof.
Verifies that leaf_value is present at leaf_index in the tree whose root is given by snapshot, then compares it against the user provided msg_hash.
- Note
- This won't check that leaf index is less than the next available leaf index.
- Parameters
-
| msg_hash | The message hash the user wants to know if exists. |
| leaf_value | The actual leaf value retrieved from the tree. |
| leaf_index | The index of the leaf in the tree. |
| sibling_path | The Merkle sibling path used for the membership proof. |
| snapshot | The tree snapshot to verify against. |
- Returns
- true if
msg_hash equals leaf_value, false otherwise.
Implements bb::avm2::simulation::L1ToL2MessageTreeCheckInterface.
Definition at line 19 of file l1_to_l2_message_tree_check.cpp.
◆ events
◆ merkle_check
The documentation for this class was generated from the following files: