From 5e03f267867dfa6ce297afd72a7ec3e097a27d2a Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 3 Sep 2024 09:48:14 -0300 Subject: [PATCH 01/12] update cairo-lang to 2.8.0 --- CHANGELOG.md | 5 +- Cargo.lock | 365 ++++++++++++++------------------- Cargo.toml | 26 +-- Makefile | 2 +- cairo1-run/Cargo.toml | 8 +- cairo1-run/Makefile | 2 +- rust-toolchain | 2 +- vm/src/vm/runners/cairo_pie.rs | 2 +- 8 files changed, 178 insertions(+), 234 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fab13c1fb..dfd2934492 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,14 @@ #### Upcoming Changes +* chore: bump `cairo-lang-` dependencies to 2.8.0make [#1823](https://github.com/lambdaclass/cairo-vm/pull/1823) + * chore: update Rust required version to 1.80.0 + * chore: bump `cairo-lang-` dependencies to 2.7.1 [#1823](https://github.com/lambdaclass/cairo-vm/pull/1823) #### [1.0.1] - 2024-08-12 -* fix(BREAKING): [#1818](https://github.com/lambdaclass/cairo-vm/pull/1818): +* fix(BREAKING): [#1818](https://github.com/lambdaclass/cairo-vm/pull/1818): * Fix `MemorySegmentManager::add_zero_segment` function when resizing a segment * Signature change(BREAKING): `MemorySegmentManager::get_memory_holes` now receives `builtin_segment_indexes: HashSet` diff --git a/Cargo.lock b/Cargo.lock index 667a43f353..928fed9d42 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -249,13 +249,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -475,9 +475,9 @@ dependencies = [ [[package]] name = "cairo-lang-casm" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4425280959f189d8a5ebf1f5363c10663bc9f843a4819253e6be87d183b583e" +checksum = "ad9e8fe95ee2add1537d00467b98bb8928334633eb01dcba7f33fb64769af259" dependencies = [ "cairo-lang-utils", "indoc", @@ -489,9 +489,9 @@ dependencies = [ [[package]] name = "cairo-lang-compiler" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2698e2ca73db964e6d496a648fcbb2ace5559941b5179ab3310c9a0b6872b348" +checksum = "0db1ae47b4918a894b60160fac42e6fbcb5a8c0023dd6c290ba03a1bcdf5a554" dependencies = [ "anyhow", "cairo-lang-defs", @@ -506,7 +506,8 @@ dependencies = [ "cairo-lang-syntax", "cairo-lang-utils", "indoc", - "salsa", + "rayon", + "rust-analyzer-salsa", "semver", "smol_str", "thiserror", @@ -514,18 +515,18 @@ dependencies = [ [[package]] name = "cairo-lang-debug" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac7332f2b041ca28b24b0311a0b4a35f426bb52836a2d268a8374ea262e9e6b" +checksum = "b1c87b905b74516c33fc7e6d61b5243363ce65133054c30bd9531f47e30ca201" dependencies = [ "cairo-lang-utils", ] [[package]] name = "cairo-lang-defs" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "079a34b560a82b463cd12ae62022d70981e8ab56b6505f9499348ebeaf460de8" +checksum = "611996d85ec608bfec75d546a5c2ec44f664f4bd2514840a5b369d30a1a8bfdb" dependencies = [ "cairo-lang-debug", "cairo-lang-diagnostics", @@ -534,15 +535,15 @@ dependencies = [ "cairo-lang-syntax", "cairo-lang-utils", "itertools 0.12.1", - "salsa", + "rust-analyzer-salsa", "smol_str", ] [[package]] name = "cairo-lang-diagnostics" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c29625349297ad791942377763f5b04c779ea694f436488dc6ad194720b89487" +checksum = "d015a0790b1f5de8b22b4b4b60d392c35bed07b7aa9dd22361af2793835cee51" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -552,9 +553,9 @@ dependencies = [ [[package]] name = "cairo-lang-eq-solver" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cb26cd75126db6eaf94d5dffe0ce750d030ac879a88de5a621551969e9b59e3" +checksum = "54c580e56e5857d51b6bf2ec5ed5fdd33fd3b74dad7e3cb6d7398396174a6c85" dependencies = [ "cairo-lang-utils", "good_lp", @@ -562,14 +563,14 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "651012f2956bea884c7a3ab9df21dc76112d7edd3f403b37ca5be62fc3f41b09" +checksum = "5368e66a742b8532d656171525bfea599490280ceee10bdac93ad60775fc4e59" dependencies = [ "cairo-lang-debug", "cairo-lang-utils", "path-clean", - "salsa", + "rust-analyzer-salsa", "semver", "serde", "smol_str", @@ -577,9 +578,9 @@ dependencies = [ [[package]] name = "cairo-lang-formatter" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d09ffb9498368cf4e95d0b28662596331aef1677e4f759ab5e609d27dfcb587" +checksum = "c1200324728e7f4c4acedceee427d9b3ffce221af57e469a454f007cbc248255" dependencies = [ "anyhow", "cairo-lang-diagnostics", @@ -590,7 +591,7 @@ dependencies = [ "diffy", "ignore", "itertools 0.12.1", - "salsa", + "rust-analyzer-salsa", "serde", "smol_str", "thiserror", @@ -598,9 +599,9 @@ dependencies = [ [[package]] name = "cairo-lang-lowering" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4ffe6c197c35dec665029fcf695422f02c55b5118b4da1142e182b9fe77f87" +checksum = "2a7a3069c75e1aca7cf15f20d03baf71f5c86e5be26988f6c25656549aa8b54a" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -616,16 +617,15 @@ dependencies = [ "log", "num-bigint", "num-traits 0.2.19", - "once_cell", - "salsa", + "rust-analyzer-salsa", "smol_str", ] [[package]] name = "cairo-lang-parser" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f262ad5f1110ff70c93deb81cce024cf160f4a4518762e7deb2047fe73846789" +checksum = "c13b245ddc740ebfed8b05e1bdb7805a06d267cf89d46486c9609306f92d45ce" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", @@ -636,16 +636,16 @@ dependencies = [ "itertools 0.12.1", "num-bigint", "num-traits 0.2.19", - "salsa", + "rust-analyzer-salsa", "smol_str", "unescaper", ] [[package]] name = "cairo-lang-plugins" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18024b44b5edbc1f378ba85c1a4ff04e880ea465a33251053aec507f08250668" +checksum = "3b656552d0ab4a69be223e42c4e1c4028e512f506a237d04bbe4ccab9a1e13c5" dependencies = [ "cairo-lang-defs", "cairo-lang-diagnostics", @@ -656,26 +656,26 @@ dependencies = [ "indent", "indoc", "itertools 0.12.1", - "salsa", + "rust-analyzer-salsa", "smol_str", ] [[package]] name = "cairo-lang-proc-macros" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "124402d8fad2a033bb36910dd7d0651f3100845c63dce679c58797a8cb0448c2" +checksum = "05cc6adb49faa42ea825e041dff0496c2e72e4ddaf50734062a62383c0c8adbf" dependencies = [ "cairo-lang-debug", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] name = "cairo-lang-project" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f37dba9653eabf4dcb43a5e1436cd6bc093b5ad6f28ff42eaaef12549014213" +checksum = "ad123ba0e0dd5e1ea80977c0244ff4b0b6d8bf050d42ecb5ff0cf7f885e871f9" dependencies = [ "cairo-lang-filesystem", "cairo-lang-utils", @@ -687,9 +687,9 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1612476b548e9ab8ae89ee38a73d9875339f62f2f59d9ce8a719bc1761c54c3" +checksum = "0d528c79e4ff3e1364569c07e22660ddf60c0d1989705b8f0feed9949962b28a" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -706,17 +706,16 @@ dependencies = [ "itertools 0.12.1", "num-bigint", "num-traits 0.2.19", - "once_cell", - "salsa", + "rust-analyzer-salsa", "smol_str", "toml", ] [[package]] name = "cairo-lang-sierra" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8209be8cf22263bf8a55df334a642b74fe563beecbbbefa55cda39fa4b131a61" +checksum = "1bdb0c2cc419f45ab7e413322502ca02c2a2c56aeabdd0885e3740f378d8b269" dependencies = [ "anyhow", "cairo-lang-utils", @@ -729,9 +728,8 @@ dependencies = [ "num-bigint", "num-integer", "num-traits 0.2.19", - "once_cell", "regex", - "salsa", + "rust-analyzer-salsa", "serde", "serde_json", "sha3", @@ -742,9 +740,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-ap-change" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c9d1350366c23e4a9f6e18ea95939f18df52df455f06c0e3d7889f80ce18a94" +checksum = "7224cd827ccf69e742c90a60278876865a96b545a101248d9472d2e02f9190b3" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -758,9 +756,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-gas" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fe1ff15052b173537360b7dca5f9b2ccb10392b2a1c11af99add35d42632115" +checksum = "7e379e3010827fe983e66aa38a0d25fe24cfc11eaf8cadf4dc7bcb31fff031de" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -774,9 +772,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-generator" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3802e7b6722fabc9cc0a61c86e7ad53138f6f41880aca80a60f889739fbf55" +checksum = "d6b353930676c06bb885a16ec3b120109aa15539c49f41b3370a5a6314dc29dc" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -790,8 +788,7 @@ dependencies = [ "cairo-lang-utils", "itertools 0.12.1", "num-traits 0.2.19", - "once_cell", - "salsa", + "rust-analyzer-salsa", "serde", "serde_json", "smol_str", @@ -799,9 +796,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-to-casm" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355bde3b0a835bac2457af133a9042a7d039c934e678905b843bb6b420884428" +checksum = "83873751d489aae4674f3d755a4897429a664bdc4b0847283e13889f0b0c2a44" dependencies = [ "assert_matches", "cairo-lang-casm", @@ -820,9 +817,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-type-size" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ddddaacc814e0ffda9f176c913fb2a9cd74fe6594dea789e8281eef10cac201" +checksum = "5bd84b445715326e44832836732b6bda76a119116b296ac9b6b87e2a4177634a" dependencies = [ "cairo-lang-sierra", "cairo-lang-utils", @@ -830,9 +827,9 @@ dependencies = [ [[package]] name = "cairo-lang-starknet" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10be5fd5fe78db232b032e25e4be786f8061606be4ab26371c869c5ab267699c" +checksum = "d8df3086f909d27a49d6706be835725df4e21fb50efe699cd763d1f782a31dea" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -851,7 +848,6 @@ dependencies = [ "indent", "indoc", "itertools 0.12.1", - "once_cell", "serde", "serde_json", "smol_str", @@ -861,9 +857,9 @@ dependencies = [ [[package]] name = "cairo-lang-starknet-classes" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7bf919d0919fce727c6d53ee5cb37459c9db35c258521284523c53f5f907c07" +checksum = "41bcab650779b3431389dc52f1e643a7c9690a1aa2b072c8f01955503d094007" dependencies = [ "cairo-lang-casm", "cairo-lang-sierra", @@ -874,7 +870,6 @@ dependencies = [ "num-bigint", "num-integer", "num-traits 0.2.19", - "once_cell", "serde", "serde_json", "sha3", @@ -885,25 +880,25 @@ dependencies = [ [[package]] name = "cairo-lang-syntax" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a376f88d815b63505be54a6afa93d75b67cfd65835922ec648cfcbb0a5e4b4" +checksum = "7e2dc876ec02a197b8d13dbfc0b2cf7a7e31dcfc6446761cbb85f5b42d589cdc" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", "cairo-lang-utils", "num-bigint", "num-traits 0.2.19", - "salsa", + "rust-analyzer-salsa", "smol_str", "unescaper", ] [[package]] name = "cairo-lang-syntax-codegen" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01f276bc28f6302fc63032046a12b60d18498906e65f646acb963244eed97f7c" +checksum = "a8727fe3f24ec0834ec6656c70a59f85233439f0a09ca53cf5e27fbdb1b40193" dependencies = [ "genco", "xshell", @@ -911,9 +906,9 @@ dependencies = [ [[package]] name = "cairo-lang-test-utils" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e90b6236439e19077ec913351a17a33c7be199dcafdacd8389c4c5199400d6" +checksum = "7a7681562268173d74b1c8d2438a1d9ec3218c89a8e39a8be3f10e044fa46ebe" dependencies = [ "cairo-lang-formatter", "cairo-lang-utils", @@ -924,12 +919,12 @@ dependencies = [ [[package]] name = "cairo-lang-utils" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55a394e545f1500bea093d01be40895d3234faaa24d9585d08a509c514cabd88" +checksum = "37e6004780c42bf28ce5afd048cc628b3de34aaf24fd2c228ae73217c58999f9" dependencies = [ "hashbrown 0.14.5", - "indexmap 2.4.0", + "indexmap 2.5.0", "itertools 0.12.1", "num-bigint", "num-traits 0.2.19", @@ -1132,7 +1127,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -1342,7 +1337,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -1528,7 +1523,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -1586,7 +1581,7 @@ checksum = "553630feadf7b76442b0849fd25fdf89b860d933623aec9693fed19af0400c78" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -1670,12 +1665,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.3.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "heck" @@ -1868,9 +1860,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -1892,15 +1884,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - [[package]] name = "iri-string" version = "0.7.2" @@ -2329,9 +2312,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.3" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -2380,17 +2363,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.3" @@ -2398,21 +2370,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", - "parking_lot_core 0.9.10", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -2423,7 +2381,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.3", + "redox_syscall", "smallvec", "windows-targets 0.52.6", ] @@ -2476,7 +2434,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.4.0", + "indexmap 2.5.0", ] [[package]] @@ -2511,7 +2469,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -2593,11 +2551,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit", ] [[package]] @@ -2715,15 +2673,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.5.3" @@ -2815,6 +2764,35 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "rust-analyzer-salsa" +version = "0.17.0-pre.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719825638c59fd26a55412a24561c7c5bcf54364c88b9a7a04ba08a6eafaba8d" +dependencies = [ + "indexmap 2.5.0", + "lock_api", + "oorandom", + "parking_lot", + "rust-analyzer-salsa-macros", + "rustc-hash", + "smallvec", + "tracing", + "triomphe", +] + +[[package]] +name = "rust-analyzer-salsa-macros" +version = "0.17.0-pre.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d96498e9684848c6676c399032ebc37c52da95ecbefa83d71ccc53b9f8a4a8e" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "rust_decimal" version = "1.36.0" @@ -2839,18 +2817,18 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ "bitflags 2.6.0", "errno", @@ -2883,35 +2861,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" -[[package]] -name = "salsa" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b84d9f96071f3f3be0dc818eae3327625d8ebc95b58da37d6850724f31d3403" -dependencies = [ - "crossbeam-utils", - "indexmap 1.9.3", - "lock_api", - "log", - "oorandom", - "parking_lot 0.11.2", - "rustc-hash", - "salsa-macros", - "smallvec", -] - -[[package]] -name = "salsa-macros" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3904a4ba0a9d0211816177fd34b04c7095443f8cdacd11175064fe541c8fe2" -dependencies = [ - "heck 0.3.3", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "same-file" version = "1.0.6" @@ -2943,7 +2892,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -2984,7 +2933,7 @@ checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -2995,7 +2944,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -3145,6 +3094,12 @@ dependencies = [ "num-traits 0.1.43", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "starknet-crypto" version = "0.6.2" @@ -3173,7 +3128,7 @@ checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" dependencies = [ "starknet-curve", "starknet-ff", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -3221,7 +3176,7 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot 0.12.3", + "parking_lot", "phf_shared", "precomputed-hash", ] @@ -3251,9 +3206,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.76" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -3313,7 +3268,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -3386,9 +3341,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.39.3" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", @@ -3408,7 +3363,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -3433,7 +3388,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit", ] [[package]] @@ -3445,28 +3400,17 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.4.0", - "toml_datetime", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.5.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.18", + "winnow", ] [[package]] @@ -3547,7 +3491,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -3585,6 +3529,16 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "triomphe" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6631e42e10b40c0690bf92f404ebcfe6e1fdb480391d15f17cc8e96eeed5369" +dependencies = [ + "serde", + "stable_deref_trait", +] + [[package]] name = "try-lock" version = "0.2.5" @@ -3721,7 +3675,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", "wasm-bindgen-shared", ] @@ -3755,7 +3709,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3788,7 +3742,7 @@ checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -3991,15 +3945,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "0.6.18" @@ -4057,7 +4002,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -4077,7 +4022,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f5f2d34118..93dbab3030 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,13 +6,9 @@ members = [ "examples/wasm-demo", "cairo1-run", "cairo-vm-tracer", - "examples/hyper_threading" -] -default-members = [ - "cairo-vm-cli", - "vm", - "cairo1-run", + "examples/hyper_threading", ] +default-members = ["cairo-vm-cli", "vm", "cairo1-run"] exclude = ["ensure-no_std"] # Explicitly set the resolver to the default for edition >= 2021 @@ -55,7 +51,7 @@ sha3 = { version = "0.10.8", default-features = false } lazy_static = { version = "1.4.0", default-features = false, features = [ "spin_no_std", ] } -nom = { version = "7", default-features = false } +nom = { version = "7.1.3", default-features = false } sha2 = { version = "0.10.7", features = ["compress"], default-features = false } generic-array = { version = "0.14.7", default-features = false } keccak = { version = "0.1.2", default-features = false } @@ -66,15 +62,15 @@ thiserror-no-std = { version = "2.0.2", default-features = false } bitvec = { version = "1", default-features = false, features = ["alloc"] } # Dependencies for cairo-1-hints feature -cairo-lang-starknet = { version = "2.7.1", default-features = false } -cairo-lang-casm = { version = "2.7.1", default-features = false } +cairo-lang-starknet = { version = "2.8.0", default-features = false } +cairo-lang-casm = { version = "2.8.0", default-features = false } -cairo-lang-starknet-classes = { version = "2.7.1", default-features = false } -cairo-lang-compiler = { version = "=2.7.1", default-features = false } -cairo-lang-sierra-to-casm = { version = "2.7.1", default-features = false } -cairo-lang-sierra = { version = "2.7.1", default-features = false } -cairo-lang-runner = { version = "2.7.1", default-features = false } -cairo-lang-utils = { version = "=2.7.1", default-features = false } +cairo-lang-starknet-classes = { version = "2.8.0", default-features = false } +cairo-lang-compiler = { version = "=2.8.0", default-features = false } +cairo-lang-sierra-to-casm = { version = "2.8.0", default-features = false } +cairo-lang-sierra = { version = "2.8.0", default-features = false } +cairo-lang-runner = { version = "2.8.0", default-features = false } +cairo-lang-utils = { version = "=2.8.0", default-features = false } # TODO: check these dependencies for wasm compatibility ark-ff = { version = "0.4.2", default-features = false } diff --git a/Makefile b/Makefile index f96e41a1ea..06cba4b0f1 100644 --- a/Makefile +++ b/Makefile @@ -180,7 +180,7 @@ $(CAIRO_2_CONTRACTS_TEST_DIR)/%.casm: $(CAIRO_2_CONTRACTS_TEST_DIR)/%.sierra # ====================== CAIRO_2_REPO_DIR = cairo2 -CAIRO_2_VERSION = 2.7.1 +CAIRO_2_VERSION = 2.8.0 build-cairo-2-compiler-macos: @if [ ! -d "$(CAIRO_2_REPO_DIR)" ]; then \ diff --git a/cairo1-run/Cargo.toml b/cairo1-run/Cargo.toml index b5022d994b..500d410d28 100644 --- a/cairo1-run/Cargo.toml +++ b/cairo1-run/Cargo.toml @@ -9,12 +9,12 @@ keywords.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cairo-vm = {workspace = true, features = ["std", "cairo-1-hints", "clap"]} +cairo-vm = { workspace = true, features = ["std", "cairo-1-hints", "clap"] } serde_json = { workspace = true } -cairo-lang-sierra-type-size = { version = "2.7.1", default-features = false } -cairo-lang-sierra-ap-change = { version = "2.7.1", default-features = false } -cairo-lang-sierra-gas = { version = "2.7.1", default-features = false } +cairo-lang-sierra-type-size = { version = "2.8.0", default-features = false } +cairo-lang-sierra-ap-change = { version = "2.8.0", default-features = false } +cairo-lang-sierra-gas = { version = "2.8.0", default-features = false } cairo-lang-starknet-classes.workspace = true cairo-lang-sierra-to-casm.workspace = true cairo-lang-compiler.workspace = true diff --git a/cairo1-run/Makefile b/cairo1-run/Makefile index 16244e05d9..a00f9dfe3f 100644 --- a/cairo1-run/Makefile +++ b/cairo1-run/Makefile @@ -13,7 +13,7 @@ TRACES:=$(patsubst $(CAIRO_1_FOLDER)/%.cairo, $(CAIRO_1_FOLDER)/%.trace, $(CAIRO MEMORY:=$(patsubst $(CAIRO_1_FOLDER)/%.cairo, $(CAIRO_1_FOLDER)/%.memory, $(CAIRO_1_PROGRAMS)) deps: - git clone --depth=1 -b v2.7.1 https://github.com/starkware-libs/cairo.git \ + git clone --depth=1 -b v2.8.0 https://github.com/starkware-libs/cairo.git \ && mv cairo/corelib/ . \ && rm -rf cairo/ diff --git a/rust-toolchain b/rust-toolchain index 907951458e..ff6d7a9a85 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,4 +1,4 @@ [toolchain] -channel = "1.76.0" +channel = "1.80.0" components = ["rustfmt", "clippy"] profile = "minimal" diff --git a/vm/src/vm/runners/cairo_pie.rs b/vm/src/vm/runners/cairo_pie.rs index 371b6de82f..37c822b0e7 100644 --- a/vm/src/vm/runners/cairo_pie.rs +++ b/vm/src/vm/runners/cairo_pie.rs @@ -373,7 +373,7 @@ pub(super) mod serde_impl { use super::CAIRO_PIE_VERSION; use super::{CairoPieMemory, Pages, PublicMemoryPage, SegmentInfo}; - #[cfg(any(target_arch = "wasm32", no_std, not(feature = "std")))] + #[cfg(any(target_arch = "wasm32", not(feature = "std")))] use crate::alloc::string::ToString; use crate::stdlib::prelude::{String, Vec}; use crate::{ From ce82234abba7a2f7ec6222dc6161b9d9e1173ffa Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 3 Sep 2024 13:42:15 -0300 Subject: [PATCH 02/12] working --- vm/src/air_private_input.rs | 2 +- vm/src/tests/cairo_pie_test.rs | 4 ++-- vm/src/tests/mod.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vm/src/air_private_input.rs b/vm/src/air_private_input.rs index fa05cc86d5..52ca645d8c 100644 --- a/vm/src/air_private_input.rs +++ b/vm/src/air_private_input.rs @@ -212,7 +212,7 @@ mod tests { assert_matches::assert_matches, }; - #[cfg(any(target_arch = "wasm32", no_std, not(feature = "std")))] + #[cfg(any(target_arch = "wasm32", not(feature = "std")))] use crate::alloc::string::ToString; #[cfg(feature = "std")] diff --git a/vm/src/tests/cairo_pie_test.rs b/vm/src/tests/cairo_pie_test.rs index 7701d66057..e12c704034 100644 --- a/vm/src/tests/cairo_pie_test.rs +++ b/vm/src/tests/cairo_pie_test.rs @@ -6,7 +6,7 @@ use crate::{ #[cfg(target_arch = "wasm32")] use wasm_bindgen_test::*; -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(all(not(feature = "std")))] use alloc::{ string::{String, ToString}, vec::Vec, @@ -25,7 +25,7 @@ use crate::{ }, }; -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(all(not(feature = "std")))] use alloc::{ string::{String, ToString}, vec::Vec, diff --git a/vm/src/tests/mod.rs b/vm/src/tests/mod.rs index 11026af5ad..c71a4c981f 100644 --- a/vm/src/tests/mod.rs +++ b/vm/src/tests/mod.rs @@ -25,7 +25,7 @@ use crate::{ #[cfg(target_arch = "wasm32")] use wasm_bindgen_test::*; -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(all(not(feature = "std"), /*feature = "alloc"*/))] use alloc::{string::String, vec::Vec}; mod bitwise_test; From 945f6fba04f406e2d3c2478a9848eadb1682e1f4 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 3 Sep 2024 13:57:15 -0300 Subject: [PATCH 03/12] format --- vm/src/tests/cairo_pie_test.rs | 4 ++-- vm/src/tests/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vm/src/tests/cairo_pie_test.rs b/vm/src/tests/cairo_pie_test.rs index e12c704034..d72dadc383 100644 --- a/vm/src/tests/cairo_pie_test.rs +++ b/vm/src/tests/cairo_pie_test.rs @@ -6,7 +6,7 @@ use crate::{ #[cfg(target_arch = "wasm32")] use wasm_bindgen_test::*; -#[cfg(all(not(feature = "std")))] +#[cfg(not(feature = "std"))] use alloc::{ string::{String, ToString}, vec::Vec, @@ -25,7 +25,7 @@ use crate::{ }, }; -#[cfg(all(not(feature = "std")))] +#[cfg(not(feature = "std"))] use alloc::{ string::{String, ToString}, vec::Vec, diff --git a/vm/src/tests/mod.rs b/vm/src/tests/mod.rs index c71a4c981f..851cbf32bb 100644 --- a/vm/src/tests/mod.rs +++ b/vm/src/tests/mod.rs @@ -25,7 +25,7 @@ use crate::{ #[cfg(target_arch = "wasm32")] use wasm_bindgen_test::*; -#[cfg(all(not(feature = "std"), /*feature = "alloc"*/))] +#[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; mod bitwise_test; From 55865c98db61496b6870ae79f40f426c370c50ab Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 3 Sep 2024 14:01:13 -0300 Subject: [PATCH 04/12] typo --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfd2934492..6eceea2d34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ #### Upcoming Changes -* chore: bump `cairo-lang-` dependencies to 2.8.0make [#1823](https://github.com/lambdaclass/cairo-vm/pull/1823) +* chore: bump `cairo-lang-` dependencies to 2.8.0 [#1833](https://github.com/lambdaclass/cairo-vm/pull/1833/files) * chore: update Rust required version to 1.80.0 * chore: bump `cairo-lang-` dependencies to 2.7.1 [#1823](https://github.com/lambdaclass/cairo-vm/pull/1823) @@ -10,8 +10,8 @@ #### [1.0.1] - 2024-08-12 * fix(BREAKING): [#1818](https://github.com/lambdaclass/cairo-vm/pull/1818): - * Fix `MemorySegmentManager::add_zero_segment` function when resizing a segment - * Signature change(BREAKING): `MemorySegmentManager::get_memory_holes` now receives `builtin_segment_indexes: HashSet` + * Fix `MemorySegmentManager::add_zero_segment` function when resizing a segment + * Signature change(BREAKING): `MemorySegmentManager::get_memory_holes` now receives `builtin_segment_indexes: HashSet` * fix(BREAKING): Replace `CairoRunner` method `initialize_all_builtins` with `initialize_program_builtins`. Now it only initializes program builtins instead of all of them From 3733d1a746ec40521e6263dc6de2a19c615ee9e0 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 3 Sep 2024 14:56:13 -0300 Subject: [PATCH 05/12] fix lints --- cairo-vm-tracer/src/tracer_data.rs | 2 +- cairo1-run/src/cairo_run.rs | 6 +++--- cairo1-run/src/main.rs | 2 +- .../builtin_hint_processor/dict_manager.rs | 6 +----- .../builtin_hint_processor/math_utils.rs | 5 +---- vm/src/types/relocatable.rs | 1 - vm/src/vm/vm_memory/memory.rs | 16 ++++++++-------- 7 files changed, 15 insertions(+), 23 deletions(-) diff --git a/cairo-vm-tracer/src/tracer_data.rs b/cairo-vm-tracer/src/tracer_data.rs index 7c5268152e..e2b02cfb23 100644 --- a/cairo-vm-tracer/src/tracer_data.rs +++ b/cairo-vm-tracer/src/tracer_data.rs @@ -67,7 +67,7 @@ impl InputCodeFile { format!("", classes.join(" ")), )); self.tags - .push((offset_end, -std::isize::MAX, "".to_string())); + .push((offset_end, -isize::MAX, "".to_string())); } pub fn to_html(&self) -> String { diff --git a/cairo1-run/src/cairo_run.rs b/cairo1-run/src/cairo_run.rs index 700225b880..3f8095e160 100644 --- a/cairo1-run/src/cairo_run.rs +++ b/cairo1-run/src/cairo_run.rs @@ -1447,7 +1447,7 @@ fn serialize_output_inner<'a>( output_string.push(':'); // Serialize the value // We create a peekable array here in order to use the serialize_output_inner as the value could be a span - let value_vec = vec![value.clone()]; + let value_vec = [value.clone()]; let mut value_iter = value_vec.iter().peekable(); serialize_output_inner( &mut value_iter, @@ -1493,7 +1493,7 @@ fn serialize_output_inner<'a>( output_string.push(':'); // Serialize the value // We create a peekable array here in order to use the serialize_output_inner as the value could be a span - let value_vec = vec![value.clone()]; + let value_vec = [value.clone()]; let mut value_iter = value_vec.iter().peekable(); serialize_output_inner( &mut value_iter, @@ -1553,7 +1553,7 @@ mod tests { .build() .unwrap(); let main_crate_ids = setup_project(&mut db, Path::new(filename)).unwrap(); - compile_prepared_db(&mut db, main_crate_ids, compiler_config) + compile_prepared_db(&db, main_crate_ids, compiler_config) .unwrap() .program } diff --git a/cairo1-run/src/main.rs b/cairo1-run/src/main.rs index 8a4a5058bb..47c9abfbca 100644 --- a/cairo1-run/src/main.rs +++ b/cairo1-run/src/main.rs @@ -181,7 +181,7 @@ fn run(args: impl Iterator) -> Result, Error> { .unwrap(); let main_crate_ids = setup_project(&mut db, &args.filename).unwrap(); let sierra_program_with_dbg = - compile_prepared_db(&mut db, main_crate_ids, compiler_config).unwrap(); + compile_prepared_db(&db, main_crate_ids, compiler_config).unwrap(); sierra_program_with_dbg.program } diff --git a/vm/src/hint_processor/builtin_hint_processor/dict_manager.rs b/vm/src/hint_processor/builtin_hint_processor/dict_manager.rs index 230ac85d2e..63d1097510 100644 --- a/vm/src/hint_processor/builtin_hint_processor/dict_manager.rs +++ b/vm/src/hint_processor/builtin_hint_processor/dict_manager.rs @@ -159,11 +159,7 @@ impl DictTracker { ) -> Self { DictTracker { data: Dictionary::DefaultDictionary { - dict: if let Some(dict) = initial_dict { - dict - } else { - HashMap::new() - }, + dict: initial_dict.unwrap_or_default(), default_value: default_value.clone(), }, current_ptr: base, diff --git a/vm/src/hint_processor/builtin_hint_processor/math_utils.rs b/vm/src/hint_processor/builtin_hint_processor/math_utils.rs index ad2c5e0767..e10467b6ee 100644 --- a/vm/src/hint_processor/builtin_hint_processor/math_utils.rs +++ b/vm/src/hint_processor/builtin_hint_processor/math_utils.rs @@ -743,10 +743,7 @@ pub fn split_xx( x = &*SPLIT_XX_PRIME - x; } - vm.insert_value( - x_addr, - Felt252::from(&(&x & &BigUint::from(u128::max_value()))), - )?; + vm.insert_value(x_addr, Felt252::from(&(&x & &BigUint::from(u128::MAX))))?; vm.insert_value((x_addr + 1)?, Felt252::from(&(x >> 128_u32)))?; Ok(()) diff --git a/vm/src/types/relocatable.rs b/vm/src/types/relocatable.rs index 0614b6ae8d..7ca52eb45d 100644 --- a/vm/src/types/relocatable.rs +++ b/vm/src/types/relocatable.rs @@ -401,7 +401,6 @@ mod tests { #[cfg(target_arch = "wasm32")] use wasm_bindgen_test::*; - #[cfg(feature = "std")] #[cfg(feature = "std")] use proptest::prelude::*; diff --git a/vm/src/vm/vm_memory/memory.rs b/vm/src/vm/vm_memory/memory.rs index caf1684932..9dbfc9a790 100644 --- a/vm/src/vm/vm_memory/memory.rs +++ b/vm/src/vm/vm_memory/memory.rs @@ -32,10 +32,10 @@ pub struct ValidationRule( /// - BIT63: NONE flag, 1 when the cell is actually empty. /// - BIT62: ACCESS flag, 1 when the cell has been accessed in a way observable to Cairo. /// - BIT61: RELOCATABLE flag, 1 when the contained value is a `Relocatable`, 0 when it is a -/// `Felt252`. -/// `Felt252` values are stored in big-endian order to keep the flag bits free. -/// `Relocatable` values are stored as native endian, with the 3rd word storing the segment index -/// and the 4th word storing the offset. +/// `Felt252`. +/// `Felt252` values are stored in big-endian order to keep the flag bits free. +/// `Relocatable` values are stored as native endian, with the 3rd word storing the segment index +/// and the 4th word storing the offset. #[derive(Copy, Clone, Eq, Ord, PartialEq, PartialOrd, Debug)] #[repr(align(32))] pub(crate) struct MemoryCell([u64; 4]); @@ -435,8 +435,8 @@ impl Memory { /// - `lhs` exists in memory but `rhs` doesn't -> (Ordering::Greater, 0) /// - `rhs` exists in memory but `lhs` doesn't -> (Ordering::Less, 0) /// - None of `lhs` or `rhs` exist in memory -> (Ordering::Equal, 0) - /// Everything else behaves much like `memcmp` in C. - /// This is meant as an optimization for hints to avoid allocations. + /// Everything else behaves much like `memcmp` in C. + /// This is meant as an optimization for hints to avoid allocations. pub(crate) fn memcmp( &self, lhs: Relocatable, @@ -487,8 +487,8 @@ impl Memory { /// - `lhs` exists in memory but `rhs` doesn't -> (Ordering::Greater, 0) /// - `rhs` exists in memory but `lhs` doesn't -> (Ordering::Less, 0) /// - None of `lhs` or `rhs` exist in memory -> (Ordering::Equal, 0) - /// Everything else behaves much like `memcmp` in C. - /// This is meant as an optimization for hints to avoid allocations. + /// Everything else behaves much like `memcmp` in C. + /// This is meant as an optimization for hints to avoid allocations. pub(crate) fn mem_eq(&self, lhs: Relocatable, rhs: Relocatable, len: usize) -> bool { if lhs == rhs { return true; From 9f2fe150339ec7a64e5ce862ab383b85c40a64dc Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 3 Sep 2024 15:02:55 -0300 Subject: [PATCH 06/12] update rusttoolchain --- .github/workflows/bench.yml | 2 +- .github/workflows/cairo_1_programs.yml | 2 +- .github/workflows/fresh_run.yml | 2 +- .github/workflows/hint_accountant.yml | 2 +- .github/workflows/hyper_threading_benchmarks.yml | 2 +- .github/workflows/hyperfine.yml | 2 +- .github/workflows/iai_main.yml | 2 +- .github/workflows/iai_pr.yml | 4 ++-- .github/workflows/publish.yml | 2 +- .github/workflows/rust.yml | 12 ++++++------ 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 5c53a840bf..280f3b79ba 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Install Rust - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 with: components: rustfmt, clippy - uses: actions/checkout@v3 diff --git a/.github/workflows/cairo_1_programs.yml b/.github/workflows/cairo_1_programs.yml index fec819d458..aa7957cc58 100644 --- a/.github/workflows/cairo_1_programs.yml +++ b/.github/workflows/cairo_1_programs.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 - name: Set up Cargo cache uses: Swatinem/rust-cache@v2 - name: Checkout diff --git a/.github/workflows/fresh_run.yml b/.github/workflows/fresh_run.yml index 510701012b..a09ffb4747 100644 --- a/.github/workflows/fresh_run.yml +++ b/.github/workflows/fresh_run.yml @@ -38,7 +38,7 @@ jobs: uses: actions/checkout@v3 - name: Install Rust - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 - name: Install Pyenv uses: "gabrielfalcao/pyenv-action@v13" diff --git a/.github/workflows/hint_accountant.yml b/.github/workflows/hint_accountant.yml index fde516d43b..9d015e41d5 100644 --- a/.github/workflows/hint_accountant.yml +++ b/.github/workflows/hint_accountant.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 - name: Set up Cargo cache uses: Swatinem/rust-cache@v2 - name: Checkout diff --git a/.github/workflows/hyper_threading_benchmarks.yml b/.github/workflows/hyper_threading_benchmarks.yml index 30e668ed7d..d772a0a6e5 100644 --- a/.github/workflows/hyper_threading_benchmarks.yml +++ b/.github/workflows/hyper_threading_benchmarks.yml @@ -26,7 +26,7 @@ jobs: sudo apt-get install -y hyperfine - name: Install Rust - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 with: components: rustfmt, clippy diff --git a/.github/workflows/hyperfine.yml b/.github/workflows/hyperfine.yml index 51912147bd..f2fd0f8405 100644 --- a/.github/workflows/hyperfine.yml +++ b/.github/workflows/hyperfine.yml @@ -74,7 +74,7 @@ jobs: - name: Install Rust if: ${{ steps.cache.outputs.cache-hit != 'true' }} - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 - name: Checkout if: ${{ steps.cache.outputs.cache-hit != 'true' }} diff --git a/.github/workflows/iai_main.yml b/.github/workflows/iai_main.yml index 41df9d4dee..6177590fff 100644 --- a/.github/workflows/iai_main.yml +++ b/.github/workflows/iai_main.yml @@ -11,7 +11,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Install Rust - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 - name: Set up cargo cache uses: Swatinem/rust-cache@v2 - name: Python3 Build diff --git a/.github/workflows/iai_pr.yml b/.github/workflows/iai_pr.yml index 0db3c0e05f..875643ea72 100644 --- a/.github/workflows/iai_pr.yml +++ b/.github/workflows/iai_pr.yml @@ -23,7 +23,7 @@ jobs: - name: Install Rust if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }} - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 - name: Set up cargo cache if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }} uses: Swatinem/rust-cache@v2 @@ -51,7 +51,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Install Rust - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 - name: Set up cargo cache uses: Swatinem/rust-cache@v2 - name: Python3 Build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 46deef477b..792a7535f2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v2 - name: Install stable toolchain - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 - name: Publish crate cairo-vm env: CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7f2b270f01..0efa960359 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -161,7 +161,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 with: components: rustfmt, clippy - name: Set up cargo cache @@ -201,7 +201,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 with: targets: wasm32-unknown-unknown @@ -247,7 +247,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 with: targets: wasm32-unknown-unknown @@ -287,7 +287,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 with: targets: wasm32-unknown-unknown @@ -329,7 +329,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 with: components: llvm-tools-preview - name: Set up cargo cache @@ -395,7 +395,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust - uses: dtolnay/rust-toolchain@1.76.0 + uses: dtolnay/rust-toolchain@1.80.0 - name: Set up cargo cache uses: Swatinem/rust-cache@v2 - name: Checkout From e06abbf63f8861345c440016dcaf54977d7df442 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 3 Sep 2024 15:09:54 -0300 Subject: [PATCH 07/12] remove duplicated imports --- vm/src/tests/cairo_pie_test.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/vm/src/tests/cairo_pie_test.rs b/vm/src/tests/cairo_pie_test.rs index d72dadc383..d8a186d6a9 100644 --- a/vm/src/tests/cairo_pie_test.rs +++ b/vm/src/tests/cairo_pie_test.rs @@ -25,12 +25,6 @@ use crate::{ }, }; -#[cfg(not(feature = "std"))] -use alloc::{ - string::{String, ToString}, - vec::Vec, -}; - #[test] #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)] fn pedersen_test() { From f5b134d75722045df80867c0c61c3d368018a9a4 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 3 Sep 2024 15:41:25 -0300 Subject: [PATCH 08/12] remove unused imports --- vm/Cargo.toml | 2 +- vm/src/tests/cairo_pie_test.rs | 6 ------ vm/src/tests/mod.rs | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/vm/Cargo.toml b/vm/Cargo.toml index 6311f1b562..bb963abbc5 100644 --- a/vm/Cargo.toml +++ b/vm/Cargo.toml @@ -9,7 +9,7 @@ readme.workspace = true keywords.workspace = true [features] -default = ["std"] +#default = ["std"] std = [ "serde_json/std", "bincode/std", diff --git a/vm/src/tests/cairo_pie_test.rs b/vm/src/tests/cairo_pie_test.rs index d8a186d6a9..e6de72ea28 100644 --- a/vm/src/tests/cairo_pie_test.rs +++ b/vm/src/tests/cairo_pie_test.rs @@ -6,12 +6,6 @@ use crate::{ #[cfg(target_arch = "wasm32")] use wasm_bindgen_test::*; -#[cfg(not(feature = "std"))] -use alloc::{ - string::{String, ToString}, - vec::Vec, -}; - use crate::{ cairo_run::{cairo_run, CairoRunConfig}, hint_processor::builtin_hint_processor::builtin_hint_processor_definition::BuiltinHintProcessor, diff --git a/vm/src/tests/mod.rs b/vm/src/tests/mod.rs index 851cbf32bb..6df6e743fe 100644 --- a/vm/src/tests/mod.rs +++ b/vm/src/tests/mod.rs @@ -26,7 +26,7 @@ use crate::{ use wasm_bindgen_test::*; #[cfg(not(feature = "std"))] -use alloc::{string::String, vec::Vec}; +use alloc::vec::Vec; mod bitwise_test; #[cfg(test)] From 3e10ae12b7035fad87467cc3ce5c55835a9a7c83 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 3 Sep 2024 15:48:25 -0300 Subject: [PATCH 09/12] remove zip unused dependencies --- Cargo.lock | 170 +------------------------------------------------- vm/Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 168 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 928fed9d42..03c0cb9c47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,17 +23,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - [[package]] name = "ahash" version = "0.8.11" @@ -243,8 +232,8 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", - "zstd 0.13.2", - "zstd-safe 7.2.1", + "zstd", + "zstd-safe", ] [[package]] @@ -334,12 +323,6 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - [[package]] name = "bincode" version = "2.0.0-rc.3" @@ -452,27 +435,6 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" -[[package]] -name = "bzip2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - [[package]] name = "cairo-lang-casm" version = "2.8.0" @@ -1086,16 +1048,6 @@ dependencies = [ "half", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "clap" version = "4.5.16" @@ -1188,12 +1140,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - [[package]] name = "convert_case" version = "0.6.0" @@ -1309,15 +1255,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] - [[package]] name = "derivative" version = "2.2.0" @@ -1875,15 +1812,6 @@ version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - [[package]] name = "iri-string" version = "0.7.2" @@ -2249,12 +2177,6 @@ dependencies = [ "num-traits 0.2.19", ] -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - [[package]] name = "num-integer" version = "0.1.46" @@ -2386,17 +2308,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core", - "subtle", -] - [[package]] name = "paste" version = "1.0.15" @@ -2409,18 +2320,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef" -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest", - "hmac", - "password-hash", - "sha2", -] - [[package]] name = "percent-encoding" version = "2.3.1" @@ -2518,12 +2417,6 @@ dependencies = [ "plotters-backend", ] -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - [[package]] name = "ppv-lite86" version = "0.2.20" @@ -2990,17 +2883,6 @@ dependencies = [ "serde", ] -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - [[package]] name = "sha2" version = "0.10.8" @@ -3301,25 +3183,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "time" -version = "0.3.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "num-conv", - "powerfmt", - "serde", - "time-core", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - [[package]] name = "tiny-keccak" version = "2.0.2" @@ -4031,27 +3894,10 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ - "aes", "byteorder", - "bzip2", - "constant_time_eq", "crc32fast", "crossbeam-utils", "flate2", - "hmac", - "pbkdf2", - "sha1", - "time", - "zstd 0.11.2+zstd.1.5.2", -] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe 5.0.2+zstd.1.5.2", ] [[package]] @@ -4060,17 +3906,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ - "zstd-safe 7.2.1", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", + "zstd-safe", ] [[package]] diff --git a/vm/Cargo.toml b/vm/Cargo.toml index bb963abbc5..aef28f4f15 100644 --- a/vm/Cargo.toml +++ b/vm/Cargo.toml @@ -37,7 +37,7 @@ test_utils = ["std", "dep:arbitrary", "starknet-types-core/arbitrary", "starknet extensive_hints = [] [dependencies] -zip = {version = "0.6.6", optional = true } +zip = { version = "0.6.6", optional = true, default-features = false, features = ["deflate"] } num-bigint = { workspace = true } rand = { workspace = true } num-traits = { workspace = true } From 63e3d20af0ff81c73112154fdab2448e77bfa9ef Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 3 Sep 2024 16:02:58 -0300 Subject: [PATCH 10/12] uncomment --- vm/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/Cargo.toml b/vm/Cargo.toml index aef28f4f15..07bcde08cd 100644 --- a/vm/Cargo.toml +++ b/vm/Cargo.toml @@ -9,7 +9,7 @@ readme.workspace = true keywords.workspace = true [features] -#default = ["std"] +default = ["std"] std = [ "serde_json/std", "bincode/std", From 84c9635298fd04d2f28b43df183ff5fde6d8f968 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 3 Sep 2024 16:06:45 -0300 Subject: [PATCH 11/12] undo dependecy upgrade --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 93dbab3030..64a4af3e09 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,7 +51,7 @@ sha3 = { version = "0.10.8", default-features = false } lazy_static = { version = "1.4.0", default-features = false, features = [ "spin_no_std", ] } -nom = { version = "7.1.3", default-features = false } +nom = { version = "7", default-features = false } sha2 = { version = "0.10.7", features = ["compress"], default-features = false } generic-array = { version = "0.14.7", default-features = false } keccak = { version = "0.1.2", default-features = false } From c2b5cc19ba4f1048908fad9a18ddd894e30bc874 Mon Sep 17 00:00:00 2001 From: FrancoGiachetta Date: Tue, 10 Sep 2024 15:17:31 -0300 Subject: [PATCH 12/12] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f077a403f6..0618a0fcea 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ It's Turing-complete and it was created by [Starkware](https://starkware.co/) as These are needed in order to compile and use the project. -- [Rust 1.76.0 or newer](https://www.rust-lang.org/tools/install) +- [Rust 1.80.0 or newer](https://www.rust-lang.org/tools/install) - Cargo #### Optional