From 6f422dfd17798b9de3656447a19715cc7fe22046 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Fri, 16 Jun 2023 17:16:15 +0100 Subject: [PATCH] fix: add NUM_RESERVED_GATES before fetching subgroup size in composer (https://github.com/AztecProtocol/barretenberg/pull/539) --- .../cpp/src/barretenberg/dsl/acir_proofs/acir_composer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/dsl/acir_proofs/acir_composer.cpp b/barretenberg/cpp/src/barretenberg/dsl/acir_proofs/acir_composer.cpp index cbc5f6233f3..066de316b0b 100644 --- a/barretenberg/cpp/src/barretenberg/dsl/acir_proofs/acir_composer.cpp +++ b/barretenberg/cpp/src/barretenberg/dsl/acir_proofs/acir_composer.cpp @@ -27,7 +27,8 @@ void AcirComposer::create_circuit(acir_format::acir_format& constraint_system) exact_circuit_size_ = composer_.get_num_gates(); total_circuit_size_ = composer_.get_total_circuit_size(); - circuit_subgroup_size_ = composer_.get_circuit_subgroup_size(total_circuit_size_); + circuit_subgroup_size_ = + composer_.get_circuit_subgroup_size(total_circuit_size_ + composer_.composer_helper.NUM_RESERVED_GATES); size_hint_ = circuit_subgroup_size_; } @@ -44,7 +45,8 @@ void AcirComposer::init_proving_key(std::shared_ptr