diff --git a/barretenberg/cpp/src/barretenberg/api/acir_format_getters.cpp b/barretenberg/cpp/src/barretenberg/api/acir_format_getters.cpp index 8db4333da78f..2679cdcc7490 100644 --- a/barretenberg/cpp/src/barretenberg/api/acir_format_getters.cpp +++ b/barretenberg/cpp/src/barretenberg/api/acir_format_getters.cpp @@ -11,10 +11,10 @@ acir_format::WitnessVector get_witness(std::string const& witness_path) return acir_format::witness_buf_to_witness_data(witness_data); } -acir_format::AcirFormat get_constraint_system(std::string const& bytecode_path, uint32_t honk_recursion) +acir_format::AcirFormat get_constraint_system(std::string const& bytecode_path) { auto bytecode = get_bytecode(bytecode_path); - return acir_format::circuit_buf_to_acir_format(bytecode, honk_recursion); + return acir_format::circuit_buf_to_acir_format(bytecode); } acir_format::WitnessVectorStack get_witness_stack(std::string const& witness_path) @@ -23,10 +23,10 @@ acir_format::WitnessVectorStack get_witness_stack(std::string const& witness_pat return acir_format::witness_buf_to_witness_stack(witness_data); } -std::vector get_constraint_systems(std::string const& bytecode_path, uint32_t honk_recursion) +std::vector get_constraint_systems(std::string const& bytecode_path) { auto bytecode = get_bytecode(bytecode_path); - return acir_format::program_buf_to_acir_format(bytecode, honk_recursion); + return acir_format::program_buf_to_acir_format(bytecode); } } // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/api/acir_format_getters.hpp b/barretenberg/cpp/src/barretenberg/api/acir_format_getters.hpp index 1dd4e7d33e45..b3eb5f354270 100644 --- a/barretenberg/cpp/src/barretenberg/api/acir_format_getters.hpp +++ b/barretenberg/cpp/src/barretenberg/api/acir_format_getters.hpp @@ -4,7 +4,7 @@ namespace bb { acir_format::WitnessVector get_witness(std::string const& witness_path); -acir_format::AcirFormat get_constraint_system(std::string const& bytecode_path, uint32_t honk_recursion); +acir_format::AcirFormat get_constraint_system(std::string const& bytecode_path); acir_format::WitnessVectorStack get_witness_stack(std::string const& witness_path); -std::vector get_constraint_systems(std::string const& bytecode_path, uint32_t honk_recursion); +std::vector get_constraint_systems(std::string const& bytecode_path); } // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/api/api_client_ivc.cpp b/barretenberg/cpp/src/barretenberg/api/api_client_ivc.cpp index c8057e5da699..b67f6064841c 100644 --- a/barretenberg/cpp/src/barretenberg/api/api_client_ivc.cpp +++ b/barretenberg/cpp/src/barretenberg/api/api_client_ivc.cpp @@ -58,7 +58,7 @@ void write_standalone_vk(const std::string& output_data_type, init_bn254_crs(1 << CONST_PG_LOG_N); init_grumpkin_crs(1 << CONST_ECCVM_LOG_N); - Program program{ get_constraint_system(bytecode_path, /*honk_recursion=*/0), /*witness=*/{} }; + Program program{ get_constraint_system(bytecode_path), /*witness=*/{} }; auto& ivc_constraints = program.constraints.ivc_recursion_constraints; TraceSettings trace_settings{ AZTEC_TRACE_STRUCTURE }; @@ -88,7 +88,7 @@ size_t get_num_public_inputs_in_final_circuit(const std::filesystem::path& input auto steps = PrivateExecutionStepRaw::load_and_decompress(input_path); const PrivateExecutionStepRaw& last_step = steps.back(); std::vector bytecode_buf(last_step.bytecode.begin(), last_step.bytecode.end()); - const AcirFormat constraints = circuit_buf_to_acir_format(bytecode_buf, /*honk_recursion=*/0); + const AcirFormat constraints = circuit_buf_to_acir_format(bytecode_buf); return constraints.public_inputs.size(); } @@ -246,7 +246,7 @@ void gate_count_for_ivc(const std::string& bytecode_path, bool include_gates_per // All circuit reports will be built into the std::string below std::string functions_string = "{\"functions\": [\n "; // TODO(https://github.com/AztecProtocol/barretenberg/issues/1181): Use enum for honk_recursion. - auto constraint_systems = get_constraint_systems(bytecode_path, /*honk_recursion=*/0); + auto constraint_systems = get_constraint_systems(bytecode_path); // Initialize an SRS to make the ClientIVC constructor happy init_bn254_crs(1 << CONST_PG_LOG_N); diff --git a/barretenberg/cpp/src/barretenberg/api/api_ultra_honk.cpp b/barretenberg/cpp/src/barretenberg/api/api_ultra_honk.cpp index 53e564006ceb..d076353b8254 100644 --- a/barretenberg/cpp/src/barretenberg/api/api_ultra_honk.cpp +++ b/barretenberg/cpp/src/barretenberg/api/api_ultra_honk.cpp @@ -33,7 +33,7 @@ Circuit _compute_circuit(const std::string& bytecode_path, const std::string& wi init_grumpkin_crs(1 << CONST_ECCVM_LOG_N); const acir_format::ProgramMetadata metadata{ .honk_recursion = honk_recursion }; - acir_format::AcirProgram program{ get_constraint_system(bytecode_path, metadata.honk_recursion) }; + acir_format::AcirProgram program{ get_constraint_system(bytecode_path) }; if (!witness_path.empty()) { program.witness = get_witness(witness_path); @@ -271,7 +271,7 @@ void write_recursion_inputs_ultra_honk(const std::string& bytecode_path, const acir_format::ProgramMetadata metadata{ .honk_recursion = honk_recursion }; acir_format::AcirProgram program; - program.constraints = get_constraint_system(bytecode_path, metadata.honk_recursion); + program.constraints = get_constraint_system(bytecode_path); program.witness = get_witness(witness_path); auto builder = acir_format::create_circuit(program, metadata); diff --git a/barretenberg/cpp/src/barretenberg/api/api_ultra_plonk.cpp b/barretenberg/cpp/src/barretenberg/api/api_ultra_plonk.cpp index e23cd6b85d85..b8a94a43ef7e 100644 --- a/barretenberg/cpp/src/barretenberg/api/api_ultra_plonk.cpp +++ b/barretenberg/cpp/src/barretenberg/api/api_ultra_plonk.cpp @@ -54,7 +54,7 @@ void prove_ultra_plonk(const std::string& bytecode_path, const std::string& output_path, const bool recursive) { - auto constraint_system = get_constraint_system(bytecode_path, /*honk_recursion=*/0); + auto constraint_system = get_constraint_system(bytecode_path); auto witness = get_witness(witness_path); acir_proofs::AcirComposer acir_composer{ 0, verbose_logging }; @@ -88,7 +88,7 @@ void prove_output_all_ultra_plonk(const std::string& bytecode_path, const std::string& output_path, const bool recursive) { - auto constraint_system = get_constraint_system(bytecode_path, /*honk_recursion=*/0); + auto constraint_system = get_constraint_system(bytecode_path); auto witness = get_witness(witness_path); acir_proofs::AcirComposer acir_composer{ 0, verbose_logging }; @@ -172,7 +172,7 @@ bool prove_and_verify_ultra_plonk(const std::string& bytecode_path, const bool recursive, const std::string& witness_path) { - auto constraint_system = get_constraint_system(bytecode_path, /*honk_recursion=*/0); + auto constraint_system = get_constraint_system(bytecode_path); auto witness = get_witness(witness_path); acir_proofs::AcirComposer acir_composer{ 0, verbose_logging }; @@ -234,7 +234,7 @@ void contract_ultra_plonk(const std::string& output_path, const std::string& vk_ */ void write_vk_ultra_plonk(const std::string& bytecode_path, const std::string& output_path, const bool recursive) { - auto constraint_system = get_constraint_system(bytecode_path, false); + auto constraint_system = get_constraint_system(bytecode_path); acir_proofs::AcirComposer acir_composer{ 0, verbose_logging }; acir_composer.create_finalized_circuit(constraint_system, recursive); acir_composer.finalize_circuit(); @@ -253,7 +253,7 @@ void write_vk_ultra_plonk(const std::string& bytecode_path, const std::string& o void write_pk_ultra_plonk(const std::string& bytecode_path, const std::string& output_path, const bool recursive) { - auto constraint_system = get_constraint_system(bytecode_path, /*honk_recursion=*/0); + auto constraint_system = get_constraint_system(bytecode_path); acir_proofs::AcirComposer acir_composer{ 0, verbose_logging }; acir_composer.create_finalized_circuit(constraint_system, recursive); acir_composer.finalize_circuit(); diff --git a/barretenberg/cpp/src/barretenberg/api/gate_count.hpp b/barretenberg/cpp/src/barretenberg/api/gate_count.hpp index dfe3d90e8259..6d31747003b5 100644 --- a/barretenberg/cpp/src/barretenberg/api/gate_count.hpp +++ b/barretenberg/cpp/src/barretenberg/api/gate_count.hpp @@ -25,7 +25,7 @@ void gate_count(const std::string& bytecode_path, // All circuit reports will be built into the string below std::string functions_string = "{\"functions\": [\n "; - auto constraint_systems = get_constraint_systems(bytecode_path, honk_recursion); + auto constraint_systems = get_constraint_systems(bytecode_path); const acir_format::ProgramMetadata metadata{ .recursive = recursive, .honk_recursion = honk_recursion, diff --git a/barretenberg/cpp/src/barretenberg/client_ivc/private_execution_steps.cpp b/barretenberg/cpp/src/barretenberg/client_ivc/private_execution_steps.cpp index 94476343f324..a68e1640bd9d 100644 --- a/barretenberg/cpp/src/barretenberg/client_ivc/private_execution_steps.cpp +++ b/barretenberg/cpp/src/barretenberg/client_ivc/private_execution_steps.cpp @@ -80,8 +80,7 @@ void PrivateExecutionSteps::parse(const std::vector& st // use spans instead of vectors. std::vector bytecode_buf(step.bytecode.begin(), step.bytecode.end()); std::vector witness_buf(step.witness.begin(), step.witness.end()); - acir_format::AcirFormat constraints = - acir_format::circuit_buf_to_acir_format(bytecode_buf, /*honk_recursion=*/0); + acir_format::AcirFormat constraints = acir_format::circuit_buf_to_acir_format(bytecode_buf); acir_format::WitnessVector witness = acir_format::witness_buf_to_witness_data(witness_buf); folding_stack.push_back({ constraints, witness }); diff --git a/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_integration.test.cpp b/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_integration.test.cpp index dc3a90c90680..523eb50e7da7 100644 --- a/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_integration.test.cpp +++ b/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_integration.test.cpp @@ -29,26 +29,24 @@ class AcirIntegrationTest : public ::testing::Test { } // Function to check if a file exists - bool file_exists(const std::string& path) + static bool file_exists(const std::string& path) { std::ifstream file(path); return file.good(); } - acir_format::AcirProgramStack get_program_stack_data_from_test_file(const std::string& test_program_name, - uint32_t honk_recursion = 0) + static acir_format::AcirProgramStack get_program_stack_data_from_test_file(const std::string& test_program_name) { std::string base_path = "../../acir_tests/acir_tests/" + test_program_name + "/target"; std::string bytecode_path = base_path + "/program.json"; std::string witness_path = base_path + "/witness.gz"; - return acir_format::get_acir_program_stack(bytecode_path, witness_path, honk_recursion); + return acir_format::get_acir_program_stack(bytecode_path, witness_path); } - acir_format::AcirProgram get_program_data_from_test_file(const std::string& test_program_name, - uint32_t honk_recursion = 0) + static acir_format::AcirProgram get_program_data_from_test_file(const std::string& test_program_name) { - auto program_stack = get_program_stack_data_from_test_file(test_program_name, honk_recursion); + auto program_stack = get_program_stack_data_from_test_file(test_program_name); ASSERT(program_stack.size() == 1); // Otherwise this method will not return full stack data return program_stack.back(); @@ -148,10 +146,7 @@ TEST_P(AcirIntegrationSingleTest, DISABLED_ProveAndVerifyProgram) std::string test_name = GetParam(); info("Test: ", test_name); - acir_format::AcirProgram acir_program = get_program_data_from_test_file( - test_name, - /*honk_recursion=*/0); // TODO(https://github.com/AztecProtocol/barretenberg/issues/1013): - // Assumes Flavor is not UltraHonk + acir_format::AcirProgram acir_program = get_program_data_from_test_file(test_name); // Construct a bberg circuit from the acir representation Builder builder = acir_format::create_circuit(acir_program); @@ -371,9 +366,7 @@ TEST_P(AcirIntegrationFoldingTest, DISABLED_ProveAndVerifyProgramStack) std::string test_name = GetParam(); info("Test: ", test_name); - auto program_stack = get_program_stack_data_from_test_file( - test_name, /*honk_recursion=*/0); // TODO(https://github.com/AztecProtocol/barretenberg/issues/1013): - // Assumes Flavor is not UltraHonk + auto program_stack = get_program_stack_data_from_test_file(test_name); while (!program_stack.empty()) { auto program = program_stack.back(); @@ -479,9 +472,7 @@ TEST_F(AcirIntegrationTest, DISABLED_UpdateAcirCircuit) using Builder = Flavor::CircuitBuilder; std::string test_name = "6_array"; // arbitrary program with RAM gates - auto acir_program = get_program_data_from_test_file( - test_name, /*honk_recursion=*/0); // TODO(https://github.com/AztecProtocol/barretenberg/issues/1013): - // Assumes Flavor is not UltraHonk + auto acir_program = get_program_data_from_test_file(test_name); // Construct a bberg circuit from the acir representation Builder circuit = acir_format::create_circuit(acir_program); @@ -514,12 +505,8 @@ TEST_F(AcirIntegrationTest, DISABLED_HonkRecursion) using Flavor = UltraFlavor; using Builder = Flavor::CircuitBuilder; - std::string test_name = "verify_honk_proof"; // arbitrary program with RAM gates - // Note: honk_recursion set to 1 here we are using the UltraFlavor. - // The honk_recursion flag determines whether a noir program will be recursively verified via Honk in a Noir - // program. - auto acir_program = get_program_data_from_test_file(test_name, - /*honk_recursion=*/1); + std::string test_name = "verify_honk_proof"; // program that recursively verifies a honk proof + auto acir_program = get_program_data_from_test_file(test_name); // Construct a bberg circuit from the acir representation Builder circuit = acir_format::create_circuit(acir_program); diff --git a/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_to_constraint_buf.cpp b/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_to_constraint_buf.cpp index 0c2f10e0bc23..b6565d42d715 100644 --- a/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_to_constraint_buf.cpp +++ b/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_to_constraint_buf.cpp @@ -548,10 +548,7 @@ WitnessOrConstant parse_input(Acir::FunctionInput input) return result; } -void handle_blackbox_func_call(Acir::Opcode::BlackBoxFuncCall const& arg, - AcirFormat& af, - uint32_t honk_recursion, - size_t opcode_index) +void handle_blackbox_func_call(Acir::Opcode::BlackBoxFuncCall const& arg, AcirFormat& af, size_t opcode_index) { std::visit( [&](auto&& arg) { @@ -722,17 +719,6 @@ void handle_blackbox_func_call(Acir::Opcode::BlackBoxFuncCall const& arg, auto input_key = get_witness_from_function_input(arg.key_hash); auto proof_type_in = arg.proof_type; - // TODO(https://github.com/AztecProtocol/barretenberg/issues/1074): Eventually arg.proof_type will - // be the only means for setting the proof type. use of honk_recursion flag in this context can go - // away once all noir programs (e.g. protocol circuits) are updated to use the new pattern. - if (proof_type_in != HONK && proof_type_in != AVM && proof_type_in != ROLLUP_HONK && - proof_type_in != ROOT_ROLLUP_HONK) { - if (honk_recursion == 1) { - proof_type_in = HONK; - } else if (honk_recursion == 2) { - proof_type_in = ROLLUP_HONK; - } - } auto c = RecursionConstraint{ .key = transform::map(arg.verification_key, @@ -888,7 +874,7 @@ void handle_memory_op(Acir::Opcode::MemoryOp const& mem_op, BlockConstraint& blo block.trace.push_back(acir_mem_op); } -AcirFormat circuit_serde_to_acir_format(Acir::Circuit const& circuit, uint32_t honk_recursion) +AcirFormat circuit_serde_to_acir_format(Acir::Circuit const& circuit) { AcirFormat af; // `varnum` is the true number of variables, thus we add one to the index which starts at zero @@ -907,7 +893,7 @@ AcirFormat circuit_serde_to_acir_format(Acir::Circuit const& circuit, uint32_t h if constexpr (std::is_same_v) { handle_arithmetic(arg, af, i); } else if constexpr (std::is_same_v) { - handle_blackbox_func_call(arg, af, honk_recursion, i); + handle_blackbox_func_call(arg, af, i); } else if constexpr (std::is_same_v) { auto block = handle_memory_init(arg); uint32_t block_id = arg.block_id.value; @@ -934,7 +920,7 @@ AcirFormat circuit_serde_to_acir_format(Acir::Circuit const& circuit, uint32_t h return af; } -AcirFormat circuit_buf_to_acir_format(std::vector const& buf, uint32_t honk_recursion) +AcirFormat circuit_buf_to_acir_format(std::vector const& buf) { // TODO(https://github.com/AztecProtocol/barretenberg/issues/927): Move to using just // `program_buf_to_acir_format` once Honk fully supports all ACIR test flows For now the backend still expects @@ -942,7 +928,7 @@ AcirFormat circuit_buf_to_acir_format(std::vector const& buf, uint32_t auto program = deserialize_program(buf); auto circuit = program.functions[0]; - return circuit_serde_to_acir_format(circuit, honk_recursion); + return circuit_serde_to_acir_format(circuit); } /** @@ -982,14 +968,14 @@ WitnessVector witness_buf_to_witness_data(std::vector const& buf) return witness_map_to_witness_vector(w); } -std::vector program_buf_to_acir_format(std::vector const& buf, uint32_t honk_recursion) +std::vector program_buf_to_acir_format(std::vector const& buf) { auto program = deserialize_program(buf); std::vector constraint_systems; constraint_systems.reserve(program.functions.size()); for (auto const& function : program.functions) { - constraint_systems.emplace_back(circuit_serde_to_acir_format(function, honk_recursion)); + constraint_systems.emplace_back(circuit_serde_to_acir_format(function)); } return constraint_systems; @@ -1006,16 +992,11 @@ WitnessVectorStack witness_buf_to_witness_stack(std::vector const& buf) return witness_vector_stack; } -AcirProgramStack get_acir_program_stack(std::string const& bytecode_path, - std::string const& witness_path, - uint32_t honk_recursion) +AcirProgramStack get_acir_program_stack(std::string const& bytecode_path, std::string const& witness_path) { vinfo("in get_acir_program_stack; witness path is ", witness_path); std::vector bytecode = get_bytecode(bytecode_path); - std::vector constraint_systems = - program_buf_to_acir_format(bytecode, - honk_recursion); // TODO(https://github.com/AztecProtocol/barretenberg/issues/1013): - // Remove honk recursion flag + std::vector constraint_systems = program_buf_to_acir_format(bytecode); WitnessVectorStack witness_stack = [&]() { if (witness_path.empty()) { info("producing a stack of empties"); diff --git a/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_to_constraint_buf.hpp b/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_to_constraint_buf.hpp index e1b359104e3a..3745512ae4cc 100644 --- a/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_to_constraint_buf.hpp +++ b/barretenberg/cpp/src/barretenberg/dsl/acir_format/acir_to_constraint_buf.hpp @@ -14,13 +14,11 @@ namespace acir_format { */ WitnessVector witness_buf_to_witness_data(std::vector const& buf); -AcirFormat circuit_buf_to_acir_format(std::vector const& buf, uint32_t honk_recursion); +AcirFormat circuit_buf_to_acir_format(std::vector const& buf); -std::vector program_buf_to_acir_format(std::vector const& buf, uint32_t honk_recursion); +std::vector program_buf_to_acir_format(std::vector const& buf); WitnessVectorStack witness_buf_to_witness_stack(std::vector const& buf); -AcirProgramStack get_acir_program_stack(std::string const& bytecode_path, - std::string const& witness_path, - uint32_t honk_recursion); +AcirProgramStack get_acir_program_stack(std::string const& bytecode_path, std::string const& witness_path); } // namespace acir_format diff --git a/barretenberg/cpp/src/barretenberg/dsl/acir_proofs/c_bind.cpp b/barretenberg/cpp/src/barretenberg/dsl/acir_proofs/c_bind.cpp index 34870d8e2aec..95ec1a516fe3 100644 --- a/barretenberg/cpp/src/barretenberg/dsl/acir_proofs/c_bind.cpp +++ b/barretenberg/cpp/src/barretenberg/dsl/acir_proofs/c_bind.cpp @@ -25,7 +25,7 @@ WASM_EXPORT void acir_get_circuit_sizes( .honk_recursion = *honk_recursion, .size_hint = 1 << 19 }; acir_format::AcirProgram program{ acir_format::circuit_buf_to_acir_format( - from_buffer>(acir_vec), *honk_recursion) }; + from_buffer>(acir_vec)) }; auto builder = acir_format::create_circuit(program, metadata); builder.finalize_circuit(/*ensure_nonzero=*/true); *total = htonl((uint32_t)builder.get_finalized_total_circuit_size()); @@ -45,8 +45,7 @@ WASM_EXPORT void acir_delete_acir_composer(in_ptr acir_composer_ptr) WASM_EXPORT void acir_init_proving_key(in_ptr acir_composer_ptr, uint8_t const* acir_vec, bool const* recursive) { auto acir_composer = reinterpret_cast(*acir_composer_ptr); - auto constraint_system = - acir_format::circuit_buf_to_acir_format(from_buffer>(acir_vec), /*honk_recursion=*/0); + auto constraint_system = acir_format::circuit_buf_to_acir_format(from_buffer>(acir_vec)); acir_composer->create_finalized_circuit(constraint_system, *recursive); acir_composer->init_proving_key(); @@ -56,8 +55,7 @@ WASM_EXPORT void acir_create_proof( in_ptr acir_composer_ptr, uint8_t const* acir_vec, bool const* recursive, uint8_t const* witness_vec, uint8_t** out) { auto acir_composer = reinterpret_cast(*acir_composer_ptr); - auto constraint_system = - acir_format::circuit_buf_to_acir_format(from_buffer>(acir_vec), /*honk_recursion=*/0); + auto constraint_system = acir_format::circuit_buf_to_acir_format(from_buffer>(acir_vec)); auto witness = acir_format::witness_buf_to_witness_data(from_buffer>(witness_vec)); acir_composer->create_finalized_circuit(constraint_system, *recursive, witness); @@ -71,7 +69,7 @@ WASM_EXPORT void acir_prove_and_verify_ultra_honk(uint8_t const* acir_vec, uint8 { const acir_format::ProgramMetadata metadata{ .honk_recursion = 1 }; acir_format::AcirProgram program{ - acir_format::circuit_buf_to_acir_format(from_buffer>(acir_vec), metadata.honk_recursion), + acir_format::circuit_buf_to_acir_format(from_buffer>(acir_vec)), acir_format::witness_buf_to_witness_data(from_buffer>(witness_vec)) }; @@ -92,7 +90,7 @@ WASM_EXPORT void acir_prove_and_verify_mega_honk(uint8_t const* acir_vec, uint8_ const acir_format::ProgramMetadata metadata{ .honk_recursion = 0 }; acir_format::AcirProgram program{ - acir_format::circuit_buf_to_acir_format(from_buffer>(acir_vec), metadata.honk_recursion), + acir_format::circuit_buf_to_acir_format(from_buffer>(acir_vec)), acir_format::witness_buf_to_witness_data(from_buffer>(witness_vec)) }; @@ -134,8 +132,7 @@ WASM_EXPORT void acir_get_proving_key(in_ptr acir_composer_ptr, uint8_t** out) { auto* acir_composer = reinterpret_cast(*acir_composer_ptr); - auto constraint_system = - acir_format::circuit_buf_to_acir_format(from_buffer>(acir_vec), /*honk_recursion=*/0); + auto constraint_system = acir_format::circuit_buf_to_acir_format(from_buffer>(acir_vec)); acir_composer->create_finalized_circuit(constraint_system, *recursive); auto pk = acir_composer->init_proving_key(); // We flatten to a vector first, as that's how we treat it on the calling side. @@ -227,10 +224,10 @@ WASM_EXPORT void acir_prove_ultra_honk(uint8_t const* acir_vec, uint8_t const* w // Lambda function to ensure things get freed before proving. UltraProver prover = [&] { const acir_format::ProgramMetadata metadata{ .honk_recursion = 1 }; - acir_format::AcirProgram program{ acir_format::circuit_buf_to_acir_format( - from_buffer>(acir_vec), metadata.honk_recursion), - acir_format::witness_buf_to_witness_data( - from_buffer>(witness_vec)) }; + acir_format::AcirProgram program{ + acir_format::circuit_buf_to_acir_format(from_buffer>(acir_vec)), + acir_format::witness_buf_to_witness_data(from_buffer>(witness_vec)) + }; auto builder = acir_format::create_circuit(program, metadata); return UltraProver(builder); @@ -245,10 +242,10 @@ WASM_EXPORT void acir_prove_ultra_keccak_honk(uint8_t const* acir_vec, uint8_t c // Lambda function to ensure things get freed before proving. UltraKeccakProver prover = [&] { const acir_format::ProgramMetadata metadata{ .honk_recursion = 1 }; - acir_format::AcirProgram program{ acir_format::circuit_buf_to_acir_format( - from_buffer>(acir_vec), metadata.honk_recursion), - acir_format::witness_buf_to_witness_data( - from_buffer>(witness_vec)) }; + acir_format::AcirProgram program{ + acir_format::circuit_buf_to_acir_format(from_buffer>(acir_vec)), + acir_format::witness_buf_to_witness_data(from_buffer>(witness_vec)) + }; auto builder = acir_format::create_circuit(program, metadata); return UltraKeccakProver(builder); @@ -291,7 +288,7 @@ WASM_EXPORT void acir_write_vk_ultra_honk(uint8_t const* acir_vec, uint8_t** out DeciderProvingKey proving_key = [&] { const acir_format::ProgramMetadata metadata{ .honk_recursion = 1 }; acir_format::AcirProgram program{ acir_format::circuit_buf_to_acir_format( - from_buffer>(acir_vec), metadata.honk_recursion) }; + from_buffer>(acir_vec)) }; auto builder = acir_format::create_circuit(program, metadata); return DeciderProvingKey(builder); }(); @@ -309,7 +306,7 @@ WASM_EXPORT void acir_write_vk_ultra_keccak_honk(uint8_t const* acir_vec, uint8_ DeciderProvingKey proving_key = [&] { const acir_format::ProgramMetadata metadata{ .honk_recursion = 1 }; acir_format::AcirProgram program{ acir_format::circuit_buf_to_acir_format( - from_buffer>(acir_vec), metadata.honk_recursion) }; + from_buffer>(acir_vec)) }; auto builder = acir_format::create_circuit(program, metadata); return DeciderProvingKey(builder); }(); @@ -366,8 +363,7 @@ WASM_EXPORT void acir_gates_aztec_client(uint8_t const* ivc_inputs_buf, uint8_t* for (const PrivateExecutionStepRaw& step : raw_steps) { std::vector bytecode_vec(step.bytecode.begin(), step.bytecode.end()); - const acir_format::AcirFormat constraint_system = - acir_format::circuit_buf_to_acir_format(bytecode_vec, /*honk_recursion=*/0); + const acir_format::AcirFormat constraint_system = acir_format::circuit_buf_to_acir_format(bytecode_vec); // Create an acir program from the constraint system acir_format::AcirProgram program{ constraint_system };