Skip to content

Commit

Permalink
fix: reassert MAX_PUBLIC_SRS as limit of settings logrows (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-camuto authored Sep 29, 2023
1 parent bce5eed commit 8f122bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,9 @@ impl GraphCircuit {
settings_mut.run_args.logrows =
std::cmp::max(settings_mut.run_args.logrows, min_rows_from_constraints);

settings_mut.run_args.logrows =
std::cmp::min(MAX_PUBLIC_SRS, settings_mut.run_args.logrows);

info!(
"setting bits to: {}, setting logrows to: {}",
self.settings().run_args.bits,
Expand All @@ -840,7 +843,7 @@ impl GraphCircuit {
.log2()
.ceil() as usize
+ 1;
if recommended_bits <= (MAX_PUBLIC_SRS - 1) as usize {
if recommended_bits <= (MAX_PUBLIC_SRS-1) as usize {
self.calc_min_logrows(&res, blinding_offset)
} else {
let err_string = format!(
Expand Down

0 comments on commit 8f122bf

Please sign in to comment.