Skip to content

Conversation

YairVaknin-starkware
Copy link
Collaborator

@YairVaknin-starkware YairVaknin-starkware commented Jun 3, 2025

TITLE

Description

Description of the pull request changes and motivation.

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

This change is Reviewable

Copy link

github-actions bot commented Jun 3, 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.725 s ±  0.036 s    [User: 24.884 s, System: 0.838 s]
  Range (min … max):   25.700 s … 25.751 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     25.713 s ±  0.017 s    [User: 24.779 s, System: 0.931 s]
  Range (min … max):   25.700 s … 25.725 s    2 runs
 
Summary
  hyper_threading_pr threads: 1 ran
    1.00 ± 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.339 s ±  0.020 s    [User: 25.050 s, System: 0.840 s]
  Range (min … max):   14.325 s … 14.354 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     14.027 s ±  0.021 s    [User: 24.938 s, System: 0.949 s]
  Range (min … max):   14.012 s … 14.041 s    2 runs
 
Summary
  hyper_threading_pr threads: 2 ran
    1.02 ± 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.516 s ±  0.083 s    [User: 37.528 s, System: 1.013 s]
  Range (min … max):   10.458 s … 10.575 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     10.425 s ±  0.296 s    [User: 37.535 s, System: 1.112 s]
  Range (min … max):   10.216 s … 10.635 s    2 runs
 
Summary
  hyper_threading_pr threads: 4 ran
    1.01 ± 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.447 s ±  0.099 s    [User: 38.016 s, System: 1.016 s]
  Range (min … max):   10.377 s … 10.517 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     10.523 s ±  0.120 s    [User: 37.345 s, System: 1.134 s]
  Range (min … max):   10.438 s … 10.608 s    2 runs
 
Summary
  hyper_threading_main threads: 6 ran
    1.01 ± 0.01 times faster than hyper_threading_pr 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.403 s ±  0.169 s    [User: 38.334 s, System: 1.073 s]
  Range (min … max):   10.284 s … 10.523 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     10.295 s ±  0.147 s    [User: 38.032 s, System: 1.158 s]
  Range (min … max):   10.191 s … 10.399 s    2 runs
 
Summary
  hyper_threading_pr threads: 8 ran
    1.01 ± 0.02 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.323 s ±  0.145 s    [User: 38.797 s, System: 1.120 s]
  Range (min … max):   10.221 s … 10.426 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     10.445 s ±  0.120 s    [User: 38.220 s, System: 1.184 s]
  Range (min … max):   10.360 s … 10.530 s    2 runs
 
Summary
  hyper_threading_main threads: 16 ran
    1.01 ± 0.02 times faster than hyper_threading_pr threads: 16


Copy link

