argumentcomputer / yatima

A zero-knowledge Lean4 compiler and kernel
MIT License
114 stars 8 forks source link

Anonymize transpiler #223

Closed arthurpaulino closed 1 year ago

arthurpaulino commented 1 year ago

The current transpiler is highly reliant on names to perform optimizations. At some point we will need to figure out how to make the transpiler work without names, generating anonymized proofs of execution.

As of writing this I see two options:

  1. Allow the user to tell whether the transpiler should do optimizations which are limited to the content present on the official Lean Init. Then, after a Lurk AST is created, subject it to a post process step of anonymization
  2. Do anonymized Lurk AST generation from the beginning, with optimizations based on anon CIDs. This option requires the maintenance of some CID-to-identifier map, very much like the map we currently have with PrimCids (or maybe an expansion of it?)

Option 1 seems easier and is in fact more aligned with what we have on main. But option 2 seems more correct.