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

Witgen produces wrong witness when reordering constraints #1559

Open
Schaeff opened this issue Jul 11, 2024 · 0 comments · May be fixed by #1562
Open

Witgen produces wrong witness when reordering constraints #1559

Schaeff opened this issue Jul 11, 2024 · 0 comments · May be fixed by #1562
Labels
bug Something isn't working

Comments

@Schaeff
Copy link
Collaborator

Schaeff commented Jul 11, 2024

in std::split::split_bn254.asm, we have:

[ bytes, BYTES_MAX, lt, gt ] in [ P_A, P_B, P_LT, P_GT ];
was_lt = RESET' * lt + (1 - RESET') * (was_lt' + lt - was_lt' * lt);

If the two constraints are swapped, witgen succeeds but halo2-mock (and pilcom in the gl equivalent) fails.

Note the comment on the was_lt constraint:

// Compute whether the current or any previous byte has been less than
// the corresponding byte of the maximum value.
// This moves backward from the second to last row.

logs here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant