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

Bump to 2.6.3 + Remove gas checks #1709

Merged
merged 30 commits into from
Apr 25, 2024
Merged

Conversation

fmoletta
Copy link
Member

@fmoletta fmoletta commented Apr 12, 2024

Description

With the following changes the programs that use Poseidon and Pedersen can be compiled, proved and verified correctly.

Changes

  • Updated compiler and corelib version to 2.6.3
  • Calculate metadata with calc_metadata_ap_change_only
  • Use new SierraToCasmConfig feature to disable gas checks. Also use theskip_auto_withdraw_gas flag to false.
  • Use of modified poseidon_hash_span (from corelib) without call to core::gas::withdraw_gas_all(builtin_costs).expect('Out of gas');

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

Copy link

github-actions bot commented Apr 12, 2024

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.372 ± 0.033 2.342 2.446 1.00
head big_factorial 2.384 ± 0.054 2.349 2.488 1.00 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.338 ± 0.067 2.297 2.527 1.01 ± 0.03
head big_fibonacci 2.321 ± 0.021 2.288 2.346 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 8.624 ± 0.220 8.471 9.077 1.01 ± 0.03
head blake2s_integration_benchmark 8.537 ± 0.116 8.463 8.855 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.414 ± 0.014 2.394 2.442 1.01 ± 0.01
head compare_arrays_200000 2.395 ± 0.012 2.379 2.422 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.502 ± 0.009 1.489 1.515 1.00
head dict_integration_benchmark 1.517 ± 0.018 1.505 1.562 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.414 ± 0.018 1.402 1.463 1.00
head field_arithmetic_get_square_benchmark 1.441 ± 0.047 1.401 1.523 1.02 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 8.575 ± 0.107 8.506 8.869 1.00
head integration_builtins 8.588 ± 0.133 8.492 8.948 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.739 ± 0.027 8.704 8.804 1.00
head keccak_integration_benchmark 8.805 ± 0.177 8.708 9.301 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.455 ± 0.071 2.424 2.651 1.01 ± 0.03
head linear_search 2.420 ± 0.035 2.404 2.520 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.890 ± 0.016 1.873 1.920 1.00
head math_cmp_and_pow_integration_benchmark 1.892 ± 0.011 1.879 1.917 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.659 ± 0.004 1.655 1.668 1.00
head math_integration_benchmark 1.665 ± 0.008 1.654 1.675 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.328 ± 0.006 1.320 1.339 1.00
head memory_integration_benchmark 1.329 ± 0.004 1.324 1.334 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.945 ± 0.007 1.937 1.958 1.00
head operations_with_data_structures_benchmarks 1.967 ± 0.030 1.946 2.032 1.01 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 562.0 ± 3.9 556.0 569.0 1.00 ± 0.01
head pedersen 561.1 ± 2.4 558.7 566.7 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 998.7 ± 2.2 993.7 1001.9 1.00
head poseidon_integration_benchmark 1009.8 ± 23.6 993.9 1072.0 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.980 ± 0.009 1.971 2.000 1.00 ± 0.01
head secp_integration_benchmark 1.977 ± 0.006 1.968 1.990 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 763.9 ± 2.4 760.4 767.8 1.00 ± 0.01
head set_integration_benchmark 762.4 ± 4.1 756.4 769.4 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.740 ± 0.017 4.721 4.762 1.00
head uint256_integration_benchmark 4.793 ± 0.127 4.717 5.140 1.01 ± 0.03

Copy link

github-actions bot commented Apr 22, 2024

**Hyper Thereading Benchmark results**




hyperfine -r 2 -n "hyper_threading_main threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_main' -n "hyper_threading_pr threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 1
  Time (mean ± σ):     29.851 s ±  0.015 s    [User: 29.120 s, System: 0.730 s]
  Range (min … max):   29.840 s … 29.861 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     29.886 s ±  0.032 s    [User: 29.212 s, System: 0.672 s]
  Range (min … max):   29.864 s … 29.909 s    2 runs
 
Summary
  'hyper_threading_main threads: 1' ran
    1.00 ± 0.00 times faster than 'hyper_threading_pr threads: 1'




