Skip to content

Commit

Permalink
update fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Artemka374 committed Dec 20, 2024
1 parent 7edd1ab commit aa4d474
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/franklin-crypto/src/plonk/circuit/goldilocks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ impl<E: Engine> Hash for GoldilocksField<E> {
}

pub fn range_check_for_num_bits<E: Engine, CS: ConstraintSystem<E>>(cs: &mut CS, num: &Num<E>, num_bits: usize) -> Result<(), SynthesisError> {
assert!(num_bits % 16 == 0);

if let Num::Constant(value) = num {
for el in value.into_repr().as_ref().iter().skip(1) {
assert_eq!(0, *el)
Expand Down

0 comments on commit aa4d474

Please sign in to comment.