-
Notifications
You must be signed in to change notification settings - Fork 366
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
refactor: Compile(ecc.ID) -> Compile(field *big.Int) #328
Conversation
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 think that in general the changes make sense. I'm just thinking that maybe it would be better to name the modulus variable as primeFieldModulus
etc? If it is field
, then may be ambiguous?
Hey, I know this is a closed issue, but it was not updated in your Go package documentations https://pkg.go.dev/github.com/consensys/gnark#section-readme. Specifically, the first example given of a cubic equation. Would save time for beginners to just add the ecc.BN254.ScalarField() to the example! I had to look around the GitHub for this, which is good practice, but I'd rather save other's time just a little. Thanks for all the hard work! |
This PR makes
frontend.Compile
hints
witness
andcs
packages dependent on afield
instead of being dependent on acurveID
.This PR adds a
tinyfield
package (modulus == 47), for test purposes.I believe the only algorithmic change is
witness
Serialization; instead of usingcurve.Encoder
it directly usesfr.Element [Set]Bytes()
methods.