hyperfine -r 2 -n "hyper_threading_main threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_main' -n "hyper_threading_pr threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 2
  Time (mean ± σ):     16.013 s ±  0.025 s    [User: 29.615 s, System: 0.734 s]
  Range (min … max):   15.995 s … 16.030 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     16.071 s ±  0.004 s    [User: 29.741 s, System: 0.660 s]
  Range (min … max):   16.068 s … 16.074 s    2 runs
 
Summary
  'hyper_threading_main threads: 2' ran
    1.00 ± 0.00 times faster than 'hyper_threading_pr threads: 2'




hyperfine -r 2 -n "hyper_threading_main threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_main' -n "hyper_threading_pr threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 4
  Time (mean ± σ):     11.663 s ±  0.087 s    [User: 40.069 s, System: 0.965 s]
  Range (min … max):   11.601 s … 11.725 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     11.666 s ±  0.006 s    [User: 40.233 s, System: 0.932 s]
  Range (min … max):   11.662 s … 11.670 s    2 runs
 
Summary
  'hyper_threading_main threads: 4' ran
    1.00 ± 0.01 times faster than 'hyper_threading_pr threads: 4'




hyperfine -r 2 -n "hyper_threading_main threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_main' -n "hyper_threading_pr threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 6
  Time (mean ± σ):     11.225 s ±  0.144 s    [User: 40.580 s, System: 0.935 s]
  Range (min … max):   11.123 s … 11.327 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     11.237 s ±  0.119 s    [User: 40.233 s, System: 0.985 s]
  Range (min … max):   11.153 s … 11.321 s    2 runs
 
Summary
  'hyper_threading_main threads: 6' ran
    1.00 ± 0.02 times faster than 'hyper_threading_pr threads: 6'




hyperfine -r 2 -n "hyper_threading_main threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_main' -n "hyper_threading_pr threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 8
  Time (mean ± σ):     11.021 s ±  0.176 s    [User: 40.607 s, System: 0.923 s]
  Range (min … max):   10.897 s … 11.145 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     10.918 s ±  0.125 s    [User: 40.725 s, System: 0.980 s]
  Range (min … max):   10.830 s … 11.006 s    2 runs
 
Summary
  'hyper_threading_pr threads: 8' ran
    1.01 ± 0.02 times faster than 'hyper_threading_main threads: 8'




hyperfine -r 2 -n "hyper_threading_main threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_main' -n "hyper_threading_pr threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 16
  Time (mean ± σ):     10.855 s ±  0.170 s    [User: 40.919 s, System: 1.004 s]
  Range (min … max):   10.735 s … 10.976 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     11.085 s ±  0.004 s    [User: 41.023 s, System: 0.987 s]
  Range (min … max):   11.083 s … 11.088 s    2 runs
 
Summary
  'hyper_threading_main threads: 16' ran
    1.02 ± 0.02 times faster than 'hyper_threading_pr threads: 16'


@fmoletta fmoletta changed the title [WIP] Bump to 2.6.3 + Remove gas checks Bump to 2.6.3 + Remove gas checks Apr 24, 2024
Copy link

codecov bot commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.80%. Comparing base (bc276ce) to head (cd42d1f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1709      +/-   ##
==========================================
+ Coverage   94.78%   94.80%   +0.02%     
==========================================
  Files         101      101              
  Lines       38731    38719      -12     
==========================================
- Hits        36711    36709       -2     
+ Misses       2020     2010      -10     

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

@fmoletta fmoletta marked this pull request as ready for review April 24, 2024 20:39
@juanbono juanbono enabled auto-merge April 24, 2024 21:06
@pefontana pefontana mentioned this pull request Apr 24, 2024
6 tasks
@juanbono juanbono added this pull request to the merge queue Apr 25, 2024
Merged via the queue into main with commit 2e24b6a Apr 25, 2024
71 checks passed
@juanbono juanbono deleted the fede-update-cairo1-run-no-gas branch April 25, 2024 21:36
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.

None yet

4 participants