updated cairo-lang deps to version 2.18#1618
Conversation
9641a97 to
aa65112
Compare
orizi
left a comment
There was a problem hiding this comment.
@orizi reviewed 10 files and all commit messages, and made 1 comment.
Reviewable status: 10 of 31 files reviewed, 1 unresolved discussion (waiting on TomerStarkware).
-- commits line 1 at r1:
rebase
783b0bc to
4f38683
Compare
|
✅ Code is now correctly formatted. |
4f38683 to
d1e213e
Compare
orizi
left a comment
There was a problem hiding this comment.
@orizi reviewed 28 files and all commit messages, made 2 comments, and resolved 1 discussion.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on TomerStarkware).
debug_utils/sierra-emu/src/vm/bounded_int.rs line 300 at r3 (raw file):
pub fn eval_guarantee_verify( _registry: &ProgramRegistry<CoreType, CoreLibfunc>,
doc
debug_utils/sierra-emu/src/vm/bounded_int.rs line 310 at r3 (raw file):
} pub fn eval_u128_to_u32_guarantees(
doc
c988f75 to
b2f6974
Compare
Benchmark results Main vs HEAD.Base
Head
Base
Head
Base
Head
Base
Head
Base
Head
Base
Head
|
Benchmarking resultsBenchmark for program
|
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
11.038 ± 0.090 | 10.932 | 11.258 | 5.91 ± 0.07 |
cairo-native (embedded AOT) |
1.866 ± 0.015 | 1.848 | 1.889 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
1.867 ± 0.024 | 1.819 | 1.898 | 1.00 ± 0.02 |
Benchmark for program dict_snapshot
Open benchmarks
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
543.3 ± 6.1 | 537.6 | 558.2 | 1.00 |
cairo-native (embedded AOT) |
1690.4 ± 15.9 | 1672.2 | 1719.2 | 3.11 ± 0.05 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
1696.3 ± 11.4 | 1671.2 | 1709.6 | 3.12 ± 0.04 |
Benchmark for program factorial_2M
Open benchmarks
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
4.854 ± 0.020 | 4.821 | 4.880 | 2.26 ± 0.02 |
cairo-native (embedded AOT) |
2.149 ± 0.028 | 2.119 | 2.207 | 1.00 ± 0.02 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
2.147 ± 0.020 | 2.099 | 2.172 | 1.00 |
Benchmark for program fib_2M
Open benchmarks
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
4.752 ± 0.029 | 4.714 | 4.795 | 2.80 ± 0.04 |
cairo-native (embedded AOT) |
1.694 ± 0.020 | 1.668 | 1.727 | 1.00 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
1.706 ± 0.016 | 1.684 | 1.734 | 1.01 ± 0.02 |
Benchmark for program linear_search
Open benchmarks
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
591.2 ± 6.2 | 583.0 | 603.3 | 1.00 |
cairo-native (embedded AOT) |
1700.6 ± 20.1 | 1677.5 | 1743.0 | 2.88 ± 0.05 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
1745.4 ± 18.7 | 1718.3 | 1774.0 | 2.95 ± 0.04 |
Benchmark for program logistic_map
Open benchmarks
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
Cairo-vm (Rust, Cairo 1) |
496.5 ± 5.1 | 490.1 | 505.4 | 1.00 |
cairo-native (embedded AOT) |
1846.1 ± 13.0 | 1831.2 | 1874.3 | 3.72 ± 0.05 |
cairo-native (embedded JIT using LLVM's ORC Engine) |
1959.1 ± 16.0 | 1939.9 | 1989.4 | 3.95 ± 0.05 |
f4ccda7 to
6c1013e
Compare
orizi
left a comment
There was a problem hiding this comment.
@orizi partially reviewed 5 files and made 1 comment.
Reviewable status: 39 of 40 files reviewed, 3 unresolved discussions (waiting on TomerStarkware).
src/executor/contract.rs line 965 at r5 (raw file):
.unwrap(); assert_eq!(result.return_values, vec![Felt::from(3628800)]); assert_eq!(result.remaining_gas, 18446744073709547445);
what are these changes?
6c1013e to
93fac59
Compare
TomerStarkware
left a comment
There was a problem hiding this comment.
@TomerStarkware made 3 comments.
Reviewable status: 39 of 40 files reviewed, 3 unresolved discussions (waiting on orizi).
debug_utils/sierra-emu/src/vm/bounded_int.rs line 300 at r3 (raw file):
Previously, orizi wrote…
doc
Done.
debug_utils/sierra-emu/src/vm/bounded_int.rs line 310 at r3 (raw file):
Previously, orizi wrote…
doc
Done.
src/executor/contract.rs line 965 at r5 (raw file):
Previously, orizi wrote…
what are these changes?
less gas usage due to compiler optimization
orizi
left a comment
There was a problem hiding this comment.
@orizi reviewed 3 files and all commit messages, made 1 comment, and resolved 3 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on TomerStarkware).
Upgrade cairo-lang to version 2.18.0
Closes #NA
Bumps the Sierra/cairo-lang dependency from
2.16.0(last upgrade) to2.18.0.The change covers two commits:
dup/dropimplicit, so allper-type override scaffolding is deleted:
metadata/dup_overrides.rs,metadata/drop_overrides.rs, and the matching builders inarray,box,enum,nullable,snapshot,struct,circuit,starknet,debug,and
constlibfuncs (~1.8k lines net removed).cairo-lang-*workspace deps and the vendoredvendor/cairosubmodule moved tov2.18.0. New libfuncs and a newSierra type introduced in 2.18 are wired up:
BoundedIntConcreteLibfunc::GuaranteeVerify— bumpsRangeCheckby 2 to match CASM accounting (no runtime check; native trusts the
Sierra type system).
BoundedIntConcreteLibfunc::U128ToU32Guarantees— splits au128into four
u32guarantees from low to high limb.BlakeConcreteLibfunc::Blake2sCompressGuarantees/Blake2sFinalizeGuarantees— share the existing Blake builder.CoreTypeConcrete::BoundedIntGuarantee— reuses the MLIRrepresentation of
BoundedInteverywhere it appears(
types.rs,values.rs,executor.rs);debug.rskeeps adistinct
bounded_int_guarantee<lo,hi>label.SCARB_VERSION/CAIRO_2_VERSIONinMakefileupdated to2.18.0.test_data/e2e_libfuncs_rawremoved from.gitignore(no longer generated).Introduces Breaking Changes?
Yes — Sierra version bumped (2.16 → 2.18). Programs compiled against
older Sierra versions will not be accepted, and downstream consumers
must update in lockstep.
This change is