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
10#include <cstdint>
11#include <filesystem>
12#include <memory>
13#include <string>
14#include <vector>
15
16namespace bb {
17
18class Chonk;
19
34 // Represents bincode.
35 std::vector<uint8_t> bytecode;
36 // Represents bincoded witness data.
37 std::vector<uint8_t> witness;
38 // Represents a legacy-serialized vk.
39 std::vector<uint8_t> vk;
40 // Represents the function name.
41 std::string function_name;
43
44 // Unrolled from SERIALIZATION_FIELDS for custom name for function_name.
45 void msgpack(auto pack_fn) { pack_fn(NVP(bytecode, witness, vk), "functionName", function_name, NVP(kind)); };
46 void self_decompress();
47 static std::vector<PrivateExecutionStepRaw> load_and_decompress(const std::filesystem::path& input_path);
48 static std::vector<PrivateExecutionStepRaw> load(const std::filesystem::path& input_path);
49 static std::vector<PrivateExecutionStepRaw> parse_uncompressed(const std::vector<uint8_t>& buf);
51 const std::filesystem::path& output_path);
52};
53
71 std::vector<acir_format::AcirProgram> folding_stack;
72 std::vector<std::string> function_names;
74 std::vector<CircuitKind> kinds;
75
84
92};
93} // namespace bb
#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...
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::vector< uint8_t > > precomputed_vks
Serialized precomputed VKs (performance)
std::vector< std::string > function_names
Function names for logging.
std::vector< CircuitKind > kinds
Per-step CircuitKind.