Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement air_private_input #1552

Merged
merged 36 commits into from
Jan 15, 2024
Merged

Implement air_private_input #1552

merged 36 commits into from
Jan 15, 2024

Conversation

fmoletta
Copy link
Contributor

@fmoletta fmoletta commented Jan 9, 2024

Adds CairoRunner::get_air_public_input method which outputs a compact AirPrivateInput struct with all builtin's private inputs, which can be converted to an AirPrivateInputSerializable struct that also contains the memory and trace file paths, and matches the file output of the python vm when serialized.
Adds air_private_input flag to cli

Copy link

github-actions bot commented Jan 10, 2024

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.171 ± 0.007 2.161 2.185 1.00
head big_factorial 2.268 ± 0.017 2.247 2.298 1.04 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.133 ± 0.020 2.101 2.161 1.00
head big_fibonacci 2.233 ± 0.023 2.213 2.267 1.05 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.818 ± 0.063 7.766 7.934 1.00
head blake2s_integration_benchmark 8.188 ± 0.090 8.096 8.310 1.05 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.194 ± 0.014 2.181 2.221 1.00
head compare_arrays_200000 2.279 ± 0.022 2.250 2.315 1.04 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.402 ± 0.011 1.391 1.422 1.00
head dict_integration_benchmark 1.439 ± 0.013 1.429 1.470 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.243 ± 0.008 1.230 1.255 1.00
head field_arithmetic_get_square_benchmark 1.289 ± 0.010 1.276 1.305 1.04 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 7.901 ± 0.085 7.821 8.112 1.00
head integration_builtins 8.274 ± 0.079 8.174 8.382 1.05 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.175 ± 0.047 8.111 8.215 1.00
head keccak_integration_benchmark 8.512 ± 0.075 8.415 8.627 1.04 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.231 ± 0.015 2.220 2.269 1.00
head linear_search 2.313 ± 0.026 2.292 2.373 1.04 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.520 ± 0.014 1.512 1.560 1.00
head math_cmp_and_pow_integration_benchmark 1.586 ± 0.013 1.572 1.613 1.04 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.388 ± 0.007 1.379 1.400 1.00
head math_integration_benchmark 1.447 ± 0.009 1.435 1.464 1.04 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.211 ± 0.002 1.207 1.213 1.00
head memory_integration_benchmark 1.252 ± 0.010 1.239 1.268 1.03 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.561 ± 0.006 1.551 1.573 1.00
head operations_with_data_structures_benchmarks 1.629 ± 0.011 1.620 1.652 1.04 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 596.3 ± 3.0 592.6 600.7 1.00
head pedersen 605.9 ± 2.2 602.9 610.0 1.02 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.065 ± 0.007 1.059 1.083 1.00
head poseidon_integration_benchmark 1.075 ± 0.003 1.072 1.082 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.891 ± 0.004 1.887 1.899 1.00
head secp_integration_benchmark 1.935 ± 0.006 1.928 1.945 1.02 ± 0.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 762.3 ± 1.2 760.5 764.5 1.00
head set_integration_benchmark 772.1 ± 3.1 767.8 777.4 1.01 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.381 ± 0.032 4.335 4.432 1.00
head uint256_integration_benchmark 4.523 ± 0.027 4.495 4.571 1.03 ± 0.01

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

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

Comparison is base (8b9aabe) 97.21% compared to head (b20da7d) 97.21%.
Report is 2 commits behind head on main.

Files Patch % Lines
vm/src/vm/runners/builtin_runner/bitwise.rs 96.72% 2 Missing ⚠️
vm/src/vm/runners/builtin_runner/ec_op.rs 95.83% 2 Missing ⚠️
vm/src/vm/runners/builtin_runner/keccak.rs 97.05% 2 Missing ⚠️
vm/src/vm/runners/builtin_runner/poseidon.rs 96.42% 2 Missing ⚠️
vm/src/vm/runners/builtin_runner/range_check.rs 93.75% 2 Missing ⚠️
cairo1-run/src/main.rs 98.24% 1 Missing ⚠️
vm/src/air_private_input.rs 97.82% 1 Missing ⚠️
vm/src/types/relocatable.rs 80.00% 1 Missing ⚠️
vm/src/vm/runners/builtin_runner/hash.rs 98.18% 1 Missing ⚠️
vm/src/vm/runners/builtin_runner/signature.rs 96.29% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #1552    +/-   ##
========================================
  Coverage   97.21%   97.21%            
========================================
  Files          90       91     +1     
  Lines       36452    36990   +538     
========================================
+ Hits        35437    35961   +524     
- Misses       1015     1029    +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fmoletta fmoletta changed the title [WIP] Implement air_private_input Implement air_private_input Jan 11, 2024
@fmoletta fmoletta marked this pull request as draft January 11, 2024 19:46
@fmoletta fmoletta changed the base branch from main to update-symlinks January 11, 2024 20:24
@fmoletta fmoletta marked this pull request as ready for review January 11, 2024 20:45
juanbono
juanbono previously approved these changes Jan 15, 2024
Base automatically changed from update-symlinks to main January 15, 2024 15:55
@Oppen Oppen dismissed juanbono’s stale review January 15, 2024 15:55

The base branch was changed.

Oppen
Oppen previously approved these changes Jan 15, 2024
@Oppen Oppen enabled auto-merge January 15, 2024 16:03
juanbono
juanbono previously approved these changes Jan 15, 2024
@fmoletta fmoletta dismissed stale reviews from juanbono and Oppen via b20da7d January 15, 2024 16:36
@Oppen Oppen added this pull request to the merge queue Jan 15, 2024
Merged via the queue into main with commit 352e8a8 Jan 15, 2024
50 checks passed
@Oppen Oppen deleted the air_private_input branch January 15, 2024 17:31
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