Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
data_copy_events.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <stdexcept>
5#include <vector>
6
9
10namespace bb::avm2::simulation {
11
12struct DataCopyException : public std::runtime_error {
13 explicit DataCopyException(const std::string& message)
14 : std::runtime_error(message)
15 {}
16};
17
18enum class DataCopyOperation : uint8_t {
19 CD_COPY,
20 RD_COPY,
21};
22
24 uint32_t execution_clk = 0; // Data copy will read and write memory,
26 std::vector<MemoryValue> copying_data; // A portion of the padded version of calldata/returndata
27 uint32_t write_context_id = 0; // For mem aware subtraces, they need the context id when referencing memory
28 uint32_t read_context_id = 0; // Refers to the parent/child context id
29 // Loaded from X_data_copy opcode
30 uint32_t data_copy_size = 0;
31 uint32_t data_offset = 0;
32 // This is a direct address from the parent/child context for calldata/returndata
34 uint32_t src_data_size = 0; // Size of the calldata/returndata
35 bool is_nested = false;
36 // Output Address
38};
39
40} // namespace bb::avm2::simulation
uint32_t MemoryAddress
STL namespace.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
std::vector< MemoryValue > copying_data
DataCopyException(const std::string &message)