lambdaclass / cairo-vm

cairo-vm is a Rust implementation of the Cairo VM. Cairo (CPU Algebraic Intermediate Representation) is a programming language for writing provable programs, where one party can prove to another that a certain computation was executed correctly without the need for this party to re-execute the same program.
https://lambdaclass.github.io/cairo-vm
Apache License 2.0
504 stars 138 forks source link

Run for extra step in proof mode #1652

Closed fmoletta closed 6 months ago

fmoletta commented 6 months ago

Add missing line equivalent to https://github.com/starkware-libs/cairo-lang/blob/efa9648f57568aad8f8a13fbf027d2de7c63c2c0/src/starkware/cairo/lang/vm/cairo_run.py#L343

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.68%. Comparing base (136296a) to head (7fd2e3b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1652 +/- ## ======================================= Coverage 97.68% 97.68% ======================================= Files 91 91 Lines 37654 37660 +6 ======================================= + Hits 36782 36788 +6 Misses 872 872 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 6 months ago

Benchmark Results for unmodified programs :rocket:

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.304 ± 0.047 2.254 2.422 1.00
head big_factorial 2.316 ± 0.037 2.278 2.401 1.00 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.235 ± 0.016 2.217 2.261 1.00
head big_fibonacci 2.297 ± 0.009 2.283 2.316 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 8.501 ± 0.109 8.408 8.762 1.00 ± 0.01
head blake2s_integration_benchmark 8.464 ± 0.046 8.374 8.552 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.348 ± 0.031 2.304 2.421 1.01 ± 0.01
head compare_arrays_200000 2.334 ± 0.012 2.316 2.358 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.462 ± 0.015 1.446 1.490 1.00
head dict_integration_benchmark 1.465 ± 0.027 1.449 1.540 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.315 ± 0.019 1.302 1.366 1.01 ± 0.01
head field_arithmetic_get_square_benchmark 1.306 ± 0.002 1.303 1.308 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 8.513 ± 0.040 8.482 8.621 1.00 ± 0.02
head integration_builtins 8.509 ± 0.125 8.423 8.830 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.740 ± 0.034 8.697 8.805 1.00
head keccak_integration_benchmark 8.764 ± 0.191 8.654 9.291 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.343 ± 0.023 2.318 2.397 1.00
head linear_search 2.347 ± 0.015 2.336 2.386 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.598 ± 0.015 1.581 1.637 1.01 ± 0.01
head math_cmp_and_pow_integration_benchmark 1.589 ± 0.015 1.579 1.627 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.445 ± 0.022 1.421 1.504 1.00
head math_integration_benchmark 1.449 ± 0.021 1.433 1.500 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.279 ± 0.023 1.262 1.333 1.00
head memory_integration_benchmark 1.287 ± 0.023 1.274 1.352 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.620 ± 0.035 1.599 1.718 1.01 ± 0.02
head operations_with_data_structures_benchmarks 1.609 ± 0.018 1.598 1.655 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 593.4 ± 1.7 591.1 595.4 1.00 ± 0.01
head pedersen 592.0 ± 4.1 588.4 603.3 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 981.7 ± 6.6 970.8 990.1 1.00
head poseidon_integration_benchmark 988.9 ± 7.7 982.4 1007.8 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.881 ± 0.023 1.858 1.932 1.00
head secp_integration_benchmark 1.884 ± 0.011 1.874 1.909 1.00 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 694.4 ± 1.6 692.5 697.8 1.00
head set_integration_benchmark 698.7 ± 5.1 695.2 712.4 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.682 ± 0.123 4.630 5.030 1.01 ± 0.03
head uint256_integration_benchmark 4.650 ± 0.009 4.638 4.666 1.00
pefontana commented 6 months ago

Lets merge this into #1653, so we merge the fix and the test together.