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 <stack>
4
13
14namespace bb::avm2::simulation {
15
17 public:
19 virtual bool contains(const AztecAddress& contract_address, const FF& slot) = 0;
20 virtual void insert(const AztecAddress& contract_address, const FF& slot) = 0;
21 virtual uint32_t size() const = 0;
22
23 // These are needed since this is a checkpointable set.
24 virtual void create_checkpoint() = 0;
25 virtual void commit_checkpoint() = 0;
26 virtual void revert_checkpoint() = 0;
27};
28
30 public:
31 // Abstraction leak: we need to track tree roots to implement the set in-circuit
32 virtual AppendOnlyTreeSnapshot snapshot() const = 0;
33};
34
74
75} // namespace bb::avm2::simulation
virtual bool contains(const AztecAddress &contract_address, const FF &slot)=0
virtual void insert(const AztecAddress &contract_address, const FF &slot)=0
bool contains(const AztecAddress &contract_address, const FF &slot) override
FF compute_leaf_slot(const AztecAddress &contract_address, const FF &slot)
void validate_low_leaf_jumps_over_slot(const WrittenPublicDataSlotsTreeLeafPreimage &low_leaf_preimage, const FF &leaf_slot)
void insert(const AztecAddress &contract_address, const FF &slot) override
WrittenPublicDataSlotsTreeCheck(Poseidon2Interface &poseidon2, MerkleCheckInterface &merkle_check, FieldGreaterThanInterface &field_gt, WrittenPublicDataSlotsTree initial_state, EventEmitterInterface< WrittenPublicDataSlotsTreeCheckEvent > &read_event_emitter)
EventEmitterInterface< WrittenPublicDataSlotsTreeCheckEvent > & events
virtual AppendOnlyTreeSnapshot snapshot() const =0
AvmFlavorSettings::FF FF
Definition field.hpp:10
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13