Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
fuzzer_data.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <vector>
5
9
19
20#include <iostream>
21
22inline std::ostream& operator<<(std::ostream& os, const FuzzerData& data)
23{
24 os << "FuzzerData {\n";
25 os << " instructions: [\n";
26 for (const auto& block : data.instruction_blocks) {
27 os << " [\n";
28 for (const auto& instr : block) {
29 os << " " << instr << ",\n";
30 }
31 os << " ],\n";
32 }
33 os << " ],\n";
34 os << " cfg_instructions: [\n";
35 for (const auto& instr : data.cfg_instructions) {
36 os << " " << instr << ",\n";
37 }
38 os << " ],\n";
39 os << " calldata: [";
40 for (size_t i = 0; i < data.calldata.size(); ++i) {
41 os << data.calldata[i];
42 if (i + 1 < data.calldata.size()) {
43 os << ", ";
44 }
45 }
46 os << "],\n";
47 os << " return_options: " << "tag: " << data.return_options.return_value_tag
48 << ", offset: " << data.return_options.return_value_offset_index << ",\n";
49 os << "}";
50 return os;
51}
const std::vector< MemoryValue > data
std::ostream & operator<<(std::ostream &os, const FuzzerData &data)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
describes the data which will be used for fuzzing Should contain instructions, calldata,...
ReturnOptions return_options
std::vector< bb::avm2::FF > calldata
std::vector< CFGInstruction > cfg_instructions
std::vector< std::vector< FuzzInstruction > > instruction_blocks
MSGPACK_FIELDS(instruction_blocks, cfg_instructions, calldata, return_options)