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

feat: implement non-native field emulation #302

Merged
merged 47 commits into from Jun 14, 2022
Merged

Conversation

ivokub
Copy link
Collaborator

@ivokub ivokub commented Apr 7, 2022

This PR adds a new standard gadget std/math/nonnative for performing non-native field operations in a circuit. It is trying to follow big.Int-like interface, but is not completely compatible.

The PR is mostly ready, but still some things to do:

  • add tests for more complex computations
  • implement Select and Lookup2
  • write a nice documentation which lists all the assumptions the library does to ensure the validness of the computation

@ivokub ivokub added this to the v0.8.0 milestone Apr 7, 2022
@ivokub ivokub self-assigned this Apr 7, 2022
@ivokub
Copy link
Collaborator Author

ivokub commented May 10, 2022

Marking this version as ready to review as is. It is functionally complete, but lacks several optimisations I will implement in a new PR. When reviewing, I suggest to start from std/math/nonnative/doc.go (or look at the package documentation with godoc) for general description and then (in parallel) look at std/math/nonnative/variable.go.

@SherLzp
Copy link
Contributor

SherLzp commented May 18, 2022

will it support Sqrt? @ivokub

@ivokub
Copy link
Collaborator Author

ivokub commented May 18, 2022

will it support Sqrt? @ivokub

Currently Sqrt is not implemented in the PR, but it should be easy to add. Will add the Sqrt method soon.

@SherLzp
Copy link
Contributor

SherLzp commented May 31, 2022

when will this PR be merged? @ivokub

@ivokub
Copy link
Collaborator Author

ivokub commented May 31, 2022

when will this PR be merged? @ivokub

I believe it is being reviewed right now. Cannot promise ETA but hopefully shortly.

@ivokub ivokub merged commit 9bcd1c8 into develop Jun 14, 2022
@ivokub ivokub deleted the feat/nonnative-ff branch June 14, 2022 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support non-native field arithmetic
3 participants