|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <retrieved_bytecodes_tree_check.hpp>
Public Member Functions | |
| RetrievedBytecodesTreeCheck (IndexedTreeCheckInterface &indexed_tree_check, RetrievedBytecodesTree initial_state) | |
| bool | contains (const FF &class_id) override |
| Checks whether a contract class ID exists in the retrieved bytecodes tree. | |
| void | insert (const FF &class_id) override |
| Inserts a contract class ID into the retrieved bytecodes tree. | |
| AppendOnlyTreeSnapshot | get_snapshot () const override |
| Returns the current tree snapshot. | |
| uint32_t | size () const override |
| Returns the number of retrieved bytecode class IDs in the tree. | |
Public Member Functions inherited from bb::avm2::simulation::RetrievedBytecodesInterface | |
| virtual | ~RetrievedBytecodesInterface ()=default |
Private Attributes | |
| IndexedTreeCheckInterface & | indexed_tree_check |
| RetrievedBytecodesTree | tree |
Definition at line 13 of file retrieved_bytecodes_tree_check.hpp.
|
inline |
Definition at line 15 of file retrieved_bytecodes_tree_check.hpp.
|
overridevirtual |
Checks whether a contract class ID exists in the retrieved bytecodes tree.
Queries the internal tree for the low leaf, converts it to generic IndexedTreeLeafData, and delegates the membership/non-membership proof to the indexed tree check gadget.
| class_id | The contract class ID to look up. |
Implements bb::avm2::simulation::RetrievedBytecodesInterface.
Definition at line 16 of file retrieved_bytecodes_tree_check.cpp.
|
overridevirtual |
Returns the current tree snapshot.
Implements bb::avm2::simulation::RetrievedBytecodesTreeCheckInterface.
Definition at line 79 of file retrieved_bytecodes_tree_check.cpp.
|
overridevirtual |
Inserts a contract class ID into the retrieved bytecodes tree.
Performs the insertion on the in memory tree, then delegates the constrained write (or duplicate detection) to the indexed tree check gadget. No siloing is applied.
| class_id | The contract class ID to insert. |
| std::runtime_error | If the indexed tree check write returns a snapshot that does not match the internal tree. |
Implements bb::avm2::simulation::RetrievedBytecodesInterface.
Definition at line 46 of file retrieved_bytecodes_tree_check.cpp.
|
overridevirtual |
Returns the number of retrieved bytecode class IDs in the tree.
Implements bb::avm2::simulation::RetrievedBytecodesInterface.
Definition at line 89 of file retrieved_bytecodes_tree_check.cpp.
|
private |
Definition at line 29 of file retrieved_bytecodes_tree_check.hpp.
|
private |
Definition at line 31 of file retrieved_bytecodes_tree_check.hpp.