-
-
Notifications
You must be signed in to change notification settings - Fork 804
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
num256 sub overflow protection doesn't work #411
Comments
@pdaian I'll fix this now |
I looked at the LLL changes and they look correct, closing. |
Hi, I have a related question. Is num256 overflow protected or not? This document says: Viper reference says nothing on the topic. This issue suggests it is protected. Conflicting data. thanks, |
@denis-bogdanas Thanks a lot for bringing this up! |
I guess it's better for someone more knowledgeable to review that document. There are probably more things to update. |
viper Version: 0.0.2
pyethereum Version: 2.1.0
OS: linux
Python Version (python --version): 3.6
What's your issue about?
num256_sub overflow protection appears to be very broken (fails in cases that should succeed, succeeds in cases that should fail); at first glance, perhaps it is flipping the order of the arguments to the sub function in the overflow check (failing when y - x would overflow, not x - y).
Minimal example:
How can it be fixed?
Have not looked into this yet.
Cute Animal Picture
The text was updated successfully, but these errors were encountered: