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