Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add NUM_RESERVED_GATES before fetching subgroup size in composer #539

Merged
merged 1 commit into from
Jun 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cpp/src/barretenberg/dsl/acir_proofs/acir_composer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
}

Expand All @@ -44,7 +45,8 @@ void AcirComposer::init_proving_key(std::shared_ptr<barretenberg::srs::factories

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);

info("computing proving key...");
proving_key_ = composer_.compute_proving_key();
Expand Down