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

Add entry point info to AotContractExecutor #889

Merged
merged 3 commits into from
Oct 28, 2024

Conversation

edg-l
Copy link
Collaborator

@edg-l edg-l commented Oct 28, 2024

This also allows us to filter out methods that are not contract entry points, making the JSON file significantly smaller.

Depends on #875

Fixes #885

Checklist

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

@edg-l edg-l changed the base branch from main to revert_revert October 28, 2024 09:38
Copy link

Benchmarking results

Benchmark for program factorial_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 10.589 ± 0.224 10.366 10.998 23.11 ± 0.49
cairo-native (embedded AOT) 3.151 ± 0.025 3.128 3.210 6.88 ± 0.06
cairo-native (embedded JIT using LLVM's ORC Engine) 3.168 ± 0.022 3.123 3.191 6.91 ± 0.05
cairo-native (standalone AOT) 0.651 ± 0.001 0.648 0.652 1.42 ± 0.00
cairo-native (standalone AOT with -march=native) 0.458 ± 0.001 0.457 0.460 1.00

Benchmark for program fib_2M

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 10.713 ± 0.250 10.365 10.936 1337.53 ± 32.83
cairo-native (embedded AOT) 2.663 ± 0.017 2.643 2.689 332.44 ± 3.25
cairo-native (embedded JIT using LLVM's ORC Engine) 2.717 ± 0.017 2.684 2.737 339.27 ± 3.28
cairo-native (standalone AOT) 0.008 ± 0.000 0.008 0.008 1.00 ± 0.01
cairo-native (standalone AOT with -march=native) 0.008 ± 0.000 0.008 0.009 1.00

Benchmark for program logistic_map

Open benchmarks
Command Mean [s] Min [s] Max [s] Relative
Cairo-vm (Rust, Cairo 1) 4.248 ± 0.035 4.195 4.309 59.52 ± 0.55
cairo-native (embedded AOT) 2.846 ± 0.024 2.812 2.889 39.87 ± 0.38
cairo-native (embedded JIT using LLVM's ORC Engine) 2.988 ± 0.017 2.953 3.014 41.86 ± 0.29
cairo-native (standalone AOT) 0.115 ± 0.001 0.114 0.121 1.61 ± 0.02
cairo-native (standalone AOT with -march=native) 0.071 ± 0.000 0.071 0.073 1.00

Copy link

Benchmark results Main vs HEAD.

Command Mean [s] Min [s] Max [s] Relative
head factorial_2M.cairo (JIT) 3.305 ± 0.026 3.273 3.348 1.00 ± 0.01
base factorial_2M.cairo (JIT) 3.341 ± 0.028 3.293 3.373 1.01 ± 0.01
head factorial_2M.cairo (AOT) 3.293 ± 0.017 3.261 3.318 1.00
base factorial_2M.cairo (AOT) 3.308 ± 0.015 3.285 3.330 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
head fib_2M.cairo (JIT) 2.856 ± 0.032 2.799 2.907 1.01 ± 0.01
base fib_2M.cairo (JIT) 2.906 ± 0.023 2.858 2.932 1.03 ± 0.01
head fib_2M.cairo (AOT) 2.832 ± 0.023 2.797 2.867 1.00
base fib_2M.cairo (AOT) 2.844 ± 0.016 2.823 2.876 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
head logistic_map.cairo (JIT) 3.164 ± 0.022 3.136 3.197 1.05 ± 0.01
base logistic_map.cairo (JIT) 3.202 ± 0.027 3.172 3.255 1.06 ± 0.01
head logistic_map.cairo (AOT) 3.021 ± 0.029 2.987 3.069 1.00
base logistic_map.cairo (AOT) 3.035 ± 0.021 3.002 3.071 1.00 ± 0.01

@edg-l edg-l marked this pull request as ready for review October 28, 2024 10:15
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 97.56098% with 2 lines in your changes missing coverage. Please review.

Project coverage is 82.86%. Comparing base (b566791) to head (17e00e8).

Files with missing lines Patch % Lines
src/executor/contract.rs 95.12% 2 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           revert_revert     #889      +/-   ##
=================================================
+ Coverage          82.83%   82.86%   +0.03%     
=================================================
  Files                120      120              
  Lines              35236    35307      +71     
=================================================
+ Hits               29187    29258      +71     
  Misses              6049     6049              

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

@edg-l edg-l merged commit f2b7d32 into revert_revert Oct 28, 2024
25 of 26 checks passed
@edg-l edg-l deleted the add_entry_point_info branch October 28, 2024 13:58
github-merge-queue bot pushed a commit that referenced this pull request Nov 11, 2024
* Revert "Revert builtin cost rework (#874)"

This reverts commit 355c250.

* x

* fix gas

* add paralel test

* Add entry point info to AotContractExecutor (#889)

* store entry point info, optimize abi storage

* use felt

* update hash

* upd replay

* try with thread local

* try to fix with thread local in runtime2

* fix

* upd ref ci

* upd replay

* fix macos

* try to fix macos

* try to fix bench

* fix

* try to fix bench ci

* save space

* upd rev

* try to fix broken pipe

* try to fix bench on ci

* remove all features

* add cache key

* update replay rev

* fix cargo.lock

* Revert "update replay rev"

This reverts commit 40f1acc.

* fix cargo.lock

* works with leaks

* fix

* upd replay

* fix bench

* Reorder deps

---------

Co-authored-by: Pedro Fontana <[email protected]>
Co-authored-by: Franco Giachetta <[email protected]>
Co-authored-by: Julián González Calderón <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Nov 15, 2024
* Revert "Revert builtin cost rework (#874)"

This reverts commit 355c250.

* x

* fix gas

* add paralel test

* Add entry point info to AotContractExecutor (#889)

* store entry point info, optimize abi storage

* use felt

* update hash

* upd replay

* try with thread local

* try to fix with thread local in runtime2

* fix

* upd ref ci

* upd replay

* fix macos

* try to fix macos

* try to fix bench

* fix

* try to fix bench ci

* save space

* upd rev

* try to fix broken pipe

* try to fix bench on ci

* remove all features

* add cache key

* update replay rev

* fix cargo.lock

* Revert "update replay rev"

This reverts commit 40f1acc.

* fix cargo.lock

* works with leaks

* fix

* upd replay

* fix bench

* Reorder deps

* start porting gas to u64

* u64 on syscalls

* fix

* Fix benches.

* clippy

* fix gas refund

* fmt

* fix

* fix get gas

* update resource bounds

* upd ci

* upd replay

* fix ci

* try

* fix align

* fix bench pr

* better fix for u256

* upd replay

* upd replay

* fix

* remove dbg!

* upd replay

* fix

* Revert conversion of `ResourceBounds` field type.

* Update sequencer revision (for CI runs).

* Update replay dependency.

* read invoke data end pad

* upd ci

---------

Co-authored-by: Pedro Fontana <[email protected]>
Co-authored-by: Franco Giachetta <[email protected]>
Co-authored-by: Julián González Calderón <[email protected]>
Co-authored-by: Esteve Soler Arderiu <[email protected]>
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.

2 participants