github-actions bot commented Jun 3, 2025

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.118 ± 0.013 2.103 2.150 1.00 ± 0.01
head big_factorial 2.110 ± 0.010 2.097 2.129 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.042 ± 0.007 2.032 2.056 1.00 ± 0.01
head big_fibonacci 2.037 ± 0.010 2.018 2.050 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.461 ± 0.038 7.402 7.524 1.00
head blake2s_integration_benchmark 7.511 ± 0.088 7.456 7.748 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.179 ± 0.022 2.162 2.238 1.00 ± 0.01
head compare_arrays_200000 2.170 ± 0.019 2.149 2.205 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.419 ± 0.004 1.410 1.423 1.00
head dict_integration_benchmark 1.425 ± 0.020 1.410 1.480 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.222 ± 0.009 1.211 1.235 1.00
head field_arithmetic_get_square_benchmark 1.227 ± 0.015 1.215 1.257 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 7.549 ± 0.052 7.476 7.657 1.00
head integration_builtins 7.581 ± 0.111 7.456 7.822 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 7.727 ± 0.088 7.629 7.936 1.01 ± 0.02
head keccak_integration_benchmark 7.674 ± 0.098 7.563 7.856 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.151 ± 0.013 2.142 2.186 1.00
head linear_search 2.157 ± 0.023 2.136 2.205 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.491 ± 0.006 1.483 1.501 1.00
head math_cmp_and_pow_integration_benchmark 1.502 ± 0.021 1.481 1.556 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.448 ± 0.013 1.437 1.484 1.00
head math_integration_benchmark 1.454 ± 0.012 1.439 1.476 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.209 ± 0.015 1.195 1.242 1.00 ± 0.01
head memory_integration_benchmark 1.203 ± 0.008 1.190 1.211 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.531 ± 0.014 1.517 1.563 1.00 ± 0.01
head operations_with_data_structures_benchmarks 1.529 ± 0.006 1.515 1.534 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 529.7 ± 2.2 525.7 532.6 1.00 ± 0.01
head pedersen 529.7 ± 4.2 522.0 536.9 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 607.9 ± 2.9 602.2 611.2 1.00
head poseidon_integration_benchmark 609.3 ± 3.6 600.8 612.2 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.829 ± 0.011 1.814 1.847 1.00
head secp_integration_benchmark 1.829 ± 0.007 1.825 1.848 1.00 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 621.8 ± 3.1 615.4 626.0 1.00 ± 0.01
head set_integration_benchmark 621.1 ± 3.3 613.5 625.8 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.220 ± 0.015 4.188 4.242 1.00 ± 0.01
head uint256_integration_benchmark 4.207 ± 0.015 4.188 4.232 1.00

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/enable_using_secure_run_in_proof_mode branch from 4c7661b to 9ad4783 Compare June 3, 2025 10:39
@gabrielbosio gabrielbosio mentioned this pull request Jun 3, 2025
Copy link
Collaborator

@yuvalsw yuvalsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @YairVaknin-starkware)


vm/src/vm/runners/cairo_runner.rs line 1032 at r1 (raw file):

                    stop_ptr.ok_or_else(|| RunnerError::NoStopPointer(Box::new(builtin.name())))?;
                builtin_segment_info.push((index, stop_ptr));
            }

Suggestion:

            if proof_mode {
                // In proof‐mode there are builtin runners for all builtins, but only the ones that are in the program are finalized (`stop_ptr` is set). Only collect those.
                if let Some(stop_ptr) = stop_ptr {
                    builtin_segment_info.push((index, stop_ptr));
                }
            } else {
                // In non‐proof-mode all builtin runners are from the program and thus should be finalized (`stop_ptr` is set).
                let stop_ptr =
                    stop_ptr.ok_or_else(|| RunnerError::NoStopPointer(Box::new(builtin.name())))?;
                builtin_segment_info.push((index, stop_ptr));
            }

vm/src/vm/runners/cairo_runner.rs line 1032 at r1 (raw file):

                    stop_ptr.ok_or_else(|| RunnerError::NoStopPointer(Box::new(builtin.name())))?;
                builtin_segment_info.push((index, stop_ptr));
            }

suggestion

Suggestion:

            match stop_ptr {
                Some(stop_ptr) => {
                    // comment ...
                    builtin_segment_info.push((index, stop_ptr));
                }
                None => {
                    if !proof_mode {
                        // comment...
                        RunnerError::NoStopPointer(Box::new(builtin.name()))
                    }
                }
            }

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/enable_using_secure_run_in_proof_mode branch 2 times, most recently from 20953cc to e5ad90b Compare June 8, 2025 08:06
Copy link
Collaborator Author

@YairVaknin-starkware YairVaknin-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @yuvalsw)


vm/src/vm/runners/cairo_runner.rs line 1032 at r1 (raw file):

Previously, yuvalsw wrote…

suggestion

Refactored so we only check if proof_mode once.


vm/src/vm/runners/cairo_runner.rs line 1032 at r1 (raw file):

                    stop_ptr.ok_or_else(|| RunnerError::NoStopPointer(Box::new(builtin.name())))?;
                builtin_segment_info.push((index, stop_ptr));
            }

Done.

Copy link

codecov bot commented Jun 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.63%. Comparing base (bdf604f) to head (1c65679).
Report is 1 commits behind head on starkware-development.

