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

Add `air_public_input` flag to cairo1-run #1539

Closed fmoletta closed 8 months ago

fmoletta commented 8 months ago

Air Public Input can now be obtained from cairo 1 proof_mode runs

codecov[bot] commented 8 months ago

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (352e8a8) 97.21% compared to head (5c19b3b) 97.22%.

Files Patch % Lines
cairo1-run/src/main.rs 87.23% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1539 +/- ## ======================================= Coverage 97.21% 97.22% ======================================= Files 91 91 Lines 36990 37048 +58 ======================================= + Hits 35961 36020 +59 + Misses 1029 1028 -1 ```

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

github-actions[bot] commented 8 months ago

Benchmark Results for unmodified programs :rocket:

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.269 ± 0.022 2.243 2.319 1.00
head big_factorial 2.270 ± 0.028 2.243 2.325 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.241 ± 0.018 2.211 2.274 1.00 ± 0.01
head big_fibonacci 2.237 ± 0.012 2.225 2.267 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 8.281 ± 0.076 8.181 8.409 1.01 ± 0.01
head blake2s_integration_benchmark 8.215 ± 0.072 8.129 8.319 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.285 ± 0.008 2.271 2.300 1.00
head compare_arrays_200000 2.306 ± 0.016 2.279 2.325 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.461 ± 0.010 1.451 1.482 1.01 ± 0.01
head dict_integration_benchmark 1.449 ± 0.008 1.434 1.461 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.296 ± 0.010 1.286 1.320 1.00 ± 0.01
head field_arithmetic_get_square_benchmark 1.296 ± 0.011 1.281 1.312 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 8.327 ± 0.084 8.204 8.428 1.02 ± 0.01
head integration_builtins 8.201 ± 0.058 8.144 8.331 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.531 ± 0.073 8.456 8.697 1.00 ± 0.01
head keccak_integration_benchmark 8.502 ± 0.083 8.412 8.650 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.352 ± 0.025 2.319 2.386 1.00
head linear_search 2.363 ± 0.013 2.350 2.394 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.632 ± 0.010 1.620 1.645 1.01 ± 0.01
head math_cmp_and_pow_integration_benchmark 1.621 ± 0.017 1.605 1.647 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.475 ± 0.008 1.464 1.488 1.01 ± 0.01
head math_integration_benchmark 1.462 ± 0.006 1.456 1.471 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.275 ± 0.009 1.262 1.288 1.00
head memory_integration_benchmark 1.276 ± 0.012 1.266 1.306 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.645 ± 0.008 1.634 1.658 1.01 ± 0.01
head operations_with_data_structures_benchmarks 1.629 ± 0.012 1.616 1.654 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 607.9 ± 3.1 604.8 614.6 1.00
head pedersen 608.8 ± 3.9 604.8 617.4 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.079 ± 0.010 1.070 1.104 1.00
head poseidon_integration_benchmark 1.082 ± 0.003 1.076 1.086 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.958 ± 0.010 1.945 1.976 1.01 ± 0.01
head secp_integration_benchmark 1.930 ± 0.007 1.920 1.944 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 779.9 ± 1.7 778.0 783.3 1.00 ± 0.01
head set_integration_benchmark 779.3 ± 4.6 774.2 789.7 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.634 ± 0.038 4.587 4.689 1.02 ± 0.01
head uint256_integration_benchmark 4.558 ± 0.028 4.526 4.629 1.00