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
485 stars 132 forks source link

Add `EXCESS_BALANCE` hint & Bump Rust to 1.74 (base 0.9.x) #1786

Closed fmoletta closed 3 weeks ago

fmoletta commented 4 weeks ago

Includes changes from #1777 but based on latest 0.9 release Also bumps rust to 1.74

github-actions[bot] commented 4 weeks ago

Benchmark Results for unmodified programs :rocket:

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.649 ± 0.023 2.623 2.700 1.11 ± 0.02
head big_factorial 2.391 ± 0.026 2.361 2.438 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.216 ± 0.008 2.205 2.232 1.11 ± 0.01
head big_fibonacci 1.999 ± 0.013 1.981 2.020 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 6.256 ± 0.037 6.213 6.325 1.08 ± 0.01
head blake2s_integration_benchmark 5.767 ± 0.046 5.692 5.833 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.320 ± 0.021 2.306 2.376 1.11 ± 0.01
head compare_arrays_200000 2.088 ± 0.012 2.071 2.110 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.624 ± 0.015 1.610 1.656 1.08 ± 0.01
head dict_integration_benchmark 1.508 ± 0.012 1.491 1.533 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.080 ± 0.004 1.074 1.085 1.07 ± 0.01
head field_arithmetic_get_square_benchmark 1.013 ± 0.009 0.995 1.029 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 6.261 ± 0.043 6.211 6.352 1.09 ± 0.01
head integration_builtins 5.729 ± 0.060 5.658 5.818 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 6.371 ± 0.041 6.324 6.456 1.09 ± 0.01
head keccak_integration_benchmark 5.862 ± 0.048 5.803 5.964 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.351 ± 0.017 2.322 2.389 1.13 ± 0.01
head linear_search 2.076 ± 0.010 2.065 2.090 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.594 ± 0.007 1.577 1.600 1.11 ± 0.02
head math_cmp_and_pow_integration_benchmark 1.442 ± 0.024 1.421 1.503 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.504 ± 0.006 1.493 1.512 1.09 ± 0.01
head math_integration_benchmark 1.382 ± 0.007 1.375 1.398 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.332 ± 0.006 1.320 1.341 1.08 ± 0.01
head memory_integration_benchmark 1.234 ± 0.011 1.223 1.262 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.468 ± 0.012 1.458 1.500 1.08 ± 0.02
head operations_with_data_structures_benchmarks 1.363 ± 0.016 1.346 1.404 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 590.6 ± 1.4 589.0 593.7 1.09 ± 0.01
head pedersen 543.5 ± 2.4 540.0 548.2 1.00
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.165 ± 0.009 1.157 1.188 1.10 ± 0.01
head poseidon_integration_benchmark 1.063 ± 0.011 1.054 1.090 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.054 ± 0.018 2.031 2.094 1.10 ± 0.01
head secp_integration_benchmark 1.865 ± 0.016 1.846 1.887 1.00
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.166 ± 0.013 1.155 1.197 1.03 ± 0.01
head set_integration_benchmark 1.135 ± 0.008 1.125 1.149 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 3.987 ± 0.043 3.954 4.093 1.10 ± 0.02
head uint256_integration_benchmark 3.609 ± 0.031 3.572 3.680 1.00
codecov[bot] commented 4 weeks ago

Codecov Report

Attention: Patch coverage is 97.60956% with 24 lines in your changes missing coverage. Please review.

Please upload report for BASE (releases/0.9.X@8ab4471). Learn more about missing BASE report.

Files Patch % Lines
...processor/builtin_hint_processor/excess_balance.rs 98.68% 13 Missing :warning:
...int_processor/builtin_hint_processor_definition.rs 14.28% 6 Missing :warning:
...t_processor/builtin_hint_processor/dict_manager.rs 57.14% 3 Missing :warning:
vm/src/serde/deserialize_program.rs 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## releases/0.9.X #1786 +/- ## ================================================= Coverage ? 97.39% ================================================= Files ? 95 Lines ? 40367 Branches ? 0 ================================================= Hits ? 39316 Misses ? 1051 Partials ? 0 ```

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