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

[BUG FIX] Fix SelectRegexReveal #200

Merged
merged 2 commits into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/circuits/utils/regex.circom
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ include "./bytes.circom";
/// @param maxRevealLen Maximum length of the reveal part
/// @input in Input array; assumes elements to be bytes
/// @input startIndex The index from which reveal part starts; assumes a valid index,
/// and `startIndex + maxRevealLen - 1` fits in `ceil(log2((maxArrayLen))` bits.
/// and `startIndex + maxRevealLen - 1` fits in `ceil(log2((maxArrayLen + maxRevealLen - 1))` bits.
/// @output out Revealed data array
template SelectRegexReveal(maxArrayLen, maxRevealLen) {
signal input in[maxArrayLen];
signal input startIndex;

signal output out[maxRevealLen];

var bitLength = log2Ceil(maxArrayLen);
var bitLength = log2Ceil(maxArrayLen + maxRevealLen - 1);

signal isStartIndex[maxArrayLen];
signal isZero[maxArrayLen];
Expand Down
Loading