-
Notifications
You must be signed in to change notification settings - Fork 156
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
Catch possible subtraction error in QUAD_BIT
& DI_BIT
hints
#1185
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1185 +/- ##
==========================================
- Coverage 97.70% 97.70% -0.01%
==========================================
Files 89 89
Lines 35847 35865 +18
==========================================
+ Hits 35025 35042 +17
- Misses 822 823 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Benchmark Results for unmodified programs 🚀
|
@@ -179,4 +179,6 @@ pub enum HintError { | |||
RecoverYPointNotOnCurve(Felt252), | |||
#[error("Invalid value for {0}. Got: {1}. Expected: {2}")] | |||
InvalidValue(&'static str, Felt252, Felt252), | |||
#[error("Attempt to subtract with overflow: ids.m - 1")] | |||
NPairBitsMZero, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should use a more descriptive name to this new error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose this name as it is more useful when debugging, as it has the name of the function that fails and the failure case, while leaving the error string useful for users, a more descriptive name could be NPairBitsMMinusOneSubtractioOverflow
or MMinusOneSubtractionOverflow
but it doesn't sound that much useful
…daclass#1185) * Catch possible sustraction error in QUAD_BIT & DI_BIT hints * Fix changelog entry * Typo * Fix changelog entry
Now returns an error if ids.m is zero
Checklist