From e9173325cd0cd1a0975d0cded7b4c1358e8a9f73 Mon Sep 17 00:00:00 2001 From: Gregory Edison Date: Mon, 11 Dec 2023 17:08:00 +0100 Subject: [PATCH] bump cairo and cairo-vm --- Cargo.lock | 1816 ++++++----------- Cargo.toml | 18 +- crates/blockifier/Cargo.toml | 3 - .../src/execution/contract_class.rs | 161 +- .../deprecated_entry_point_execution.rs | 2 +- .../src/execution/entry_point_execution.rs | 2 +- .../src/execution/entry_point_test.rs | 296 ++- crates/native_blockifier/Cargo.toml | 3 - 8 files changed, 979 insertions(+), 1322 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 43754a6b91..a4801cf142 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -55,66 +55,12 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" -[[package]] -name = "anstream" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" - -[[package]] -name = "anstyle-parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" -dependencies = [ - "windows-sys 0.48.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" -dependencies = [ - "anstyle", - "windows-sys 0.48.0", -] - [[package]] name = "anyhow" version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" -[[package]] -name = "arc-swap" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" - [[package]] name = "ark-ec" version = "0.4.2" @@ -272,18 +218,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", + "syn 2.0.40", ] [[package]] @@ -310,29 +245,10 @@ dependencies = [ [[package]] name = "bincode" version = "2.0.0-rc.3" -source = "git+https://github.com/bincode-org/bincode.git?tag=v2.0.0-rc.3#aada4bb4cb457677a4b8e47572ae7ca8dd44927c" -dependencies = [ - "serde", -] - -[[package]] -name = "bindgen" -version = "0.66.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" +checksum = "f11ea1a0346b94ef188834a65c068a03aec181c94896d481d7a0a40d85b0ce95" dependencies = [ - "bitflags 2.4.1", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "peeking_take_while", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.39", + "serde", ] [[package]] @@ -393,11 +309,11 @@ dependencies = [ "ark-secp256r1", "assert_matches", "cached", - "cairo-felt", - "cairo-lang-casm", + "cairo-felt 0.9.1", + "cairo-lang-casm 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "cairo-lang-runner", - "cairo-lang-starknet", - "cairo-lang-utils", + "cairo-lang-starknet 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "cairo-vm", "ctor", "derive_more", @@ -417,7 +333,7 @@ dependencies = [ "starknet-crypto 0.5.2", "starknet_api", "strum", - "strum_macros 0.24.3", + "strum_macros", "test-case", "thiserror", ] @@ -440,12 +356,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" -[[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" - [[package]] name = "cached" version = "0.44.0" @@ -484,8 +394,21 @@ checksum = "3a4f925191b4367301851c6d99b09890311d74b0d43f274c0b34c86d308a3663" [[package]] name = "cairo-felt" -version = "0.8.2" -source = "git+https://github.com/kkrt-labs/cairo-vm.git?branch=v0.8.2#2105b7c2f6c37d003ae7a4e0c531e8a3233eb5f2" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5972097b8800ca5dffb458040e74c724a2ac4fa4b5b480b50f5b96c7e67d6427" +dependencies = [ + "lazy_static", + "num-bigint", + "num-integer", + "num-traits 0.2.17", + "serde", +] + +[[package]] +name = "cairo-felt" +version = "0.9.1" +source = "git+https://github.com/kkrt-labs/cairo-vm.git?branch=v0.9.1#e14bb1590ece9b4e960761ad89a85f52b419a4fb" dependencies = [ "lazy_static", "num-bigint", @@ -496,12 +419,28 @@ dependencies = [ [[package]] name = "cairo-lang-casm" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49cd1bd89a1772dc87408a0aa3551f494dd5a719f64ae36fb8e30c0e1d09ee90" +checksum = "2850dc1d46d5bfb64c5ed0bc7ccd4821e4d4c36a8f2678a897df7c2bfaefe6fc" dependencies = [ - "cairo-lang-utils", - "indoc 2.0.4", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indoc", + "num-bigint", + "num-traits 0.2.17", + "parity-scale-codec", + "parity-scale-codec-derive", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "cairo-lang-casm" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" +dependencies = [ + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "indoc", "num-bigint", "num-traits 0.2.17", "parity-scale-codec", @@ -513,22 +452,44 @@ dependencies = [ [[package]] name = "cairo-lang-compiler" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85a90caccb1659e3c0f9914fa445bf11dfe6291cbc88d1d7f061de2ca3ce55f" +checksum = "2e6360b6735eeff503c6103520fef7410ca2c5a5ae90584822baa326607721ac" +dependencies = [ + "anyhow", + "cairo-lang-defs 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-diagnostics 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-filesystem 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-lowering 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-parser 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-project 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-semantic 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-sierra 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-sierra-generator 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-syntax 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.11.0", + "salsa", + "thiserror", +] + +[[package]] +name = "cairo-lang-compiler" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" dependencies = [ "anyhow", - "cairo-lang-defs", - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-lowering", - "cairo-lang-parser", - "cairo-lang-project", - "cairo-lang-semantic", - "cairo-lang-sierra", - "cairo-lang-sierra-generator", - "cairo-lang-syntax", - "cairo-lang-utils", + "cairo-lang-defs 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-diagnostics 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-filesystem 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-lowering 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-parser 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-project 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-semantic 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra-generator 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-syntax 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "itertools 0.11.0", "salsa", "thiserror", @@ -536,25 +497,49 @@ dependencies = [ [[package]] name = "cairo-lang-debug" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52701341fe368486790766d529e709baf7d8a54cb90ed0e56fb773a6de732ad" +checksum = "0c190deb7ba826a462fa7339e482d5e2df78d329435f4988b15f7752e033b5ac" +dependencies = [ + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cairo-lang-debug" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" dependencies = [ - "cairo-lang-utils", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", ] [[package]] name = "cairo-lang-defs" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a43a1ea4c957a468503dca018dc8236bb04b1e34cab2d6031584c5f1349646ba" +checksum = "b42a34d9952b04fa0c96fafd08d170097fb5075ff81826a034ef9faa70556de8" dependencies = [ - "cairo-lang-debug", - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-parser", - "cairo-lang-syntax", - "cairo-lang-utils", + "cairo-lang-debug 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-diagnostics 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-filesystem 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-parser 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-syntax 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.11.0", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-defs" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" +dependencies = [ + "cairo-lang-debug 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-diagnostics 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-filesystem 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-parser 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-syntax 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "itertools 0.11.0", "salsa", "smol_str", @@ -562,34 +547,67 @@ dependencies = [ [[package]] name = "cairo-lang-diagnostics" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d73d89a3ce8d88ea226dd82b51c324cb54513bd0451faa52d9d1b352f861eb2e" +checksum = "c399832f9fc462cd51687a415c391ead4b99ee48c54cad5c8e1d5004ff6520c7" dependencies = [ - "cairo-lang-debug", - "cairo-lang-filesystem", - "cairo-lang-utils", + "cairo-lang-debug 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-filesystem 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.11.0", +] + +[[package]] +name = "cairo-lang-diagnostics" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" +dependencies = [ + "cairo-lang-debug 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-filesystem 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "itertools 0.11.0", ] [[package]] name = "cairo-lang-eq-solver" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01045142ad7207084a9107e98d45e132b769bde649add625b4ea28b0f452478e" +checksum = "d73846e0dec2a204bc429f7421020fc6a98ae48f20f0cfa2aa1091b78221d6ce" dependencies = [ - "cairo-lang-utils", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "good_lp", +] + +[[package]] +name = "cairo-lang-eq-solver" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" +dependencies = [ + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "good_lp", ] [[package]] name = "cairo-lang-filesystem" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2544b747b73fbb6fff9e19d5fdc9b632e436b4623ed7cbb378d061a0bcbbe736" +checksum = "64f15f4a10963dcd5baa0386632c5ce4136d54f93d6c71cc16a49cbcbf774ee2" +dependencies = [ + "cairo-lang-debug 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "path-clean", + "salsa", + "serde", + "smol_str", +] + +[[package]] +name = "cairo-lang-filesystem" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" dependencies = [ - "cairo-lang-debug", - "cairo-lang-utils", + "cairo-lang-debug 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "path-clean", "salsa", "serde", @@ -598,19 +616,44 @@ dependencies = [ [[package]] name = "cairo-lang-lowering" -version = "2.4.0-rc6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efcbc8934db02ef73f8cd11a04dc72cc745121768c3e7b2352b518ad9311d488" -dependencies = [ - "cairo-lang-debug", - "cairo-lang-defs", - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-parser", - "cairo-lang-proc-macros", - "cairo-lang-semantic", - "cairo-lang-syntax", - "cairo-lang-utils", +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5547bb3e13841a840b4faad3eb7fe7c39b525220f708973b71b1b9077747758b" +dependencies = [ + "cairo-lang-debug 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-defs 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-diagnostics 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-filesystem 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-parser 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-proc-macros 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-semantic 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-syntax 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "id-arena", + "indexmap 2.1.0", + "itertools 0.11.0", + "log", + "num-bigint", + "num-traits 0.2.17", + "once_cell", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-lowering" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" +dependencies = [ + "cairo-lang-debug 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-defs 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-diagnostics 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-filesystem 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-parser 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-proc-macros 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-semantic 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-syntax 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "id-arena", "indexmap 2.1.0", "itertools 0.11.0", @@ -624,15 +667,34 @@ dependencies = [ [[package]] name = "cairo-lang-parser" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571649bca547280a561dc312d4690a1b83c11c89b3a06385a6ce2ebe9233025d" +checksum = "197445f8db467e28dbeddc573047dd8f2a0ef3fcc3d1c32575162d4cf79988df" dependencies = [ - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-syntax", - "cairo-lang-syntax-codegen", - "cairo-lang-utils", + "cairo-lang-diagnostics 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-filesystem 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-syntax 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-syntax-codegen 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "colored", + "itertools 0.11.0", + "num-bigint", + "num-traits 0.2.17", + "salsa", + "smol_str", + "unescaper", +] + +[[package]] +name = "cairo-lang-parser" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" +dependencies = [ + "cairo-lang-diagnostics 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-filesystem 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-syntax 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-syntax-codegen 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "colored", "itertools 0.11.0", "num-bigint", @@ -644,18 +706,36 @@ dependencies = [ [[package]] name = "cairo-lang-plugins" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e768ca10354ca46099dbad54163feccbaac21cb500d3f3b44a7aa682a995bc" +checksum = "9c3ea747577bd93e4791bdd57744dfddbc4b99ce056fffb5fd41340759642f91" dependencies = [ - "cairo-lang-defs", - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-parser", - "cairo-lang-syntax", - "cairo-lang-utils", + "cairo-lang-defs 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-diagnostics 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-filesystem 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-parser 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-syntax 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "indent", - "indoc 2.0.4", + "indoc", + "itertools 0.11.0", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-plugins" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" +dependencies = [ + "cairo-lang-defs 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-diagnostics 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-filesystem 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-parser 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-syntax 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "indent", + "indoc", "itertools 0.11.0", "salsa", "smol_str", @@ -663,23 +743,46 @@ dependencies = [ [[package]] name = "cairo-lang-proc-macros" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465e78d2dd3060615ec693158f0fa260f6dcdb677c197ac4b0ed418d7de331d0" +checksum = "c8cc59c40344194d2cc825071080d887826dcf0df37de71e58fc8aa4c344bb84" +dependencies = [ + "cairo-lang-debug 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quote", + "syn 2.0.40", +] + +[[package]] +name = "cairo-lang-proc-macros" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" dependencies = [ - "cairo-lang-debug", + "cairo-lang-debug 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] name = "cairo-lang-project" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70108135746d14b2f0aefcddf1b00566edc80b949ab47f0d48c0e142bab106b1" +checksum = "312b65dec1d0b8e1b420d7b464c0c771f18301177376432681c05c30f5ef9604" +dependencies = [ + "cairo-lang-filesystem 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde", + "smol_str", + "thiserror", + "toml", +] + +[[package]] +name = "cairo-lang-project" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" dependencies = [ - "cairo-lang-filesystem", - "cairo-lang-utils", + "cairo-lang-filesystem 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "serde", "smol_str", "thiserror", @@ -688,22 +791,21 @@ dependencies = [ [[package]] name = "cairo-lang-runner" -version = "2.4.0-rc6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a021c1b1882b993971f728dcf5d94a59959acc72a0311c9c64ce6f86d762418" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" dependencies = [ "ark-ff", "ark-secp256k1", "ark-secp256r1", "ark-std", - "cairo-felt", - "cairo-lang-casm", - "cairo-lang-sierra", - "cairo-lang-sierra-ap-change", - "cairo-lang-sierra-to-casm", - "cairo-lang-sierra-type-size", - "cairo-lang-starknet", - "cairo-lang-utils", + "cairo-felt 0.9.1", + "cairo-lang-casm 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra-ap-change 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra-to-casm 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra-type-size 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-starknet 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "cairo-vm", "itertools 0.11.0", "keccak", @@ -715,21 +817,45 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" -version = "2.4.0-rc6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7fc27407a4c9b54c5cf2e7078d862b668a9292f7ef93d3cc6f0d078418e273c" -dependencies = [ - "cairo-lang-debug", - "cairo-lang-defs", - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-parser", - "cairo-lang-plugins", - "cairo-lang-proc-macros", - "cairo-lang-syntax", - "cairo-lang-utils", +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e18c57cd10bcf69b427b901ce058268d21f65f5199b33e36b72b02ba7ceff74" +dependencies = [ + "cairo-lang-debug 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-defs 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-diagnostics 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-filesystem 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-parser 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-plugins 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-proc-macros 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-syntax 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "id-arena", - "indoc 2.0.4", + "indoc", + "itertools 0.11.0", + "num-bigint", + "num-traits 0.2.17", + "once_cell", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-semantic" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" +dependencies = [ + "cairo-lang-debug 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-defs 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-diagnostics 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-filesystem 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-parser 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-plugins 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-proc-macros 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-syntax 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "id-arena", + "indoc", "itertools 0.11.0", "num-bigint", "num-traits 0.2.17", @@ -740,12 +866,36 @@ dependencies = [ [[package]] name = "cairo-lang-sierra" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403df9553e9e9dad38442ef29a773c7c056d10c4d357a43310e0ef152ab1d272" +checksum = "84cf029a71e0176992cc401f7f182dc92e14a51662b1576240a7ecc79efac6bc" dependencies = [ "anyhow", - "cairo-lang-utils", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "const-fnv1a-hash", + "convert_case 0.6.0", + "derivative", + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "num-bigint", + "num-traits 0.2.17", + "regex", + "salsa", + "serde", + "serde_json", + "sha3", + "smol_str", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" +dependencies = [ + "anyhow", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "const-fnv1a-hash", "convert_case 0.6.0", "derivative", @@ -765,48 +915,97 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-ap-change" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25df2cbd9f71cc11a3a4e13df1d3d78d0c2bb9985ffbe38d9aacd58e2699a904" +checksum = "529ed2d8d14ef4c2d77e45db597425488e194b8ab1d3210742a1c54d78743407" +dependencies = [ + "cairo-lang-eq-solver 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-sierra 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-sierra-type-size 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.11.0", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-ap-change" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" dependencies = [ - "cairo-lang-eq-solver", - "cairo-lang-sierra", - "cairo-lang-sierra-type-size", - "cairo-lang-utils", + "cairo-lang-eq-solver 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra-type-size 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "itertools 0.11.0", "thiserror", ] [[package]] name = "cairo-lang-sierra-gas" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c87e47ea5c9b4d4c716700fd1296114d7847e2aaf252e3fe8e5b3a5461b893" +checksum = "d0cbe3dd4f663d7df902a2f10cf52990d62f178741fe1494de51f08bb89b7aa6" +dependencies = [ + "cairo-lang-eq-solver 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-sierra 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-sierra-type-size 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.11.0", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-gas" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" dependencies = [ - "cairo-lang-eq-solver", - "cairo-lang-sierra", - "cairo-lang-sierra-type-size", - "cairo-lang-utils", + "cairo-lang-eq-solver 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra-type-size 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "itertools 0.11.0", "thiserror", ] [[package]] name = "cairo-lang-sierra-generator" -version = "2.4.0-rc6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09d628a0ad8a43a18d86120554a1b73ff15822cdd82da01abc9ee01ee90a033" -dependencies = [ - "cairo-lang-debug", - "cairo-lang-defs", - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-lowering", - "cairo-lang-parser", - "cairo-lang-semantic", - "cairo-lang-sierra", - "cairo-lang-syntax", - "cairo-lang-utils", +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5bed52b240e1546b08e075493b2df4030dba2199e019d36f52da1423f2c653" +dependencies = [ + "cairo-lang-debug 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-defs 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-diagnostics 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-filesystem 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-lowering 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-parser 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-semantic 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-sierra 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-syntax 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 2.1.0", + "itertools 0.11.0", + "num-bigint", + "once_cell", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-sierra-generator" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" +dependencies = [ + "cairo-lang-debug 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-defs 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-diagnostics 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-filesystem 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-lowering 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-parser 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-semantic 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-syntax 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "indexmap 2.1.0", "itertools 0.11.0", "num-bigint", @@ -817,19 +1016,39 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-to-casm" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad2cdf46d655a21a377070c90edb5e37c2e26e56653f47e9b59c20019e673a01" +checksum = "fc16661a7a78f885f6b5a4fdb3c7463d9ee3f6bca83266b4f2b956e65579ec72" dependencies = [ "assert_matches", - "cairo-felt", - "cairo-lang-casm", - "cairo-lang-sierra", - "cairo-lang-sierra-ap-change", - "cairo-lang-sierra-gas", - "cairo-lang-sierra-type-size", - "cairo-lang-utils", - "indoc 2.0.4", + "cairo-felt 0.8.7", + "cairo-lang-casm 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-sierra 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-sierra-ap-change 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-sierra-gas 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-sierra-type-size 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indoc", + "itertools 0.11.0", + "num-bigint", + "num-traits 0.2.17", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-to-casm" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" +dependencies = [ + "assert_matches", + "cairo-felt 0.9.1", + "cairo-lang-casm 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra-ap-change 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra-gas 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra-type-size 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "indoc", "itertools 0.11.0", "num-bigint", "num-traits 0.2.17", @@ -838,38 +1057,83 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-type-size" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881da96cdec770e64093b3f4e9208abc62e0aca129e6ebbc75a57d3123f3e281" +checksum = "9f3fa025f6bc1c8d4556c9fc4609fb6f27071470ed47eb3bd0b5f9a159e51124" +dependencies = [ + "cairo-lang-sierra 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cairo-lang-sierra-type-size" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" dependencies = [ - "cairo-lang-sierra", - "cairo-lang-utils", + "cairo-lang-sierra 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", ] [[package]] name = "cairo-lang-starknet" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab6b62e95008f7c75af5f6169046b5a6531d22373cd05579be9880397cdaf2e3" +checksum = "ac5523d9c5b8e7c98afb2907c2cf4821a251d94fc42d37940063a9f2adbea05f" +dependencies = [ + "anyhow", + "cairo-felt 0.8.7", + "cairo-lang-casm 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-compiler 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-defs 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-diagnostics 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-filesystem 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-lowering 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-semantic 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-sierra 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-sierra-generator 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-sierra-to-casm 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-syntax 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "const_format", + "convert_case 0.6.0", + "indent", + "indoc", + "itertools 0.11.0", + "num-bigint", + "num-integer", + "num-traits 0.2.17", + "once_cell", + "serde", + "serde_json", + "sha3", + "smol_str", + "starknet-crypto 0.6.1", + "thiserror", +] + +[[package]] +name = "cairo-lang-starknet" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" dependencies = [ "anyhow", - "cairo-felt", - "cairo-lang-casm", - "cairo-lang-compiler", - "cairo-lang-defs", - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-lowering", - "cairo-lang-semantic", - "cairo-lang-sierra", - "cairo-lang-sierra-generator", - "cairo-lang-sierra-to-casm", - "cairo-lang-syntax", - "cairo-lang-utils", + "cairo-felt 0.9.1", + "cairo-lang-casm 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-compiler 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-defs 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-diagnostics 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-filesystem 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-lowering 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-semantic 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra-generator 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-sierra-to-casm 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-syntax 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "const_format", "convert_case 0.6.0", "indent", - "indoc 2.0.4", + "indoc", "itertools 0.11.0", "num-bigint", "num-integer", @@ -885,13 +1149,28 @@ dependencies = [ [[package]] name = "cairo-lang-syntax" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17e9df0b09beb87d028bd068641160ba879682cfee0cea320f9e8f82b0460c07" +checksum = "8c8e9b19fa724135353470ee3452605f82edfec17a7dd4e8388d77152ea4fbd2" dependencies = [ - "cairo-lang-debug", - "cairo-lang-filesystem", - "cairo-lang-utils", + "cairo-lang-debug 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-filesystem 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cairo-lang-utils 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint", + "num-traits 0.2.17", + "salsa", + "smol_str", + "unescaper", +] + +[[package]] +name = "cairo-lang-syntax" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" +dependencies = [ + "cairo-lang-debug 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-filesystem 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", + "cairo-lang-utils 2.4.0 (git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0)", "num-bigint", "num-traits 0.2.17", "salsa", @@ -901,9 +1180,18 @@ dependencies = [ [[package]] name = "cairo-lang-syntax-codegen" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb95d054410dc22534b7e74ae9b327b0abe473ebb216945f70c8999329c8748f" +checksum = "7a50c3a5dc5d890a523122e40dac59f3a430952cec73fe7312dd266ad865f049" +dependencies = [ + "genco", + "xshell", +] + +[[package]] +name = "cairo-lang-syntax-codegen" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" dependencies = [ "genco", "xshell", @@ -911,9 +1199,9 @@ dependencies = [ [[package]] name = "cairo-lang-utils" -version = "2.4.0-rc6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351432462f09f50023da4d8f1cc97ea795fb8850a700a9845915f8c1a931a3d5" +checksum = "88969fe46417affe9628bd039865693431837807eb981115f02756a35f488489" dependencies = [ "indexmap 2.1.0", "itertools 0.11.0", @@ -925,126 +1213,69 @@ dependencies = [ ] [[package]] -name = "cairo-vm" -version = "0.8.2" -source = "git+https://github.com/kkrt-labs/cairo-vm.git?branch=v0.8.2#2105b7c2f6c37d003ae7a4e0c531e8a3233eb5f2" +name = "cairo-lang-utils" +version = "2.4.0" +source = "git+https://github.com/kkrt-labs/cairo.git?branch=v2.4.0#dd644b8ecdb62e67192d6c138a5558469ff72a98" dependencies = [ - "anyhow", - "bincode", - "bitvec", - "cairo-felt", - "generic-array", - "hashbrown 0.14.3", - "hex", - "keccak", - "lazy_static", - "mimalloc", - "nom", + "indexmap 2.1.0", + "itertools 0.11.0", "num-bigint", - "num-integer", - "num-prime", "num-traits 0.2.17", - "rand", + "parity-scale-codec", + "schemars", "serde", - "serde_json", - "sha2", - "sha3", - "starknet-crypto 0.5.2", - "thiserror-no-std", -] - -[[package]] -name = "cast" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "clang-sys" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "bitflags 1.3.2", - "textwrap", - "unicode-width", ] [[package]] -name = "clap" -version = "4.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fffed7514f420abec6d183b1d3acfd9099c79c3a10a06ade4f8203f1411272" +name = "cairo-vm" +version = "0.9.1" +source = "git+https://github.com/kkrt-labs/cairo-vm.git?branch=v0.9.1#e14bb1590ece9b4e960761ad89a85f52b419a4fb" dependencies = [ - "clap_builder", + "anyhow", + "bincode", + "bitvec", + "cairo-felt 0.9.1", + "generic-array", + "hashbrown 0.14.3", + "hex", + "keccak", + "lazy_static", + "mimalloc", + "nom", + "num-bigint", + "num-integer", + "num-prime", + "num-traits 0.2.17", + "rand", + "serde", + "serde_json", + "sha2", + "sha3", + "starknet-crypto 0.6.1", + "thiserror-no-std", ] [[package]] -name = "clap_builder" -version = "4.4.9" +name = "cc" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63361bae7eef3771745f02d8d892bec2fee5f6e34af316ba556e7f97a7069ff1" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", + "libc", ] [[package]] -name = "clap_lex" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" - -[[package]] -name = "colorchoice" +name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "colored" -version = "2.0.4" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" dependencies = [ - "is-terminal", "lazy_static", "windows-sys 0.48.0", ] @@ -1099,75 +1330,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "criterion" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" -dependencies = [ - "atty", - "cast", - "clap 2.34.0", - "criterion-plot", - "csv", - "itertools 0.10.5", - "lazy_static", - "num-traits 0.2.17", - "oorandom", - "plotters", - "rayon", - "regex", - "serde", - "serde_cbor", - "serde_derive", - "serde_json", - "tinytemplate", - "walkdir", -] - -[[package]] -name = "criterion-plot" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" -dependencies = [ - "cast", - "itertools 0.10.5", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" -dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset", - "scopeguard", -] - [[package]] name = "crossbeam-utils" version = "0.8.16" @@ -1204,27 +1366,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "csv" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" -dependencies = [ - "csv-core", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" -dependencies = [ - "memchr", -] - [[package]] name = "ctor" version = "0.2.5" @@ -1232,7 +1373,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37e366bff8cd32dd8754b0991fb66b279dc48f598c3a18914852a6673deef583" dependencies = [ "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -1369,12 +1510,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - [[package]] name = "fixed-hash" version = "0.8.0" @@ -1393,31 +1528,12 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - [[package]] name = "funty" version = "2.0.0" @@ -1480,7 +1596,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -1538,7 +1654,7 @@ checksum = "d4cf186fea4af17825116f72932fe52cce9a13bae39ff63b4dc0cfdb3fb4bde1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -1570,12 +1686,6 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - [[package]] name = "good_lp" version = "1.7.0" @@ -1586,12 +1696,6 @@ dependencies = [ "minilp", ] -[[package]] -name = "half" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" - [[package]] name = "hashbrown" version = "0.12.3" @@ -1636,15 +1740,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.3" @@ -1666,12 +1761,6 @@ dependencies = [ "digest", ] -[[package]] -name = "human_bytes" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91f255a4535024abf7640cb288260811fc14794f62b063652ed349f9a6c2348e" - [[package]] name = "id-arena" version = "2.2.1" @@ -1684,33 +1773,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "if_chain" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" - [[package]] name = "impl-codec" version = "0.6.0" @@ -1768,12 +1830,6 @@ dependencies = [ "serde", ] -[[package]] -name = "indoc" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" - [[package]] name = "indoc" version = "2.0.4" @@ -1789,19 +1845,13 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "integer-encoding" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" - [[package]] name = "is-terminal" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "rustix", "windows-sys 0.48.0", ] @@ -1826,9 +1876,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" @@ -1889,44 +1939,11 @@ dependencies = [ "spin", ] -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" -version = "0.2.150" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" - -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] - -[[package]] -name = "libmdbx" -version = "0.3.5" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f0bee397dc9a7003e7bd34fffc1dc2d4c4fdc96530a0c439a5f98c9402bc7bf" -dependencies = [ - "bitflags 2.4.1", - "byteorder", - "derive_more", - "indexmap 1.9.3", - "libc", - "lifetimed-bytes", - "mdbx-sys", - "parking_lot 0.12.1", - "thiserror", -] +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "libmimalloc-sys" @@ -1949,20 +1966,11 @@ dependencies = [ "redox_syscall 0.4.1", ] -[[package]] -name = "lifetimed-bytes" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c970c8ea4c7b023a41cfa4af4c785a16694604c2f2a3b0d1f20a9bcb73fa550" -dependencies = [ - "bytes", -] - [[package]] name = "linux-raw-sys" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lock_api" @@ -1989,12 +1997,6 @@ dependencies = [ "hashbrown 0.12.3", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matrixmultiply" version = "0.2.4" @@ -2004,63 +2006,12 @@ dependencies = [ "rawpointer", ] -[[package]] -name = "mdbx-sys" -version = "0.12.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a329f8d655fb646cc9511c00886eefcddb6ef131869ef2d4b02c24c66825ac" -dependencies = [ - "bindgen", - "cc", - "libc", -] - [[package]] name = "memchr" version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" -[[package]] -name = "memmap2" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "metrics" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fde3af1a009ed76a778cb84fdef9e7dbbdf5775ae3e4cc1f434a6a307f6f76c5" -dependencies = [ - "ahash 0.8.6", - "metrics-macros", - "portable-atomic", -] - -[[package]] -name = "metrics-macros" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddece26afd34c31585c74a4db0630c376df271c285d682d1e55012197830b6df" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - [[package]] name = "mimalloc" version = "0.1.39" @@ -2095,28 +2046,6 @@ dependencies = [ "adler", ] -[[package]] -name = "native_blockifier" -version = "0.4.0-rc6" -dependencies = [ - "blockifier", - "cached", - "cairo-lang-starknet", - "cairo-vm", - "criterion", - "indexmap 2.1.0", - "log", - "num-bigint", - "papyrus_storage", - "pretty_assertions", - "pyo3", - "pyo3-log", - "serde_json", - "starknet_api", - "tempfile", - "thiserror", -] - [[package]] name = "ndarray" version = "0.13.1" @@ -2234,90 +2163,22 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "oorandom" -version = "11.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" - -[[package]] -name = "page_size" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d5b2194ed13191c1999ae0704b7839fb18384fa22e49b57eeaa97d79ce40da" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "papyrus_config" -version = "0.2.0-rc3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b290d624e39ec04018140e6a94dc162fc812b17e31c02660505346065437ddca" -dependencies = [ - "clap 4.4.10", - "itertools 0.10.5", - "serde", - "serde_json", - "strum_macros 0.25.3", - "thiserror", - "validator", -] - -[[package]] -name = "papyrus_proc_macros" -version = "0.2.0-rc3" +name = "once_cell" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3068769b78f2ccd22544f742dc37d17c69d603cdee22b6996f8d2b7747da7f23" -dependencies = [ - "quote", - "syn 2.0.39", -] +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] -name = "papyrus_storage" -version = "0.2.0-rc3" +name = "oorandom" +version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b21c01003e46b28f6de4adb5dada6c74c859d02e5d56774f3a077ec265bf39da" -dependencies = [ - "byteorder", - "cairo-lang-casm", - "cairo-lang-starknet", - "cairo-lang-utils", - "clap 4.4.10", - "flate2", - "human_bytes", - "indexmap 2.1.0", - "integer-encoding", - "libmdbx", - "memmap2", - "metrics", - "num-bigint", - "page_size", - "papyrus_config", - "papyrus_proc_macros", - "parity-scale-codec", - "primitive-types", - "serde", - "serde_json", - "starknet_api", - "tempfile", - "thiserror", - "tracing", - "validator", -] +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "parity-scale-codec" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec", "bitvec", @@ -2329,9 +2190,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2399,18 +2260,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef" -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - [[package]] name = "petgraph" version = "0.6.4" @@ -2451,7 +2300,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -2490,40 +2339,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "plotters" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" -dependencies = [ - "num-traits 0.2.17", - "plotters-backend", - "plotters-svg", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "plotters-backend" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" - -[[package]] -name = "plotters-svg" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" -dependencies = [ - "plotters-backend", -] - -[[package]] -name = "portable-atomic" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b" - [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2560,12 +2375,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.3.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ - "once_cell", - "toml_edit 0.19.15", + "toml_edit 0.20.7", ] [[package]] @@ -2601,79 +2415,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "pyo3" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e681a6cfdc4adcc93b4d3cf993749a4552018ee0a9b65fc0ccfad74352c72a38" -dependencies = [ - "cfg-if", - "hashbrown 0.14.3", - "indoc 1.0.9", - "libc", - "memoffset", - "num-bigint", - "parking_lot 0.12.1", - "pyo3-build-config", - "pyo3-ffi", - "pyo3-macros", - "unindent", -] - -[[package]] -name = "pyo3-build-config" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076c73d0bc438f7a4ef6fdd0c3bb4732149136abd952b110ac93e4edb13a6ba5" -dependencies = [ - "once_cell", - "target-lexicon", -] - -[[package]] -name = "pyo3-ffi" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e53cee42e77ebe256066ba8aa77eff722b3bb91f3419177cf4cd0f304d3284d9" -dependencies = [ - "libc", - "pyo3-build-config", -] - -[[package]] -name = "pyo3-log" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c09c2b349b6538d8a73d436ca606dab6ce0aaab4dad9e6b7bdd57a4f556c3bc3" -dependencies = [ - "arc-swap", - "log", - "pyo3", -] - -[[package]] -name = "pyo3-macros" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfeb4c99597e136528c6dd7d5e3de5434d1ceaf487436a3f03b2d56b6fc9efd1" -dependencies = [ - "proc-macro2", - "pyo3-macros-backend", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "pyo3-macros-backend" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "947dc12175c254889edc0c02e399476c2f652b4b9ebd123aa655c224de259536" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "quote" version = "1.0.33" @@ -2725,26 +2466,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" -[[package]] -name = "rayon" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - [[package]] name = "redox_syscall" version = "0.2.16" @@ -2880,15 +2601,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.25" +version = "0.38.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ "bitflags 2.4.1", "errno", "libc", "linux-raw-sys", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2899,9 +2620,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "salsa" @@ -2932,15 +2653,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - [[package]] name = "schemars" version = "0.8.16" @@ -2987,16 +2699,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde_cbor" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" -dependencies = [ - "half", - "serde", -] - [[package]] name = "serde_derive" version = "1.0.193" @@ -3005,7 +2707,7 @@ checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -3060,12 +2762,6 @@ dependencies = [ "keccak", ] -[[package]] -name = "shlex" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" - [[package]] name = "siphasher" version = "0.3.11" @@ -3161,7 +2857,7 @@ checksum = "af6527b845423542c8a16e060ea1bc43f67229848e7cd4c4d80be994a84220ce" dependencies = [ "starknet-curve 0.4.0", "starknet-ff", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -3196,11 +2892,11 @@ dependencies = [ [[package]] name = "starknet_api" -version = "0.6.0-rc3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874475a79285b03525dcb6773c5b6436d0bb937de9791c43a02a682a0fcbefd4" +checksum = "0f9d0c42ef835df4cb8fc0468825aa5ad2825da927a89d5346ec0ef74573f158" dependencies = [ - "cairo-lang-starknet", + "cairo-lang-starknet 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more", "hex", "indexmap 2.1.0", @@ -3210,7 +2906,7 @@ dependencies = [ "serde_json", "starknet-crypto 0.5.2", "strum", - "strum_macros 0.24.3", + "strum_macros", "thiserror", ] @@ -3258,19 +2954,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "strum_macros" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.39", -] - [[package]] name = "subtle" version = "2.5.0" @@ -3290,9 +2973,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "13fa70a4ee923979ffb522cacce59d34421ebdea5625e1073c4326ef9d2dd42e" dependencies = [ "proc-macro2", "quote", @@ -3305,25 +2988,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" -[[package]] -name = "target-lexicon" -version = "0.12.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" - -[[package]] -name = "tempfile" -version = "3.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" -dependencies = [ - "cfg-if", - "fastrand", - "redox_syscall 0.4.1", - "rustix", - "windows-sys 0.48.0", -] - [[package]] name = "term" version = "0.7.0" @@ -3357,15 +3021,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - [[package]] name = "thiserror" version = "1.0.50" @@ -3383,7 +3038,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -3415,36 +3070,11 @@ dependencies = [ "crunchy", ] -[[package]] -name = "tinytemplate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" -dependencies = [ - "serde", - "serde_json", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" -version = "1.34.0" +version = "1.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" dependencies = [ "backtrace", "parking_lot 0.12.1", @@ -3460,7 +3090,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -3486,9 +3116,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ "indexmap 2.1.0", "toml_datetime", @@ -3508,38 +3138,6 @@ dependencies = [ "winnow", ] -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", -] - [[package]] name = "typenum" version = "1.17.0" @@ -3567,123 +3165,30 @@ dependencies = [ "thiserror", ] -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" -[[package]] -name = "unicode-width" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" - [[package]] name = "unicode-xid" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "unindent" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna 0.5.0", - "percent-encoding", -] - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "validator" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d6937c33ec6039d8071bcf72933146b5bbe378d645d8fa59bdadabfc2a249" -dependencies = [ - "idna 0.2.3", - "lazy_static", - "regex", - "serde", - "serde_derive", - "serde_json", - "url", - "validator_derive", - "validator_types", -] - -[[package]] -name = "validator_derive" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4286b4497f270f59276a89ae0ad109d5f8f18c69b613e3fb22b61201aadb0c4d" -dependencies = [ - "if_chain", - "lazy_static", - "proc-macro-error", - "proc-macro2", - "quote", - "regex", - "syn 1.0.109", - "validator_types", -] - -[[package]] -name = "validator_types" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad9680608df133af2c1ddd5eaf1ddce91d60d61b6bc51494ef326458365a470a" - [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "walkdir" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" -dependencies = [ - "same-file", - "winapi-util", -] - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -3711,7 +3216,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", "wasm-bindgen-shared", ] @@ -3733,7 +3238,7 @@ checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3744,16 +3249,6 @@ version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" -[[package]] -name = "web-sys" -version = "0.3.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "winapi" version = "0.3.9" @@ -3770,15 +3265,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -3919,9 +3405,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.19" +version = "0.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +checksum = "b67b5f0a4e7a27a64c651977932b9dc5667ca7fc31ac44b03ed37a0cf42fdfff" dependencies = [ "memchr", ] @@ -3958,22 +3444,22 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "zerocopy" -version = "0.7.26" +version = "0.7.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" +checksum = "306dca4455518f1f31635ec308b6b3e4eb1b11758cefafc782827d0aa7acb5c7" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.26" +version = "0.7.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" +checksum = "be912bf68235a88fbefd1b73415cb218405958d1655b2ece9035a19920bdf6ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] [[package]] @@ -3993,5 +3479,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.40", ] diff --git a/Cargo.toml b/Cargo.toml index c955d1910c..a38e9596c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ # https://doc.rust-lang.org/cargo/reference/resolver.html#feature-resolver-version-2 resolver = "2" -members = ["crates/blockifier", "crates/native_blockifier"] +members = ["crates/blockifier"] [workspace.package] version = "0.4.0-rc6" @@ -19,12 +19,12 @@ ark-secp256k1 = "0.4.0" ark-secp256r1 = "0.4.0" assert_matches = "1.5.0" cached = "0.44.0" -cairo-felt = "0.8.2" -cairo-lang-casm = "2.4.0-rc2" -cairo-lang-runner = "2.4.0-rc2" -cairo-lang-starknet = "2.4.0-rc2" -cairo-lang-utils = "2.4.0-rc2" -cairo-vm = "=0.8.2" +cairo-felt = { git = "https://github.com/kkrt-labs/cairo-vm.git", branch = "v0.9.1", default-features = false } +cairo-lang-casm = { git = "https://github.com/kkrt-labs/cairo.git", branch = "v2.4.0", default-features = false } +cairo-lang-runner = { git = "https://github.com/kkrt-labs/cairo.git", branch = "v2.4.0", default-features = false } +cairo-lang-starknet = { git = "https://github.com/kkrt-labs/cairo.git", branch = "v2.4.0", default-features = false } +cairo-lang-utils = { git = "https://github.com/kkrt-labs/cairo.git", branch = "v2.4.0", default-features = false } +cairo-vm = { git = "https://github.com/kkrt-labs/cairo-vm.git", branch = "v0.9.1", default-features = false } criterion = "0.3" ctor = "0.2.0" derive_more = "0.99.17" @@ -58,7 +58,3 @@ future-incompatible = "deny" nonstandard-style = "deny" rust-2018-idioms = "deny" unused = "deny" - -[patch.crates-io] -cairo-felt = { git = "https://github.com/kkrt-labs/cairo-vm.git", branch = "v0.8.2" } -cairo-vm = { git = "https://github.com/kkrt-labs/cairo-vm.git", branch = "v0.8.2" } diff --git a/crates/blockifier/Cargo.toml b/crates/blockifier/Cargo.toml index 4d5dce6cf2..ed9fb978f9 100644 --- a/crates/blockifier/Cargo.toml +++ b/crates/blockifier/Cargo.toml @@ -6,9 +6,6 @@ repository.workspace = true license-file.workspace = true description = "The transaction-executing component in the StarkNet sequencer." -[lints] -workspace = true - [features] testing = [] diff --git a/crates/blockifier/src/execution/contract_class.rs b/crates/blockifier/src/execution/contract_class.rs index 2cd9527dd0..a0b8403c6a 100644 --- a/crates/blockifier/src/execution/contract_class.rs +++ b/crates/blockifier/src/execution/contract_class.rs @@ -1,4 +1,4 @@ -use std::collections::HashMap; +use std::collections::{BTreeMap, HashMap}; use std::ops::Deref; use std::sync::Arc; @@ -12,12 +12,12 @@ use cairo_vm::serde::deserialize_program::{ InstructionLocation, ReferenceManager, }; use cairo_vm::types::errors::program_errors::ProgramError; -use cairo_vm::types::program::{Program, SharedProgramData}; +use cairo_vm::types::program::{HintsCollection, Program, SharedProgramData}; use cairo_vm::types::relocatable::MaybeRelocatable; use cairo_vm::vm::runners::builtin_runner::{HASH_BUILTIN_NAME, POSEIDON_BUILTIN_NAME}; use cairo_vm::vm::runners::cairo_runner::ExecutionResources as VmExecutionResources; use serde::de::{self, Error as DeserializationError}; -use serde::{Deserialize, Deserializer, Serialize}; +use serde::{Deserialize, Deserializer, Serialize, Serializer}; use starknet_api::core::EntryPointSelector; use starknet_api::deprecated_contract_class::{ ContractClass as DeprecatedContractClass, EntryPoint, EntryPointOffset, EntryPointType, @@ -109,7 +109,7 @@ impl ContractClassV0 { #[derive(Debug, Clone, Default, Eq, PartialEq, Serialize, Deserialize)] pub struct ContractClassV0Inner { - #[serde(deserialize_with = "deserialize_program")] + #[serde(with = "serde_program")] pub program: Program, pub entry_points_by_type: HashMap>, } @@ -285,16 +285,16 @@ impl TryFrom for ContractClassV1 { // V0 utilities. -/// Converts the program type from SN API into a Cairo VM-compatible type. -pub fn deserialize_program<'de, D: Deserializer<'de>>( - deserializer: D, -) -> Result { +mod serde_program { + use super::*; + // We have this because `hints` field is a hashmap from - // When deserializing from JSON, for untagged enum it will only match for - #[derive(Serialize, Deserialize)] + // When deserializing from JSON, for untagged enum it will only match for + #[derive(Deserialize, Serialize)] struct TmpSharedProgram { data: Vec, - hints: HashMap>, + hints: BTreeMap>, main: Option, start: Option, end: Option, @@ -304,64 +304,107 @@ pub fn deserialize_program<'de, D: Deserializer<'de>>( reference_manager: Vec, } - #[derive(Serialize, Deserialize)] + impl From for TmpSharedProgram { + fn from(shared_program_data: SharedProgramData) -> Self { + Self { + data: shared_program_data.data, + hints: Into::>>::into( + &shared_program_data.hints_collection, + ) + .into_iter() + .map(|(k, v)| (k.to_string(), v)) + .collect(), + main: shared_program_data.main, + start: shared_program_data.start, + end: shared_program_data.end, + error_message_attributes: shared_program_data.error_message_attributes, + instruction_locations: shared_program_data.instruction_locations, + identifiers: shared_program_data.identifiers, + reference_manager: shared_program_data.reference_manager, + } + } + } + + #[derive(Deserialize, Serialize)] struct TmpProgram { pub shared_program_data: TmpSharedProgram, pub constants: HashMap, pub builtins: Vec, } - #[derive(Serialize, Deserialize)] - #[serde(untagged)] - enum Tmp { - /// Box the variant in order to reduce the size of the enum (clippy suggestion). - CairoVM(Box), - SNProgram(DeprecatedProgram), + pub(crate) fn serialize(program: &Program, serializer: S) -> Result + where + S: Serializer, + { + let shared_program_data = program.shared_program_data.as_ref().clone().into(); + let constants = program.constants.clone(); + let builtins = program.builtins.clone(); + + let tmp_program = TmpProgram { shared_program_data, constants, builtins }; + + tmp_program.serialize(serializer) } - let program: Tmp = Tmp::deserialize(deserializer)?; + /// Converts the program type from SN API into a Cairo VM-compatible type. + pub(crate) fn deserialize<'de, D: Deserializer<'de>>( + deserializer: D, + ) -> Result { + #[derive(Deserialize)] + #[serde(untagged)] + enum Tmp { + /// Box the variant in order to reduce the size of the enum (clippy suggestion). + CairoVM(Box), + SNProgram(DeprecatedProgram), + } - match program { - Tmp::CairoVM(tmp_program) => { - let hints: Result>, D::Error> = tmp_program - .shared_program_data - .hints - .into_iter() - .map(|(k, v)| { - let key = k.parse::().map_err(|error| { - de::Error::custom(format!( - "failed to convert value {} to usize, \n error {}", - k, error - )) - })?; - - Ok((key, v)) - }) - .collect(); - - let hints = hints?; - - let shared_program_data = SharedProgramData { - data: tmp_program.shared_program_data.data, - hints, - main: tmp_program.shared_program_data.main, - start: tmp_program.shared_program_data.start, - end: tmp_program.shared_program_data.end, - error_message_attributes: tmp_program.shared_program_data.error_message_attributes, - identifiers: tmp_program.shared_program_data.identifiers, - instruction_locations: tmp_program.shared_program_data.instruction_locations, - reference_manager: tmp_program.shared_program_data.reference_manager, - }; - - let program = Program { - shared_program_data: Arc::new(shared_program_data), - constants: tmp_program.constants, - builtins: tmp_program.builtins, - }; - Ok(program) + let program: Tmp = Tmp::deserialize(deserializer)?; + + match program { + Tmp::CairoVM(tmp_program) => { + let hints: BTreeMap> = tmp_program + .shared_program_data + .hints + .into_iter() + .map(|(k, v)| { + let key = k.parse::().map_err(|error| { + de::Error::custom(format!( + "failed to convert value {} to usize, \n error {}", + k, error + )) + })?; + + Ok((key, v)) + }) + .collect::>()?; + + let hints_collection = + HintsCollection::new(&hints, tmp_program.shared_program_data.data.len()) + .map_err(|err| de::Error::custom(err.to_string()))?; + + let shared_program_data = SharedProgramData { + data: tmp_program.shared_program_data.data, + hints_collection, + main: tmp_program.shared_program_data.main, + start: tmp_program.shared_program_data.start, + end: tmp_program.shared_program_data.end, + error_message_attributes: tmp_program + .shared_program_data + .error_message_attributes, + identifiers: tmp_program.shared_program_data.identifiers, + instruction_locations: tmp_program.shared_program_data.instruction_locations, + reference_manager: tmp_program.shared_program_data.reference_manager, + }; + + let program = Program { + shared_program_data: Arc::new(shared_program_data), + constants: tmp_program.constants, + builtins: tmp_program.builtins, + }; + Ok(program) + } + Tmp::SNProgram(deprecated_program) => sn_api_to_cairo_vm_program(deprecated_program) + .map_err(|err| DeserializationError::custom(err.to_string())), } - Tmp::SNProgram(deprecated_program) => sn_api_to_cairo_vm_program(deprecated_program) - .map_err(|err| DeserializationError::custom(err.to_string())), } } diff --git a/crates/blockifier/src/execution/deprecated_entry_point_execution.rs b/crates/blockifier/src/execution/deprecated_entry_point_execution.rs index 296baefb2f..95846cd221 100644 --- a/crates/blockifier/src/execution/deprecated_entry_point_execution.rs +++ b/crates/blockifier/src/execution/deprecated_entry_point_execution.rs @@ -239,7 +239,7 @@ pub fn finalize_execution( // Has to happen after marking holes in segments as accessed. let vm_resources_without_inner_calls = runner .get_execution_resources(&vm) - .map_err(VirtualMachineError::TracerError)? + .map_err(VirtualMachineError::RunnerError)? .filter_unused_builtins(); syscall_handler.resources.vm_resources += &vm_resources_without_inner_calls; diff --git a/crates/blockifier/src/execution/entry_point_execution.rs b/crates/blockifier/src/execution/entry_point_execution.rs index b3f4d15349..f32720ebc9 100644 --- a/crates/blockifier/src/execution/entry_point_execution.rs +++ b/crates/blockifier/src/execution/entry_point_execution.rs @@ -284,7 +284,7 @@ pub fn finalize_execution( // Has to happen after marking holes in segments as accessed. let vm_resources_without_inner_calls = runner .get_execution_resources(&vm) - .map_err(VirtualMachineError::TracerError)? + .map_err(VirtualMachineError::RunnerError)? .filter_unused_builtins(); syscall_handler.resources.vm_resources += &vm_resources_without_inner_calls; diff --git a/crates/blockifier/src/execution/entry_point_test.rs b/crates/blockifier/src/execution/entry_point_test.rs index 5a2c418763..7e8a81142c 100644 --- a/crates/blockifier/src/execution/entry_point_test.rs +++ b/crates/blockifier/src/execution/entry_point_test.rs @@ -3,26 +3,23 @@ use std::collections::HashSet; use cairo_vm::serde::deserialize_program::BuiltinName; use num_bigint::BigInt; use pretty_assertions::assert_eq; -use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, PatriciaKey}; -use starknet_api::deprecated_contract_class::EntryPointType; +use starknet_api::core::{ContractAddress, EntryPointSelector, PatriciaKey}; use starknet_api::hash::{StarkFelt, StarkHash}; use starknet_api::state::StorageKey; use starknet_api::transaction::Calldata; -use starknet_api::{calldata, class_hash, contract_address, patricia_key, stark_felt}; +use starknet_api::{calldata, contract_address, patricia_key, stark_felt}; use crate::abi::abi_utils::{get_storage_var_address, selector_from_name}; use crate::execution::call_info::{CallExecution, CallInfo, Retdata}; -use crate::execution::contract_class::ContractClass; use crate::execution::entry_point::CallEntryPoint; use crate::execution::errors::EntryPointExecutionError; use crate::retdata; use crate::state::cached_state::CachedState; -use crate::state::state_api::StateReader; use crate::test_utils::cached_state::{create_test_state, deprecated_create_test_state}; use crate::test_utils::dict_state_reader::DictStateReader; use crate::test_utils::{ create_calldata, pad_address_to_64, trivial_external_entry_point, - trivial_external_entry_point_security_test, SECURITY_TEST_CONTRACT_ADDRESS, TEST_CLASS_HASH, + trivial_external_entry_point_security_test, SECURITY_TEST_CONTRACT_ADDRESS, TEST_CONTRACT_ADDRESS, TEST_CONTRACT_ADDRESS_2, }; @@ -197,6 +194,7 @@ fn run_security_test( "Entry point '{entry_point_name}' did not fail! Expected error: {expected_error}" ), }; + pretty_assertions::assert_eq!(error, expected_error); if !error.contains(expected_error) { panic!("Expected error: {expected_error}.\nGot: {error}") } @@ -207,72 +205,132 @@ fn test_vm_execution_security_failures() { let mut state = deprecated_create_test_state(); run_security_test( - "Expected relocatable", + "Expected relocatable at address 1:11", "test_nonrelocatable_syscall_ptr", calldata![], &mut state, ); run_security_test( - "Unknown value for memory cell", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:124: +Couldn't compute operand op1. Unknown value for memory cell 6:0 +Cairo traceback (most recent call last): +Unknown location (pc=0:129) +", "test_unknown_memory", calldata![], &mut state, ); run_security_test( - "can't subtract two relocatable values with different segment indexes", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:142: +Operation failed: 6:0 - 3:0, can't subtract two relocatable values with different segment indexes +Cairo traceback (most recent call last): +Unknown location (pc=0:149) +", "test_subtraction_between_relocatables", calldata![], &mut state, ); run_security_test( - "can't add two relocatable values", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:162: +Operation failed: 6:0 + 6:0, can't add two relocatable values +Cairo traceback (most recent call last): +Unknown location (pc=0:167) +", "test_relocatables_addition_failure", calldata![], &mut state, ); run_security_test( - "op0 must be known in double dereference", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:180: +op0 must be known in double dereference +Cairo traceback (most recent call last): +Unknown location (pc=0:185) +", "test_op0_unknown_double_dereference", calldata![], &mut state, ); run_security_test( - "Out of bounds access to program segment", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Out of bounds access to program segment", "test_write_to_program_segment", calldata![], &mut state, ); - run_security_test("Cannot exit main scope.", "test_exit_main_scope", calldata![], &mut state); + run_security_test( + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:218: +Got an exception while executing a hint: Cannot exit main scope. +Cairo traceback (most recent call last): +Unknown location (pc=0:220) +", + "test_exit_main_scope", + calldata![], + &mut state, + ); run_security_test( - "Every enter_scope() requires a corresponding exit_scope()", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Every enter_scope() requires a corresponding exit_scope().", "test_missing_exit_scope", calldata![], &mut state, ); run_security_test( - "maximum offset value exceeded", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:250: +Operation failed: 10:0 + \ + 3618502788666131213697322783095070105623107215331596699973092056135872020480, maximum \ + offset value exceeded +Cairo traceback (most recent call last): +Unknown location (pc=0:254) +", "test_out_of_bound_memory_value", calldata![], &mut state, ); run_security_test( - "Memory addresses must be relocatable", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:271: +Memory addresses must be relocatable +Cairo traceback (most recent call last): +Unknown location (pc=0:274) +", "test_non_relocatable_memory_address", calldata![], &mut state, ); run_security_test( - "Bad expr: {test}. (Cannot evaluate ap-based or complex references: ['test'])", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:289: +Error message: Bad expr: {test}. (Cannot evaluate ap-based or complex references: ['test']) + +Cairo traceback (most recent call last): +Unknown location (pc=0:293) +", "test_bad_expr_eval", calldata![], &mut state, @@ -284,18 +342,27 @@ fn test_builtin_execution_security_failures() { let mut state = deprecated_create_test_state(); run_security_test( - "Inconsistent auto-deduction for builtin pedersen", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Inconsistent auto-deduction for builtin pedersen_builtin, expected \ + 2089986280348253421170679821480865132823066470938446095505822317253594081284, got \ + Some(Int(0))", "test_bad_pedersen_values", calldata![], &mut state, ); let u128_bound: BigInt = BigInt::from(u128::MAX) + 1; - let u123_bound_plus_one = u128_bound.clone() + 1; + let u128_bound_plus_one = u128_bound.clone() + 1; run_security_test( &format!( - "Range-check validation failed, number {u123_bound_plus_one} is out of valid range \ - [0, {u128_bound}]" + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:337: +Range-check validation failed, number {u128_bound_plus_one} is out of valid range [0, {u128_bound}] +Cairo traceback (most recent call last): +Unknown location (pc=0:345) +" ), "test_bad_range_check_values", calldata![], @@ -303,28 +370,59 @@ fn test_builtin_execution_security_failures() { ); run_security_test( - "Signature hint is missing", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:363: +Signature hint is missing for ECDSA builtin at address 4:0. + Add it using 'ecdsa_builtin.add_signature'. +Cairo traceback (most recent call last): +Unknown location (pc=0:370) +", "test_missing_signature_hint", calldata![], &mut state, ); run_security_test( - "Signature hint must point to the signature builtin segment", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:51: +Got an exception while executing a hint: Signature hint must point to the signature builtin \ + segment, not 10:0. +Cairo traceback (most recent call last): +Unknown location (pc=0:401) +Unknown location (pc=0:393) +", "test_signature_hint_on_wrong_segment", calldata![], &mut state, ); run_security_test( - "Cannot apply EC operation: computation reached two points with the same x coordinate", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Cannot apply EC operation: computation reached two points with the same x coordinate. + + Attempting to compute P + m * Q where: + + P = (3004956058830981475544150447242655232275382685012344776588097793621230049020, \ + 3232266734070744637901977159303149980795588196503166389060831401046564401743) + + m = 8 + + Q = (3004956058830981475544150447242655232275382685012344776588097793621230049020, \ + 3232266734070744637901977159303149980795588196503166389060831401046564401743).", "test_ec_op_invalid_input", calldata![], &mut state, ); run_security_test( - "is not on the curve", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +EcOpBuiltin: point (2864041794633455918387139831609347757720597354645583729611044800117714995244, \ + 2252415379535459416893084165764951913426528160630388985542241241048300343257) is not on \ + the curve", "test_ec_op_point_not_on_curve", calldata![], &mut state, @@ -338,14 +436,29 @@ fn test_syscall_execution_security_failures() { for perform_inner_call_to_foo in 0..2 { let calldata = calldata![stark_felt!(perform_inner_call_to_foo as u8)]; run_security_test( - "Custom Hint Error: Out of range", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:40: +Got an exception while executing a hint: Hint Error: Out of range [0x0, \ + 0x800000000000000000000000000000000000000000000000000000000000000). +Cairo traceback (most recent call last): +Unknown location (pc=0:540) +Unknown location (pc=0:526) +", "test_read_bad_address", calldata.clone(), &mut state, ); run_security_test( - "Custom Hint Error: Expected integer", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:40: +Got an exception while executing a hint: Hint Error: Expected integer at address 6:1 +Cairo traceback (most recent call last): +Unknown location (pc=0:569) +Unknown location (pc=0:555) +", "test_relocatable_storage_address", calldata, &mut state, @@ -353,33 +466,51 @@ fn test_syscall_execution_security_failures() { } run_security_test( - "Requested contract address \ - ContractAddress(PatriciaKey(StarkFelt(\"\ - 0x0000000000000000000000000000000000000000000000000000000000000017\"))) is not deployed", + r#"Error in the called contract (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:16: +Got an exception while executing a hint: Hint Error: Requested contract address ContractAddress(PatriciaKey(StarkFelt("0x0000000000000000000000000000000000000000000000000000000000000017"))) is not deployed. +Cairo traceback (most recent call last): +Unknown location (pc=0:598) +Unknown location (pc=0:592) +"#, "test_bad_call_address", calldata![], &mut state, ); run_security_test( - "Custom Hint Error: Expected relocatable", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:626: +Got an exception while executing a hint: Hint Error: Expected relocatable at address 6:4 +Cairo traceback (most recent call last): +Unknown location (pc=0:630) +", "test_bad_syscall_request_arg_type", calldata![], &mut state, ); run_security_test( - "Entry point \ - EntryPointSelector(StarkFelt(\"\ - 0x0000000000000000000000000000000000000000000000000000000000000019\")) not found in \ - contract", + r#"Error in the called contract (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:16: +Got an exception while executing a hint: Hint Error: Entry point EntryPointSelector(StarkFelt("0x0000000000000000000000000000000000000000000000000000000000000019")) not found in contract. +Cairo traceback (most recent call last): +Unknown location (pc=0:661) +Unknown location (pc=0:655) +"#, "test_bad_call_selector", calldata![], &mut state, ); run_security_test( - "The deploy_from_zero field in the deploy system call must be 0 or 1.", + r#"Error in the called contract (0x0000000000000000000000000000000000000000000000000000000000000300): +Error at pc=0:692: +Got an exception while executing a hint: Hint Error: Invalid syscall input: StarkFelt("0x0000000000000000000000000000000000000000000000000000000000000002"); The deploy_from_zero field in the deploy system call must be 0 or 1. +Cairo traceback (most recent call last): +Unknown location (pc=0:696) +"#, "test_bad_deploy_from_zero_field", calldata![], &mut state, @@ -391,56 +522,61 @@ fn test_post_run_validation_security_failure() { let mut state = deprecated_create_test_state(); run_security_test( - "Missing memory cells for builtin range_check", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Missing memory cells for builtin range_check_builtin", "test_builtin_hole", calldata![], &mut state, ); run_security_test( - "Missing memory cells for builtin pedersen", + "Error in the called contract \ + (0x0000000000000000000000000000000000000000000000000000000000000300): +Missing memory cells for builtin pedersen_builtin", "test_missing_pedersen_values", calldata![], &mut state, ); run_security_test( - "Validation failed: Invalid stop pointer for range_check", + "Validation failed: Invalid stop pointer for range_check_builtin. Expected: 3:0, found: \ + 3:2.", "test_bad_builtin_stop_ptr", calldata![], &mut state, ); run_security_test( - "Validation failed: Syscall segment size", + "Validation failed: Syscall segment size.", "test_access_after_syscall_stop_ptr", calldata![], &mut state, ); run_security_test( - "Validation failed: Syscall segment end", + "Validation failed: Syscall segment end.", "test_bad_syscall_stop_ptr", calldata![], &mut state, ); run_security_test( - "Validation failed: Read-only segments", + "Validation failed: Read-only segments.", "test_out_of_bounds_write_to_signature_segment", calldata![], &mut state, ); run_security_test( - "Validation failed: Read-only segments", + "Validation failed: Read-only segments.", "test_out_of_bounds_write_to_tx_info_segment", calldata![], &mut state, ); run_security_test( - "Validation failed: Read-only segments", + "Validation failed: Read-only segments.", "test_write_to_call_contract_return_value", calldata![], &mut state, @@ -448,7 +584,7 @@ fn test_post_run_validation_security_failure() { let calldata = calldata![stark_felt!(1_u8), stark_felt!(1_u8)]; run_security_test( - "Validation failed: Read-only segments", + "Validation failed: Read-only segments.", "test_out_of_bounds_write_to_calldata_segment", calldata, &mut state, @@ -531,54 +667,56 @@ fn test_stack_trace() { ..trivial_external_entry_point() }; - // Fetch PC locations from the compiled contract to compute the expected PC locations in the - // traceback. Computation is not robust, but as long as the cairo function itself is not edited, - // this computation should be stable. - let contract_class = state.get_compiled_contract_class(&class_hash!(TEST_CLASS_HASH)).unwrap(); - let entry_point_offset = match contract_class { - ContractClass::V0(class) => { - class - .entry_points_by_type - .get(&EntryPointType::External) - .unwrap() - .iter() - .find(|ep| ep.selector == entry_point_call.entry_point_selector) - .unwrap() - .offset - } - ContractClass::V1(_) => panic!("Expected contract class V0, got V1."), - }; - // Relative offsets of the test_call_contract entry point and the inner call. - let call_location = entry_point_offset.0 + 14; - let entry_point_location = entry_point_offset.0 - 3; - + let first = pad_address_to_64(TEST_CONTRACT_ADDRESS); + let second = pad_address_to_64(TEST_CONTRACT_ADDRESS_2); + let third = pad_address_to_64(SECURITY_TEST_CONTRACT_ADDRESS); let expected_trace = format!( - "Error in the called contract ({}): + "Error in the called contract ({first}): +Error at pc=0:34: +Got an exception while executing a hint: Hint Error: Error in the called contract ({second}): Error at pc=0:34: -Got an exception while executing a hint. +Got an exception while executing a hint: Hint Error: Error in the called contract ({third}): +Error at pc=0:58: +An ASSERT_EQ instruction failed: 1 != 0. +Cairo traceback (most recent call last): +Unknown location (pc=0:62) + +Cairo traceback (most recent call last): +Unknown location (pc=0:741) +Unknown location (pc=0:724) + +Error in the called contract ({third}): +Error at pc=0:58: +An ASSERT_EQ instruction failed: 1 != 0. Cairo traceback (most recent call last): -Unknown location (pc=0:{call_location}) -Unknown location (pc=0:{entry_point_location}) +Unknown location (pc=0:62) -Error in the called contract ({}): +Cairo traceback (most recent call last): +Unknown location (pc=0:741) +Unknown location (pc=0:724) + +Error in the called contract ({second}): Error at pc=0:34: -Got an exception while executing a hint. +Got an exception while executing a hint: Hint Error: Error in the called contract ({third}): +Error at pc=0:58: +An ASSERT_EQ instruction failed: 1 != 0. Cairo traceback (most recent call last): -Unknown location (pc=0:{call_location}) -Unknown location (pc=0:{entry_point_location}) +Unknown location (pc=0:62) -Error in the called contract ({}): +Cairo traceback (most recent call last): +Unknown location (pc=0:741) +Unknown location (pc=0:724) + +Error in the called contract ({third}): Error at pc=0:58: An ASSERT_EQ instruction failed: 1 != 0. Cairo traceback (most recent call last): Unknown location (pc=0:62) -", - pad_address_to_64(TEST_CONTRACT_ADDRESS), - pad_address_to_64(TEST_CONTRACT_ADDRESS_2), - pad_address_to_64(SECURITY_TEST_CONTRACT_ADDRESS) +" ); match entry_point_call.execute_directly(&mut state).unwrap_err() { EntryPointExecutionError::VirtualMachineExecutionErrorWithTrace { trace, source: _ } => { + dbg!(&trace); assert_eq!(trace, expected_trace) } other_error => panic!("Unexpected error type: {other_error:?}"), diff --git a/crates/native_blockifier/Cargo.toml b/crates/native_blockifier/Cargo.toml index 4d5a9109ba..44addc81a3 100644 --- a/crates/native_blockifier/Cargo.toml +++ b/crates/native_blockifier/Cargo.toml @@ -13,9 +13,6 @@ description = "A Bridge between the Rust blockifier crate and Python." extension-module = ["pyo3/extension-module"] testing = [] -[lints] -workspace = true - [lib] name = "native_blockifier" # "cdylib" is necessary to produce a shared library for Python to import from.