20#ifdef STARKNET_GARAGA_FLAVORS
21#include "barretenberg/flavor/ultra_starknet_flavor.hpp"
22#include "barretenberg/flavor/ultra_starknet_zk_flavor.hpp"
36template <
typename VK>
inline void validate_vk_size(
const std::vector<uint8_t>& vk_bytes)
38 const size_t expected_size = VK::calc_num_data_types() *
sizeof(
bb::fr);
39 if (vk_bytes.size() != expected_size) {
147 if (
type ==
"keccak") {
150 if (
type ==
"starknet") {
161 if (policy ==
"check") {
164 if (policy ==
"recompute") {
167 if (policy ==
"rewrite") {
202#define BBAPI_ERROR(request, msg) \
204 (request).error_message = (msg); \
233template <
typename Flavor>
238 result.reserve(public_inputs.size() + proof.size());
239 result.insert(result.end(), public_inputs.begin(), public_inputs.end());
240 result.insert(result.end(), proof.begin(), proof.end());
249 auto fields =
vk.to_field_elements();
272 throw_or_abort(
"Rollup circuits (ipa_accumulation=true) must use oracle_hash_type='poseidon2', got '" +
318#ifdef STARKNET_GARAGA_FLAVORS
321 return operation.template operator()<UltraStarknetFlavor,
DefaultIO>();
323 return operation.template operator()<UltraStarknetZKFlavor,
DefaultIO>();
Manages the data that is propagated on the public inputs of an application/function circuit.
The data that is propagated on the public inputs of a rollup circuit.
Child class of UltraFlavor that runs with ZK Sumcheck.
OracleHashType
Convert oracle hash type string to enum for internal use.
VkPolicy
Policy for handling verification keys during IVC accumulation.
void validate_rollup_settings(const ProofSystemSettings &settings)
Validate rollup circuit settings.
std::vector< uint256_t > vk_to_uint256_fields(const VK &vk)
Convert VK to uint256 field elements, handling flavor-specific return types.
VkPolicy parse_vk_policy(const std::string &policy)
Convert VK policy string to enum for internal use.
Flavor::Transcript::Proof concatenate_proof(const std::vector< uint256_t > &public_inputs, const std::vector< uint256_t > &proof)
Concatenate public inputs and proof into a complete proof for verification.
auto dispatch_by_settings(const ProofSystemSettings &settings, Operation &&operation)
Dispatch to the correct Flavor and IO type based on proof system settings.
OracleHashType parse_oracle_hash_type(const std::string &type)
void validate_vk_size(const std::vector< uint8_t > &vk_bytes)
Validate verification key size before deserialization.
field< Bn254FrParams > fr
VerifierCommitmentKey< Curve > vk
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::string to_string(bb::avm2::ValueTag tag)
std::string loaded_circuit_name
std::string error_message
std::shared_ptr< IVCBase > ivc_in_progress
std::vector< uint8_t > loaded_circuit_vk
std::optional< acir_format::AcirFormat > loaded_circuit_constraints
Error response returned when a command fails.
bool operator==(const ErrorResponse &) const =default
static constexpr const char MSGPACK_SCHEMA_NAME[]
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)
bool 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,...
static constexpr const char MSGPACK_SCHEMA_NAME[]
bool operator==(const Response &) const =default
void msgpack(auto &&pack_fn)
void msgpack(auto &&pack_fn)
static constexpr const char MSGPACK_SCHEMA_NAME[]
bool operator==(const Shutdown &) const =default
Response execute(const BBApiRequest &) &&
void throw_or_abort(std::string const &err)