Skip to content

Sync starkware-development with main #2150

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

Closed
wants to merge 22 commits into from

Conversation

gabrielbosio
Copy link
Collaborator

No description provided.

FrancoGiachetta and others added 22 commits April 8, 2025 22:07
* avoid installing gmp if it is already installed

* revert part of the last commit

* changelog

* remove unwanted file
* Add Makefile and requirements.txt to cache key

* Don't fetch cairo stwo exclusive programs

* Remove empty file

* Restrict caching Cairo programs

Revert how the Rust workflow uses the Cairo program paths to
calculate the cache keys.
This change would imply the branch only adds Makefile and
requirements.txt to the cache key computation.

---------

Co-authored-by: gabrielbosio <[email protected]>
Co-authored-by: Gabriel Bosio <[email protected]>
* dev: make Memory::get `pub`

* edit changelog

* dev: expose get_maybe_relocatable instead

* add comment on borrowed variant

* add tests
* feat: add support for hint accessible scopes

update changelog

* Update vm/src/hint_processor/hint_processor_definition.rs

Co-authored-by: Julian Gonzalez Calderon <[email protected]>

---------

Co-authored-by: Julian Gonzalez Calderon <[email protected]>
…2071)

* feat: add support for aliases destination in program serde

* add changelog

---------

Co-authored-by: Julián González Calderón <[email protected]>
* fix: Add boundary tests for SecpSplitOutOfRange in secp_utils

* Update secp_utils.rs

* Update CHANGELOG.md

* Update secp_utils.rs

* remove optimizations

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* empty commit to fix CI

---------

Co-authored-by: Julian Gonzalez Calderon <[email protected]>
…2077)

* docs: add --run_from_cairo_pie flag usage documentation for Cairo 0

* docs: add --run_from_cairo_pie flag usage documentation for Cairo 1

* Update README.md

Co-authored-by: Julian Gonzalez Calderon <[email protected]>

* Update README.md

* Update README.md

* Update README.md

Co-authored-by: Julian Gonzalez Calderon <[email protected]>

* Update README.md

Co-authored-by: Gabriel Bosio <[email protected]>

* Update README.md

Co-authored-by: Julian Gonzalez Calderon <[email protected]>

---------

Co-authored-by: Julian Gonzalez Calderon <[email protected]>
Co-authored-by: Gabriel Bosio <[email protected]>
* Minor fixes - use CAIRO_PRIME

* Add error handling

* Update CHANGELOG.md
* Update cairo-lang versin

* Update changelog

* Add new hints

* Specify prime in new hints

* Only apply mod floor if prime is not CAIRO_PRIME

* Properly implement pack for a different prime

* Fix pack in compute_doubling_slope

* Add negative_points.cairo test

* Add try_get_point_from_x for negative points

* Add double_x test for negative points

* Allow to many arguments

* Add codecov to cairo-0-secp-hints feature
* Update version

* Update lock

* Update toolchain

* Update changelog

* Fix clippy

* Update toolchain in CI
* update rust toolchain to 1.87.0

* remove uneeded file

* update rust in workflows

* update changelog

* clippy

* clippy

* remove unneeded clippy allow
* Add tests for .gen_arg() and .write_arg()

* Add test for .is_valid_memory_value()

* Assert contents of memory segments
* Removed tower and cairo-lang-starknet

* Remove cairo1-run unused dependencies

* Remove unused imports on wasm-demo and vm-cli

* Remove wasm_bindgen_test

* Remove cairo-lang-starknet

* Remove getrandom dependency

* Revert "Remove getrandom dependency"

This reverts commit 4919373.
This is done because the dependency is indeed necessary.

* Remove with_mimalloc feature in cairo1-run

* Update CHANGELOG.md

---------

Co-authored-by: Gabriel Bosio <[email protected]>
* Use proptest for QM31 test

* Fix attributes conditions

* Add missing cfg constraint

* Add missing cfg constraint

* Remove unnecessary cgf constraints

* Filter special case

* Add .no_shrink()

* Add test with random input

* Remove enum Configuration
Co-authored-by: Julián González Calderón <[email protected]>
* Update changelog

* Pin types-rs version
Copy link

github-actions bot commented Aug 6, 2025

**Hyper Thereading Benchmark results**




hyperfine -r 2 -n "hyper_threading_main threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_main' -n "hyper_threading_pr threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 1
  Time (mean ± σ):     25.576 s ±  0.033 s    [User: 24.764 s, System: 0.810 s]
  Range (min … max):   25.553 s … 25.600 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     24.202 s ±  0.072 s    [User: 23.335 s, System: 0.865 s]
  Range (min … max):   24.151 s … 24.252 s    2 runs
 
Summary
  hyper_threading_pr threads: 1 ran
    1.06 ± 0.00 times faster than hyper_threading_main threads: 1




hyperfine -r 2 -n "hyper_threading_main threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_main' -n "hyper_threading_pr threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 2
  Time (mean ± σ):     14.311 s ±  0.021 s    [User: 24.953 s, System: 0.813 s]
  Range (min … max):   14.296 s … 14.325 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     13.177 s ±  0.056 s    [User: 23.425 s, System: 0.876 s]
  Range (min … max):   13.137 s … 13.216 s    2 runs
 
Summary
  hyper_threading_pr threads: 2 ran
    1.09 ± 0.00 times faster than hyper_threading_main threads: 2




hyperfine -r 2 -n "hyper_threading_main threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_main' -n "hyper_threading_pr threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 4
  Time (mean ± σ):     10.569 s ±  0.274 s    [User: 37.318 s, System: 0.964 s]
  Range (min … max):   10.375 s … 10.763 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     10.158 s ±  0.109 s    [User: 35.522 s, System: 1.037 s]
  Range (min … max):   10.081 s … 10.235 s    2 runs
 
