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

Sum number of matches in circom #53

Open
Divide-By-0 opened this issue Feb 3, 2024 · 0 comments
Open

Sum number of matches in circom #53

Divide-By-0 opened this issue Feb 3, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers medium

Comments

@Divide-By-0
Copy link
Member

Check for number of unique matches as an output of the zk-regex library; the app dev could have the option to turn it on using a flag.

This code:

 component final_state_result = MultiOR(num_bytes+1);
 for (var i = 0; i <= num_bytes; i++) {
  final_state_result.in[i] <== states[i][8];
 }
 out <== final_state_result.out;

in the regex generation should add a second, similar arg (matches) that is a summation over state transitions for matched states instead (i.e. where state[i][8] = 1 and state[i-1][8] = 0). Then users can decide whether to constrain this to i.e. 1 or not.

@Divide-By-0 Divide-By-0 added enhancement New feature or request good first issue Good for newcomers medium labels Feb 3, 2024
@Divide-By-0 Divide-By-0 changed the title Sum number of matches Sum number of matches in circom Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers medium
Projects
None yet
Development

No branches or pull requests

1 participant