Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
mock_indexed_tree_check.hpp
Go to the documentation of this file.
1#pragma once
2
7
8#include <cstdint>
9#include <gmock/gmock.h>
10#include <optional>
11#include <span>
12
13namespace bb::avm2::simulation {
14
16 public:
19
22 (const FF& value,
24 bool exists,
25 const IndexedTreeLeafData& low_leaf_preimage,
26 uint64_t low_leaf_index,
27 std::span<const FF> sibling_path,
28 const AppendOnlyTreeSnapshot& snapshot),
29 (override));
30
32 write,
33 (const FF& value,
35 std::optional<uint64_t> public_inputs_index,
36 const IndexedTreeLeafData& low_leaf_preimage,
37 uint64_t low_leaf_index,
38 std::span<const FF> low_leaf_sibling_path,
39 const AppendOnlyTreeSnapshot& prev_snapshot,
40 // Null if this is a failing write.
41 std::optional<std::span<const FF>> insertion_sibling_path),
42 (override));
43};
44
45} // namespace bb::avm2::simulation
virtual void assert_read(const FF &value, std::optional< IndexedTreeSiloingParameters > siloing_params, bool exists, const IndexedTreeLeafData &low_leaf_preimage, uint64_t low_leaf_index, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &snapshot)=0
virtual AppendOnlyTreeSnapshot write(const FF &value, std::optional< IndexedTreeSiloingParameters > siloing_params, std::optional< uint64_t > public_inputs_index, const IndexedTreeLeafData &low_leaf_preimage, uint64_t low_leaf_index, std::span< const FF > low_leaf_sibling_path, const AppendOnlyTreeSnapshot &prev_snapshot, std::optional< std::span< const FF > > insertion_sibling_path)=0
MOCK_METHOD(void, assert_read,(const FF &value, std::optional< IndexedTreeSiloingParameters > siloing_params, bool exists, const IndexedTreeLeafData &low_leaf_preimage, uint64_t low_leaf_index, std::span< const FF > sibling_path, const AppendOnlyTreeSnapshot &snapshot),(override))
MOCK_METHOD(AppendOnlyTreeSnapshot, write,(const FF &value, std::optional< IndexedTreeSiloingParameters > siloing_params, std::optional< uint64_t > public_inputs_index, const IndexedTreeLeafData &low_leaf_preimage, uint64_t low_leaf_index, std::span< const FF > low_leaf_sibling_path, const AppendOnlyTreeSnapshot &prev_snapshot, std::optional< std::span< const FF > > insertion_sibling_path),(override))
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