-
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
builtin cost rework with fixes #875
base: main
Are you sure you want to change the base?
Conversation
This reverts commit 355c250.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #875 +/- ##
========================================
Coverage 82.82% 82.83%
========================================
Files 120 120
Lines 34941 35236 +295
========================================
+ Hits 28941 29187 +246
- Misses 6000 6049 +49 ☔ View full report in Codecov by Sentry. |
Benchmarking resultsBenchmark for program
|
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
10.748 ± 0.188 | 10.518 | 11.075 | 23.37 ± 0.48 |
cairo-native (embedded AOT) |
3.237 ± 0.031 | 3.205 | 3.313 | 7.04 ± 0.10 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
3.271 ± 0.056 | 3.197 | 3.375 | 7.11 ± 0.14 |
cairo-native (standalone AOT) |
0.652 ± 0.001 | 0.651 | 0.655 | 1.42 ± 0.02 |
cairo-native (standalone AOT with -march=native) |
0.460 ± 0.005 | 0.457 | 0.473 | 1.00 |
Benchmark for program fib_2M
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
10.811 ± 0.273 | 10.439 | 11.108 | 1344.75 ± 35.86 |
cairo-native (embedded AOT) |
2.789 ± 0.028 | 2.742 | 2.830 | 346.92 ± 4.54 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2.860 ± 0.060 | 2.769 | 2.966 | 355.74 ± 8.00 |
cairo-native (standalone AOT) |
0.008 ± 0.000 | 0.008 | 0.009 | 1.00 |
cairo-native (standalone AOT with -march=native) |
0.008 ± 0.000 | 0.008 | 0.008 | 1.00 ± 0.01 |
Benchmark for program logistic_map
Open benchmarks
Command | Mean [s] | Min [s] | Max [s] | Relative |
---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
4.389 ± 0.039 | 4.309 | 4.441 | 61.25 ± 0.62 |
cairo-native (embedded AOT) |
2.924 ± 0.035 | 2.881 | 2.983 | 40.80 ± 0.53 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
3.084 ± 0.029 | 3.056 | 3.153 | 43.03 ± 0.46 |
cairo-native (standalone AOT) |
0.115 ± 0.000 | 0.115 | 0.115 | 1.60 ± 0.01 |
cairo-native (standalone AOT with -march=native) |
0.072 ± 0.000 | 0.071 | 0.074 | 1.00 |
Benchmark results Main vs HEAD.
|
✅ Code is now correctly formatted. |
let entrypoint_function_id = starknet_program | ||
.funcs | ||
.last() | ||
.expect("should have a function") | ||
.id | ||
.clone(); | ||
|
||
(0..200).par_bridge().for_each(|n| { | ||
let result = executor | ||
.run( | ||
&entrypoint_function_id, | ||
&[n.into()], | ||
Some(u64::MAX as u128), | ||
None, | ||
&mut StubSyscallHandler::default(), | ||
) | ||
.unwrap(); | ||
|
||
assert_eq!(result.return_values, vec![Felt::from(n), Felt::from(n * 2)]); | ||
assert_eq!(result.remaining_gas, 18446744073709548175); | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the contract used is to simple to find a possible race condition, maybe we can do the same in the replay, with a larger transaction (one that used to fail). For example, transactions:
- 0x0310c46edc795c82c71f600159fa9e6c6540cb294df9d156f685bfe62b31a5f4
- 0x066e1f01420d8e433f6ef64309adb1a830e5af0ea67e3d935de273ca57b3ae5e
This reverts commit 355c250.
We should test this change with a block range we know works with current main, to assert it adds no regressions.
Checklist