-
Notifications
You must be signed in to change notification settings - Fork 504
feat(wires): implements GetWiresConstraintExact as a draft proposal #1462
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
Conversation
|
The PR is ready. I decided it's maybe simpler to keep the original function. I renamed it however |
ivokub
left a comment
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 good to me. Indeed I think we could optimize that we wouldn't add constraints for every constant (if they are duplicate), but I guess it shouldn't happen too much?
Only thing I would change is the name of the existing method - the documentation says GetWireConstraintsNoDuplicate but method name is GetWireConstraintsN. But I would keep it as is, because we use it using implicit interfaces and then its easier to keep existing implementation working.
…ys/gnark into feat/get-wires-constraints-exact
|
Fair enough. I have applied your suggestion. For the constant, it seems easy enough to use a map to read ten times the same constants. For MiMC, the constant is essentially the "0" that we use to initialize the state of a MiMC hasher. |
|
Lemme test this on my end before merging. Will merge after. Happy to get a reapproval :) |
ivokub
left a comment
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.
Yep - now it seems better. Now only the method documentation doesn't match the implementation.
ivokub
left a comment
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.
LGTM now. Thanks!
Description
Fixes # (issue)
Type of change
How has this been tested?
How has this been benchmarked?
Checklist:
golangci-lintdoes not output errors locally