diff --git a/.gitignore b/.gitignore index cda95c69a..e35c2c9b2 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ starkware hints.py run_os.py run_bootloader.py +prover +prover.zip diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 000000000..252102b49 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,4069 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aes" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "ahash" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits 0.2.17", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest", + "itertools 0.10.5", + "num-bigint", + "num-traits 0.2.17", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits 0.2.17", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-secp256k1" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c02e954eaeb4ddb29613fee20840c2bbc85ca4396d53e33837e11905363c5f2" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-secp256r1" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3975a01b0a6e3eae0f72ec7ca8598a6620fc72fa5981f6f5cca33b7cd788f633" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits 0.2.17", + "rand", +] + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + +[[package]] +name = "async-trait" +version = "0.1.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bincode" +version = "2.0.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f11ea1a0346b94ef188834a65c068a03aec181c94896d481d7a0a40d85b0ce95" +dependencies = [ + "serde", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "serde", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "blockifier" +version = "0.3.0-rc0" +source = "git+https://github.com/keep-starknet-strange/blockifier.git?branch=lucas/clone#0f17e6dd89827af4ade53ec3664acf9412e734ab" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-secp256k1", + "ark-secp256r1", + "cached", + "cairo-felt 0.8.7", + "cairo-lang-casm", + "cairo-lang-runner", + "cairo-lang-starknet", + "cairo-vm 0.8.7", + "ctor", + "derive_more", + "indexmap 1.9.3", + "itertools 0.10.5", + "keccak", + "log", + "num-bigint", + "num-integer", + "num-traits 0.2.17", + "phf", + "serde", + "serde_json", + "sha3", + "starknet-crypto 0.5.2", + "starknet_api", + "strum", + "strum_macros", + "thiserror", +] + +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "byteorder" +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 = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "cached" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b195e4fbc4b6862bbd065b991a34750399c119797efff72492f28a5864de8700" +dependencies = [ + "async-trait", + "cached_proc_macro", + "cached_proc_macro_types", + "futures", + "hashbrown 0.13.2", + "instant", + "once_cell", + "thiserror", + "tokio", +] + +[[package]] +name = "cached_proc_macro" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b48814962d2fd604c50d2b9433c2a41a0ab567779ee2c02f7fba6eca1221f082" +dependencies = [ + "cached_proc_macro_types", + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "cached_proc_macro_types" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a4f925191b4367301851c6d99b09890311d74b0d43f274c0b34c86d308a3663" + +[[package]] +name = "cairo-felt" +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/lambdaclass/cairo-vm#8a2ef24c1ca258f1d1d230cbbd1478cd1d4cf9db" +dependencies = [ + "lazy_static", + "num-bigint", + "num-integer", + "num-traits 0.2.17", + "serde", +] + +[[package]] +name = "cairo-lang-casm" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850dc1d46d5bfb64c5ed0bc7ccd4821e4d4c36a8f2678a897df7c2bfaefe6fc" +dependencies = [ + "cairo-lang-utils", + "indoc", + "num-bigint", + "num-traits 0.2.17", + "parity-scale-codec", + "parity-scale-codec-derive", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "cairo-lang-compiler" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e6360b6735eeff503c6103520fef7410ca2c5a5ae90584822baa326607721ac" +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", + "itertools 0.11.0", + "salsa", + "thiserror", +] + +[[package]] +name = "cairo-lang-debug" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c190deb7ba826a462fa7339e482d5e2df78d329435f4988b15f7752e033b5ac" +dependencies = [ + "cairo-lang-utils", +] + +[[package]] +name = "cairo-lang-defs" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42a34d9952b04fa0c96fafd08d170097fb5075ff81826a034ef9faa70556de8" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-syntax", + "cairo-lang-utils", + "itertools 0.11.0", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-diagnostics" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c399832f9fc462cd51687a415c391ead4b99ee48c54cad5c8e1d5004ff6520c7" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-filesystem", + "cairo-lang-utils", + "itertools 0.11.0", +] + +[[package]] +name = "cairo-lang-eq-solver" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d73846e0dec2a204bc429f7421020fc6a98ae48f20f0cfa2aa1091b78221d6ce" +dependencies = [ + "cairo-lang-utils", + "good_lp", +] + +[[package]] +name = "cairo-lang-filesystem" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64f15f4a10963dcd5baa0386632c5ce4136d54f93d6c71cc16a49cbcbf774ee2" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-utils", + "path-clean", + "salsa", + "serde", + "smol_str", +] + +[[package]] +name = "cairo-lang-lowering" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5547bb3e13841a840b4faad3eb7fe7c39b525220f708973b71b1b9077747758b" +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", + "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-parser" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197445f8db467e28dbeddc573047dd8f2a0ef3fcc3d1c32575162d4cf79988df" +dependencies = [ + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-syntax", + "cairo-lang-syntax-codegen", + "cairo-lang-utils", + "colored", + "itertools 0.11.0", + "num-bigint", + "num-traits 0.2.17", + "salsa", + "smol_str", + "unescaper", +] + +[[package]] +name = "cairo-lang-plugins" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3ea747577bd93e4791bdd57744dfddbc4b99ce056fffb5fd41340759642f91" +dependencies = [ + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-syntax", + "cairo-lang-utils", + "indent", + "indoc", + "itertools 0.11.0", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-proc-macros" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8cc59c40344194d2cc825071080d887826dcf0df37de71e58fc8aa4c344bb84" +dependencies = [ + "cairo-lang-debug", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "cairo-lang-project" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "312b65dec1d0b8e1b420d7b464c0c771f18301177376432681c05c30f5ef9604" +dependencies = [ + "cairo-lang-filesystem", + "cairo-lang-utils", + "serde", + "smol_str", + "thiserror", + "toml", +] + +[[package]] +name = "cairo-lang-runner" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2376aa33117e2feae26ca030e8b6b5ec7c6c1edfc599885d1157d92f3fc413a" +dependencies = [ + "ark-ff", + "ark-secp256k1", + "ark-secp256r1", + "ark-std", + "cairo-felt 0.8.7", + "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-vm 0.8.7", + "itertools 0.11.0", + "keccak", + "num-bigint", + "num-integer", + "num-traits 0.2.17", + "thiserror", +] + +[[package]] +name = "cairo-lang-semantic" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e18c57cd10bcf69b427b901ce058268d21f65f5199b33e36b72b02ba7ceff74" +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", + "id-arena", + "indoc", + "itertools 0.11.0", + "num-bigint", + "num-traits 0.2.17", + "once_cell", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-sierra" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84cf029a71e0176992cc401f7f182dc92e14a51662b1576240a7ecc79efac6bc" +dependencies = [ + "anyhow", + "cairo-lang-utils", + "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-ap-change" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "529ed2d8d14ef4c2d77e45db597425488e194b8ab1d3210742a1c54d78743407" +dependencies = [ + "cairo-lang-eq-solver", + "cairo-lang-sierra", + "cairo-lang-sierra-type-size", + "cairo-lang-utils", + "itertools 0.11.0", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-gas" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0cbe3dd4f663d7df902a2f10cf52990d62f178741fe1494de51f08bb89b7aa6" +dependencies = [ + "cairo-lang-eq-solver", + "cairo-lang-sierra", + "cairo-lang-sierra-type-size", + "cairo-lang-utils", + "itertools 0.11.0", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-generator" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5bed52b240e1546b08e075493b2df4030dba2199e019d36f52da1423f2c653" +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", + "indexmap 2.1.0", + "itertools 0.11.0", + "num-bigint", + "once_cell", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-sierra-to-casm" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc16661a7a78f885f6b5a4fdb3c7463d9ee3f6bca83266b4f2b956e65579ec72" +dependencies = [ + "assert_matches", + "cairo-felt 0.8.7", + "cairo-lang-casm", + "cairo-lang-sierra", + "cairo-lang-sierra-ap-change", + "cairo-lang-sierra-gas", + "cairo-lang-sierra-type-size", + "cairo-lang-utils", + "indoc", + "itertools 0.11.0", + "num-bigint", + "num-traits 0.2.17", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-type-size" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f3fa025f6bc1c8d4556c9fc4609fb6f27071470ed47eb3bd0b5f9a159e51124" +dependencies = [ + "cairo-lang-sierra", + "cairo-lang-utils", +] + +[[package]] +name = "cairo-lang-starknet" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac5523d9c5b8e7c98afb2907c2cf4821a251d94fc42d37940063a9f2adbea05f" +dependencies = [ + "anyhow", + "cairo-felt 0.8.7", + "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", + "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-syntax" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c8e9b19fa724135353470ee3452605f82edfec17a7dd4e8388d77152ea4fbd2" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-filesystem", + "cairo-lang-utils", + "num-bigint", + "num-traits 0.2.17", + "salsa", + "smol_str", + "unescaper", +] + +[[package]] +name = "cairo-lang-syntax-codegen" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a50c3a5dc5d890a523122e40dac59f3a430952cec73fe7312dd266ad865f049" +dependencies = [ + "genco", + "xshell", +] + +[[package]] +name = "cairo-lang-utils" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88969fe46417affe9628bd039865693431837807eb981115f02756a35f488489" +dependencies = [ + "indexmap 2.1.0", + "itertools 0.11.0", + "num-bigint", + "num-traits 0.2.17", + "parity-scale-codec", + "schemars", + "serde", +] + +[[package]] +name = "cairo-vm" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d9bf139b0fe845627cf09d11af43eec9575dba702033bf6b08050c776b8553" +dependencies = [ + "anyhow", + "bincode", + "bitvec", + "cairo-felt 0.8.7", + "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.5.2", + "thiserror-no-std", +] + +[[package]] +name = "cairo-vm" +version = "0.9.1" +source = "git+https://github.com/lambdaclass/cairo-vm#8a2ef24c1ca258f1d1d230cbbd1478cd1d4cf9db" +dependencies = [ + "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 = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "jobserver", + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits 0.2.17", + "serde", + "windows-targets 0.48.5", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "colored" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" +dependencies = [ + "is-terminal", + "lazy_static", + "windows-sys 0.48.0", +] + +[[package]] +name = "const-fnv1a-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca" + +[[package]] +name = "const_format" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +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 = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "ctor" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e366bff8cd32dd8754b0991fb66b279dc48f598c3a18914852a6673deef583" +dependencies = [ + "quote", + "syn 2.0.39", +] + +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +dependencies = [ + "darling_core 0.20.3", + "darling_macro 0.20.3", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", +] + +[[package]] +name = "darling_core" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.39", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +dependencies = [ + "darling_core 0.20.3", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "deranged" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case 0.4.0", + "proc-macro2", + "quote", + "rustc_version", + "syn 1.0.109", +] + +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "dyn-clone" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "ena" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" +dependencies = [ + "log", +] + +[[package]] +name = "encoding_rs" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fixedbitset" +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", + "libz-sys", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" + +[[package]] +name = "futures-executor" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" + +[[package]] +name = "futures-macro" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "futures-sink" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" + +[[package]] +name = "futures-task" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" + +[[package]] +name = "futures-timer" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" + +[[package]] +name = "futures-util" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "genco" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98d7af598790738fee616426e669360fa361273b1b9c9b7f30c92fa627605cad" +dependencies = [ + "genco-macros", + "relative-path", + "smallvec", +] + +[[package]] +name = "genco-macros" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4cf186fea4af17825116f72932fe52cce9a13bae39ff63b4dc0cfdb3fb4bde1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa124423ded10046a849fa0ae9747c541895557f1af177e0890b09879e7e9e7d" +dependencies = [ + "fnv", + "minilp", +] + +[[package]] +name = "h2" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.1.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.7", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.6", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash 0.8.6", + "allocator-api2", + "serde", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "http" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.4.10", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "id-arena" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[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 = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indent" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f1a0777d972970f204fdf8ef319f1f4f8459131636d7e3c96c5d59570d0fa6" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", + "serde", +] + +[[package]] +name = "indoc" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi", + "rustix", + "windows-sys 0.48.0", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "jobserver" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "keccak" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lalrpop" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" +dependencies = [ + "ascii-canvas", + "bit-set", + "diff", + "ena", + "is-terminal", + "itertools 0.10.5", + "lalrpop-util", + "petgraph", + "pico-args", + "regex", + "regex-syntax 0.7.5", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d" +dependencies = [ + "regex", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin", +] + +[[package]] +name = "libc" +version = "0.2.150" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" + +[[package]] +name = "libmimalloc-sys" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3979b5c37ece694f1f5e51e7ecc871fdb0f517ed04ee45f88d15d6d553cb9664" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + +[[package]] +name = "libz-sys" +version = "1.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "lru" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +dependencies = [ + "hashbrown 0.12.3", +] + +[[package]] +name = "matrixmultiply" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916806ba0031cd542105d916a97c8572e1fa6dd79c9c51e7eb43a09ec2dd84c1" +dependencies = [ + "rawpointer", +] + +[[package]] +name = "memchr" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[package]] +name = "mimalloc" +version = "0.1.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa01922b5ea280a911e323e4d2fd24b7fe5cc4042e0d2cda3c40775cdc4bdc9c" +dependencies = [ + "libmimalloc-sys", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minilp" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82a7750a9e5076c660b7bec5e6457b4dbff402b9863c8d112891434e18fd5385" +dependencies = [ + "log", + "sprs", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "ndarray" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac06db03ec2f46ee0ecdca1a1c34a99c0d188a0d83439b84bf0cb4b386e4ab09" +dependencies = [ + "matrixmultiply", + "num-complex", + "num-integer", + "num-traits 0.2.17", + "rawpointer", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits 0.2.17", + "rand", + "serde", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits 0.2.17", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits 0.2.17", +] + +[[package]] +name = "num-modular" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a5fe11d4135c3bcdf3a95b18b194afa9608a5f6ff034f5d857bc9a27fb0119" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits 0.2.17", +] + +[[package]] +name = "num-prime" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4e3bc495f6e95bc15a6c0c55ac00421504a5a43d09e3cc455d1fea7015581d" +dependencies = [ + "bitvec", + "either", + "lru", + "num-bigint", + "num-integer", + "num-modular", + "num-traits 0.2.17", + "rand", +] + +[[package]] +name = "num-traits" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" +dependencies = [ + "num-traits 0.2.17", +] + +[[package]] +name = "num-traits" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "oorandom" +version = "11.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + +[[package]] +name = "openssl" +version = "0.10.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b8419dc8cc6d866deb801274bba2e6f8f6108c1bb7fcc10ee5ab864931dbb45" +dependencies = [ + "bitflags 2.4.1", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3eaad34cdd97d81de97964fc7f29e2d104f483840d906ef56daa1912338460b" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.9", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.4.1", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "path-clean" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap 2.1.0", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared 0.11.2", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared 0.11.2", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared 0.11.2", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "pretty_assertions" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +dependencies = [ + "diff", + "yansi", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-serde", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", +] + +[[package]] +name = "proc-macro2" +version = "1.0.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_users" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-syntax" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "relative-path" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c707298afce11da2efef2f600116fa93ffa7a032b5d7b628aa17711ec81383ca" + +[[package]] +name = "reqwest" +version = "0.11.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "rstest" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" +dependencies = [ + "futures", + "futures-timer", + "rstest_macros", + "rustc_version", +] + +[[package]] +name = "rstest_macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" +dependencies = [ + "cfg-if", + "glob", + "proc-macro2", + "quote", + "regex", + "relative-path", + "rustc_version", + "syn 2.0.39", + "unicode-ident", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfeae074e687625746172d639330f1de242a178bf3189b51e35a7a21573513ac" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "ryu" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + +[[package]] +name = "salsa" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b84d9f96071f3f3be0dc818eae3327625d8ebc95b58da37d6850724f31d3403" +dependencies = [ + "crossbeam-utils", + "indexmap 1.9.3", + "lock_api", + "log", + "oorandom", + "parking_lot 0.11.2", + "rustc-hash", + "salsa-macros", + "smallvec", +] + +[[package]] +name = "salsa-macros" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3904a4ba0a9d0211816177fd34b04c7095443f8cdacd11175064fe541c8fe2" +dependencies = [ + "heck 0.3.3", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "schannel" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "schemars" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 1.0.109", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "security-framework" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" + +[[package]] +name = "serde" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "serde_derive_internals" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "serde_json" +version = "1.0.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" +dependencies = [ + "base64", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.1.0", + "serde", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" +dependencies = [ + "darling 0.20.3", + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "serde_yaml" +version = "0.9.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" +dependencies = [ + "indexmap 2.1.0", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest", + "keccak", +] + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" + +[[package]] +name = "smol_str" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74212e6bbe9a4352329b2f68ba3130c15a3f26fe88ff22dbdc6cdd58fa85e99c" +dependencies = [ + "serde", +] + +[[package]] +name = "snos" +version = "0.1.0" +dependencies = [ + "anyhow", + "base64", + "bitvec", + "blockifier", + "cairo-vm 0.8.7", + "cairo-vm 0.9.1", + "hex", + "indexmap 1.9.3", + "indoc", + "lazy_static", + "log", + "num-integer", + "num-traits 0.2.17", + "pretty_assertions", + "regex", + "reqwest", + "rstest", + "serde", + "serde_json", + "serde_with", + "serde_yaml", + "starknet-crypto 0.6.1", + "starknet_api", + "thiserror", + "tokio", + "uuid", + "zip", +] + +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "sprs" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec63571489873d4506683915840eeb1bb16b3198ee4894cc6f2fe3013d505e56" +dependencies = [ + "ndarray", + "num-complex", + "num-traits 0.1.43", +] + +[[package]] +name = "starknet-crypto" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3f2175b0b3fc24ff2ec6dc07f5a720498994effca7e78b11a6e1c1bd02cad52" +dependencies = [ + "crypto-bigint", + "hex", + "hmac", + "num-bigint", + "num-integer", + "num-traits 0.2.17", + "rfc6979", + "sha2", + "starknet-crypto-codegen", + "starknet-curve 0.3.0", + "starknet-ff", + "zeroize", +] + +[[package]] +name = "starknet-crypto" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33c03f5ac70f9b067f48db7d2d70bdf18ee0f731e8192b6cfa679136becfcdb0" +dependencies = [ + "crypto-bigint", + "hex", + "hmac", + "num-bigint", + "num-integer", + "num-traits 0.2.17", + "rfc6979", + "sha2", + "starknet-crypto-codegen", + "starknet-curve 0.4.0", + "starknet-ff", + "zeroize", +] + +[[package]] +name = "starknet-crypto-codegen" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af6527b845423542c8a16e060ea1bc43f67229848e7cd4c4d80be994a84220ce" +dependencies = [ + "starknet-curve 0.4.0", + "starknet-ff", + "syn 2.0.39", +] + +[[package]] +name = "starknet-curve" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "252610baff59e4c4332ce3569f7469c5d3f9b415a2240d698fb238b2b4fc0942" +dependencies = [ + "starknet-ff", +] + +[[package]] +name = "starknet-curve" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a68a0d87ae56572abf83ddbfd44259a7c90dbeeee1629a1ffe223e7f9a8f3052" +dependencies = [ + "starknet-ff", +] + +[[package]] +name = "starknet-ff" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7584bc732e4d2a8ccebdd1dda8236f7940a79a339e30ebf338d45c329659e36c" +dependencies = [ + "ark-ff", + "crypto-bigint", + "getrandom", + "hex", +] + +[[package]] +name = "starknet_api" +version = "0.5.0-rc1" +source = "git+https://github.com/starkware-libs/starknet-api?rev=1526a40921762641a39872643c53305c3e959ab2#1526a40921762641a39872643c53305c3e959ab2" +dependencies = [ + "cairo-lang-starknet", + "derive_more", + "hex", + "indexmap 1.9.3", + "once_cell", + "primitive-types", + "serde", + "serde_json", + "starknet-crypto 0.5.2", + "thiserror", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot 0.12.1", + "phf_shared 0.10.0", + "precomputed-hash", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + +[[package]] +name = "thiserror" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "thiserror-impl-no-std" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58e6318948b519ba6dc2b442a6d0b904ebfb8d411a3ad3e07843615a72249758" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "thiserror-no-std" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3ad459d94dd517257cc96add8a43190ee620011bb6e6cdc82dafd97dfafafea" +dependencies = [ + "thiserror-impl-no-std", +] + +[[package]] +name = "time" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +dependencies = [ + "deranged", + "itoa", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +dependencies = [ + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot 0.12.1", + "pin-project-lite", + "socket2 0.5.5", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.21.0", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +dependencies = [ + "indexmap 2.1.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[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 = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unescaper" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8f0f68e58d297ba8b22b8b5a96a87b863ba6bb46aaf51e19a4b02c5a6dd5b7f" +dependencies = [ + "thiserror", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" + +[[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-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "unsafe-libyaml" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "uuid" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +dependencies = [ + "getrandom", + "serde", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.39", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" + +[[package]] +name = "web-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67b5f0a4e7a27a64c651977932b9dc5667ca7fc31ac44b03ed37a0cf42fdfff" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "xshell" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce2107fe03e558353b4c71ad7626d58ed82efaf56c54134228608893c77023ad" +dependencies = [ + "xshell-macros", +] + +[[package]] +name = "xshell-macros" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e2c411759b501fb9501aac2b1b2d287a6e93e5bdcf13c25306b23e1b716dd0e" + +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + +[[package]] +name = "zerocopy" +version = "0.7.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d075cf85bbb114e933343e087b92f2146bac0d55b534cbb8188becf0039948e" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86cd5ca076997b97ef09d3ad65efe811fa68c9e874cb636ccb211223a813b0c2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2", + "sha1", + "time", + "zstd", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.9+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index fdd7cc935..f916a5563 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,11 +11,11 @@ blockifier = { git = "https://github.com/keep-starknet-strange/blockifier.git", "testing", "clone", ] } -cairo-felt = "0.9.0" -cairo-vm = "0.9.0" +cairo-vm = { git = "https://github.com/lambdaclass/cairo-vm", features = ["extensive_hints"] } cairo-vm-blockifier = { package = "cairo-vm", version = "0.8.7" } hex = "0.4.3" indexmap = "1.9.2" +indoc = "2" lazy_static = "1.4.0" log = "0.4.19" num-integer = "0.1.45" diff --git a/build/os_latest.json b/build/os_latest.json index 1495833a8..90ba3ce42 100644 --- a/build/os_latest.json +++ b/build/os_latest.json @@ -105407,4 +105407,4 @@ } ] } -} +} \ No newline at end of file diff --git a/rust-toolchain.toml b/rust-toolchain.toml deleted file mode 100644 index 509da7f23..000000000 --- a/rust-toolchain.toml +++ /dev/null @@ -1,4 +0,0 @@ -[toolchain] -channel = "nightly" -components = ["rustfmt", "clippy"] -profile = "minimal" diff --git a/scripts/setup-tests.sh b/scripts/setup-tests.sh index 29968c58c..72d95325d 100755 --- a/scripts/setup-tests.sh +++ b/scripts/setup-tests.sh @@ -54,7 +54,7 @@ cairo-compile cairo-lang/src/starkware/starknet/core/os/os.cairo --output build/ echo -e "compiling starknet contracts...\n" mkdir -p build/contracts mkdir -p build/pie -ln -s cairo-lang/src/starkware starkware +ln -sf cairo-lang/src/starkware starkware starknet-compile-deprecated --no_debug_info tests/contracts/token_for_testing.cairo --output build/contracts/token_for_testing.json --cairo_path cairo-lang/src --account_contract starknet-compile-deprecated --no_debug_info tests/contracts/dummy_account.cairo --output build/contracts/dummy_account.json --cairo_path cairo-lang/src --account_contract starknet-compile-deprecated --no_debug_info tests/contracts/dummy_token.cairo --output build/contracts/dummy_token.json --cairo_path cairo-lang/src --account_contract diff --git a/src/error.rs b/src/error.rs index 7b58be339..b256412a1 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,4 +1,4 @@ -use cairo_felt::Felt252; +use cairo_vm::felt::Felt252; use cairo_vm::vm::errors::cairo_run_errors::CairoRunError; #[derive(thiserror::Error, Debug)] @@ -21,6 +21,8 @@ pub enum SnOsError { IO(#[from] std::io::Error), #[error(transparent)] SerdeJson(#[from] serde_json::Error), + #[error("SnOs Deprecated Syscall Error: {0}")] + InvalidDeprecatedSyscallSelector(Felt252), } #[derive(thiserror::Error, Clone, Debug)] diff --git a/src/hints/block_context.rs b/src/hints/block_context.rs index 7beb1236f..3f0f3926b 100644 --- a/src/hints/block_context.rs +++ b/src/hints/block_context.rs @@ -4,7 +4,7 @@ use std::collections::hash_map::IntoIter; use std::collections::{HashMap, HashSet}; use blockifier::block_context::BlockContext; -use cairo_felt::Felt252; +use cairo_vm::felt::Felt252; use cairo_vm::hint_processor::builtin_hint_processor::dict_manager::Dictionary; use cairo_vm::hint_processor::builtin_hint_processor::hint_utils::{ get_ptr_from_var_name, insert_value_from_var_name, insert_value_into_ap, @@ -15,19 +15,20 @@ use cairo_vm::types::exec_scope::ExecutionScopes; use cairo_vm::types::relocatable::MaybeRelocatable; use cairo_vm::vm::errors::hint_errors::HintError; use cairo_vm::vm::vm_core::VirtualMachine; +use indoc::indoc; use starknet_api::deprecated_contract_class::ContractClass as DeprecatedContractClass; use crate::io::classes::write_deprecated_class; use crate::io::input::StarknetOsInput; use crate::utils::felt_api2vm; -/// Implements hint: -/// -/// ids.compiled_class_facts = segments.add() -/// ids.n_compiled_class_facts = len(os_input.compiled_classes) -/// vm_enter_scope({ -/// 'compiled_class_facts': iter(os_input.compiled_classes.items()), -/// }) +pub const LOAD_CLASS_FACTS: &str = indoc! {r#" + ids.compiled_class_facts = segments.add() + ids.n_compiled_class_facts = len(os_input.compiled_classes) + vm_enter_scope({ + 'compiled_class_facts': iter(os_input.compiled_classes.items()), + })"# +}; pub fn load_class_facts( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -47,15 +48,15 @@ pub fn load_class_facts( Ok(()) } -/// Implements hint: -/// -/// # Creates a set of deprecated class hashes to distinguish calls to deprecated entry points. -/// __deprecated_class_hashes=set(os_input.deprecated_compiled_classes.keys()) -/// ids.compiled_class_facts = segments.add() -/// ids.n_compiled_class_facts = len(os_input.deprecated_compiled_classes) -/// vm_enter_scope({ -/// 'compiled_class_facts': iter(os_input.deprecated_compiled_classes.items()), -/// }) +pub const LOAD_DEPRECATED_CLASS_FACTS: &str = indoc! {r##" + # Creates a set of deprecated class hashes to distinguish calls to deprecated entry points. + __deprecated_class_hashes=set(os_input.deprecated_compiled_classes.keys()) + ids.compiled_class_facts = segments.add() + ids.n_compiled_class_facts = len(os_input.deprecated_compiled_classes) + vm_enter_scope({ + 'compiled_class_facts': iter(os_input.deprecated_compiled_classes.items()), + })"## +}; pub fn load_deprecated_class_facts( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -64,12 +65,11 @@ pub fn load_deprecated_class_facts( _constants: &HashMap, ) -> Result<(), HintError> { let os_input = exec_scopes.get::("os_input")?; - let compiled_class_facts_ptr = vm.add_memory_segment(); - insert_value_from_var_name("compiled_class_facts", compiled_class_facts_ptr, vm, ids_data, ap_tracking)?; let deprecated_class_hashes: HashSet = HashSet::from_iter(os_input.deprecated_compiled_classes.keys().cloned()); exec_scopes.insert_value("__deprecated_class_hashes", deprecated_class_hashes); + insert_value_from_var_name("compiled_class_facts", vm.add_memory_segment(), vm, ids_data, ap_tracking)?; insert_value_from_var_name( "n_compiled_class_facts", os_input.deprecated_compiled_classes.len(), @@ -83,17 +83,17 @@ pub fn load_deprecated_class_facts( Ok(()) } -/// Implements hint: -/// -/// from starkware.starknet.core.os.contract_class.deprecated_class_hash import ( -/// get_deprecated_contract_class_struct, -/// ) -/// -/// compiled_class_hash, compiled_class = next(compiled_class_facts) -/// -/// cairo_contract = get_deprecated_contract_class_struct( -/// identifiers=ids._context.identifiers, contract_class=compiled_class) -/// ids.compiled_class = segments.gen_arg(cairo_contract) +pub const LOAD_DEPRECATED_CLASS_INNER: &str = indoc! {r#" + from starkware.starknet.core.os.contract_class.deprecated_class_hash import ( + get_deprecated_contract_class_struct, + ) + + compiled_class_hash, compiled_class = next(compiled_class_facts) + + cairo_contract = get_deprecated_contract_class_struct( + identifiers=ids._context.identifiers, contract_class=compiled_class) + ids.compiled_class = segments.gen_arg(cairo_contract)"# +}; pub fn load_deprecated_inner( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -107,16 +107,17 @@ pub fn load_deprecated_inner( let (class_hash, deprecated_class) = deprecated_class_iter.next().unwrap(); exec_scopes.insert_value("compiled_class_hash", class_hash); + exec_scopes.insert_value("compiled_class", deprecated_class.clone()); let dep_class_base = vm.add_memory_segment(); write_deprecated_class(vm, dep_class_base, deprecated_class)?; + println!("{dep_class_base:}"); insert_value_from_var_name("compiled_class", dep_class_base, vm, ids_data, ap_tracking) } -/// Implements hint: -/// -/// memory[ap] = to_felt_or_relocatable(deprecated_syscall_handler.block_info.block_number) +pub const DEPRECATED_BLOCK_NUMBER: &str = + "memory[ap] = to_felt_or_relocatable(deprecated_syscall_handler.block_info.block_number)"; pub fn block_number( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -129,9 +130,8 @@ pub fn block_number( insert_value_into_ap(vm, Felt252::from(block_context.block_number.0)) } -/// Implements hint: -/// -/// memory[ap] = to_felt_or_relocatable(deprecated_syscall_handler.block_info.block_timestamp) +pub const DEPRECATED_BLOCK_TIMESTAMP: &str = + "memory[ap] = to_felt_or_relocatable(deprecated_syscall_handler.block_info.block_timestamp)"; pub fn block_timestamp( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -143,9 +143,7 @@ pub fn block_timestamp( insert_value_into_ap(vm, Felt252::from(block_context.block_timestamp.0)) } -/// Implements hint: -/// -/// memory[ap] = to_felt_or_relocatable(os_input.general_config.chain_id.value) +pub const CHAIN_ID: &str = "memory[ap] = to_felt_or_relocatable(os_input.general_config.chain_id.value)"; pub fn chain_id( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -159,9 +157,7 @@ pub fn chain_id( insert_value_into_ap(vm, chain_id) } -/// Implements hint: -/// -/// memory[ap] = to_felt_or_relocatable(os_input.general_config.fee_token_address) +pub const FEE_TOKEN_ADDRESS: &str = "memory[ap] = to_felt_or_relocatable(os_input.general_config.fee_token_address)"; pub fn fee_token_address( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -173,9 +169,7 @@ pub fn fee_token_address( insert_value_into_ap(vm, felt_api2vm(*os_input.general_config.starknet_os_config.fee_token_address.0.key())) } -/// Implements hint: -/// -/// os_input.general_config.sequencer_address +pub const SEQUENCER_ADDRESS: &str = "memory[ap] = to_felt_or_relocatable(os_input.general_config.sequencer_address)"; pub fn sequencer_address( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -191,11 +185,11 @@ pub fn sequencer_address( ) } -/// Implements hint: -/// -/// ids.state_entry = __dict_manager.get_dict(ids.contract_state_changes)[ -/// ids.BLOCK_HASH_CONTRACT_ADDRESS -/// ] +pub const GET_BLOCK_MAPPING: &str = indoc! {r#" + ids.state_entry = __dict_manager.get_dict(ids.contract_state_changes)[ + ids.BLOCK_HASH_CONTRACT_ADDRESS + ]"# +}; pub fn get_block_mapping( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, diff --git a/src/hints/execution.rs b/src/hints/execution.rs index 227bc58b8..af3648bb9 100644 --- a/src/hints/execution.rs +++ b/src/hints/execution.rs @@ -1,12 +1,12 @@ use std::any::Any; use std::collections::{HashMap, HashSet}; use std::ops::AddAssign; +use std::vec::IntoIter; -use cairo_felt::Felt252; +use cairo_vm::felt::Felt252; use cairo_vm::hint_processor::builtin_hint_processor::dict_manager::Dictionary; use cairo_vm::hint_processor::builtin_hint_processor::hint_utils::{ - get_integer_from_var_name, get_ptr_from_var_name, get_relocatable_from_var_name, insert_value_from_var_name, - insert_value_into_ap, + get_integer_from_var_name, get_ptr_from_var_name, insert_value_from_var_name, insert_value_into_ap, }; use cairo_vm::hint_processor::hint_processor_definition::HintReference; use cairo_vm::serde::deserialize_program::ApTracking; @@ -14,39 +14,128 @@ use cairo_vm::types::exec_scope::ExecutionScopes; use cairo_vm::types::relocatable::MaybeRelocatable; use cairo_vm::vm::errors::hint_errors::HintError; use cairo_vm::vm::vm_core::VirtualMachine; +use indoc::indoc; use num_traits::{One, Zero}; -use crate::io::execution_helper::OsExecutionHelper; -use crate::state::storage::TrieStorage; -use crate::state::trie::PedersenHash; +use crate::io::input::StarknetOsInput; +use crate::io::InternalTransaction; -/// Implements hint: -/// -/// execution_helper.start_tx( -/// tx_info_ptr=ids.constructor_execution_context.deprecated_tx_info.address_ -/// ) -pub fn start_execute_deploy_transaction( +pub const LOAD_NEXT_TX: &str = indoc! {r#" + tx = next(transactions) + tx_type_bytes = tx.tx_type.name.encode("ascii") + ids.tx_type = int.from_bytes(tx_type_bytes, "big")"# +}; +pub fn load_next_tx( + vm: &mut VirtualMachine, + exec_scopes: &mut ExecutionScopes, + ids_data: &HashMap, + ap_tracking: &ApTracking, + _constants: &HashMap, +) -> Result<(), HintError> { + let mut transactions = exec_scopes.get::>("transactions")?; + // Safe to unwrap because the remaining number of txs is checked in the cairo code. + let tx = transactions.next().unwrap(); + exec_scopes.insert_value("transactions", transactions); + exec_scopes.insert_value("tx", tx.clone()); + insert_value_from_var_name("tx_type", Felt252::from_bytes_be(tx.r#type.as_bytes()), vm, ids_data, ap_tracking) +} + +pub const PREPARE_CONSTRUCTOR_EXECUTION: &str = indoc! {r#" + ids.contract_address_salt = tx.contract_address_salt + ids.class_hash = tx.class_hash + ids.constructor_calldata_size = len(tx.constructor_calldata) + ids.constructor_calldata = segments.gen_arg(arg=tx.constructor_calldata)"# +}; +pub fn prepare_constructor_execution( + vm: &mut VirtualMachine, + exec_scopes: &mut ExecutionScopes, + ids_data: &HashMap, + ap_tracking: &ApTracking, + _constants: &HashMap, +) -> Result<(), HintError> { + let tx = exec_scopes.get::("tx")?; + insert_value_from_var_name( + "contract_address_salt", + tx.contract_address_salt.expect("`contract_address_salt` must be present"), + vm, + ids_data, + ap_tracking, + )?; + insert_value_from_var_name( + "class_hash", + // using `contract_hash` instead of `class_hash` as the that's how the + // input.json is structured + tx.contract_hash.expect("`contract_hash` must be present"), + vm, + ids_data, + ap_tracking, + )?; + + let constructor_calldata_size = match &tx.constructor_calldata { + None => 0, + Some(calldata) => calldata.len(), + }; + insert_value_from_var_name("constructor_calldata_size", constructor_calldata_size, vm, ids_data, ap_tracking)?; + + let constructor_calldata = tx.constructor_calldata.unwrap_or_default().iter().map(|felt| felt.into()).collect(); + let constructor_calldata_base = vm.add_memory_segment(); + vm.load_data(constructor_calldata_base, &constructor_calldata)?; + insert_value_from_var_name("constructor_calldata", constructor_calldata_base, vm, ids_data, ap_tracking) +} + +pub const TRANSACTION_VERSION: &str = "memory[ap] = to_felt_or_relocatable(tx.version)"; +pub fn transaction_version( + vm: &mut VirtualMachine, + exec_scopes: &mut ExecutionScopes, + _ids_data: &HashMap, + _ap_tracking: &ApTracking, + _constants: &HashMap, +) -> Result<(), HintError> { + let tx = exec_scopes.get::("tx")?; + insert_value_into_ap(vm, tx.version.expect("Transaction version should be set")) +} + +pub const ASSERT_TRANSACTION_HASH: &str = indoc! {r#" + assert ids.transaction_hash == tx.hash_value, ( + "Computed transaction_hash is inconsistent with the hash in the transaction. " + f"Computed hash = {ids.transaction_hash}, Expected hash = {tx.hash_value}.")"# +}; +pub fn assert_transaction_hash( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, ids_data: &HashMap, ap_tracking: &ApTracking, _constants: &HashMap, ) -> Result<(), HintError> { - let execution_helper = - exec_scopes.get_mut_ref::>("execution_helper").unwrap(); - let constructor_execution_context = - get_relocatable_from_var_name("constructor_execution_context", vm, ids_data, ap_tracking)?; - let deprecated_tx_info_ptr = (constructor_execution_context + 5usize).unwrap(); + let tx = exec_scopes.get::("tx")?; + let transaction_hash = get_integer_from_var_name("transaction_hash", vm, ids_data, ap_tracking)?.into_owned(); - execution_helper.start_tx(Some(deprecated_tx_info_ptr)); + assert_eq!( + tx.hash_value, transaction_hash, + "Computed transaction_hash is inconsistent with the hash in the transaction. Computed hash = {}, Expected \ + hash = {}.", + transaction_hash, tx.hash_value + ); Ok(()) } -/// Implements hint: -/// -/// # Fetch a state_entry in this hint and validate it in the update at the end -/// # of this function. -/// ids.state_entry = __dict_manager.get_dict(ids.contract_state_changes)[ids.contract_address] +pub const ENTER_SCOPE_SYSCALL_HANDLER: &str = "vm_enter_scope({'syscall_handler': deprecated_syscall_handler})"; +pub fn enter_scope_syscall_handler( + vm: &mut VirtualMachine, + _exec_scopes: &mut ExecutionScopes, + ids_data: &HashMap, + ap_tracking: &ApTracking, + _constants: &HashMap, +) -> Result<(), HintError> { + let _jump_dest = get_ptr_from_var_name("contract_entry_point", vm, ids_data, ap_tracking)?; + Ok(()) +} + +pub const GET_STATE_ENTRY: &str = indoc! {r##" + # Fetch a state_entry in this hint and validate it in the update at the end + # of this function. + ids.state_entry = __dict_manager.get_dict(ids.contract_state_changes)[ids.contract_address]"## +}; pub fn get_state_entry( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -69,9 +158,8 @@ pub fn get_state_entry( Ok(()) } -/// Implements hint: -/// -/// is_deprecated = 1 if ids.execution_context.class_hash in __deprecated_class_hashes else 0 +pub const CHECK_IS_DEPRECATED: &str = + "is_deprecated = 1 if ids.execution_context.class_hash in __deprecated_class_hashes else 0"; pub fn check_is_deprecated( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -89,9 +177,7 @@ pub fn check_is_deprecated( Ok(()) } -/// Implements hint: -/// -/// memory[ap] = to_felt_or_relocatable(is_deprecated) +pub const IS_DEPRECATED: &str = "memory[ap] = to_felt_or_relocatable(is_deprecated)"; pub fn is_deprecated( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -103,10 +189,7 @@ pub fn is_deprecated( Ok(()) } -/// Implement hint: -/// -/// ids.os_context = segments.add() -/// ids.syscall_ptr = segments.add() +pub const OS_CONTEXT_SEGMENTS: &str = "ids.os_context = segments.add()\nids.syscall_ptr = segments.add()"; pub fn os_context_segments( vm: &mut VirtualMachine, _exec_scopes: &mut ExecutionScopes, @@ -119,9 +202,7 @@ pub fn os_context_segments( Ok(()) } -/// Implements hint: -/// -/// vm_enter_scope({'n_selected_builtins': ids.n_selected_builtins}) +pub const SELECTED_BUILTINS: &str = "vm_enter_scope({'n_selected_builtins': ids.n_selected_builtins})"; pub fn selected_builtins( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -135,15 +216,15 @@ pub fn selected_builtins( Ok(()) } -/// Implements hint: -/// -/// # A builtin should be selected iff its encoding appears in the selected encodings list -/// # and the list wasn't exhausted. -/// # Note that testing inclusion by a single comparison is possible since the lists are sorted. -/// ids.select_builtin = int( -/// n_selected_builtins > 0 and memory[ids.selected_encodings] == memory[ids.all_encodings]) -/// if ids.select_builtin: -/// n_selected_builtins = n_selected_builtins - 1 +pub const SELECT_BUILTIN: &str = indoc! {r##" + # A builtin should be selected iff its encoding appears in the selected encodings list + # and the list wasn't exhausted. + # Note that testing inclusion by a single comparison is possible since the lists are sorted. + ids.select_builtin = int( + n_selected_builtins > 0 and memory[ids.selected_encodings] == memory[ids.all_encodings]) + if ids.select_builtin: + n_selected_builtins = n_selected_builtins - 1"## +}; pub fn select_builtin( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -170,21 +251,32 @@ pub fn select_builtin( Ok(()) } -/// Implements hint: -/// -/// execution_helper.enter_call( -/// execution_info_ptr=ids.execution_context.execution_info.address_) -pub fn enter_call( - vm: &mut VirtualMachine, +pub const ENTER_SYSCALL_SCOPES: &str = indoc! {r#" + vm_enter_scope({ + '__deprecated_class_hashes': __deprecated_class_hashes, + 'transactions': iter(os_input.transactions), + 'execution_helper': execution_helper, + 'deprecated_syscall_handler': deprecated_syscall_handler, + 'syscall_handler': syscall_handler, + '__dict_manager': __dict_manager, + })"# +}; +pub fn enter_syscall_scopes( + _vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, - ids_data: &HashMap, - ap_tracking: &ApTracking, + _ids_data: &HashMap, + _ap_tracking: &ApTracking, _constants: &HashMap, ) -> Result<(), HintError> { - let execution_info_ptr = - vm.get_relocatable((get_ptr_from_var_name("execution_context", vm, ids_data, ap_tracking)? + 4i32).unwrap())?; - exec_scopes - .get_mut_ref::>("execution_helper")? - .enter_call(Some(execution_info_ptr)); + let os_input = exec_scopes.get::("os_input").unwrap(); + let transactions: Box = Box::new(os_input.transactions.into_iter()); + let dict_manager = Box::new(exec_scopes.get_dict_manager()?); + let deprecated_class_hashes = Box::new(exec_scopes.get::>("__deprecated_class_hashes")?); + + exec_scopes.enter_scope(HashMap::from_iter([ + (String::from("transactions"), transactions), + (String::from("dict_manager"), dict_manager), + (String::from("__deprecated_class_hashes"), deprecated_class_hashes), + ])); Ok(()) } diff --git a/src/hints/hints_raw.rs b/src/hints/hints_raw.rs deleted file mode 100644 index ad08dde8e..000000000 --- a/src/hints/hints_raw.rs +++ /dev/null @@ -1,108 +0,0 @@ -pub const STARKNET_OS_INPUT: &str = - "from starkware.starknet.core.os.os_input import StarknetOsInput\n\nos_input = \ - StarknetOsInput.load(data=program_input)\n\nids.initial_carried_outputs.messages_to_l1 = \ - segments.add_temp_segment()\nids.initial_carried_outputs.messages_to_l2 = segments.add_temp_segment()"; - -pub const LOAD_CLASS_FACTS: &str = "ids.compiled_class_facts = segments.add()\nids.n_compiled_class_facts = \ - len(os_input.compiled_classes)\nvm_enter_scope({\n 'compiled_class_facts': \ - iter(os_input.compiled_classes.items()),\n})"; - -pub const LOAD_DEPRECATED_CLASS_FACTS: &str = - "# Creates a set of deprecated class hashes to distinguish calls to deprecated entry \ - points.\n__deprecated_class_hashes=set(os_input.deprecated_compiled_classes.keys())\nids.compiled_class_facts = \ - segments.add()\nids.n_compiled_class_facts = len(os_input.deprecated_compiled_classes)\nvm_enter_scope({\n \ - 'compiled_class_facts': iter(os_input.deprecated_compiled_classes.items()),\n})"; - -pub const LOAD_DEPRECATED_CLASS_INNER: &str = - "from starkware.starknet.core.os.contract_class.deprecated_class_hash import (\n \ - get_deprecated_contract_class_struct,\n)\n\ncompiled_class_hash, compiled_class = \ - next(compiled_class_facts)\n\ncairo_contract = get_deprecated_contract_class_struct(\n \ - identifiers=ids._context.identifiers, contract_class=compiled_class)\nids.compiled_class = \ - segments.gen_arg(cairo_contract)"; - -pub const CHECK_DEPRECATED_CLASS_HASH: &str = - "from starkware.python.utils import from_bytes\n\ncomputed_hash = ids.compiled_class_fact.hash\nexpected_hash = \ - compiled_class_hash\nassert computed_hash == expected_hash, (\n \"Computed compiled_class_hash is \ - inconsistent with the hash in the os_input. \"\n f\"Computed hash = {computed_hash}, Expected hash = \ - {expected_hash}.\")\n\nvm_load_program(compiled_class.program, ids.compiled_class.bytecode_ptr)"; - -/// This is the equivalent of nondet %{ os_input.general_config.sequencer_address %} -pub const SEQUENCER_ADDRESS: &str = "memory[ap] = to_felt_or_relocatable(os_input.general_config.sequencer_address)"; - -pub const DEPRECATED_BLOCK_NUMBER: &str = - "memory[ap] = to_felt_or_relocatable(deprecated_syscall_handler.block_info.block_number)"; - -pub const DEPRECATED_BLOCK_TIMESTAMP: &str = - "memory[ap] = to_felt_or_relocatable(deprecated_syscall_handler.block_info.block_timestamp)"; - -pub const CHAIN_ID: &str = "memory[ap] = to_felt_or_relocatable(os_input.general_config.chain_id.value)"; - -pub const FEE_TOKEN_ADDRESS: &str = "memory[ap] = to_felt_or_relocatable(os_input.general_config.fee_token_address)"; - -pub const INITIALIZE_STATE_CHANGES: &str = "from starkware.python.utils import from_bytes\n\ninitial_dict = {\n \ - address: segments.gen_arg(\n (from_bytes(contract.contract_hash), \ - segments.add(), contract.nonce))\n for address, contract in \ - os_input.contracts.items()\n}"; - -pub const INITIALIZE_CLASS_HASHES: &str = "initial_dict = os_input.class_hash_to_compiled_class_hash"; - -pub const GET_BLOCK_MAPPING: &str = - "ids.state_entry = __dict_manager.get_dict(ids.contract_state_changes)[\n ids.BLOCK_HASH_CONTRACT_ADDRESS\n]"; - -pub const SEGMENTS_ADD: &str = "memory[ap] = to_felt_or_relocatable(segments.add())"; - -pub const SEGMENTS_ADD_TEMP: &str = "memory[ap] = to_felt_or_relocatable(segments.add_temp_segment())"; - -pub const TRANSACTIONS_LEN: &str = "memory[ap] = to_felt_or_relocatable(len(os_input.transactions))"; - -pub const ENTER_SYSCALL_SCOPES: &str = - "vm_enter_scope({\n '__deprecated_class_hashes': __deprecated_class_hashes,\n 'transactions': \ - iter(os_input.transactions),\n 'execution_helper': execution_helper,\n 'deprecated_syscall_handler': \ - deprecated_syscall_handler,\n 'syscall_handler': syscall_handler,\n '__dict_manager': __dict_manager,\n})"; - -pub const LOAD_NEXT_TX: &str = "tx = next(transactions)\ntx_type_bytes = \ - tx.tx_type.name.encode(\"ascii\")\nids.tx_type = int.from_bytes(tx_type_bytes, \ - \"big\")"; - -pub const LOAD_CONTRACT_ADDRESS: &str = "from starkware.starknet.business_logic.transaction.objects import \ - InternalL1Handler\nids.contract_address = (\ntx.contract_address if \ - isinstance(tx, InternalL1Handler) else tx.sender_address\n)"; - -pub const PREPARE_CONSTRUCTOR_EXECUTION: &str = "ids.contract_address_salt = tx.contract_address_salt\nids.class_hash \ - = tx.class_hash\nids.constructor_calldata_size = \ - len(tx.constructor_calldata)\nids.constructor_calldata = \ - segments.gen_arg(arg=tx.constructor_calldata)"; - -pub const TRANSACTION_VERSION: &str = "memory[ap] = to_felt_or_relocatable(tx.version)"; - -pub const ASSERT_TRANSACTION_HASH: &str = - "assert ids.transaction_hash == tx.hash_value, (\n \"Computed transaction_hash is inconsistent with the hash \ - in the transaction. \"\n f\"Computed hash = {ids.transaction_hash}, Expected hash = {tx.hash_value}.\")"; - -pub const FORMAT_OS_OUTPUT: &str = - "from starkware.python.math_utils import div_ceil\nonchain_data_start = ids.da_start\nonchain_data_size = ids.output_ptr - onchain_data_start\n\nmax_page_size = 3800\nn_pages = div_ceil(onchain_data_size, max_page_size)\nfor i in range(n_pages):\n start_offset = i * max_page_size\n output_builtin.add_page(\n page_id=1 + i,\n page_start=onchain_data_start + start_offset,\n page_size=min(onchain_data_size - start_offset, max_page_size),\n )\n# Set the tree structure to a root with two children:\n# * A leaf which represents the main part\n# * An inner node for the onchain data part (which contains n_pages children).\n#\n# This is encoded using the following sequence:\noutput_builtin.add_attribute('gps_fact_topology', [\n # Push 1 + n_pages pages (all of the pages).\n 1 + n_pages,\n # Create a parent node for the last n_pages.\n n_pages,\n # Don't push additional pages.\n 0,\n # Take the first page (the main part) and the node that was created (onchain data)\n # and use them to construct the root of the fact tree.\n 2,\n])"; - -pub const START_DEPLOY_TX: &str = - "execution_helper.start_tx(\n tx_info_ptr=ids.constructor_execution_context.deprecated_tx_info.address_\n)"; - -pub const GET_STATE_ENTRY: &str = "# Fetch a state_entry in this hint and validate it in the update at the end\n# of \ - this function.\nids.state_entry = \ - __dict_manager.get_dict(ids.contract_state_changes)[ids.contract_address]"; - -pub const CHECK_IS_DEPRECATED: &str = - "is_deprecated = 1 if ids.execution_context.class_hash in __deprecated_class_hashes else 0"; - -pub const IS_DEPRECATED: &str = "memory[ap] = to_felt_or_relocatable(is_deprecated)"; - -pub const OS_CONTEXT_SEGMENTS: &str = "ids.os_context = segments.add()\nids.syscall_ptr = segments.add()"; - -pub const SELECTED_BUILTINS: &str = "vm_enter_scope({'n_selected_builtins': ids.n_selected_builtins})"; - -pub const SELECT_BUILTIN: &str = - "# A builtin should be selected iff its encoding appears in the selected encodings list\n# and the list wasn't \ - exhausted.\n# Note that testing inclusion by a single comparison is possible since the lists are \ - sorted.\nids.select_builtin = int(\n n_selected_builtins > 0 and memory[ids.selected_encodings] == \ - memory[ids.all_encodings])\nif ids.select_builtin:\n n_selected_builtins = n_selected_builtins - 1"; - -pub const ENTER_CALL: &str = - "execution_helper.enter_call(\n execution_info_ptr=ids.execution_context.execution_info.address_)"; diff --git a/src/hints/mod.rs b/src/hints/mod.rs index 8c10064a0..bce1fc50b 100644 --- a/src/hints/mod.rs +++ b/src/hints/mod.rs @@ -1,140 +1,176 @@ pub mod block_context; -mod execution; -pub mod hints_raw; -// pub mod transaction_context; +pub mod execution; use std::any::Any; -use std::collections::{HashMap, HashSet}; -use std::rc::Rc; -use std::vec::IntoIter; +use std::collections::HashMap; use cairo_vm::felt::Felt252; use cairo_vm::hint_processor::builtin_hint_processor::builtin_hint_processor_definition::{ - BuiltinHintProcessor, HintFunc, + BuiltinHintProcessor, HintProcessorData, }; use cairo_vm::hint_processor::builtin_hint_processor::hint_utils::*; -use cairo_vm::hint_processor::hint_processor_definition::HintReference; -use cairo_vm::serde::deserialize_program::ApTracking; +use cairo_vm::hint_processor::hint_processor_definition::{ + HintExtension, HintProcessor, HintProcessorLogic, HintReference, +}; +use cairo_vm::serde::deserialize_program::{ApTracking, HintParams, ReferenceManager}; use cairo_vm::types::exec_scope::ExecutionScopes; use cairo_vm::types::relocatable::MaybeRelocatable; use cairo_vm::vm::errors::hint_errors::HintError; +use cairo_vm::vm::runners::cairo_runner::{ResourceTracker, RunResources}; use cairo_vm::vm::vm_core::VirtualMachine; +use indoc::indoc; +use starknet_api::deprecated_contract_class::ContractClass as DeprecatedContractClass; -use self::block_context::get_block_mapping; -use self::execution::{ - check_is_deprecated, enter_call, get_state_entry, is_deprecated, os_context_segments, select_builtin, - selected_builtins, start_execute_deploy_transaction, -}; use crate::config::DEFAULT_INPUT_PATH; -use crate::hints::hints_raw::*; -use crate::io::execution_helper::OsExecutionHelper; use crate::io::input::StarknetOsInput; -use crate::io::InternalTransaction; -use crate::state::storage::TrieStorage; -use crate::state::trie::PedersenHash; - -pub fn sn_hint_processor() -> BuiltinHintProcessor { - let mut hint_processor = BuiltinHintProcessor::new_empty(); - - let sn_os_input = HintFunc(Box::new(starknet_os_input)); - hint_processor.add_hint(String::from(hints_raw::STARKNET_OS_INPUT), Rc::new(sn_os_input)); - - let load_class_facts = HintFunc(Box::new(block_context::load_class_facts)); - hint_processor.add_hint(String::from(hints_raw::LOAD_CLASS_FACTS), Rc::new(load_class_facts)); - - let load_deprecated_class_facts = HintFunc(Box::new(block_context::load_deprecated_class_facts)); - hint_processor.add_hint(String::from(hints_raw::LOAD_DEPRECATED_CLASS_FACTS), Rc::new(load_deprecated_class_facts)); - - let load_deprecated_class_inner = HintFunc(Box::new(block_context::load_deprecated_inner)); - hint_processor.add_hint(String::from(hints_raw::LOAD_DEPRECATED_CLASS_INNER), Rc::new(load_deprecated_class_inner)); - - let check_deprecated_class_hash_hint = HintFunc(Box::new(check_deprecated_class_hash)); - hint_processor - .add_hint(String::from(hints_raw::CHECK_DEPRECATED_CLASS_HASH), Rc::new(check_deprecated_class_hash_hint)); - - let block_number_hint = HintFunc(Box::new(block_context::block_number)); - hint_processor.add_hint(String::from(hints_raw::DEPRECATED_BLOCK_NUMBER), Rc::new(block_number_hint)); - - let block_timestamp_hint = HintFunc(Box::new(block_context::block_timestamp)); - hint_processor.add_hint(String::from(hints_raw::DEPRECATED_BLOCK_TIMESTAMP), Rc::new(block_timestamp_hint)); - - let sequencer_address_hint = HintFunc(Box::new(block_context::sequencer_address)); - hint_processor.add_hint(String::from(hints_raw::SEQUENCER_ADDRESS), Rc::new(sequencer_address_hint)); - - let chain_id_hint = HintFunc(Box::new(block_context::chain_id)); - hint_processor.add_hint(String::from(hints_raw::CHAIN_ID), Rc::new(chain_id_hint)); - let fee_token_address_hint = HintFunc(Box::new(block_context::fee_token_address)); - hint_processor.add_hint(String::from(hints_raw::FEE_TOKEN_ADDRESS), Rc::new(fee_token_address_hint)); - - let initialize_state_changes_hint = HintFunc(Box::new(initialize_state_changes)); - hint_processor.add_hint(String::from(hints_raw::INITIALIZE_STATE_CHANGES), Rc::new(initialize_state_changes_hint)); - - let initialize_class_hashes_hint = HintFunc(Box::new(initialize_class_hashes)); - hint_processor.add_hint(String::from(hints_raw::INITIALIZE_CLASS_HASHES), Rc::new(initialize_class_hashes_hint)); - - let segments_add_hint = HintFunc(Box::new(segments_add)); - hint_processor.add_hint(String::from(hints_raw::SEGMENTS_ADD), Rc::new(segments_add_hint)); - - let segments_add_temp_hint = HintFunc(Box::new(segments_add_temp)); - hint_processor.add_hint(String::from(hints_raw::SEGMENTS_ADD_TEMP), Rc::new(segments_add_temp_hint)); - - let transactions_len_hint = HintFunc(Box::new(transactions_len)); - hint_processor.add_hint(String::from(hints_raw::TRANSACTIONS_LEN), Rc::new(transactions_len_hint)); +/// Hint Extensions extend the current map of hints used by the VM. +/// This behaviour achieves what the `vm_load_data` primitive does for cairo-lang +/// and is needed to implement os hints like `vm_load_program`. +#[derive(Default)] +pub struct SnosHintProcessor { + sn_hint_processor: SnosSimpleHintProcessor, + run_resources: RunResources, +} - let enter_syscall_scopes_hint = HintFunc(Box::new(enter_syscall_scopes)); - hint_processor.add_hint(String::from(hints_raw::ENTER_SYSCALL_SCOPES), Rc::new(enter_syscall_scopes_hint)); +impl ResourceTracker for SnosHintProcessor { + fn consumed(&self) -> bool { + self.run_resources.consumed() + } - let load_next_tx_hint = HintFunc(Box::new(load_next_tx)); - hint_processor.add_hint(String::from(LOAD_NEXT_TX), Rc::new(load_next_tx_hint)); + fn consume_step(&mut self) { + self.run_resources.consume_step() + } - let prepare_constructor_execution_hint = HintFunc(Box::new(prepare_constructor_execution)); - hint_processor.add_hint(String::from(PREPARE_CONSTRUCTOR_EXECUTION), Rc::new(prepare_constructor_execution_hint)); + fn get_n_steps(&self) -> Option { + self.run_resources.get_n_steps() + } - let transaction_version_hint = HintFunc(Box::new(transaction_version)); - hint_processor.add_hint(String::from(TRANSACTION_VERSION), Rc::new(transaction_version_hint)); + fn run_resources(&self) -> &RunResources { + &self.run_resources + } +} - let assert_transaction_hash_hint = HintFunc(Box::new(assert_transaction_hash)); - hint_processor.add_hint(String::from(ASSERT_TRANSACTION_HASH), Rc::new(assert_transaction_hash_hint)); +impl HintProcessorLogic for SnosHintProcessor { + // stub for trait impl + fn execute_hint( + &mut self, + _vm: &mut VirtualMachine, + _exec_scopes: &mut ExecutionScopes, + _hint_data: &Box, + _constants: &HashMap, + ) -> Result<(), HintError> { + Ok(()) + } - let get_block_mapping_hint = HintFunc(Box::new(get_block_mapping)); - hint_processor.add_hint(String::from(GET_BLOCK_MAPPING), Rc::new(get_block_mapping_hint)); + fn execute_hint_extensive( + &mut self, + vm: &mut VirtualMachine, + exec_scopes: &mut ExecutionScopes, + hint_data: &Box, + constants: &HashMap, + ) -> Result { + // First attempt to execute with builtin hint processor + match self.sn_hint_processor.execute_hint(vm, exec_scopes, hint_data, constants) { + Err(HintError::UnknownHint(_)) => {} + res => return res.map(|_| HintExtension::default()), + } + // Execute os-specific hints + let hint_data = hint_data.downcast_ref::().ok_or(HintError::WrongHintData)?; + match &*hint_data.code { + CHECK_DEPRECATED_CLASS_HASH => { + check_deprecated_class_hash(self, vm, exec_scopes, &hint_data.ids_data, &hint_data.ap_tracking) + } + code => Err(HintError::UnknownHint(code.to_string().into_boxed_str())), + } + } +} - let start_execute_deploy_transaction_hint = HintFunc(Box::new(start_execute_deploy_transaction)); - hint_processor.add_hint(String::from(START_DEPLOY_TX), Rc::new(start_execute_deploy_transaction_hint)); +pub struct SnosSimpleHintProcessor { + builtin_hint_proc: BuiltinHintProcessor, + run_resources: RunResources, +} - let get_state_entry_hint = HintFunc(Box::new(get_state_entry)); - hint_processor.add_hint(String::from(GET_STATE_ENTRY), Rc::new(get_state_entry_hint)); +impl ResourceTracker for SnosSimpleHintProcessor { + fn consumed(&self) -> bool { + self.run_resources.consumed() + } - let check_is_deprecated_hint = HintFunc(Box::new(check_is_deprecated)); - hint_processor.add_hint(String::from(CHECK_IS_DEPRECATED), Rc::new(check_is_deprecated_hint)); + fn consume_step(&mut self) { + self.run_resources.consume_step() + } - let is_deprecated_hint = HintFunc(Box::new(is_deprecated)); - hint_processor.add_hint(String::from(IS_DEPRECATED), Rc::new(is_deprecated_hint)); + fn get_n_steps(&self) -> Option { + self.run_resources.get_n_steps() + } - let os_context_segments_hint = HintFunc(Box::new(os_context_segments)); - hint_processor.add_hint(String::from(OS_CONTEXT_SEGMENTS), Rc::new(os_context_segments_hint)); + fn run_resources(&self) -> &RunResources { + &self.run_resources + } +} - let selected_builtins_hint = HintFunc(Box::new(selected_builtins)); - hint_processor.add_hint(String::from(SELECTED_BUILTINS), Rc::new(selected_builtins_hint)); +impl Default for SnosSimpleHintProcessor { + fn default() -> Self { + Self { builtin_hint_proc: BuiltinHintProcessor::new_empty(), run_resources: Default::default() } + } +} - let select_builtin_hint = HintFunc(Box::new(select_builtin)); - hint_processor.add_hint(String::from(SELECT_BUILTIN), Rc::new(select_builtin_hint)); +impl HintProcessorLogic for SnosSimpleHintProcessor { + fn execute_hint( + &mut self, + vm: &mut VirtualMachine, + exec_scopes: &mut ExecutionScopes, + hint_data: &Box, + constants: &HashMap, + ) -> Result<(), HintError> { + match self.builtin_hint_proc.execute_hint(vm, exec_scopes, hint_data, constants) { + Err(HintError::UnknownHint(_)) => {} + res => return res, + } + let hint_data = hint_data.downcast_ref::().ok_or(HintError::WrongHintData)?; + + let hint_func = match &*hint_data.code { + STARKNET_OS_INPUT => starknet_os_input, + INITIALIZE_STATE_CHANGES => initialize_state_changes, + INITIALIZE_CLASS_HASHES => initialize_class_hashes, + SEGMENTS_ADD => segments_add, + SEGMENTS_ADD_TEMP => segments_add_temp, + TRANSACTIONS_LEN => transactions_len, + block_context::LOAD_CLASS_FACTS => block_context::load_class_facts, + block_context::LOAD_DEPRECATED_CLASS_FACTS => block_context::load_deprecated_class_facts, + block_context::LOAD_DEPRECATED_CLASS_INNER => block_context::load_deprecated_inner, + block_context::DEPRECATED_BLOCK_NUMBER => block_context::block_number, + block_context::DEPRECATED_BLOCK_TIMESTAMP => block_context::block_timestamp, + block_context::SEQUENCER_ADDRESS => block_context::sequencer_address, + block_context::CHAIN_ID => block_context::chain_id, + block_context::FEE_TOKEN_ADDRESS => block_context::fee_token_address, + block_context::GET_BLOCK_MAPPING => block_context::get_block_mapping, + execution::ENTER_SYSCALL_SCOPES => execution::enter_syscall_scopes, + execution::GET_STATE_ENTRY => execution::get_state_entry, + execution::CHECK_IS_DEPRECATED => execution::check_is_deprecated, + execution::IS_DEPRECATED => execution::is_deprecated, + execution::OS_CONTEXT_SEGMENTS => execution::os_context_segments, + execution::SELECTED_BUILTINS => execution::selected_builtins, + execution::SELECT_BUILTIN => execution::select_builtin, + execution::LOAD_NEXT_TX => execution::load_next_tx, + execution::PREPARE_CONSTRUCTOR_EXECUTION => execution::prepare_constructor_execution, + execution::TRANSACTION_VERSION => execution::transaction_version, + execution::ASSERT_TRANSACTION_HASH => execution::assert_transaction_hash, + execution::ENTER_SCOPE_SYSCALL_HANDLER => execution::enter_scope_syscall_handler, + code => return Err(HintError::UnknownHint(code.to_string().into_boxed_str())), + }; + hint_func(vm, exec_scopes, &hint_data.ids_data, &hint_data.ap_tracking, constants) + } +} - let enter_call_hint = HintFunc(Box::new(enter_call)); - hint_processor.add_hint(String::from(ENTER_CALL), Rc::new(enter_call_hint)); +pub const STARKNET_OS_INPUT: &str = indoc! {r#" + from starkware.starknet.core.os.os_input import StarknetOsInput - hint_processor -} + os_input = StarknetOsInput.load(data=program_input) -/// Implements hint: -/// -/// from starkware.starknet.core.os.os_input import StarknetOsInput -/// -/// os_input = StarknetOsInput.load(data=program_input) -/// -/// ids.initial_carried_outputs.messages_to_l1 = segments.add_temp_segment() -/// ids.initial_carried_outputs.messages_to_l2 = segments.add_temp_segment() + ids.initial_carried_outputs.messages_to_l1 = segments.add_temp_segment() + ids.initial_carried_outputs.messages_to_l2 = segments.add_temp_segment()"# +}; pub fn starknet_os_input( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -161,39 +197,67 @@ pub fn starknet_os_input( vm.insert_value(messages_to_l2, temp_segment).map_err(|e| e.into()) } -/// Implements hint: -/// -/// from starkware.python.utils import from_bytes -/// -/// computed_hash = ids.compiled_class_fact.hash -/// expected_hash = compiled_class_hash -/// assert computed_hash == expected_hash, ( -/// "Computed compiled_class_hash is inconsistent with the hash in the os_input. " -/// f"Computed hash = {computed_hash}, Expected hash = {expected_hash}.") -/// -/// vm_load_program(compiled_class.program, ids.compiled_class.bytecode_ptr) +pub const CHECK_DEPRECATED_CLASS_HASH: &str = indoc! {r#" + from starkware.python.utils import from_bytes + + computed_hash = ids.compiled_class_fact.hash + expected_hash = compiled_class_hash + assert computed_hash == expected_hash, ( + "Computed compiled_class_hash is inconsistent with the hash in the os_input. " + f"Computed hash = {computed_hash}, Expected hash = {expected_hash}.") + + vm_load_program(compiled_class.program, ids.compiled_class.bytecode_ptr)"# +}; pub fn check_deprecated_class_hash( - _vm: &mut VirtualMachine, - _exec_scopes: &mut ExecutionScopes, - _ids_data: &HashMap, - _ap_tracking: &ApTracking, - _constants: &HashMap, -) -> Result<(), HintError> { - // TODO: decide if we really need to check this deprecated hash moving forward - // TODO: check w/ LC for `vm_load_program` impl + hint_processor: &dyn HintProcessor, + vm: &mut VirtualMachine, + exec_scopes: &mut ExecutionScopes, + ids_data: &HashMap, + ap_tracking: &ApTracking, +) -> Result { + // TODO(#61): fix comp class hash + // let computed_hash_addr = get_ptr_from_var_name("compiled_class_fact", vm, ids_data, + // ap_tracking)?; let computed_hash = vm.get_integer(computed_hash_addr)?; + // let expected_hash = exec_scopes.get::("compiled_class_hash").unwrap(); + // if computed_hash.as_ref() != &expected_hash { + // return Err(HintError::AssertionFailed( + // format!("Compiled_class_hash mismatch comp={computed_hash} + // exp={expected_hash}").into_boxed_str(), )); + // } + + let dep_class = exec_scopes.get::("compiled_class").unwrap(); + let hints: HashMap> = serde_json::from_value(dep_class.program.hints).unwrap(); + let ref_manager: ReferenceManager = serde_json::from_value(dep_class.program.reference_manager).unwrap(); + let refs = ref_manager.references.iter().map(|r| HintReference::from(r.clone())).collect::>(); + let mut deprecated_compiled_hints: Vec> = Vec::new(); + for (_hint_pc, hint_params) in hints.into_iter() { + let compiled_hint = hint_processor.compile_hint( + &hint_params[0].code, + &hint_params[0].flow_tracking_data.ap_tracking, + &hint_params[0].flow_tracking_data.reference_ids, + &refs, + )?; + + deprecated_compiled_hints.push(compiled_hint); + } - Ok(()) + let compiled_class_ptr = get_ptr_from_var_name("compiled_class", vm, ids_data, ap_tracking)?; + let byte_code_ptr = vm.get_relocatable((compiled_class_ptr + 11)?)?; + println!("dep class byte_ptr: {byte_code_ptr:?}"); + let hint_extension = HashMap::from([(byte_code_ptr, deprecated_compiled_hints)]); + + Ok(hint_extension) } -/// Implements hint: -/// -/// from starkware.python.utils import from_bytes -/// -/// initial_dict = { -/// address: segments.gen_arg( -/// (from_bytes(contract.contract_hash), segments.add(), contract.nonce)) -/// for address, contract in os_input.contracts.items() -/// } +pub const INITIALIZE_STATE_CHANGES: &str = indoc! {r#" + from starkware.python.utils import from_bytes + + initial_dict = { + address: segments.gen_arg( + (from_bytes(contract.contract_hash), segments.add(), contract.nonce)) + for address, contract in os_input.contracts.items() + }"# +}; pub fn initialize_state_changes( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -217,9 +281,7 @@ pub fn initialize_state_changes( Ok(()) } -/// Implements hint: -/// -/// initial_dict = os_input.class_hash_to_compiled_class_hash +pub const INITIALIZE_CLASS_HASHES: &str = "initial_dict = os_input.class_hash_to_compiled_class_hash"; pub fn initialize_class_hashes( _vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -237,9 +299,7 @@ pub fn initialize_class_hashes( Ok(()) } -/// Implements hint: -/// -/// memory[ap] = to_felt_or_relocatable(segments.add()) +pub const SEGMENTS_ADD: &str = "memory[ap] = to_felt_or_relocatable(segments.add())"; pub fn segments_add( vm: &mut VirtualMachine, _exec_scopes: &mut ExecutionScopes, @@ -251,9 +311,7 @@ pub fn segments_add( insert_value_into_ap(vm, segment) } -/// Implements hint: -/// -/// memory[ap] = to_felt_or_relocatable(segments.add_temp_segment()) +pub const SEGMENTS_ADD_TEMP: &str = "memory[ap] = to_felt_or_relocatable(segments.add_temp_segment())"; pub fn segments_add_temp( vm: &mut VirtualMachine, _exec_scopes: &mut ExecutionScopes, @@ -265,9 +323,7 @@ pub fn segments_add_temp( insert_value_into_ap(vm, temp_segment) } -/// Implements hint: -/// -/// memory[ap] = to_felt_or_relocatable(len(os_input.transactions)) +pub const TRANSACTIONS_LEN: &str = "memory[ap] = to_felt_or_relocatable(len(os_input.transactions))"; pub fn transactions_len( vm: &mut VirtualMachine, exec_scopes: &mut ExecutionScopes, @@ -280,135 +336,23 @@ pub fn transactions_len( insert_value_into_ap(vm, os_input.transactions.len()) } -/// Implements hint: -/// -/// vm_enter_scope({ -/// '__deprecated_class_hashes': __deprecated_class_hashes, -/// 'transactions': iter(os_input.transactions), -/// 'execution_helper': execution_helper, -/// 'deprecated_syscall_handler': deprecated_syscall_handler, -/// 'syscall_handler': syscall_handler, -/// '__dict_manager': __dict_manager, -/// }) -pub fn enter_syscall_scopes( - _vm: &mut VirtualMachine, - exec_scopes: &mut ExecutionScopes, - _ids_data: &HashMap, - _ap_tracking: &ApTracking, - _constants: &HashMap, -) -> Result<(), HintError> { - let os_input = exec_scopes.get::("os_input").unwrap(); - let transactions: Box = Box::new(os_input.transactions.into_iter()); - let dict_manager = Box::new(exec_scopes.get_dict_manager()?); - let deprecated_class_hashes = Box::new(exec_scopes.get::>("__deprecated_class_hashes")?); - let execution_helper = - Box::new(exec_scopes.get::>("execution_helper")?); - exec_scopes.enter_scope(HashMap::from_iter([ - (String::from("transactions"), transactions), - (String::from("execution_helper"), execution_helper), - (String::from("dict_manager"), dict_manager), - (String::from("__deprecated_class_hashes"), deprecated_class_hashes), - ])); - Ok(()) -} - -/// Implements hint: -/// -/// tx = next(transactions) -/// tx_type_bytes = tx.tx_type.name.encode("ascii") -/// ids.tx_type = int.from_bytes(tx_type_bytes, "big") -pub fn load_next_tx( - vm: &mut VirtualMachine, - exec_scopes: &mut ExecutionScopes, - ids_data: &HashMap, - ap_tracking: &ApTracking, - _constants: &HashMap, -) -> Result<(), HintError> { - let mut transactions = exec_scopes.get::>("transactions")?; - // Safe to unwrap because the remaining number of txs is checked in the cairo code. - let tx = transactions.next().unwrap(); - exec_scopes.insert_value("transactions", transactions); - exec_scopes.insert_value("tx", tx.clone()); - insert_value_from_var_name("tx_type", Felt252::from_bytes_be(tx.r#type.as_bytes()), vm, ids_data, ap_tracking) -} - -/// Implements hint: -/// -/// ids.contract_address_salt = tx.contract_address_salt -/// ids.class_hash = tx.class_hash -/// ids.constructor_calldata_size = len(tx.constructor_calldata) -/// ids.constructor_calldata = segments.gen_arg(arg=tx.constructor_calldata) -pub fn prepare_constructor_execution( - vm: &mut VirtualMachine, - exec_scopes: &mut ExecutionScopes, - ids_data: &HashMap, - ap_tracking: &ApTracking, - _constants: &HashMap, -) -> Result<(), HintError> { - let tx = exec_scopes.get::("tx")?; - insert_value_from_var_name( - "contract_address_salt", - tx.contract_address_salt.expect("`contract_address_salt` must be present"), - vm, - ids_data, - ap_tracking, - )?; - insert_value_from_var_name( - "class_hash", - // using `contract_hash` instead of `class_hash` as the that's how the - // input.json is structured - tx.contract_hash.expect("`contract_hash` must be present"), - vm, - ids_data, - ap_tracking, - )?; - - let constructor_calldata_size = match &tx.constructor_calldata { - None => 0, - Some(calldata) => calldata.len(), - }; - insert_value_from_var_name("constructor_calldata_size", constructor_calldata_size, vm, ids_data, ap_tracking)?; - - let constructor_calldata = tx.constructor_calldata.unwrap_or_default().iter().map(|felt| felt.into()).collect(); - let constructor_calldata_base = vm.add_memory_segment(); - vm.load_data(constructor_calldata_base, &constructor_calldata)?; - insert_value_from_var_name("constructor_calldata", constructor_calldata_base, vm, ids_data, ap_tracking) -} - -/// Implements hint: -/// -/// memory[ap] = to_felt_or_relocatable(tx.version) -pub fn transaction_version( +pub const BREAKPOINT: &str = "breakpoint()"; +pub fn breakpoint( vm: &mut VirtualMachine, - exec_scopes: &mut ExecutionScopes, - _ids_data: &HashMap, - _ap_tracking: &ApTracking, - _constants: &HashMap, -) -> Result<(), HintError> { - let tx = exec_scopes.get::("tx")?; - insert_value_into_ap(vm, tx.version.expect("Transaction version should be set")) -} - -/// Implements hint: -/// -/// assert ids.transaction_hash == tx.hash_value, ( -/// "Computed transaction_hash is inconsistent with the hash in the transaction. " -/// f"Computed hash = {ids.transaction_hash}, Expected hash = {tx.hash_value}.") -pub fn assert_transaction_hash( - vm: &mut VirtualMachine, - exec_scopes: &mut ExecutionScopes, + _exec_scopes: &mut ExecutionScopes, ids_data: &HashMap, ap_tracking: &ApTracking, _constants: &HashMap, ) -> Result<(), HintError> { - let tx = exec_scopes.get::("tx")?; - let transaction_hash = get_integer_from_var_name("transaction_hash", vm, ids_data, ap_tracking)?.into_owned(); - - assert_eq!( - tx.hash_value, transaction_hash, - "Computed transaction_hash is inconsistent with the hash in the transaction. Computed hash = {}, Expected \ - hash = {}.", - transaction_hash, tx.hash_value - ); + let add = get_ptr_from_var_name("compiled_class", vm, ids_data, ap_tracking)?; + println!("compiled class {add:}"); + let temp = vm.get_integer(add)?; + println!("temp {temp:}"); + let add = (add + 11usize).unwrap(); + let add = vm.get_relocatable(add)?; + let jump_dest = get_ptr_from_var_name("contract_entry_point", vm, ids_data, ap_tracking)?; + println!("jump dest {jump_dest:}"); + println!("val deref {:}", vm.get_integer(jump_dest)?); + println!("add {add:}"); Ok(()) } diff --git a/src/hints/transaction_context.rs b/src/hints/transaction_context.rs deleted file mode 100644 index 8980e73c3..000000000 --- a/src/hints/transaction_context.rs +++ /dev/null @@ -1,21 +0,0 @@ -use crate::io::InternalTransaction; - -/// Implements hint: -/// -/// from starkware.starknet.business_logic.transaction.objects import InternalL1Handler -/// ids.contract_address = ( -/// tx.contract_address if isinstance(tx, InternalL1Handler) else tx.sender_address -/// ) -pub fn load_transaction_context( - vm: &mut VirtualMachine, - exec_scopes: &mut ExecutionScopes, - ids_data: &HashMap, - ap_tracking: &ApTracking, - _constants: &HashMap, -) -> Result<(), HintError> { - let mut transactions = exec_scopes.get::>("transactions")?; - // Safe to unwrap because the remaining number of txs is checked in the cairo code. - let tx = transactions.next().unwrap(); - exec_scopes.insert_value("transactions", transactions); - insert_value_from_var_name("tx_type", Felt252::from_bytes_be(tx.r#type.as_bytes()), vm, ids_data, ap_tracking) -} diff --git a/src/io/classes.rs b/src/io/classes.rs index a6952d1de..c138675fc 100644 --- a/src/io/classes.rs +++ b/src/io/classes.rs @@ -1,4 +1,4 @@ -use cairo_felt::Felt252; +use cairo_vm::felt::Felt252; use cairo_vm::types::relocatable::{MaybeRelocatable, Relocatable}; use cairo_vm::vm::errors::hint_errors::HintError; use cairo_vm::vm::vm_core::VirtualMachine; diff --git a/src/io/execution_helper.rs b/src/io/execution_helper.rs deleted file mode 100644 index f3d8ca31c..000000000 --- a/src/io/execution_helper.rs +++ /dev/null @@ -1,166 +0,0 @@ -use std::collections::HashMap; -use std::vec::IntoIter; - -use blockifier::execution::cairo1_execution::CallResult; -use blockifier::execution::call_info::CallInfo; -use blockifier::transaction::objects::TransactionExecutionInfo; -use cairo_felt::Felt252; -use cairo_vm::types::relocatable::Relocatable; -use starknet_api::deprecated_contract_class::EntryPointType; - -use crate::state::storage::{Storage, TrieStorage}; -use crate::state::trie::StarkHasher; - -#[derive(Default, Clone)] -pub struct OsExecutionHelper -where - H: StarkHasher, - S: Storage, -{ - call_execution_info_ptr: Option, - call_info_: Option, - call_iterator: IntoIter, - deployed_contracts_iterator: IntoIter, - execute_code_read_iterator: IntoIter, - _old_block_number_and_hash: Option<(Felt252, Felt252)>, - result_iterator: IntoIter, - _storage_by_address: HashMap>, - tx_execution_info: Option, - tx_execution_info_iterator: IntoIter, - pub tx_info_ptr: Option, -} - -impl OsExecutionHelper { - pub fn new( - tx_execution_infos: Vec, - storage_by_address: HashMap>, - old_block_number_and_hash: Option<(Felt252, Felt252)>, - ) -> Self { - Self { - call_execution_info_ptr: None, - call_info_: None, - call_iterator: vec![].into_iter(), - deployed_contracts_iterator: vec![].into_iter(), - execute_code_read_iterator: vec![].into_iter(), - _old_block_number_and_hash: old_block_number_and_hash, - result_iterator: vec![].into_iter(), - _storage_by_address: storage_by_address, - tx_execution_info: None, - tx_execution_info_iterator: tx_execution_infos.into_iter(), - tx_info_ptr: None, - } - } - - pub fn start_tx(&mut self, tx_info_ptr: Option) { - assert!(self.tx_info_ptr.is_none(), "self.tx_info_ptr should be None"); - self.tx_info_ptr = tx_info_ptr; - assert!(self.tx_execution_info.is_none(), "self.tx_execution_info should be None"); - self.tx_execution_info = self.tx_execution_info_iterator.next(); - // TODO: uncomment this when possible - self.call_iterator = self.tx_execution_info.as_ref().unwrap().gen_call_iterator(); - } - - pub fn enter_call(&mut self, execution_info_ptr: Option) { - assert!(self.call_execution_info_ptr.is_none()); - self.call_execution_info_ptr = execution_info_ptr; - self.assert_iterators_exhausted(); - assert!(self.call_info_.is_none(), "Call info should be none"); - self.call_info_ = self.call_iterator.next(); - self.deployed_contracts_iterator = self - .call_info_ - .as_ref() - .unwrap() - .inner_calls - .iter() - .filter_map(|call| { - if matches!(call.call.entry_point_type, EntryPointType::Constructor) { - Some(Felt252::from_bytes_be(call.call.caller_address.0.key().bytes())) - } else { - None - } - }) - .collect::>() - .into_iter(); - self.result_iterator = self - .call_info_ - .as_ref() - .unwrap() - .inner_calls - .iter() - .map(|call| CallResult { - failed: call.execution.failed, - retdata: call.execution.retdata.clone(), - gas_consumed: call.execution.gas_consumed, - }) - .collect::>() - .into_iter(); - self.execute_code_read_iterator = self - .call_info_ - .as_ref() - .unwrap() - .storage_read_values - .iter() - .map(|felt| Felt252::from_bytes_be(felt.bytes())) - .collect::>() - .into_iter(); - } - - pub fn assert_iterators_exhausted(&self) { - assert!(self.deployed_contracts_iterator.is_empty(), "Deployed contracts iter isn't exhausted"); - assert!(self.result_iterator.is_empty(), "Result iterator isn't exhausted"); - assert!(self.execute_code_read_iterator.is_empty(), "Execute code read iterator isn't exhausted"); - } -} -trait GenCallIter { - fn gen_call_iterator(&self) -> IntoIter; -} -impl GenCallIter for TransactionExecutionInfo { - fn gen_call_iterator(&self) -> IntoIter { - let mut call_infos = vec![]; - for call_info in self.non_optional_call_infos() { - call_infos.extend(call_info.clone().gen_call_topology()); - } - call_infos.into_iter() - } -} - -trait GenCallTopology { - fn gen_call_topology(self) -> IntoIter; -} - -impl GenCallTopology for CallInfo { - fn gen_call_topology(self) -> IntoIter { - // Create a vector to store the results - let mut results = vec![self.clone()]; - - // Iterate over internal calls, recursively call gen_call_topology, and collect the results - for call in self.inner_calls.into_iter() { - results.extend(call.gen_call_topology()); - } - - // Convert the results vector into an iterator and return it - results.into_iter() - } -} -#[derive(Clone)] -pub struct OsSingleStarknetStorage -where - H: StarkHasher, - S: Storage, -{ - _expected_updated_root: Felt252, - _ffc: FactFetchingContext, - _ongoing_storage_changes: HashMap, - _previous_tree: TrieStorage, -} -#[derive(Clone)] -pub struct FactFetchingContext -where - H: StarkHasher, - S: Storage, -{ - _hash_func: H, - // Prob useless - _n_workers: Option, - _storage: S, -} diff --git a/src/io/input.rs b/src/io/input.rs index f7aaee9f2..d6485a8de 100644 --- a/src/io/input.rs +++ b/src/io/input.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use std::io::Write; use std::{fs, path}; -use cairo_felt::Felt252; +use cairo_vm::felt::Felt252; use serde::{Deserialize, Serialize}; use serde_with::serde_as; use starknet_api::deprecated_contract_class::ContractClass as DeprecatedContractClass; @@ -10,6 +10,7 @@ use starknet_api::deprecated_contract_class::ContractClass as DeprecatedContract use super::InternalTransaction; use crate::config::StarknetGeneralConfig; use crate::error::SnOsError; +use crate::state::trie::{MerkleTrie, StarkHasher}; use crate::utils::{Felt252HexNoPrefix, Felt252Num, Felt252Str, Felt252StrDec}; #[serde_as] @@ -56,6 +57,14 @@ pub struct CommitmentInfo { #[serde_as(as = "HashMap>")] pub commitment_facts: HashMap>, } +impl CommitmentInfo { + pub fn create_from_modifications(_previous_tree: MerkleTrie) -> Self + where + H: StarkHasher, + { + CommitmentInfo::default() + } +} #[serde_as] #[derive(Deserialize, Clone, Debug, Serialize)] pub struct ContractState { diff --git a/src/io/mod.rs b/src/io/mod.rs index 453cb511e..c8d661c63 100644 --- a/src/io/mod.rs +++ b/src/io/mod.rs @@ -1,9 +1,8 @@ pub mod classes; -pub mod execution_helper; pub mod input; pub mod output; -use cairo_felt::Felt252; +use cairo_vm::felt::Felt252; use serde::{Deserialize, Serialize}; use serde_with::serde_as; diff --git a/src/io/output.rs b/src/io/output.rs index 360ae061b..2ed750fc9 100644 --- a/src/io/output.rs +++ b/src/io/output.rs @@ -1,4 +1,4 @@ -use cairo_felt::Felt252; +use cairo_vm::felt::Felt252; use cairo_vm::types::relocatable::MaybeRelocatable; use cairo_vm::vm::runners::builtin_runner::BuiltinRunner; use cairo_vm::vm::vm_core::VirtualMachine; diff --git a/src/lib.rs b/src/lib.rs index 3f703eb88..e1879e348 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(exact_size_is_empty)] pub mod config; pub mod error; pub mod hints; @@ -7,7 +6,6 @@ pub mod sharp; pub mod state; pub mod utils; -use std::collections::HashMap; use std::fs; use blockifier::block_context::BlockContext; @@ -24,10 +22,6 @@ use error::SnOsError; use io::output::StarknetOsOutput; use state::SharedState; -use crate::io::execution_helper::OsExecutionHelper; -use crate::state::storage::TrieStorage; -use crate::state::trie::PedersenHash; - pub struct SnOsRunner { layout: String, os_path: String, @@ -39,7 +33,7 @@ impl SnOsRunner { pub fn run( &self, shared_state: SharedState, - execution_infos: Vec, + _execution_infos: Vec, ) -> Result { // Init CairoRunConfig let cairo_run_config = CairoRunConfig { @@ -61,16 +55,11 @@ impl SnOsRunner { // Init the Cairo VM let mut vm = VirtualMachine::new(cairo_run_config.trace_enabled); let end = cairo_runner.initialize(&mut vm).map_err(|e| SnOsError::Runner(e.into()))?; - let execution_helper = - OsExecutionHelper::::new(execution_infos, HashMap::new(), None); - cairo_runner.exec_scopes.insert_value("execution_helper", execution_helper); cairo_runner.exec_scopes.insert_value("input_path", self.input_path.clone()); cairo_runner.exec_scopes.insert_box("block_context", Box::new(shared_state.block_context)); - // let execution_helper = OsExecutionHelper::<'a, PedersenHash, TrieStorage>::new(execution_infos, - // shared_state, ) // Run the Cairo VM - let mut sn_hint_processor = hints::sn_hint_processor(); + let mut sn_hint_processor = hints::SnosHintProcessor::default(); cairo_runner .run_until_pc(end, &mut vm, &mut sn_hint_processor) .map_err(|err| VmException::from_vm_error(&cairo_runner, &vm, err)) diff --git a/src/state/mod.rs b/src/state/mod.rs index 9152d7693..762e9af8b 100644 --- a/src/state/mod.rs +++ b/src/state/mod.rs @@ -8,7 +8,7 @@ use blockifier::block_context::BlockContext; use blockifier::execution::contract_class::ContractClass; use blockifier::state::cached_state::{CachedState, CommitmentStateDiff}; use blockifier::state::state_api::{State, StateReader}; -use cairo_felt::Felt252; +use cairo_vm::felt::Felt252; use indexmap::{IndexMap, IndexSet}; use starknet_api::block::BlockNumber; use starknet_api::core::{ClassHash, ContractAddress, PatriciaKey}; diff --git a/src/state/trie.rs b/src/state/trie.rs index ae1f3f4df..e2d65c946 100644 --- a/src/state/trie.rs +++ b/src/state/trie.rs @@ -1,5 +1,4 @@ //! pathfinder/crates/merkle-tree - use std::cell::RefCell; use std::collections::HashMap; use std::ops::ControlFlow; @@ -52,6 +51,12 @@ impl MerkleTrie { Self { root, _hasher: std::marker::PhantomData, verify_hashes: false, leaves: Default::default() } } + pub fn update(&mut self) + where + S: Storage, + { + } + pub fn with_verify_hashes(mut self, verify_hashes: bool) -> Self { self.verify_hashes = verify_hashes; self @@ -179,21 +184,6 @@ impl MerkleTrie { let path = self.traverse(storage, &key)?; // There are three possibilities. - // - // 1. The leaf exists, in which case we simply change its value. - // - // 2. The tree is empty, we insert the new leaf and the root becomes an edge node connecting to it. - // - // 3. The leaf does not exist, and the tree is not empty. The final node in the traversal will be an - // edge node who's path diverges from our new leaf node's. - // - // This edge must be split into a new subtree containing both the existing edge's child and the - // new leaf. This requires an edge followed by a binary node and then further edges to both the - // current child and the new leaf. Any of these new edges may also end with an empty path in - // which case they should be elided. It depends on the common path length of the current edge - // and the new leaf i.e. the split may be at the first bit (in which case there is no leading - // edge), or the split may be in the middle (requires both leading and post edges), or the - // split may be the final bit (no post edge). use InternalNode::*; match path.last() { Some(node) => { @@ -286,23 +276,8 @@ impl MerkleTrie { } /// Deletes a leaf node from the tree. - /// - /// This is not an external facing API; the functionality is instead accessed by calling - /// [`Trie::set`] with value set to [`StarkFelt::ZERO`]. fn delete_leaf(&mut self, storage: &impl Storage, key: &BitSlice) -> anyhow::Result<()> { // Algorithm explanation: - // - // The leaf's parent node is either an edge, or a binary node. - // If it's an edge node, then it must also be deleted. And its parent - // must be a binary node. In either case we end up with a binary node - // who's one child is deleted. This changes the binary to an edge node. - // - // Note that its possible that there is no binary node -- if the resulting tree would be empty. - // - // This new edge node may need to merge with the old binary node's parent node - // and other remaining child node -- if they're also edges. - // - // Then we are done. let path = self.traverse(storage, key)?; // Do nothing if the leaf does not exist. @@ -520,9 +495,6 @@ impl MerkleTrie { } /// Retrieves the requested node from storage. - /// - /// Result will be either a [Binary](InternalNode::Binary), [Edge](InternalNode::Edge) or - /// [Leaf](InternalNode::Leaf) node. fn resolve(&self, storage: &impl Storage, index: u64, height: usize) -> anyhow::Result { anyhow::ensure!( height < HEIGHT, diff --git a/src/utils.rs b/src/utils.rs index fd3d88aee..cbd3fd7d7 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -4,7 +4,7 @@ use anyhow::anyhow; use bitvec::prelude::{BitSlice, BitVec, Msb0}; use bitvec::view::BitView; use blockifier::execution::contract_class::ContractClassV0; -use cairo_felt::{felt_str, Felt252}; +use cairo_vm::felt::{felt_str, Felt252}; use cairo_vm_blockifier::types::program::Program; use lazy_static::lazy_static; use num_traits::Num; diff --git a/tests/common/prepared_os_test.rs b/tests/common/prepared_os_test.rs index 673a0ed1f..b0a4ec6cf 100644 --- a/tests/common/prepared_os_test.rs +++ b/tests/common/prepared_os_test.rs @@ -11,7 +11,7 @@ use blockifier::test_utils::{deploy_account_tx, invoke_tx, DictStateReader, Invo use blockifier::transaction::account_transaction::AccountTransaction; use blockifier::transaction::objects::TransactionExecutionInfo; use blockifier::transaction::transactions::ExecutableTransaction; -use cairo_felt::felt_str; +use cairo_vm::felt::felt_str; use cairo_vm::vm::runners::builtin_runner::{ BITWISE_BUILTIN_NAME, EC_OP_BUILTIN_NAME, HASH_BUILTIN_NAME, OUTPUT_BUILTIN_NAME, POSEIDON_BUILTIN_NAME, RANGE_CHECK_BUILTIN_NAME, SIGNATURE_BUILTIN_NAME, diff --git a/tests/common/serde_utils.rs b/tests/common/serde_utils.rs index b6c625a70..f079a1814 100644 --- a/tests/common/serde_utils.rs +++ b/tests/common/serde_utils.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use std::fs; use std::io::Write; -use cairo_felt::Felt252; +use cairo_vm::felt::Felt252; use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; use serde_with::{serde_as, DeserializeAs, SerializeAs}; use snos::config::StarknetGeneralConfig; diff --git a/tests/hints.rs b/tests/hints.rs index a6edb3794..8294c5c8a 100644 --- a/tests/hints.rs +++ b/tests/hints.rs @@ -11,13 +11,11 @@ use cairo_vm::hint_processor::builtin_hint_processor::hint_utils::*; use common::utils::{check_output_vs_python, deprecated_cairo_python_run}; use common::{load_input, load_output}; use rstest::{fixture, rstest}; -use snos::hints::block_context::{ - get_block_mapping, load_deprecated_class_facts, load_deprecated_inner, sequencer_address, -}; -use snos::hints::hints_raw::*; +use snos::hints::block_context::*; +use snos::hints::execution::*; use snos::hints::{ - check_deprecated_class_hash, enter_syscall_scopes, initialize_class_hashes, initialize_state_changes, load_next_tx, - starknet_os_input, + initialize_class_hashes, initialize_state_changes, starknet_os_input, INITIALIZE_CLASS_HASHES, + INITIALIZE_STATE_CHANGES, STARKNET_OS_INPUT, }; use snos::io::input::StarknetOsInput; use snos::io::output::StarknetOsOutput; @@ -51,33 +49,6 @@ fn bad_output_test() { check_output_vs_python(bad_hint_run, program, false); } -#[rstest] -fn block_context_test(mut os_input_hint_processor: BuiltinHintProcessor) { - let program = "build/programs/load_deprecated_class.json"; - - let load_deprecated_class_facts_hint = HintFunc(Box::new(load_deprecated_class_facts)); - os_input_hint_processor - .add_hint(String::from(LOAD_DEPRECATED_CLASS_FACTS), Rc::new(load_deprecated_class_facts_hint)); - - let load_deprecated_class_inner_hint = HintFunc(Box::new(load_deprecated_inner)); - os_input_hint_processor - .add_hint(String::from(LOAD_DEPRECATED_CLASS_INNER), Rc::new(load_deprecated_class_inner_hint)); - - let check_deprecated_class_hash_hint = HintFunc(Box::new(check_deprecated_class_hash)); - os_input_hint_processor - .add_hint(String::from(CHECK_DEPRECATED_CLASS_HASH), Rc::new(check_deprecated_class_hash_hint)); - - let sequencer_address_hint = HintFunc(Box::new(sequencer_address)); - os_input_hint_processor.add_hint(String::from(SEQUENCER_ADDRESS), Rc::new(sequencer_address_hint)); - - let run_output = cairo_run( - &fs::read(program).unwrap(), - &CairoRunConfig { layout: "starknet", relocate_mem: true, trace_enabled: true, ..Default::default() }, - &mut os_input_hint_processor, - ); - check_output_vs_python(run_output, program, true); -} - #[rstest] fn initialize_state_changes_test(mut os_input_hint_processor: BuiltinHintProcessor) { let program = "build/programs/initialize_state_changes.json"; diff --git a/tests/hints_extensive.rs b/tests/hints_extensive.rs new file mode 100644 index 000000000..26c5ec721 --- /dev/null +++ b/tests/hints_extensive.rs @@ -0,0 +1,22 @@ +mod common; + +use std::fs; + +use cairo_vm::cairo_run::{cairo_run, CairoRunConfig}; +use common::utils::check_output_vs_python; +use rstest::rstest; +use snos::hints::SnosHintProcessor; + +#[rstest] +fn load_deprecated_class_test() { + let program = "build/programs/load_deprecated_class.json"; + + let mut sn_hint_processor = SnosHintProcessor::default(); + + let run_output = cairo_run( + &fs::read(program).unwrap(), + &CairoRunConfig { layout: "starknet", relocate_mem: true, trace_enabled: true, ..Default::default() }, + &mut sn_hint_processor, + ); + check_output_vs_python(run_output, program, true); +} diff --git a/tests/snos.rs b/tests/snos.rs index fa62fc124..e8b9c2d15 100644 --- a/tests/snos.rs +++ b/tests/snos.rs @@ -3,7 +3,7 @@ mod common; use blockifier::state::state_api::State; use blockifier::test_utils::DictStateReader; use blockifier::transaction::objects::TransactionExecutionInfo; -use cairo_felt::{felt_str, Felt252}; +use cairo_vm::felt::{felt_str, Felt252}; use common::defs::{ EXPECTED_PREV_ROOT, EXPECTED_UPDATED_ROOT, TESTING_1_ADDREESS_0_12_2, TESTING_2_ADDREESS_0_12_2, TESTING_BLOCK_HASH, TESTING_DELEGATE_ADDREESS_0_12_2, TESTING_HASH_0_12_2, @@ -27,7 +27,7 @@ fn snos_run_test( _load_input: &StarknetOsInput, prepare_os_test: (SharedState, Vec), ) { - let snos_runner = SnOsRunner::with_os_path("build/os_debug.json"); + let snos_runner = SnOsRunner::with_os_path("build/os_latest.json"); let runner_res = snos_runner.run(prepare_os_test.0, prepare_os_test.1); println!("{:#?}", runner_res);