-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add entry inequality module to GPC #1892
base: main
Are you sure you want to change the base?
Conversation
"maxLists": 0, | ||
"maxListElements": 0, | ||
"maxTuples": 0, | ||
"tupleArity": 0, | ||
"includeOwnerV3": true, | ||
"includeOwnerV4": false | ||
}, | ||
6842 | ||
6843 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like something is costing 1 constraint even when the number of EI modules is zero.
Do you have any insight into what it is? Not a big deal, but I'd expect everything to collapse to zero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comes from the bit-packed signal associated with the module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Num2Bits(0) has a constraint? Naughty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Literally naught-y in the sense that Num2Bits(0) constrains its input to be zero. ;-)
// NumericValueModule}. | ||
signal output out <== LessThan(NUM_BITS)( | ||
[ | ||
value + ABS_POD_INT_MIN(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this "offset value" should be a template parameter rather than being hard-coded here. The proto-pod-gpc layer should be where the decision on int size is made. The same suggestion might apply to the bounds check module too. Actually it could be a template parameter at the proto-pod-gpc level too, though that might be overkill since I don't anticipate ever generating with different sizes.
This PR adds an entry inequality module to GPCs. Summary of changes:
lessThan
,lessThanEq
,greaterThan
andgreaterThanEq
fields to the GPC proof entry config.This PR depends on the artifact changes in proofcarryingdata/snark-artifacts#14.