Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
retrieved_bytecodes_tree.cpp
Go to the documentation of this file.
2
4
5namespace bb::avm2::simulation {
6
8{
9 return true;
10}
11
13{
14 return class_id == other.class_id;
15}
16
17std::ostream& operator<<(std::ostream& os, const ClassIdLeafValue& v)
18{
19 os << "slot = " << v.class_id;
20 return os;
21}
22
24{
25 return class_id;
26}
27
29{
30 return class_id.is_zero();
31}
32
33std::vector<fr> ClassIdLeafValue::get_hash_inputs(fr nextKey, fr nextIndex) const
34{
35 return std::vector<fr>({ class_id, nextKey, nextIndex });
36}
37
38ClassIdLeafValue::operator uint256_t() const
39{
40 return get_key();
41}
42
47
52
54{
55 return "ClassIdLeafValue";
56}
57
62
63} // namespace bb::avm2::simulation
#define AVM_RETRIEVED_BYTECODES_TREE_INITIAL_SIZE
#define AVM_RETRIEVED_BYTECODES_TREE_HEIGHT
IndexedMemoryTree< ClassIdLeafValue, Poseidon2HashPolicy > RetrievedBytecodesTree
RetrievedBytecodesTree build_retrieved_bytecodes_tree()
::bb::crypto::merkle_tree::index_t index_t
Definition db.hpp:28
std::ostream & operator<<(std::ostream &os, const WireOpCode &op)
Definition opcodes.cpp:8
Key get_key(int64_t keyCount)
Definition fixtures.hpp:30
bool operator==(ClassIdLeafValue const &other) const
std::vector< fr > get_hash_inputs(fr nextKey, fr nextIndex) const
static ClassIdLeafValue padding(index_t i)
BB_INLINE constexpr bool is_zero() const noexcept
static constexpr field zero()