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

ZKP tweaks #279

Merged
merged 31 commits into from
Jul 18, 2023
Merged

ZKP tweaks #279

merged 31 commits into from
Jul 18, 2023

Conversation

samtay
Copy link
Contributor

@samtay samtay commented Jul 11, 2023

Some changes made while writing zkp user docs:

  • sudoku cleanup
  • new zkp serialization example
  • exports necessary to use zkp compiler
  • convenience exports (e.g. BulletproofsField)
  • couple of doc fixes
  • rename Gadget::compute_inputs to Gadget::compute_hidden_inputs
  • Restrict zkp arguments to be in order: private, public, constant
  • Offer shorthand methods directly on zkp program struct (and maybe fhe too, time permitting) for compilation: e.g. let prog = sudoku.compile()?. Potentially useful, but less so, is to also offer let runtime = sudoku.runtime(&backend)? method. Doesn't really buy you much other than avoiding one ZkpRuntime import.

I do wonder if these should be defined in a separate trait, just so that they don't live next to the more internal functions in documentation.
Its typical to have the caller handle cloning, rather than taking a reference, requiring Clone impl, and forcing clone. Plus, as of now the only backend is a zero size null struct, so nothing to be gained by using a reference. It also just looks weird to always pass `&BulletproofsBackend::new()`
@samtay samtay merged commit badb8f9 into main Jul 18, 2023
3 checks passed
@samtay samtay deleted the samtay/zkp-tweaks branch July 18, 2023 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants