From fa11abf0877314b03420d6f7ace1312df41cd50b 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 (#539) --- cpp/src/barretenberg/dsl/acir_proofs/acir_composer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpp/src/barretenberg/dsl/acir_proofs/acir_composer.cpp b/cpp/src/barretenberg/dsl/acir_proofs/acir_composer.cpp index cbc5f6233f..066de316b0 100644 --- a/cpp/src/barretenberg/dsl/acir_proofs/acir_composer.cpp +++ b/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