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
13#include <cstdint>
14#include <string>
15#include <vector>
16
17namespace bb::bbapi {
18
22inline bool USE_SUMCHECK_IVC = false;
23
35 std::string name;
36
43 std::vector<uint8_t> bytecode;
44
46 bool operator==(const CircuitInputNoVK& other) const = default;
47};
48
60 std::string name;
61
68 std::vector<uint8_t> bytecode;
69
74 std::vector<uint8_t> verification_key;
75
77 bool operator==(const CircuitInput& other) const = default;
78};
79
85 bool ipa_accumulation = false;
86
93 std::string oracle_hash_type = "poseidon2";
94
99 bool disable_zk = false;
100
101 // TODO(md): remove this once considered stable
103
105 bool operator==(const ProofSystemSettings& other) const = default;
106};
107
112
113inline OracleHashType parse_oracle_hash_type(const std::string& type)
114{
115 if (type == "keccak") {
117 }
118 if (type == "starknet") {
120 }
121 return OracleHashType::POSEIDON2; // default
122}
123
125 TraceSettings trace_settings{ AZTEC_TRACE_STRUCTURE };
126 // Current depth of the IVC stack for this request
127 uint32_t ivc_stack_depth = 0;
129 // Name of the last loaded circuit
131 // Store the parsed constraint system to get ahead of parsing before accumulate
133 // Store the verification key passed with the circuit
134 std::vector<uint8_t> loaded_circuit_vk;
135};
136
137} // namespace bb::bbapi
OracleHashType
Convert oracle hash type string to enum for internal use.
bool USE_SUMCHECK_IVC
Global flag to control whether to use SumcheckClientIVC instead of ClientIVC.
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< IVCBase > 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....
bool operator==(const ProofSystemSettings &other) const =default
MSGPACK_FIELDS(ipa_accumulation, oracle_hash_type, disable_zk, optimized_solidity_verifier)
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,...