Skip to content

Commit

Permalink
Update program + add changelog entry
Browse files Browse the repository at this point in the history
  • Loading branch information
fmoletta committed Mar 25, 2024
1 parent 6295613 commit 8fa52f2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#### Upcoming Changes

* feat: Bump cairo_lang to 0.13.1 in testing env [#1687](https://github.com/lambdaclass/cairo-vm/pull/1687)

* feat(BREAKING): Use return type info from sierra when serializing return values in cairo1-run crate [#1665](https://github.com/lambdaclass/cairo-vm/pull/1665)
* Removed public function `serialize_output`.
* Add field `serialize_output` to `Cairo1RunConfig`.
Expand Down
12 changes: 6 additions & 6 deletions cairo_programs/secp.cairo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%builtins range_check
from starkware.cairo.common.cairo_secp.bigint import nondet_bigint3, BigInt3, bigint_to_uint256

from starkware.cairo.common.cairo_secp.bigint3 import BigInt3, SumBigInt3
from starkware.cairo.common.cairo_secp.bigint import nondet_bigint3, bigint_to_uint256
from starkware.cairo.common.cairo_secp.field import verify_zero, UnreducedBigInt3, reduce, is_zero

func main{range_check_ptr: felt}() {
Expand Down Expand Up @@ -43,17 +43,17 @@ func main{range_check_ptr: felt}() {
);

// is_zero
let (u) = is_zero(BigInt3(0, 0, 0));
let (u) = is_zero(SumBigInt3(0, 0, 0));
assert u = 1;
let (v) = is_zero(
BigInt3(232113757366008801543585, 232113757366008801543585, 232113757366008801543585)
SumBigInt3(232113757366008801543585, 232113757366008801543585, 232113757366008801543585)
);
assert v = 0;

let (w) = is_zero(BigInt3(-10, -10, -10));
let (w) = is_zero(SumBigInt3(-10, -10, -10));
assert w = 0;

let (z) = is_zero(BigInt3(1833312543, 67523423, 8790312));
let (z) = is_zero(SumBigInt3(1833312543, 67523423, 8790312));
assert z = 0;

return ();
Expand Down
4 changes: 2 additions & 2 deletions cairo_programs/secp_integration_tests.cairo
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
%builtins range_check

from starkware.cairo.common.cairo_secp.bigint import (
BigInt3,
bigint_mul,
nondet_bigint3,
bigint_to_uint256,
uint256_to_bigint,
)
from starkware.cairo.common.cairo_secp.bigint3 import BigInt3, SumBigInt3
from starkware.cairo.common.cairo_secp.signature import (
get_generator_point,
validate_signature_entry,
Expand Down Expand Up @@ -86,7 +86,7 @@ func test_operations{range_check_ptr}(point: EcPoint) {
let (zero_uint, _) = uint256_add(slope_uint, neg_slope);
let (zero) = uint256_to_bigint(zero_uint);

let (is_z) = is_zero(zero);
let (is_z) = is_zero(SumBigInt3(d0=zero.d0, d1=zero.d1, d2=zero.d2));
assert is_z = 1;

let (pow2, scaled) = ec_mul_inner(point, 0, 0);
Expand Down

0 comments on commit 8fa52f2

Please sign in to comment.