Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Activate custom gates in JS and add rangeCheck64 gadget #1176
Activate custom gates in JS and add rangeCheck64 gadget #1176
Changes from 19 commits
7bc025b
ebc47bc
b0043ee
454bbd6
272b6ed
fa314a0
01ea77c
09ef562
173e54e
0d777d5
b027739
c7ca867
0630d5f
1bfedba
a8f06d1
e5f8e37
f5e6796
2229be9
14a7daf
46123ac
aa26e46
68b9ba8
5ef100f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
// not using compact mode
why not? 😅
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 is just a different "mode" of the gate which is used in specific circumstances (when combining this with other gates to do a 2x88 + 1x88-bit range check where the 2x88-bit value is what is called "compact")
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.
nit: This is a superficial suggestion, but you could add some type safety here instead of the switch statement
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.
fwiw I think the switch statement is perfectly type-safe
but your suggestion is definitely less spaghetti-like than the long switch statement
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 went with the object approach. This is the type signature you need to encode that some but not all gate types cause a feature flag to be set (same as the switch statement with the default branch):