Skip to content

Commit

Permalink
fix(circom): Constrain DivisionVerification
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-nikolov96 committed Jun 27, 2023
1 parent 843b9f7 commit 45eaaf9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion beacon-light-client/circom/circuits/utils/numerical.circom
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,16 @@ template DivisionVerification() {
signal input quotient;
signal input remainder;

//TODO: Needs additional corebase nstraint
dividend === divisor * quotient + remainder;

component lessThan = LessThan(252);
lessThan.in[0] <== remainder;
lessThan.in[1] <== divisor;
lessThan.out === 1;
}



template Pow(N){
signal input base;
signal input power;
Expand Down

0 comments on commit 45eaaf9

Please sign in to comment.