Additional details and impacted files
@@                  Coverage Diff                   @@
##           starkware-development    #2113   +/-   ##
======================================================
  Coverage                  96.63%   96.63%           
======================================================
  Files                        104      104           
  Lines                      43864    43905   +41     
======================================================
+ Hits                       42388    42429   +41     
  Misses                      1476     1476           

☔ 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.

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/enable_using_secure_run_in_proof_mode branch from e5ad90b to 622a92b Compare June 8, 2025 10:01
Copy link
Collaborator

@yuvalsw yuvalsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @YairVaknin-starkware)


vm/src/vm/runners/cairo_runner.rs line 1023 at r2 (raw file):

        // Closure to process each builtin's segment info based on whether we are in proof mode or not.
        let mut process: ProcessBuiltinSegmentClosure<'_> = if proof_mode {

While saving the if inside the loop, it complicates the code, also adding other indirections - so I am not sure it's more efficient (saving the if is pretty negligible). Unless I missed some other reason to use a closure here, I prefer the previous way.
Though I will not block on it, if you choose to leave it this way, please explain why.

Copy link
Collaborator

@yuvalsw yuvalsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r3.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @YairVaknin-starkware)

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/enable_using_secure_run_in_proof_mode branch from 622a92b to 1043f0a Compare June 8, 2025 13:17
Copy link
Collaborator Author

@YairVaknin-starkware YairVaknin-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @yuvalsw)


vm/src/vm/runners/cairo_runner.rs line 1023 at r2 (raw file):

Previously, yuvalsw wrote…

While saving the if inside the loop, it complicates the code, also adding other indirections - so I am not sure it's more efficient (saving the if is pretty negligible). Unless I missed some other reason to use a closure here, I prefer the previous way.
Though I will not block on it, if you choose to leave it this way, please explain why.

It's not there in terms of efficiency. They should be pretty similar in that regard (most efficient would just be duplication of the loop, but still really negligible for our use case). I Just like this style better and I think this avoids polluting the loop with a logic that could be decided earlier on in the run (it's pretty standard practice to have different methods do different things based on some branch logic, just here there's no need to define them outside the func scope and the logic is pretty "thin").

Copy link
Collaborator

@yuvalsw yuvalsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @YairVaknin-starkware)


vm/src/vm/runners/cairo_runner.rs line 1023 at r2 (raw file):

Previously, YairVaknin-starkware wrote…

It's not there in terms of efficiency. They should be pretty similar in that regard (most efficient would just be duplication of the loop, but still really negligible for our use case). I Just like this style better and I think this avoids polluting the loop with a logic that could be decided earlier on in the run (it's pretty standard practice to have different methods do different things based on some branch logic, just here there's no need to define them outside the func scope and the logic is pretty "thin").

I disagree - the if way is much more readable and straight forward IMO. Anyway as said, not blocking on this if you insist.


vm/src/vm/runners/cairo_runner.rs line 1016 at r4 (raw file):

    // Returns a map from builtin base's segment index to stop_ptr offset
    // Aka the builtin's segment number and its maximum offset

Suggestion:

    /// Returns a map from builtin base's segment index to stop_ptr offset
    /// Aka the builtin's segment number and its maximum offset

