Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
private_execution_steps.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Complete, auditors: [Sergei], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
9#include <cstdint>
10#include <filesystem>
11#include <string>
12#include <vector>
13
14namespace bb {
15
30 // Represents bincode.
31 std::vector<uint8_t> bytecode;
32 // Represents bincoded witness data.
33 std::vector<uint8_t> witness;
34 // Represents a legacy-serialized vk.
35 std::vector<uint8_t> vk;
36 // Represents the function name.
37 std::string function_name;
38
39 // Unrolled from MSGPACK_FIELDS for custom name for function_name.
40 void msgpack(auto pack_fn) { pack_fn(NVP(bytecode, witness, vk), "functionName", function_name); };
41 void self_decompress();
42 static std::vector<PrivateExecutionStepRaw> load_and_decompress(const std::filesystem::path& input_path);
43 static std::vector<PrivateExecutionStepRaw> load(const std::filesystem::path& input_path);
44 static std::vector<PrivateExecutionStepRaw> parse_uncompressed(const std::vector<uint8_t>& buf);
46 const std::filesystem::path& output_path);
47};
48
87} // namespace bb
uint8_t const * buf
Definition data_store.hpp:9
#define NVP(...)
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
This is the msgpack encoding of the objects returned by the following typescript: const stepToStruct ...
static void compress_and_save(std::vector< PrivateExecutionStepRaw > &&steps, const std::filesystem::path &output_path)
static std::vector< PrivateExecutionStepRaw > load_and_decompress(const std::filesystem::path &input_path)
static std::vector< PrivateExecutionStepRaw > parse_uncompressed(const std::vector< uint8_t > &buf)
static std::vector< PrivateExecutionStepRaw > load(const std::filesystem::path &input_path)
Parsed private execution steps ready for Chonk accumulation.
std::shared_ptr< Chonk > accumulate()
Creates a Chonk instance and accumulates each circuit in the folding stack. Uses precomputed VKs when...
std::vector< std::shared_ptr< Chonk::MegaVerificationKey > > precomputed_vks
Precomputed VKs (performance)
void parse(std::vector< PrivateExecutionStepRaw > &&steps)
Converts PrivateExecutionStepRaw entries (which contain raw bytecode/witness bytes) into structured A...
std::vector< acir_format::AcirProgram > folding_stack
ACIR programs with witnesses.
std::vector< std::string > function_names
Function names for logging.