Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bbapi_shared.hpp
Go to the documentation of this file.
1#pragma once
12#include <cstdint>
13#include <string>
14#include <vector>
15
16namespace bb::bbapi {
17
29 std::string name;
30
37 std::vector<uint8_t> bytecode;
38
40 bool operator==(const CircuitInputNoVK& other) const = default;
41};
42
54 std::string name;
55
62 std::vector<uint8_t> bytecode;
63
68 std::vector<uint8_t> verification_key;
69
71 bool operator==(const CircuitInput& other) const = default;
72};
73
79 bool ipa_accumulation = false;
80
87 std::string oracle_hash_type = "poseidon2";
88
93 bool disable_zk = false;
94
96 bool operator==(const ProofSystemSettings& other) const = default;
97};
98
103
104inline OracleHashType parse_oracle_hash_type(const std::string& type)
105{
106 if (type == "keccak") {
108 }
109 if (type == "starknet") {
111 }
112 return OracleHashType::POSEIDON2; // default
113}
114
116 TraceSettings trace_settings{ AZTEC_TRACE_STRUCTURE };
117 // Current depth of the IVC stack for this request
118 uint32_t ivc_stack_depth = 0;
120 // Name of the last loaded circuit
122 // Store the parsed constraint system to get ahead of parsing before accumulate
124 // Store the verification key passed with the circuit
125 std::vector<uint8_t> loaded_circuit_vk;
126};
127
128} // namespace bb::bbapi
OracleHashType
Convert oracle hash type string to enum for internal use.
OracleHashType parse_oracle_hash_type(const std::string &type)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
std::shared_ptr< ClientIVC > ivc_in_progress
std::vector< uint8_t > loaded_circuit_vk
std::optional< acir_format::AcirFormat > loaded_circuit_constraints
A circuit to be used in either ultrahonk or ClientIVC-honk proving.
MSGPACK_FIELDS(name, bytecode, verification_key)
bool operator==(const CircuitInput &other) const =default
std::vector< uint8_t > verification_key
Verification key of the circuit. This could be derived, but it is more efficient to have it fixed ahe...
std::string name
Human-readable name for the circuit.
std::vector< uint8_t > bytecode
Serialized bytecode representation of the circuit.
A circuit to be used in either ultrahonk or chonk (ClientIVC+honk) verification key derivation.
MSGPACK_FIELDS(name, bytecode)
std::string name
Human-readable name for the circuit.
bool operator==(const CircuitInputNoVK &other) const =default
std::vector< uint8_t > bytecode
Serialized bytecode representation of the circuit.
bool ipa_accumulation
Optional flag to indicate if the proof should be generated with IPA accumulation (i....
MSGPACK_FIELDS(ipa_accumulation, oracle_hash_type, disable_zk)
bool operator==(const ProofSystemSettings &other) const =default
std::string oracle_hash_type
The oracle hash type to be used for the proof.
bool disable_zk
Flag to disable blinding of the proof. Useful for cases that don't require privacy,...