Skip to content

Sum number of matches in circom #53

Open
@Divide-By-0

Description

@Divide-By-0

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions