Skip to content

Commit

Permalink
even prettier and informative message
Browse files Browse the repository at this point in the history
  • Loading branch information
shamatar committed Sep 7, 2022
1 parent 6af8348 commit 84a0666
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/plonk/better_better_cs/cs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1415,8 +1415,23 @@ impl<E: Engine, P: PlonkConstraintSystemParams<E>, MG: MainGate<E>, S: Synthesis
let new_size_candidates = [(self.n() + 1).next_power_of_two() - 1, (total_number_of_table_entries + 1).next_power_of_two() - 1];

let new_size = *new_size_candidates.iter().max().unwrap();
assert!(new_size <= 1usize << E::Fr::S, "Circuit size is {}, that is larget than number of roots of unity 2^{}", new_size, E::Fr::S);
assert!(new_size <= (1usize << E::Fr::S) / <Self as ConstraintSystem<E>>::Params::STATE_WIDTH, "Circuit size is {}, that is larget than number of roots of unity 2^{} for copy-permutation over {} polys", new_size, E::Fr::S, <Self as ConstraintSystem<E>>::Params::STATE_WIDTH);
assert!(
new_size <= 1usize << E::Fr::S,
"Padded circuit size is {}, that is larget than number of roots of unity 2^{}. Padded from {} gates and {} lookup table accesses",
new_size,
E::Fr::S,
self.n(),
total_number_of_table_entries,
);
assert!(
new_size <= (1usize << E::Fr::S) / <Self as ConstraintSystem<E>>::Params::STATE_WIDTH,
"Circuit size is {}, that is larget than number of roots of unity 2^{} for copy-permutation over {} polys. Padded from {} gates and {} lookup table accesses",
new_size,
E::Fr::S,
<Self as ConstraintSystem<E>>::Params::STATE_WIDTH,
self.n(),
total_number_of_table_entries,
);

let dummy = Self::get_dummy_variable();

Expand Down

0 comments on commit 84a0666

Please sign in to comment.