Created
January 5, 2023 11:11
-
-
Save enricobottazzi/382e726dc426c5ebae08498207e4f004 to your computer and use it in GitHub Desktop.
Circuit to test Range Check Overflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma circom 2.1.0; | |
include "node_modules/circomlib/circuits/bitify.circom"; | |
template Example () { | |
signal input a; | |
log(a); | |
// prevent overflow of leafSum | |
component aRangeCheck = Num2Bits(252); | |
aRangeCheck.in <== a; | |
} | |
component main = Example(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment