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
508 stars 142 forks source link

[Cairo1] Add a test to check that the output segment contains the return values when running in proof-mode #1602

Closed fmoletta closed 7 months ago

fmoletta commented 7 months ago

Tests the behaviour added in #1593 Depends on refactor done in #1601

github-actions[bot] commented 7 months ago

Benchmark Results for unmodified programs :rocket:

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.263 ± 0.017 2.246 2.296 1.00
head big_factorial 2.313 ± 0.043 2.276 2.426 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.264 ± 0.044 2.231 2.379 1.00
head big_fibonacci 2.277 ± 0.020 2.255 2.322 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 8.265 ± 0.077 8.186 8.371 1.00 ± 0.01
head blake2s_integration_benchmark 8.255 ± 0.090 8.173 8.393 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.296 ± 0.020 2.279 2.328 1.00
head compare_arrays_200000 2.320 ± 0.027 2.295 2.379 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.468 ± 0.011 1.457 1.497 1.00 ± 0.01
head dict_integration_benchmark 1.462 ± 0.011 1.445 1.476 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.297 ± 0.012 1.286 1.321 1.00
head field_arithmetic_get_square_benchmark 1.308 ± 0.011 1.287 1.323 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 8.332 ± 0.086 8.242 8.485 1.00
head integration_builtins 8.343 ± 0.088 8.256 8.479 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.515 ± 0.030 8.482 8.566 1.00
head keccak_integration_benchmark 8.568 ± 0.075 8.490 8.701 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.338 ± 0.017 2.324 2.368 1.00
head linear_search 2.386 ± 0.024 2.353 2.424 1.02 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.594 ± 0.025 1.581 1.665 1.00
head math_cmp_and_pow_integration_benchmark 1.601 ± 0.004 1.598 1.610 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.450 ± 0.004 1.444 1.455 1.00
head math_integration_benchmark 1.463 ± 0.006 1.453 1.473 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.267 ± 0.014 1.254 1.294 1.00
head memory_integration_benchmark 1.285 ± 0.008 1.271 1.293 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.624 ± 0.007 1.616 1.641 1.00 ± 0.01
head operations_with_data_structures_benchmarks 1.616 ± 0.006 1.608 1.630 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 605.2 ± 3.3 602.8 613.1 1.00
head pedersen 608.9 ± 3.8 604.9 618.4 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.074 ± 0.013 1.065 1.104 1.00 ± 0.01
head poseidon_integration_benchmark 1.070 ± 0.004 1.065 1.076 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.931 ± 0.010 1.918 1.953 1.00 ± 0.01
head secp_integration_benchmark 1.929 ± 0.006 1.925 1.943 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 775.9 ± 1.7 773.4 778.5 1.00
head set_integration_benchmark 781.7 ± 8.0 776.1 800.5 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.562 ± 0.032 4.530 4.618 1.00
head uint256_integration_benchmark 4.627 ± 0.055 4.579 4.755 1.01 ± 0.01
codecov[bot] commented 7 months ago

Codecov Report

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

Comparison is base (7abbb39) 97.13% compared to head (2442a1c) 97.16%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1602 +/- ## ========================================== + Coverage 97.13% 97.16% +0.03% ========================================== Files 92 92 Lines 37347 37369 +22 ========================================== + Hits 36276 36309 +33 + Misses 1071 1060 -11 ```

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