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

TODO: Store NOTHING_UP_MY_SLEEVE.neg() as a constant #18

Open
weijiekoh opened this issue Jan 31, 2023 · 0 comments
Open

TODO: Store NOTHING_UP_MY_SLEEVE.neg() as a constant #18

weijiekoh opened this issue Jan 31, 2023 · 0 comments
Assignees

Comments

@weijiekoh
Copy link
Collaborator

In Semacaulk.sol, insertIdentity() computes the negative of the NUMS value in the field:

uint256 n = Constants.PRIME_R;
uint256 negZero = mulmod(NOTHING_UP_MY_SLEEVE_ZERO, n - 1, n);

Instead, negZero can be stored as a constant or computed in the constructor and stored as an immutable.

@weijiekoh weijiekoh self-assigned this Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant