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: add shortcut for const input in MulConst #438

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

ivokub
Copy link
Collaborator

@ivokub ivokub commented Jan 18, 2023

Previously the result of MulConst had non-zero overflow when multipling a constant by a small constant. This panics Reduce method which assumes that constants have zero overflow.

Fixes #431

The PR doesn't include the initial test because circuit called EnforceWidth() on the public witness and as fuzzer provides random inputs (where the width of the witness may be longer than assumed), then leads false failure. See also #296.

Previously the result of MulConst had non-zero overflow when multipling a
constant by a small constant. This panics Reduce method which assumes that
constants have zero overflow.

Fixes #431
@ivokub ivokub added the bug Something isn't working label Jan 18, 2023
@ivokub ivokub added this to the v0.8.0 milestone Jan 18, 2023
@ivokub ivokub requested a review from gbotrel January 18, 2023 14:34
@ivokub ivokub self-assigned this Jan 18, 2023
@ivokub ivokub linked an issue Jan 18, 2023 that may be closed by this pull request
@gbotrel gbotrel merged commit 2b9d934 into develop Jan 19, 2023
@gbotrel gbotrel deleted the fix/nonnative-overflow branch January 19, 2023 16:04
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.

std/math/emulated: constant with overflow flag set
2 participants