We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
api.AssertIsLessOrEqual
import ( "testing" "github.com/consensys/gnark/frontend" "github.com/consensys/gnark/test" ) type Circuit struct { X frontend.Variable } func (circuit *Circuit) Define(api frontend.API) error { api.AssertIsLessOrEqual(1, circuit.X) return nil } func TestConstantPath(t *testing.T) { assert := test.NewAssert(t) assert.CheckCircuit(&Circuit{}, test.WithValidAssignment(&Circuit{X: 1}), // 1 <= 1 --> true test.WithInvalidAssignment(&Circuit{X: 0})) // 1 <= 0 --> false }
thanks to @wuestholz for reporting
Fails because of a bug in the R1CS compiler when the first parameter to api.AssertIsLessOrEqual is a constant.
The text was updated successfully, but these errors were encountered:
70baf16
gbotrel
Successfully merging a pull request may close this issue.
thanks to @wuestholz for reporting
Fails because of a bug in the R1CS compiler when the first parameter to
api.AssertIsLessOrEqual
is a constant.The text was updated successfully, but these errors were encountered: