Skip to content
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

go 1.18: prepare for next Go release #172

Closed
1 of 4 tasks
gbotrel opened this issue Nov 10, 2021 · 0 comments
Closed
1 of 4 tasks

go 1.18: prepare for next Go release #172

gbotrel opened this issue Nov 10, 2021 · 0 comments
Assignees
Milestone

Comments

@gbotrel
Copy link
Collaborator

gbotrel commented Nov 10, 2021

We did advertise in the past support for last 2 major Go releases, but some go 1.18 features may significantly change the codebase (in a good way) and warrant breaking this for a future release.

To explore / needs decision:

go 1.17:

  • use reflect.VisibleFields and IsExported to simplify internal/...parser.go

go 1.18 (~ beta Dec 2021, release Feb 2022):

  • generics are coming. Impact on gnark could be important: backend package is pointing to internal/... packages code generated with curve typed fr.Element, for each backend.ID. If we can instantiate constraint systems and backend objects typed with curves, without loss of performance, that would greatly simplify the codebase. No more code generation (or very little), possibility to expose directly the gnark objects (simpler serialization / deserialization workflows), etc. Need to experiment, here mentions interface{} are faster than generic in some cases...

  • support for fuzzing . Lesser priority, but particularly in gnark-crypto, repacling gopter tests with a standard (as in long term / maintained) approach would make sense. Providing a wrapper (similar to test/Assert) to help circuit developers to fuzz witnesses for their circuit may be of separate interest.

  • GOAMD64=v3 (see this). Some field arithmetic operations are implemented in assembly in gnark-crypto. I think we should only support =v3 arch through build tags, and fall back to generic for other (+ arm64 assembly). The core reason for using assembly is the use of v3 instructions (ADX, MULX, ..).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant