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

Fix shift constraint #1280

Merged
merged 4 commits into from
Oct 9, 2023
Merged

Fix shift constraint #1280

merged 4 commits into from
Oct 9, 2023

Conversation

Nashtare
Copy link
Collaborator

@Nashtare Nashtare commented Oct 6, 2023

This fixes the shift constraints for displacement > $2^{32}$.

The issue is that when calling append_shift in witness/operations.rs, we don't perform a READ if the displacement does not fit in the lowest limb, but this isn't properly represented in constraints.
We also didn't compute the general column for the inverse of the high_limbs_sum, which is necessary for satisfying some of the constraints.

I've also added constraint comments on the recursive side for easy reading and consistency with how the other modules are documented.

@unzvfu Would you mind confirming?

@Nashtare Nashtare added the bug Something isn't working label Oct 6, 2023
@Nashtare Nashtare added this to the EVM Audit Readiness milestone Oct 6, 2023
@Nashtare Nashtare self-assigned this Oct 6, 2023
Copy link
Contributor

@unzvfu unzvfu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@Nashtare Nashtare merged commit 8a5eed9 into 0xPolygonZero:main Oct 9, 2023
2 checks passed
@Nashtare Nashtare deleted the fix_shift branch October 9, 2023 13:55
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
Development

Successfully merging this pull request may close these issues.

2 participants