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) Replace div_rem with div_mod_floor #1881

Merged
merged 12 commits into from
Dec 3, 2024
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
## Cairo-VM Changelog

#### Upcoming Changes

#### [2.0.0-rc1] - 2024-11-20
* fix: replace `div_rem` with `div_mod_floor` in `verify_zero` hints [#1881](https://github.com/lambdaclass/cairo-vm/pull/1881)

* feat: add `EvalCircuit` and `TestLessThanOrEqualAddress` hints [#1843](https://github.com/lambdaclass/cairo-vm/pull/1843)

Expand Down
88 changes: 44 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn verify_zero(
) -> Result<(), HintError> {
exec_scopes.insert_value("SECP_P", secp_p.clone());
let val = Uint384::from_var_name("val", vm, ids_data, ap_tracking)?.pack86();
let (q, r) = val.div_rem(secp_p);
let (q, r) = val.div_mod_floor(secp_p);
if !r.is_zero() {
return Err(HintError::SecpVerifyZero(Box::new(val)));
}
Expand All @@ -62,7 +62,7 @@ pub fn verify_zero_with_external_const(
) -> Result<(), HintError> {
let secp_p = exec_scopes.get_ref("SECP_P")?;
let val = Uint384::from_var_name("val", vm, ids_data, ap_tracking)?.pack86();
let (q, r) = val.div_rem(secp_p);
let (q, r) = val.div_mod_floor(secp_p);
if !r.is_zero() {
return Err(HintError::SecpVerifyZero(Box::new(val)));
}
Expand Down
Loading