vm/src/vm/runners/cairo_runner.rs line 1017 at r4 (raw file):

    // Returns a map from builtin base's segment index to stop_ptr offset
    // Aka the builtin's segment number and its maximum offset
    pub fn get_builtin_segments_info(&self) -> Result<Vec<(usize, usize)>, RunnerError> {

Any reason not to use HashMap?
If there is, please just adjust the doc saying it's a vector mapping these values, not "a map".

Code quote:

<Vec<(usize, usize)>

vm/src/vm/runners/cairo_runner.rs line 3938 at r4 (raw file):

    #[test]
    #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
    fn get_builtin_segments_info_non_proof_mode() {

consider uniting the test using parametrrization


vm/src/vm/runners/cairo_runner.rs line 3952 at r4 (raw file):

        let mut hint_executor = BuiltinHintProcessor::new_empty();
        let runner = cairo_run(program_data, &cairo_run_config, &mut hint_executor).unwrap();
        assert_eq!(runner.get_builtin_segments_info(), Ok(vec![(2, 6)]));

how only a single segment?
Which builtin is it?
Why is it index 2?

  • Same questions for the other test
  • Please reply to those questions in comments.

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/enable_using_secure_run_in_proof_mode branch from 1043f0a to 763901a Compare June 10, 2025 06:28
Copy link
Collaborator Author

@YairVaknin-starkware YairVaknin-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @JulianGCalderon and @yuvalsw)


vm/src/vm/runners/cairo_runner.rs line 1017 at r4 (raw file):

Previously, yuvalsw wrote…

Any reason not to use HashMap?
If there is, please just adjust the doc saying it's a vector mapping these values, not "a map".

No need for random access here, and later used as a tuple in a few places. I don't see a reason to change it.


vm/src/vm/runners/cairo_runner.rs line 3938 at r4 (raw file):

Previously, yuvalsw wrote…

consider uniting the test using parametrrization

they don't have the needed dep. prefer not to add it or create a custom macro for this case.


vm/src/vm/runners/cairo_runner.rs line 3952 at r4 (raw file):

Previously, yuvalsw wrote…

how only a single segment?
Which builtin is it?
Why is it index 2?

  • Same questions for the other test
  • Please reply to those questions in comments.

It's just range check. idx 2 for non proof mode, idx 4 for proof mode since the layout contains some before it, but not used.

Copy link
Collaborator

@yuvalsw yuvalsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @JulianGCalderon and @YairVaknin-starkware)


vm/src/vm/runners/cairo_runner.rs line 3952 at r4 (raw file):

Previously, YairVaknin-starkware wrote…

It's just range check. idx 2 for non proof mode, idx 4 for proof mode since the layout contains some before it, but not used.

