Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
written_public_data_slots_tree_check.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <stack>
5#include <utility>
6
12
13namespace bb::avm2::simulation {
14
16 public:
23
24 bool contains(const AztecAddress& contract_address, const FF& slot) override;
25
26 void insert(const AztecAddress& contract_address, const FF& slot) override;
27
28 AppendOnlyTreeSnapshot get_snapshot() const override;
29
30 uint32_t size() const override;
31
32 void create_checkpoint() override;
33 void commit_checkpoint() override;
34 void revert_checkpoint() override;
35
36 private:
38
40};
41
42} // namespace bb::avm2::simulation
bool contains(const AztecAddress &contract_address, const FF &slot) override
Checks whether a public data slot exists in the written public data slots tree.
uint32_t size() const override
Returns the number of written public data slots in the tree.
AppendOnlyTreeSnapshot get_snapshot() const override
Returns the current tree snapshot from the top of the checkpoint stack.
void revert_checkpoint() override
Reverts the current checkpoint by discarding the top of the tree state stack.
void insert(const AztecAddress &contract_address, const FF &slot) override
Inserts a public data slot into the written public data slots tree.
WrittenPublicDataSlotsTreeCheck(IndexedTreeCheckInterface &indexed_tree_check, WrittenPublicDataSlotsTree initial_state)
void create_checkpoint() override
Creates a checkpoint by pushing a copy of the current tree state onto the stack.
void commit_checkpoint() override
Commits the current checkpoint by replacing the previous tree state with the current one.
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