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

Selector columns must not depend on input #591

Open
CblPOK-git opened this issue Apr 1, 2024 · 1 comment
Open

Selector columns must not depend on input #591

CblPOK-git opened this issue Apr 1, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@CblPOK-git
Copy link
Contributor

CblPOK-git commented Apr 1, 2024

As far as selectors is a part of constraint system it must not be depend on the inputs.
Now during handling brunch under false condition we manually disable corresponded selectors which is actually wrong behavior.
Possible solution - introduce extra flag variable into each constraint under branch:

if (cond) {
    a = b + c;
} else {
    a = d + f;
}

Current constraints

w_0_0 + w_1_0 - w_2_0
w_0_1 + w_1_1 - w_2_1

Should be

(w_0_0 + w_1_0 - w_2_0) * w_3_0
(w_0_1 + w_1_1 - w_2_1) * w_3_1

where w_3_0 is (cond == true), w_3_1 is (cond == false)

But it's not avoid possible security issue till selectors are part of the public assignment table (any body can just set all 0 and proof will be successfully verified for any input)

@CblPOK-git CblPOK-git added the bug Something isn't working label Apr 1, 2024
@CblPOK-git CblPOK-git self-assigned this Apr 1, 2024
@akokoshn
Copy link

akokoshn commented May 9, 2024

Now selectors not depend on the inputs, they have same values for both (true/false) branches.
It means we have to fully fill assignment table for both branches, so using bellow approach can speed up generation assignment table.

@akokoshn akokoshn added enhancement New feature or request and removed bug Something isn't working labels May 9, 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
Projects
None yet
Development

No branches or pull requests

2 participants