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

Enhance MACI circuits readability #1337

Merged
merged 18 commits into from
May 1, 2024

Conversation

0xjei
Copy link
Member

@0xjei 0xjei commented Apr 2, 2024

Description

This PR aims to improve the readability of MACI's circuits by introducing precise documentation and refactoring the code to introduce Circom's Anonymous Components and Tuples feature. Also, lighten the circuits by removing unused ones and importing as much as possible from external libraries such as circomlib and zk-kit.

This PR also introduces a significant change to the structure of the Circuits package. Specifically:

  • core contains only processMessages and tallyVotes with their supporting templates for qv and non-qv version.
  • trees contains IQT and IMT
  • utils contains all templates that are not a core part of those in the root. Also, when necessary, they are subdivided between qv and non-qv.

Note the respective QV e NonQV versions of the templates are located in the same file.

Related issue(s)

See privacy-scaling-explorations/zk-kit#131 (last rewrite).

Confirmation

Copy link

vercel bot commented Apr 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
maci-website ✅ Ready (Inspect) Visit Preview May 1, 2024 8:33am

@samajammin
Copy link
Member

Love to see this 🙏😍

@0xjei 0xjei changed the base branch from refactor/circom-circuits to dev April 18, 2024 20:09
@0xjei 0xjei marked this pull request as ready for review April 18, 2024 20:11
@0xjei 0xjei marked this pull request as draft April 19, 2024 09:33
Copy link
Collaborator

@kittybest kittybest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

circuits/circom/processMessages.circom Outdated Show resolved Hide resolved
circuits/circom/processMessages.circom Outdated Show resolved Hide resolved
circuits/circom/processMessages.circom Outdated Show resolved Hide resolved
circuits/circom/processMessages.circom Show resolved Hide resolved
@ctrlc03 ctrlc03 merged commit 3770a2a into privacy-scaling-explorations:dev May 1, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants