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 <iostream>
5#include <vector>
6
11
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 << " " << block << ",\n";
28 }
29 os << " ],\n";
30 os << " cfg_instructions: [\n";
31 for (const auto& instr : data.cfg_instructions) {
32 os << " " << instr << ",\n";
33 }
34 os << " ],\n";
35 os << " calldata: [";
36 for (size_t i = 0; i < data.calldata.size(); ++i) {
37 os << data.calldata[i];
38 if (i + 1 < data.calldata.size()) {
39 os << ", ";
40 }
41 }
42 os << "],\n";
43 os << " return_options: " << "tag: " << data.return_options.return_value_tag
44 << ", offset: " << data.return_options.return_value_offset_index << ",\n";
45 os << "}";
46 return os;
47}
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< InstructionBlock > instruction_blocks
MSGPACK_FIELDS(instruction_blocks, cfg_instructions, calldata, return_options)