Summary
  hyper_threading_pr threads: 4 ran
    1.04 ± 0.03 times faster than hyper_threading_main threads: 4




hyperfine -r 2 -n "hyper_threading_main threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_main' -n "hyper_threading_pr threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 6
  Time (mean ± σ):     10.492 s ±  0.253 s    [User: 37.798 s, System: 0.965 s]
  Range (min … max):   10.313 s … 10.671 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     10.029 s ±  0.003 s    [User: 35.592 s, System: 1.060 s]
  Range (min … max):   10.027 s … 10.031 s    2 runs
 
Summary
  hyper_threading_pr threads: 6 ran
    1.05 ± 0.03 times faster than hyper_threading_main threads: 6




hyperfine -r 2 -n "hyper_threading_main threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_main' -n "hyper_threading_pr threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 8
  Time (mean ± σ):     10.352 s ±  0.004 s    [User: 38.079 s, System: 0.990 s]
  Range (min … max):   10.349 s … 10.355 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):      9.701 s ±  0.092 s    [User: 36.430 s, System: 1.079 s]
  Range (min … max):    9.637 s …  9.766 s    2 runs
 
Summary
  hyper_threading_pr threads: 8 ran
    1.07 ± 0.01 times faster than hyper_threading_main threads: 8




hyperfine -r 2 -n "hyper_threading_main threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_main' -n "hyper_threading_pr threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 16
  Time (mean ± σ):     10.370 s ±  0.014 s    [User: 38.393 s, System: 1.090 s]
  Range (min … max):   10.360 s … 10.380 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):      9.843 s ±  0.190 s    [User: 36.571 s, System: 1.144 s]
  Range (min … max):    9.709 s …  9.977 s    2 runs
 
Summary
  hyper_threading_pr threads: 16 ran
    1.05 ± 0.02 times faster than hyper_threading_main threads: 16


Copy link

github-actions bot commented Aug 6, 2025

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.141 ± 0.008 2.126 2.148 1.04 ± 0.01
head big_factorial 2.052 ± 0.011 2.035 2.069 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.075 ± 0.025 2.057 2.128 1.05 ± 0.01
head big_fibonacci 1.975 ± 0.009 1.966 1.993 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.521 ± 0.043 7.484 7.630 1.07 ± 0.01
head blake2s_integration_benchmark 6.997 ± 0.056 6.899 7.066 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.188 ± 0.011 2.176 2.215 1.05 ± 0.01
head compare_arrays_200000 2.089 ± 0.016 2.067 2.109 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.432 ± 0.010 1.425 1.456 1.03 ± 0.01
head dict_integration_benchmark 1.390 ± 0.005 1.378 1.398 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.230 ± 0.007 1.222 1.245 1.04 ± 0.01
head field_arithmetic_get_square_benchmark 1.182 ± 0.010 1.171 1.203 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 7.610 ± 0.028 7.584 7.667 1.07 ± 0.01
head integration_builtins 7.143 ± 0.038 7.050 7.187 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 7.874 ± 0.163 7.752 8.162 1.10 ± 0.02
head keccak_integration_benchmark 7.129 ± 0.060 7.056 7.201 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.177 ± 0.015 2.158 2.202 1.03 ± 0.01
head linear_search 2.113 ± 0.015 2.096 2.150 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.529 ± 0.014 1.516 1.561 1.03 ± 0.02
head math_cmp_and_pow_integration_benchmark 1.485 ± 0.018 1.465 1.522 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.467 ± 0.004 1.460 1.474 1.02 ± 0.00
head math_integration_benchmark 1.433 ± 0.003 1.426 1.437 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.221 ± 0.003 1.216 1.225 1.02 ± 0.02
head memory_integration_benchmark 1.198 ± 0.021 1.178 1.238 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.555 ± 0.004 1.550 1.561 1.03 ± 0.01
head operations_with_data_structures_benchmarks 1.513 ± 0.015 1.496 1.546 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 538.8 ± 3.9 536.1 548.3 1.03 ± 0.01
head pedersen 521.6 ± 1.6 518.7 524.3 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 635.2 ± 1.5 632.4 637.4 1.04 ± 0.00
head poseidon_integration_benchmark 610.4 ± 2.0 606.1 613.5 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.830 ± 0.004 1.826 1.836 1.03 ± 0.01
head secp_integration_benchmark 1.772 ± 0.012 1.759 1.800 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 683.9 ± 1.3 681.4 685.9 1.10 ± 0.01
head set_integration_benchmark 623.5 ± 3.0 619.3 630.6 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.284 ± 0.024 4.251 4.336 1.05 ± 0.01
head uint256_integration_benchmark 4.061 ± 0.042 4.010 4.172 1.00

Copy link

codecov bot commented Aug 6, 2025

Codecov Report

❌ Patch coverage is 98.08917% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.67%. Comparing base (d3c649c) to head (a7f8b97).
⚠️ Report is 1 commits behind head on starkware-development.

Files with missing lines Patch % Lines
cairo-vm-tracer/src/tracer.rs 0.00% 1 Missing ⚠️
cairo-vm-tracer/src/tracer_data.rs 0.00% 1 Missing ⚠️
vm/src/vm/vm_memory/memory.rs 96.00% 1 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                    @@
##           starkware-development    #2150      +/-   ##
=========================================================
+ Coverage                  96.63%   96.67%   +0.03%     
=========================================================
  Files                        103      103              
  Lines                      43865    43941      +76     
=========================================================
+ Hits                       42389    42480      +91     
+ Misses                      1476     1461      -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gabrielbosio
Copy link
Collaborator Author

Closing because #2175 was merged so starkware-development work was merged into main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.