ok, but as said - "Please reply to those questions in comments "

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/enable_using_secure_run_in_proof_mode branch from 763901a to 1c65679 Compare June 16, 2025 09:55
@YairVaknin-starkware YairVaknin-starkware merged commit 15de4b2 into starkware-development Jun 16, 2025
92 of 93 checks passed
@YairVaknin-starkware YairVaknin-starkware deleted the yairv/enable_using_secure_run_in_proof_mode branch June 16, 2025 10:45
github-merge-queue bot pushed a commit that referenced this pull request Aug 12, 2025
* Add starkware-development to CI (like another main) (#2025)

* Keep None memory cells for the prover input info (#2021)

* CI: Fix cache not found error (#2026)

* Fix flow notation

* Fix dependency

* Remove dependancy in cairo pie when collectiog builtin segments info (#2022)

* Add Commit Signing section (#2019)

* Add Commit Signing section

* Clarify that this only affects to internal branches

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

---------

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

* use btreemap instead of hashmap for deterministic iteration order. (#2023)

* fill holes is builtins segments

* fill holes is builtins segments

* Added hints felt unpacking for blake (#2032)

This PR is an as-is copy of AlonT's PR pushed to a fork repo.

* add prover input info flag to vm-cli

* set disable trace padding for prover input info

* Add_perp_and_dex_w_bitwise_layouts (#2067)

* Fix_zero_offset_output_base_assumption (#2068)

* add flag to serialize prover input info into binary files

* Use_btreemap_for_deterministic_order_of_pie_keys (#2085)

* [BREAKING] Compute_missing_builtin_cells_only_in_proof_mode (#2088)

* move prover input info to a new seperate file (#2079)

* add trace not enabled error

* add test to filling holes (#2087)

* memory comparision test only for non proof mode cases

* Sync with main (#2116)

* Remove duplicated `get_val` (#2065)

* avoid installing gmp if it is already installed

* revert part of the last commit

* changelog

* remove unwanted file

* CI: Make cache keys depend on Cairo version (#2056)

* 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` (#2039)

* dev: make Memory::get `pub`

* edit changelog

* dev: expose get_maybe_relocatable instead

* add comment on borrowed variant

* add tests

* feat(breaking): add support for hint accessible scopes (#2042)

* 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]>

* feat: add support for alias identifiers destination in program serde (#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 (#2062)

* 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]>

* docs: add --run_from_cairo_pie documentation for Cairo 0 and Cairo 1 (#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]>

* Fix WRITE_DIVMOD_SEGMENT hint (#2078)

* Minor fixes - use CAIRO_PRIME

* Add error handling

* Update CHANGELOG.md

* Bump cairo-lang to 0.13.5 (#1959)

* 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

* Prepare for Release v3.0.0-rc.1 (#2092)

* Update version

* Update lock

* Update toolchain

* Update changelog

* Fix clippy

* Update toolchain in CI

* fix: correct cache keys for no-std test coverage in CI (#2093)

* Update rust.yml

* Update rust.yml

* Update rust toolchain to 1.87.0 (#2100)

* update rust toolchain to 1.87.0

* remove uneeded file

* update rust in workflows

* update changelog

* clippy

* clippy

* remove unneeded clippy allow

* fix Changelog link (#2104)

* Improve memory_segments coverage (#2110)

* Add tests for .gen_arg() and .write_arg()

* Add test for .is_valid_memory_value()

* Assert contents of memory segments

---------

Co-authored-by: Franco Giachetta <[email protected]>
Co-authored-by: Julian Gonzalez Calderon <[email protected]>
Co-authored-by: Mathieu <[email protected]>
Co-authored-by: VolodymyrBg <[email protected]>
Co-authored-by: GarmashAlex <[email protected]>
Co-authored-by: crStiv <[email protected]>
Co-authored-by: DiegoC <[email protected]>

* Revert "Sync with main (#2116)" (#2117)

This reverts commit 7269a8f.

* Bump cairo-lang to 0.13.5 (#1959) (#2118)

* 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

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

* Enable_using_secure_run_in_proof_mode (#2113)

* take ownershop instad of clone

* Fixed bad submodule (#2131)

* Added support for large files in PIE (#2136)

* [starkware-development] Pin types-rs version to the one set in lockfile (#2142)

* Update changelog

* Pin types-rs version

* Include_output_builtin_in_prover_input_info (#2138)

* add relocate trace flag to the runner

* remove prover input info struct and add getters instead (#2149)

* Use_BTreeMap_in_pie_additional_data (#2162)

---------

Co-authored-by: Julian Gonzalez Calderon <[email protected]>
Co-authored-by: Gabriel Bosio <[email protected]>
Co-authored-by: Franco Giachetta <[email protected]>
Co-authored-by: yuvalsw <[email protected]>
Co-authored-by: YairVaknin-starkware <[email protected]>
Co-authored-by: Mathieu <[email protected]>
Co-authored-by: VolodymyrBg <[email protected]>
Co-authored-by: GarmashAlex <[email protected]>
Co-authored-by: crStiv <[email protected]>
Co-authored-by: DiegoC <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Aug 13, 2025
* Add starkware-development to CI (like another main) (#2025)

* Keep None memory cells for the prover input info (#2021)

* CI: Fix cache not found error (#2026)

* Fix flow notation

* Fix dependency

* Remove dependancy in cairo pie when collectiog builtin segments info (#2022)

* Add Commit Signing section (#2019)

* Add Commit Signing section

* Clarify that this only affects to internal branches

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

---------

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

* use btreemap instead of hashmap for deterministic iteration order. (#2023)

* fill holes is builtins segments

* fill holes is builtins segments

* Added hints felt unpacking for blake (#2032)

This PR is an as-is copy of AlonT's PR pushed to a fork repo.

* add prover input info flag to vm-cli

* set disable trace padding for prover input info

* Add_perp_and_dex_w_bitwise_layouts (#2067)

* Fix_zero_offset_output_base_assumption (#2068)

* add flag to serialize prover input info into binary files

* Use_btreemap_for_deterministic_order_of_pie_keys (#2085)

* [BREAKING] Compute_missing_builtin_cells_only_in_proof_mode (#2088)

* move prover input info to a new seperate file (#2079)

* add trace not enabled error

* add test to filling holes (#2087)

* memory comparision test only for non proof mode cases

* Sync with main (#2116)

* Remove duplicated `get_val` (#2065)

* avoid installing gmp if it is already installed

* revert part of the last commit

* changelog

* remove unwanted file

* CI: Make cache keys depend on Cairo version (#2056)

* 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` (#2039)

* dev: make Memory::get `pub`

* edit changelog

* dev: expose get_maybe_relocatable instead

* add comment on borrowed variant

* add tests

* feat(breaking): add support for hint accessible scopes (#2042)

* 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]>

* feat: add support for alias identifiers destination in program serde (#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 (#2062)

* 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]>

* docs: add --run_from_cairo_pie documentation for Cairo 0 and Cairo 1 (#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]>

* Fix WRITE_DIVMOD_SEGMENT hint (#2078)

* Minor fixes - use CAIRO_PRIME

* Add error handling

* Update CHANGELOG.md

* Bump cairo-lang to 0.13.5 (#1959)

* 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

* Prepare for Release v3.0.0-rc.1 (#2092)

* Update version

* Update lock

* Update toolchain

* Update changelog

* Fix clippy

* Update toolchain in CI

* fix: correct cache keys for no-std test coverage in CI (#2093)

* Update rust.yml

* Update rust.yml

* Update rust toolchain to 1.87.0 (#2100)

* update rust toolchain to 1.87.0

* remove uneeded file

* update rust in workflows

* update changelog

* clippy

* clippy

* remove unneeded clippy allow

* fix Changelog link (#2104)

* Improve memory_segments coverage (#2110)

* Add tests for .gen_arg() and .write_arg()

* Add test for .is_valid_memory_value()

* Assert contents of memory segments

---------

Co-authored-by: Franco Giachetta <[email protected]>
Co-authored-by: Julian Gonzalez Calderon <[email protected]>
Co-authored-by: Mathieu <[email protected]>
Co-authored-by: VolodymyrBg <[email protected]>
Co-authored-by: GarmashAlex <[email protected]>
Co-authored-by: crStiv <[email protected]>
Co-authored-by: DiegoC <[email protected]>

* Revert "Sync with main (#2116)" (#2117)

This reverts commit 7269a8f.

* Bump cairo-lang to 0.13.5 (#1959) (#2118)

* 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

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

* Enable_using_secure_run_in_proof_mode (#2113)

* take ownershop instad of clone

* Fixed bad submodule (#2131)

* Added support for large files in PIE (#2136)

* [starkware-development] Pin types-rs version to the one set in lockfile (#2142)

* Update changelog

* Pin types-rs version

* Include_output_builtin_in_prover_input_info (#2138)

* add relocate trace flag to the runner

* remove prover input info struct and add getters instead (#2149)

* Use_BTreeMap_in_pie_additional_data (#2162)

* Update CHANGELOG for previous PR

---------

Co-authored-by: Julian Gonzalez Calderon <[email protected]>
Co-authored-by: Stavbe <[email protected]>
Co-authored-by: Franco Giachetta <[email protected]>
Co-authored-by: yuvalsw <[email protected]>
Co-authored-by: YairVaknin-starkware <[email protected]>
Co-authored-by: Mathieu <[email protected]>
Co-authored-by: VolodymyrBg <[email protected]>
Co-authored-by: GarmashAlex <[email protected]>
Co-authored-by: crStiv <[email protected]>
Co-authored-by: DiegoC <[email protected]>
gabrielbosio added a commit that referenced this pull request Aug 13, 2025
* Add starkware-development to CI (like another main) (#2025)

* Keep None memory cells for the prover input info (#2021)

* CI: Fix cache not found error (#2026)

* Fix flow notation

* Fix dependency

* Remove dependancy in cairo pie when collectiog builtin segments info (#2022)

* Add Commit Signing section (#2019)

* Add Commit Signing section

* Clarify that this only affects to internal branches

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

---------

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

* use btreemap instead of hashmap for deterministic iteration order. (#2023)

* fill holes is builtins segments

* fill holes is builtins segments

* Added hints felt unpacking for blake (#2032)

This PR is an as-is copy of AlonT's PR pushed to a fork repo.

* add prover input info flag to vm-cli

* set disable trace padding for prover input info

* Add_perp_and_dex_w_bitwise_layouts (#2067)

* Fix_zero_offset_output_base_assumption (#2068)

* add flag to serialize prover input info into binary files

* Use_btreemap_for_deterministic_order_of_pie_keys (#2085)

* [BREAKING] Compute_missing_builtin_cells_only_in_proof_mode (#2088)

* move prover input info to a new seperate file (#2079)

* add trace not enabled error

* add test to filling holes (#2087)

* memory comparision test only for non proof mode cases

* Sync with main (#2116)

* Remove duplicated `get_val` (#2065)

* avoid installing gmp if it is already installed

* revert part of the last commit

* changelog

* remove unwanted file

* CI: Make cache keys depend on Cairo version (#2056)

* 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` (#2039)

* dev: make Memory::get `pub`

* edit changelog

* dev: expose get_maybe_relocatable instead

* add comment on borrowed variant

* add tests

* feat(breaking): add support for hint accessible scopes (#2042)

* 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]>

* feat: add support for alias identifiers destination in program serde (#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 (#2062)

* 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]>

* docs: add --run_from_cairo_pie documentation for Cairo 0 and Cairo 1 (#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]>

* Fix WRITE_DIVMOD_SEGMENT hint (#2078)

* Minor fixes - use CAIRO_PRIME

* Add error handling

* Update CHANGELOG.md

* Bump cairo-lang to 0.13.5 (#1959)

* 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

* Prepare for Release v3.0.0-rc.1 (#2092)

* Update version

* Update lock

* Update toolchain

* Update changelog

* Fix clippy

* Update toolchain in CI

* fix: correct cache keys for no-std test coverage in CI (#2093)

* Update rust.yml

* Update rust.yml

* Update rust toolchain to 1.87.0 (#2100)

* update rust toolchain to 1.87.0

* remove uneeded file

* update rust in workflows

* update changelog

* clippy

* clippy

* remove unneeded clippy allow

* fix Changelog link (#2104)

* Improve memory_segments coverage (#2110)

* Add tests for .gen_arg() and .write_arg()

* Add test for .is_valid_memory_value()

* Assert contents of memory segments

---------

Co-authored-by: Franco Giachetta <[email protected]>
Co-authored-by: Julian Gonzalez Calderon <[email protected]>
Co-authored-by: Mathieu <[email protected]>
Co-authored-by: VolodymyrBg <[email protected]>
Co-authored-by: GarmashAlex <[email protected]>
Co-authored-by: crStiv <[email protected]>
Co-authored-by: DiegoC <[email protected]>

* Revert "Sync with main (#2116)" (#2117)

This reverts commit 7269a8f.

* Bump cairo-lang to 0.13.5 (#1959) (#2118)

* 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

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

* Enable_using_secure_run_in_proof_mode (#2113)

* take ownershop instad of clone

* Fixed bad submodule (#2131)

* Added support for large files in PIE (#2136)

* [starkware-development] Pin types-rs version to the one set in lockfile (#2142)

* Update changelog

* Pin types-rs version

* Include_output_builtin_in_prover_input_info (#2138)

* add relocate trace flag to the runner

* remove prover input info struct and add getters instead (#2149)

* Use_BTreeMap_in_pie_additional_data (#2162)

* Update CHANGELOG for previous PR

---------

Co-authored-by: Julian Gonzalez Calderon <[email protected]>
Co-authored-by: Stavbe <[email protected]>
Co-authored-by: Franco Giachetta <[email protected]>
Co-authored-by: yuvalsw <[email protected]>
Co-authored-by: YairVaknin-starkware <[email protected]>
Co-authored-by: Mathieu <[email protected]>
Co-authored-by: VolodymyrBg <[email protected]>
Co-authored-by: GarmashAlex <[email protected]>
Co-authored-by: crStiv <[email protected]>
Co-authored-by: DiegoC <[email protected]>
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.

3 participants