-
Notifications
You must be signed in to change notification settings - Fork 43
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
fix storage's values truncations #839
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Code is now correctly formatted. |
FrancoGiachetta
requested review from
edg-l,
igaray,
azteca1998,
jrchatruc,
entropidelic,
fmoletta,
Oppen and
pefontana
as code owners
October 8, 2024 19:17
azteca1998
approved these changes
Oct 8, 2024
edg-l
approved these changes
Oct 8, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #839 +/- ##
==========================================
+ Coverage 88.08% 88.11% +0.03%
==========================================
Files 123 123
Lines 35155 35294 +139
==========================================
+ Hits 30965 31099 +134
- Misses 4190 4195 +5 ☔ View full report in Codecov by Sentry. |
Benchmarking resultsBenchmark for program
|
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
11.386 ± 0.368 | 11.003 | 11.899 | 25.35 ± 0.86 |
cairo-native (embedded AOT) |
3.276 ± 0.019 | 3.247 | 3.309 | 7.30 ± 0.09 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
3.313 ± 0.033 | 3.280 | 3.392 | 7.38 ± 0.11 |
cairo-native (standalone AOT) |
0.674 ± 0.001 | 0.672 | 0.675 | 1.50 ± 0.02 |
cairo-native (standalone AOT with -march=native) |
0.449 ± 0.005 | 0.447 | 0.462 | 1.00 |
Benchmark for program fib_2M
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
11.345 ± 0.272 | 10.939 | 11.687 | 1408.62 ± 34.51 |
cairo-native (embedded AOT) |
2.841 ± 0.015 | 2.826 | 2.864 | 352.71 ± 2.58 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2.863 ± 0.025 | 2.825 | 2.903 | 355.44 ± 3.61 |
cairo-native (standalone AOT) |
0.008 ± 0.000 | 0.008 | 0.009 | 1.04 ± 0.01 |
cairo-native (standalone AOT with -march=native) |
0.008 ± 0.000 | 0.008 | 0.008 | 1.00 |
Benchmark for program logistic_map
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
4.382 ± 0.018 | 4.342 | 4.402 | 61.82 ± 0.28 |
cairo-native (embedded AOT) |
3.158 ± 0.027 | 3.118 | 3.195 | 44.55 ± 0.39 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
3.338 ± 0.028 | 3.295 | 3.385 | 47.08 ± 0.40 |
cairo-native (standalone AOT) |
0.115 ± 0.000 | 0.115 | 0.116 | 1.62 ± 0.00 |
cairo-native (standalone AOT with -march=native) |
0.071 ± 0.000 | 0.071 | 0.071 | 1.00 |
Benchmark results Main vs HEAD.
|
edg-l
added a commit
that referenced
this pull request
Oct 21, 2024
* Add logs * Implement Felt252Dict trace dump * Implement nullabel for trace dump * Print type id * Remove print * add convertion for Sints * fix mispelled types * forgot to add feature * change Sints value to correspond to sierra-emu * Readd feature * Add is_infinity field to secp256 point struct (#828) * add is_infinity to secp point * clean * fix * use same deps as blockifier * fix * fix layout * fix test * remove some brittle asserts due to random initial data when adding and muling points at infinity * fix * remove unused dep * fixes, missed the value entry/output * Reset src * Fix warnings * Make library public * Use debug runtime for trace dump * fix storage's values truncations (#839) * fix storage's values truncations * change implementation for i8 i16 i32 i64 too * format * Add ptr check to felt dict entry * Add malloc tracing and fix more memory leaks. (#833) * Add memory tracing. * Partial memory fixes. * Fix arrays. * Simplify dictionaries. Fix false positive memory leak in dictionary drops. * Fix zero-sized allocation. Fix warnings. More mem tracing checks. * Fix mem tracing. * Fix memory leak in `print` libfunc. * Fix array slice libfunc. * Fix starknet memory leaks. * Fix keccak syscall. * Fix dict get double free bug. * Lots of memory fixes. * More fixes. * Fix CI. * Remove old TODOs. * Fix CI (again). * Remove TODOs. * Fix test. * Maybe fix * Maybe fix * Maybe fix * Dont panic when building circuit partial outputs * trace dump for Sha256StateHandler * Builtin costs rework (#837) * Update to 2.8.4, release docs, alpha This PR updates cairo to 2.8.4, adds some release docs and updates the version to alpha.3 to prepare for another release. * try fix * cleanup ci, remove panic in link * rename from jit to from ptr, etc * crates.io badge * progress * progress * fmt2 * progress * progress * fix * fix bench * use struct * Fix felt252 and enum deserialization bugs. (#844) * Fix felt252 and enum deserialization bugs. * Fix formatting. * Also fix the runtime. * Fix errors. * try to fix ci * remove unused deps --------- Co-authored-by: Edgar Luque <git@edgarluque.com> * Fix trace dump type conv * fix aot contract executor not passing builtinstats (#849) * Fix felt252 and enum deserialization bugs. * Fix formatting. * Also fix the runtime. * Fix errors. * try to fix ci * remove unused deps * fix aot contract executor not passing builtinstats --------- Co-authored-by: Esteve Soler Arderiu <esteve.soler@lambdaclass.com> Co-authored-by: Esteve Soler Arderiu <soler.arderiu@gmail.com> * Fix bug (#851) * Also fix felt bits in starknet syscall wrappers (#853) * Also fix felt bits in starknet syscall wrappers * style * missed * fix aot contract executor not passing builtinstats (#849) * Fix felt252 and enum deserialization bugs. * Fix formatting. * Also fix the runtime. * Fix errors. * try to fix ci * remove unused deps * fix aot contract executor not passing builtinstats --------- Co-authored-by: Esteve Soler Arderiu <esteve.soler@lambdaclass.com> Co-authored-by: Esteve Soler Arderiu <soler.arderiu@gmail.com> * Fix bug (#851) * Also fix felt bits in starknet syscall wrappers (#853) * Also fix felt bits in starknet syscall wrappers * style * missed * update version to alpha 4 (#854) * bytes31 * Better function attributes and re-enable >O1 opt (#843) * Fix felt252 and enum deserialization bugs. * Fix formatting. * Also fix the runtime. * Fix errors. * try to fix ci * remove unused deps * proper function attributes * add proper function attrs to optimize better, add some passes, run tests with atleast some opts * dont use remi * oops * maybe with opt level 3 now it works * test * works * readd deleted bench * remove dbg * Update bench-hyperfine.sh * fixci * comment * Update src/ffi.rs Co-authored-by: MrAzteca <azteca1998@users.noreply.github.com> --------- Co-authored-by: Esteve Soler Arderiu <esteve.soler@lambdaclass.com> Co-authored-by: Esteve Soler Arderiu <soler.arderiu@gmail.com> Co-authored-by: MrAzteca <azteca1998@users.noreply.github.com> * Resolve `CAIRO_NATIVE_RUNTIME_LIBRARY` relative path (#841) * feat(ffi): resolve runtime relative path using current dir * chore: remove mentions to old runtime variable * fix: typo --------- Co-authored-by: Bohdan Ohorodnii <limposfeed@gmail.com> * Implement secp * Fix bytes31 * try to fix ci (#858) * update implementing libfuncs doc (#856) * Fix bytes31 bug * Remove unused dep --------- Co-authored-by: FrancoGiachetta <francogiachetta27@gmail.com> Co-authored-by: Edgar <git@edgarluque.com> Co-authored-by: MrAzteca <azteca1998@users.noreply.github.com> Co-authored-by: Esteve Soler Arderiu <esteve.soler@lambdaclass.com> Co-authored-by: Esteve Soler Arderiu <soler.arderiu@gmail.com> Co-authored-by: Rodrigo <rodrodpino@gmail.com> Co-authored-by: Bohdan Ohorodnii <limposfeed@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the issue with the storage's value being truncated during cairo_native's execution. This was due to a wrong implementation of the
i128_to_felt252
libfunc, which handled the conversion of negative values as if they were positive.Closes #820
Checklist