Skip to content

Design constraint generation in the Circom compiler for the Ligetron target #1

@aesilevich

Description

@aesilevich

There is a short description with a proposal for different approaches on how to generate constraints for the Ligetron target:

https://github.com/ligeroinc/circom/blob/ligetron/ligetron-constraints.md

I suggest the following:

  1. Implement the runtime approach and ensure it works with large examples like the email verifier while generating a reasonable number of constraints.
  2. Design and implement the minimal Ligetron backend API required for Circom: https://github.com/ligeroinc/ligetron/issues/13
  3. Gradually implement the compile-time approach step by step:
  • Implement basic analysis to detect individual operations for which constraints should be generated.
  • Implement generation of both constrained and unconstrained versions of each function and use the appropriate version at each call site.

Alternatively, instead of step 3, we can try reusing constraint information generated by the Circom compiler in the code generator for the Ligetron target. However, I'm not sure if it's easy to implement.

@SuperHex What do you think about this?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions