-
Notifications
You must be signed in to change notification settings - Fork 0
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
doc: annotated guide to correctly constraining and optimizing circom #2
Conversation
rdy4reviu. I'm finished with the main thrust of the post. The only thing I would add; I could spend time going farther into tools that I spent a half hour trying to set up without success (circom-mutator, picus), or a tool I found today (ecne). lmk if that seems worth doing, and any stylistic guidance on this readme. also, waylon mentioned on call that he thought it would be good to make this repo public after review. |
README.md
Outdated
|
||
As stated in the circom docs, generally avoid using `<--`, at least until an optimization code pass. The operator may save a small number of gates, but risks underconstraining the circuit. A developer may incorrectly use `<--` to allow assignment for would-be non-quadratic assignments; this is a [footgun](https://en.wiktionary.org/wiki/footgun). | ||
|
||
Use of `<--` is can allow the developer to reason extra constraints out of their circuits, thereby improving proving times. When optimizing code with `<--`, use tools like `circom --inspect` (which searches the codebase for `<--` that can be transformed into `<==`) and `circomspect` to check for correctly constrained circuits. |
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.
Use of `<--` is can allow the developer to reason extra constraints out of their circuits, thereby improving proving times. When optimizing code with `<--`, use tools like `circom --inspect` (which searches the codebase for `<--` that can be transformed into `<==`) and `circomspect` to check for correctly constrained circuits. | |
```suggestion | |
Use of `<--` can allow the developer to reason extra constraints out of their circuits, thereby improving proving times. When optimizing code with `<--`, use tools like `circom --inspect` (which searches the codebase for `<--` that can be transformed into `<==`) and `circomspect` to check for correctly constrained circuits. |
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 sentence sounds a little strange
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.
updated in last latest push
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.
@thor314 this is great. Thanks for diving in and looking into this. I would love for this to be open source so i can share it with my nerd friends and highlight the resource
Adds short blog post in README about correctly constraining Circom values.