diff --git a/Cargo.lock b/Cargo.lock index 640f2fd064..7bdff6f380 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,19 +14,13 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -169,9 +163,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "aquamarine" @@ -184,7 +178,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -323,9 +317,9 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" @@ -366,7 +360,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", "synstructure", ] @@ -378,7 +372,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -422,9 +416,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" +checksum = "7e614738943d3f68c628ae3dbce7c3daffb196665f82f8c8ea6b65de73c79429" dependencies = [ "flate2", "futures-core", @@ -435,9 +429,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7ebdfa2ebdab6b1760375fa7d6f382b9f486eac35fc994625a00e89280bdbb7" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" dependencies = [ "async-task", "concurrent-queue", @@ -453,7 +447,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" dependencies = [ "async-lock 2.8.0", - "autocfg 1.3.0", + "autocfg 1.4.0", "blocking", "futures-lite 1.13.0", ] @@ -480,7 +474,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ "async-lock 2.8.0", - "autocfg 1.3.0", + "autocfg 1.4.0", "cfg-if", "concurrent-queue", "futures-lite 1.13.0", @@ -506,7 +500,7 @@ dependencies = [ "futures-lite 2.3.0", "parking", "polling 3.7.3", - "rustix 0.38.34", + "rustix 0.38.37", "slab", "tracing", "windows-sys 0.59.0", @@ -556,7 +550,7 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.34", + "rustix 0.38.37", "windows-sys 0.48.0", ] @@ -568,7 +562,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -583,7 +577,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 0.38.34", + "rustix 0.38.37", "signal-hook-registry", "slab", "windows-sys 0.59.0", @@ -591,20 +585,20 @@ dependencies = [ [[package]] name = "async-std" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" +checksum = "c634475f29802fde2b8f0b505b1bd00dfe4df7d4a000f0b36f7671197d5c3615" dependencies = [ "async-channel 1.9.0", "async-global-executor", - "async-io 1.13.0", - "async-lock 2.8.0", + "async-io 2.3.4", + "async-lock 3.4.0", "crossbeam-utils", "futures-channel", "futures-core", "futures-io", - "futures-lite 1.13.0", - "gloo-timers", + "futures-lite 2.3.0", + "gloo-timers 0.3.0", "kv-log-macro", "log", "memchr", @@ -617,9 +611,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -628,13 +622,13 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -645,13 +639,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -716,7 +710,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -725,14 +719,14 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" @@ -785,17 +779,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -896,7 +890,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -918,10 +912,30 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.76", + "syn 2.0.79", "which", ] +[[package]] +name = "bindgen" +version = "0.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" +dependencies = [ + "bitflags 2.6.0", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn 2.0.79", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -1008,8 +1022,9 @@ dependencies = [ "cairo-vm", "criterion", "derive_more", + "educe", "glob", - "indexmap 2.4.0", + "indexmap 2.6.0", "itertools 0.10.5", "keccak", "lazy_static", @@ -1099,9 +1114,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" dependencies = [ "serde", ] @@ -1359,7 +1374,7 @@ checksum = "c33b5f4502b7efde6ac07fd5468f6dae15d88760aeece3d57a7bc4c224ba693e" dependencies = [ "cairo-lang-debug", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -1673,7 +1688,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73104609a7d865e4cd1de9cbf4e750683d076b6d0233bf81be511df274a26916" dependencies = [ "hashbrown 0.14.5", - "indexmap 2.4.0", + "indexmap 2.6.0", "itertools 0.12.1", "num-bigint 0.4.6", "num-traits 0.2.19", @@ -1684,8 +1699,8 @@ dependencies = [ [[package]] name = "cairo-native" -version = "0.2.0" -source = "git+https://github.com/lambdaclass/cairo_native?rev=a478e89b749bf0b596a7e63afd14e834c08a84e3#a478e89b749bf0b596a7e63afd14e834c08a84e3" +version = "0.2.0-alpha.1" +source = "git+https://github.com/lambdaclass/cairo_native?rev=ae17dd370a7bbf6affeefb9fa6954965e8b52239#ae17dd370a7bbf6affeefb9fa6954965e8b52239" dependencies = [ "anyhow", "aquamarine", @@ -1731,19 +1746,21 @@ dependencies = [ "thiserror", "tracing", "tracing-subscriber", + "utf8_iter", ] [[package]] name = "cairo-native-runtime" -version = "0.2.0" -source = "git+https://github.com/lambdaclass/cairo_native?rev=a478e89b749bf0b596a7e63afd14e834c08a84e3#a478e89b749bf0b596a7e63afd14e834c08a84e3" +version = "0.2.0-alpha.1" +source = "git+https://github.com/lambdaclass/cairo_native?rev=ae17dd370a7bbf6affeefb9fa6954965e8b52239#ae17dd370a7bbf6affeefb9fa6954965e8b52239" dependencies = [ "cairo-lang-sierra-gas", + "itertools 0.13.0", "lazy_static", "libc", + "num-traits 0.2.19", "rand 0.8.5", - "starknet-crypto 0.7.1", - "starknet-curve 0.5.0", + "starknet-curve 0.5.1", "starknet-types-core", ] @@ -1834,9 +1851,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.15" +version = "1.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" +checksum = "812acba72f0a070b003d3697490d2b55b837230ae7c6c6497f05cc2ddbb8d938" dependencies = [ "jobserver", "libc", @@ -1954,9 +1971,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.16" +version = "4.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" +checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615" dependencies = [ "clap_builder", "clap_derive", @@ -1964,9 +1981,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.15" +version = "4.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" +checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b" dependencies = [ "anstream", "anstyle", @@ -1976,14 +1993,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -2078,7 +2095,7 @@ dependencies = [ "derive_more", "ethnum", "futures", - "indexmap 2.4.0", + "indexmap 2.6.0", "pretty_assertions", "rand 0.8.5", "rand_distr", @@ -2100,9 +2117,9 @@ dependencies = [ [[package]] name = "comrak" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d061c6d53fe98c25efda0d91b7f6b4b4020a51dad78a3eac5028710aa26f8e7" +checksum = "c93ab3577cca16b4a1d80a88c2e0cd8b6e969e51696f0bbb0d1dcb0157109832" dependencies = [ "caseless", "derive_builder", @@ -2144,9 +2161,9 @@ checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca" [[package]] name = "const-hex" -version = "1.12.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" +checksum = "0121754e84117e65f9d90648ee6aa4882a6e63110307ab73967a4c5e7e69e586" dependencies = [ "cfg-if", "cpufeatures", @@ -2163,18 +2180,18 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const_format" -version = "0.2.32" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +checksum = "50c655d81ff1114fb0dcdea9225ea9f0cc712a6f8d189378e82bdf62a473a64b" dependencies = [ "const_format_proc_macros", ] [[package]] name = "const_format_proc_macros" -version = "0.2.32" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +checksum = "eff1a44b93f47b1bac19a27932f5c591e43d1ba357ee4f61526c8a25603f0eb1" dependencies = [ "proc-macro2", "quote", @@ -2257,9 +2274,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -2415,7 +2432,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -2463,7 +2480,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -2485,14 +2502,14 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] name = "dashmap" -version = "6.0.1" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804c8821570c3f8b70230c2ba75ffa5c0f9a4189b9a432b6656c536712acae28" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" dependencies = [ "cfg-if", "crossbeam-utils", @@ -2591,33 +2608,33 @@ dependencies = [ [[package]] name = "derive_builder" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" +checksum = "cd33f37ee6a119146a1781d3356a7c26028f83d779b2e04ecd45fdc75c76877b" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" +checksum = "7431fa049613920234f22c47fdc33e6cf3ee83067091ea4277a3f8c4587aae38" dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] name = "derive_builder_macro" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" +checksum = "4abae7035bf79b9877b779505d8cf3749285b80c43941eda66604841889451dc" dependencies = [ "derive_builder_core", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -2630,7 +2647,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -2725,7 +2742,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -2806,7 +2823,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -2885,14 +2902,14 @@ checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca" [[package]] name = "enum-as-inner" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -2923,7 +2940,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -2943,7 +2960,7 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -3119,7 +3136,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "syn 2.0.76", + "syn 2.0.79", "toml", "walkdir", ] @@ -3137,7 +3154,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -3163,7 +3180,7 @@ dependencies = [ "serde", "serde_json", "strum 0.26.3", - "syn 2.0.76", + "syn 2.0.79", "tempfile", "thiserror", "tiny-keccak", @@ -3298,7 +3315,7 @@ dependencies = [ "tokio", "tracing", "walkdir", - "yansi", + "yansi 0.5.1", ] [[package]] @@ -3398,9 +3415,9 @@ checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "filetime" -version = "0.2.24" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", @@ -3428,12 +3445,12 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.33" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -3621,7 +3638,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -3631,7 +3648,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f2f12607f92c69b12ed746fabf9ca4f5c482cba46679c1a75b874ed7c26adb" dependencies = [ "futures-io", - "rustls 0.23.12", + "rustls 0.23.13", "rustls-pki-types", ] @@ -3664,7 +3681,7 @@ version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" dependencies = [ - "gloo-timers", + "gloo-timers 0.2.6", "send_wrapper 0.4.0", ] @@ -3714,7 +3731,7 @@ checksum = "553630feadf7b76442b0849fd25fdf89b860d933623aec9693fed19af0400c78" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -3753,9 +3770,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "glob" @@ -3765,15 +3782,15 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -3809,6 +3826,18 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gloo-timers" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + [[package]] name = "gloo-utils" version = "0.2.0" @@ -3907,7 +3936,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.4.0", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -3926,7 +3955,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.4.0", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -3969,6 +3998,12 @@ dependencies = [ "serde", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + [[package]] name = "hashers" version = "1.0.1" @@ -4166,9 +4201,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -4257,9 +4292,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-util", @@ -4272,9 +4307,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -4403,15 +4438,15 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" dependencies = [ "crossbeam-deque", "globset", "log", "memchr", - "regex-automata 0.4.7", + "regex-automata 0.4.8", "same-file", "walkdir", "winapi-util", @@ -4492,19 +4527,19 @@ version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", "hashbrown 0.12.3", "serde", ] [[package]] name = "indexmap" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", "serde", ] @@ -4531,9 +4566,9 @@ dependencies = [ [[package]] name = "insta" -version = "1.39.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "810ae6042d48e2c9e9215043563a58a80b877bc863228a74cf10c49d4620a6f5" +checksum = "6593a41c7a73841868772495db7dc1e8ecab43bb5c0b6da2059246c4b506ab60" dependencies = [ "console", "lazy_static", @@ -4582,9 +4617,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "is-terminal" @@ -4879,9 +4914,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if", "ecdsa", @@ -4923,7 +4958,7 @@ dependencies = [ "petgraph", "pico-args", "regex", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", "string_cache", "term", "tiny-keccak", @@ -4937,7 +4972,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex-automata 0.4.7", + "regex-automata 0.4.8", ] [[package]] @@ -4979,9 +5014,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libloading" @@ -5321,7 +5356,7 @@ dependencies = [ "quinn", "rand 0.8.5", "ring 0.17.8", - "rustls 0.23.12", + "rustls 0.23.13", "socket2 0.5.7", "thiserror", "tokio", @@ -5362,7 +5397,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -5414,7 +5449,7 @@ dependencies = [ "libp2p-identity", "rcgen", "ring 0.17.8", - "rustls 0.23.12", + "rustls 0.23.13", "rustls-webpki 0.101.7", "thiserror", "x509-parser", @@ -5503,9 +5538,9 @@ checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "llvm-sys" -version = "181.1.1" +version = "191.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d255b36907416971229095a8465c0b69f5f1c6fb8421b6dcdbb64eb47e1be90" +checksum = "893cddf1adf0354b93411e413553dd4daf5c43195d73f1acfa1e394bdd371456" dependencies = [ "anyhow", "cc", @@ -5521,7 +5556,7 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", "scopeguard", ] @@ -5620,9 +5655,9 @@ dependencies = [ [[package]] name = "melior" -version = "0.18.6" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3085c0169aa3b735d8e7df582baee23c2aeb280ea62cc7f71effda28d8e281" +checksum = "c5d97014786c173a839839e2a068e82516ad1eb94fca1d40013d3c5e224e7c1e" dependencies = [ "dashmap", "melior-macro", @@ -5632,9 +5667,9 @@ dependencies = [ [[package]] name = "melior-macro" -version = "0.11.6" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d58c356ebaa7855da67aad1306a0d032b68919d3c65b0b5dcecf10d9bdf6a9" +checksum = "ef7ae0ba2f96784ec407d58374c8477f5b04ec8c57a114cafef0c8f165c4b288" dependencies = [ "comrak", "convert_case 0.6.0", @@ -5642,7 +5677,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.76", + "syn 2.0.79", "tblgen-alt", "unindent 0.2.3", ] @@ -5668,7 +5703,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", ] [[package]] @@ -5728,7 +5763,7 @@ checksum = "38b4faf00617defe497754acde3024865bc143d44a86799b24e191ecff91354f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -5783,15 +5818,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.8.0" @@ -5815,11 +5841,11 @@ dependencies = [ [[package]] name = "mlir-sys" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1b5806a63bc959cd5c4e5db8cadd20e40045d41969d325132748db8af11b7f" +checksum = "fae0a14b0940736a243fef4a4d96d8cdf8a253272031b63c5e4b1bea207c82b0" dependencies = [ - "bindgen 0.69.4", + "bindgen 0.70.1", ] [[package]] @@ -5846,7 +5872,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -5893,9 +5919,9 @@ dependencies = [ [[package]] name = "multiaddr" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b852bc02a2da5feed68cd14fa50d0774b92790a5bdbfa932a813926c8472070" +checksum = "fe6351f60b488e04c1d21bc69e56b89cb3f5e8f5d22557d6e8031bdfd79b6961" dependencies = [ "arrayref", "byteorder", @@ -5906,7 +5932,7 @@ dependencies = [ "percent-encoding", "serde", "static_assertions", - "unsigned-varint 0.7.2", + "unsigned-varint 0.8.0", "url", ] @@ -5986,7 +6012,7 @@ dependencies = [ "cached", "cairo-lang-starknet-classes", "cairo-vm", - "indexmap 2.4.0", + "indexmap 2.6.0", "log", "num-bigint 0.4.6", "papyrus_storage", @@ -6170,7 +6196,7 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", "num-integer", "num-traits 0.2.19", ] @@ -6199,7 +6225,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", "num-traits 0.2.19", ] @@ -6243,7 +6269,7 @@ version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", "num-integer", "num-traits 0.2.19", ] @@ -6281,7 +6307,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", "num-bigint 0.2.6", "num-integer", "num-traits 0.2.19", @@ -6314,7 +6340,7 @@ version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", "libm", ] @@ -6343,10 +6369,10 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -6360,9 +6386,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.3" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -6378,9 +6404,12 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" +dependencies = [ + "portable-atomic", +] [[package]] name = "oorandom" @@ -6442,7 +6471,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -6549,7 +6578,7 @@ dependencies = [ "assert_matches", "cairo-lang-starknet-classes", "hex", - "indexmap 2.4.0", + "indexmap 2.6.0", "itertools 0.10.5", "lazy_static", "papyrus_test_utils", @@ -6616,7 +6645,7 @@ dependencies = [ "cairo-lang-starknet-classes", "cairo-lang-utils", "cairo-vm", - "indexmap 2.4.0", + "indexmap 2.6.0", "itertools 0.10.5", "lazy_static", "papyrus_common", @@ -6758,7 +6787,7 @@ dependencies = [ "chrono", "enum-iterator", "futures", - "indexmap 2.4.0", + "indexmap 2.6.0", "lazy_static", "metrics 0.21.1", "papyrus_common", @@ -6790,7 +6819,7 @@ dependencies = [ "papyrus_test_utils", "prometheus-parse", "quote", - "syn 2.0.76", + "syn 2.0.79", "tracing", ] @@ -6798,7 +6827,7 @@ dependencies = [ name = "papyrus_protobuf" version = "0.0.0" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.6.0", "lazy_static", "papyrus_common", "papyrus_test_utils", @@ -6830,7 +6859,7 @@ dependencies = [ "futures-util", "hex", "hyper 0.14.30", - "indexmap 2.4.0", + "indexmap 2.6.0", "insta", "itertools 0.10.5", "jsonrpsee", @@ -6877,7 +6906,7 @@ dependencies = [ "camelpaste", "clap", "human_bytes", - "indexmap 2.4.0", + "indexmap 2.6.0", "insta", "integer-encoding", "lazy_static", @@ -6927,7 +6956,7 @@ dependencies = [ "chrono", "futures", "futures-util", - "indexmap 2.4.0", + "indexmap 2.6.0", "itertools 0.10.5", "lru", "metrics 0.21.1", @@ -6958,7 +6987,7 @@ dependencies = [ "cairo-lang-casm", "cairo-lang-starknet-classes", "cairo-lang-utils", - "indexmap 2.4.0", + "indexmap 2.6.0", "num-bigint 0.4.6", "pretty_assertions", "primitive-types", @@ -7000,9 +7029,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -7125,7 +7154,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.4.0", + "indexmap 2.6.0", ] [[package]] @@ -7168,7 +7197,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -7212,7 +7241,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -7250,15 +7279,15 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plotters" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ "num-traits 0.2.19", "plotters-backend", @@ -7269,15 +7298,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] @@ -7288,7 +7317,7 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", "bitflags 1.3.2", "cfg-if", "concurrent-queue", @@ -7308,7 +7337,7 @@ dependencies = [ "concurrent-queue", "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.34", + "rustix 0.38.37", "tracing", "windows-sys 0.59.0", ] @@ -7338,9 +7367,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "powerfmt" @@ -7391,12 +7420,12 @@ dependencies = [ [[package]] name = "pretty_assertions" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ "diff", - "yansi", + "yansi 1.0.1", ] [[package]] @@ -7406,7 +7435,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -7448,7 +7477,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.22.20", + "toml_edit 0.22.22", ] [[package]] @@ -7494,7 +7523,7 @@ dependencies = [ "hex", "lazy_static", "procfs-core", - "rustix 0.38.34", + "rustix 0.38.37", ] [[package]] @@ -7527,7 +7556,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -7554,7 +7583,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rand_xorshift 0.3.0", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", "unarray", ] @@ -7585,7 +7614,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.76", + "syn 2.0.79", "tempfile", ] @@ -7599,7 +7628,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -7759,9 +7788,9 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b22d8e7369034b9a7132bc2008cac12f2013c8132b45e0554e6e20e2617f2156" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" dependencies = [ "bytes", "futures-io", @@ -7769,7 +7798,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.0.0", - "rustls 0.23.12", + "rustls 0.23.13", "socket2 0.5.7", "thiserror", "tokio", @@ -7778,15 +7807,15 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.6" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" dependencies = [ "bytes", "rand 0.8.5", "ring 0.17.8", "rustc-hash 2.0.0", - "rustls 0.23.12", + "rustls 0.23.13", "slab", "thiserror", "tinyvec", @@ -7795,15 +7824,15 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" +checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" dependencies = [ "libc", "once_cell", "socket2 0.5.7", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -8034,9 +8063,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] @@ -8054,14 +8083,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -8075,13 +8104,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -8098,9 +8127,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "relative-path" @@ -8223,9 +8252,9 @@ dependencies = [ [[package]] name = "rlimit" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3560f70f30a0f16d11d01ed078a07740fe6b489667abc7c7b029155d9f21c3d8" +checksum = "7043b63bd0cd1aaa628e476b80e6d4023a3b50eb32789f2728908107bd0c793a" dependencies = [ "libc", ] @@ -8306,7 +8335,7 @@ version = "0.17.0-pre.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719825638c59fd26a55412a24561c7c5bcf54364c88b9a7a04ba08a6eafaba8d" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.6.0", "lock_api", "oorandom", "parking_lot", @@ -8326,7 +8355,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -8365,9 +8394,9 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -8397,9 +8426,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -8422,14 +8451,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" dependencies = [ "once_cell", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki 0.102.6", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -8457,9 +8486,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" [[package]] name = "rustls-webpki" @@ -8473,9 +8502,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.6" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring 0.17.8", "rustls-pki-types", @@ -8549,11 +8578,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -8578,7 +8607,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -8638,9 +8667,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -8669,22 +8698,22 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -8695,14 +8724,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -8739,14 +8768,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -8787,7 +8816,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -8928,7 +8957,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "autocfg 1.3.0", + "autocfg 1.4.0", ] [[package]] @@ -9100,26 +9129,6 @@ dependencies = [ "starknet-ff", ] -[[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 0.4.6", - "num-integer", - "num-traits 0.2.19", - "rfc6979", - "sha2", - "starknet-crypto-codegen 0.3.3", - "starknet-curve 0.3.0", - "starknet-ff", - "zeroize", -] - [[package]] name = "starknet-crypto" version = "0.6.2" @@ -9134,7 +9143,7 @@ dependencies = [ "num-traits 0.2.19", "rfc6979", "sha2", - "starknet-crypto-codegen 0.3.3", + "starknet-crypto-codegen", "starknet-curve 0.4.2", "starknet-ff", "zeroize", @@ -9142,9 +9151,9 @@ dependencies = [ [[package]] name = "starknet-crypto" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2a821ad8d98c6c3e4d0e5097f3fe6e2ed120ada9d32be87cd1330c7923a2f0" +checksum = "60a5064173a8e8d2675e67744fd07f310de44573924b6b7af225a6bdd8102913" dependencies = [ "crypto-bigint", "hex", @@ -9154,8 +9163,7 @@ dependencies = [ "num-traits 0.2.19", "rfc6979", "sha2", - "starknet-crypto-codegen 0.4.0", - "starknet-curve 0.5.0", + "starknet-curve 0.5.1", "starknet-types-core", "zeroize", ] @@ -9168,27 +9176,7 @@ checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" dependencies = [ "starknet-curve 0.4.2", "starknet-ff", - "syn 2.0.76", -] - -[[package]] -name = "starknet-crypto-codegen" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e179dedc3fa6da064e56811d3e05d446aa2f7459e4eb0e3e49378a337235437" -dependencies = [ - "starknet-curve 0.5.0", - "starknet-types-core", - "syn 2.0.76", -] - -[[package]] -name = "starknet-curve" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "252610baff59e4c4332ce3569f7469c5d3f9b415a2240d698fb238b2b4fc0942" -dependencies = [ - "starknet-ff", + "syn 2.0.79", ] [[package]] @@ -9202,9 +9190,9 @@ dependencies = [ [[package]] name = "starknet-curve" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56935b306dcf0b8f14bb2a1257164b8478bb8be4801dfae0923f5b266d1b457c" +checksum = "bcde6bd74269b8161948190ace6cf069ef20ac6e79cd2ba09b320efa7500b6de" dependencies = [ "starknet-types-core", ] @@ -9225,9 +9213,9 @@ dependencies = [ [[package]] name = "starknet-types-core" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6bacf0ba19bc721e518bc4bf389ff13daa8a7c5db5fd320600473b8aa9fcbd" +checksum = "9b889ee5734db8b3c8a6551135c16764bf4ce1ab4955fffbb2ac5b6706542b64" dependencies = [ "lambdaworks-crypto", "lambdaworks-math", @@ -9247,17 +9235,17 @@ dependencies = [ "cairo-lang-starknet-classes", "derive_more", "hex", - "indexmap 2.4.0", - "itertools 0.12.1", + "indexmap 2.6.0", + "itertools 0.10.5", "primitive-types", "rstest", "serde", "serde_json", "sha3", - "starknet-crypto 0.5.2", + "starknet-crypto 0.7.2", "starknet-types-core", - "strum 0.24.1", - "strum_macros 0.24.3", + "strum 0.25.0", + "strum_macros 0.25.3", "thiserror", ] @@ -9301,7 +9289,7 @@ dependencies = [ "cairo-lang-starknet-classes", "enum-iterator", "http 0.2.12", - "indexmap 2.4.0", + "indexmap 2.6.0", "mockall", "mockito 0.31.1", "os_info", @@ -9448,7 +9436,7 @@ dependencies = [ "axum", "blockifier", "cairo-lang-starknet-classes", - "indexmap 2.4.0", + "indexmap 2.6.0", "itertools 0.10.5", "mempool_test_utils", "papyrus_common", @@ -9612,12 +9600,6 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" -[[package]] -name = "strum" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" - [[package]] name = "strum" version = "0.25.0" @@ -9633,19 +9615,6 @@ dependencies = [ "strum_macros 0.26.4", ] -[[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 = "strum_macros" version = "0.25.3" @@ -9656,7 +9625,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -9669,7 +9638,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -9711,9 +9680,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.76" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -9734,7 +9703,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -9766,9 +9735,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020" dependencies = [ "filetime", "libc", @@ -9783,9 +9752,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tblgen-alt" -version = "0.3.6" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ae726d43658a13a9cd479de814be1311fea69236cd821e931a4fb9ca4d70e50" +checksum = "0ecbc9175dd38627cd01d546e7b41c9a115e5773f4c98f64e2185c81ec5f45ab" dependencies = [ "bindgen 0.69.4", "cc", @@ -9795,14 +9764,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand 2.1.1", "once_cell", - "rustix 0.38.34", + "rustix 0.38.37", "windows-sys 0.59.0", ] @@ -9850,7 +9819,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -9861,7 +9830,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", "test-case-core", ] @@ -9884,7 +9853,7 @@ checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -9897,28 +9866,28 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.76", + "syn 2.0.79", "which", ] [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -10040,9 +10009,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.3" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", @@ -10064,7 +10033,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -10100,9 +10069,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -10139,9 +10108,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -10160,7 +10129,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit 0.22.22", ] [[package]] @@ -10178,22 +10147,22 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.6.0", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.18", + "winnow 0.6.20", ] [[package]] @@ -10249,7 +10218,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -10332,7 +10301,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" dependencies = [ "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -10412,36 +10381,36 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-xid" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unicode_categories" @@ -10516,6 +10485,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -10660,7 +10635,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", "wasm-bindgen-shared", ] @@ -10694,7 +10669,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -10740,7 +10715,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.34", + "rustix 0.38.37", ] [[package]] @@ -10996,9 +10971,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -11086,14 +11061,14 @@ checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", "linux-raw-sys 0.4.14", - "rustix 0.38.34", + "rustix 0.38.37", ] [[package]] name = "xml-rs" -version = "0.8.21" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539a77ee7c0de333dcc6da69b177380a0b81e0dacfa4f7344c465a36871ee601" +checksum = "af4e2e2f7cba5a093896c1e150fbfe177d1883e7448200efb81d40b9d339ef26" [[package]] name = "xmltree" @@ -11156,6 +11131,12 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + [[package]] name = "yasna" version = "0.5.2" @@ -11183,7 +11164,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] @@ -11203,7 +11184,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.79", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 8d24e8e11c..0a5b071f85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,14 +74,13 @@ byteorder = "1.4.3" bytes = "1" cached = "0.44.0" cairo-felt = "0.9.1" -cairo-lang-casm = "2.8.0" -cairo-lang-runner = "2.8.0" -cairo-lang-sierra = "2.8.0" -cairo-lang-sierra-to-casm = "2.8.0" -cairo-lang-starknet-classes = "2.8.0" -cairo-lang-utils = "2.8.0" -cairo-native = { git = "https://github.com/lambdaclass/cairo_native", rev = "a478e89b749bf0b596a7e63afd14e834c08a84e3" } -# This is a temporary dependency, will be removed once the new version of cairo-native is released to main. +cairo-lang-casm = "2.8.2" +cairo-lang-runner = "2.8.2" +cairo-lang-sierra = "2.8.2" +cairo-lang-sierra-to-casm = "2.8.2" +cairo-lang-starknet-classes = "2.8.2" +cairo-lang-utils = "2.8.2" +cairo-native = { git = "https://github.com/lambdaclass/cairo_native", rev="ae17dd370a7bbf6affeefb9fa6954965e8b52239"} cairo-vm = "1.0.1" camelpaste = "0.1.0" chrono = "0.4.26" @@ -173,7 +172,7 @@ sha2 = "0.10.8" sha3 = "0.10.8" simple_logger = "4.0.0" starknet-core = "0.6.0" -starknet-crypto = "0.5.1" +starknet-crypto = "0.7.1" starknet-types-core = { version = "0.1.5" } starknet_api = { path = "crates/starknet_api", version = "0.0.0" } starknet_batcher = { path = "crates/batcher", version = "0.0.0" } diff --git a/crates/blockifier/Cargo.toml b/crates/blockifier/Cargo.toml index 9ab996184a..90bb224401 100644 --- a/crates/blockifier/Cargo.toml +++ b/crates/blockifier/Cargo.toml @@ -32,6 +32,7 @@ cairo-lang-utils.workspace = true cairo-native.workspace = true cairo-vm.workspace = true derive_more.workspace = true +educe = "0.5.11" indexmap.workspace = true itertools.workspace = true keccak.workspace = true diff --git a/crates/blockifier/src/execution/contract_class.rs b/crates/blockifier/src/execution/contract_class.rs index 9fbb02e87b..227a9a83aa 100644 --- a/crates/blockifier/src/execution/contract_class.rs +++ b/crates/blockifier/src/execution/contract_class.rs @@ -3,7 +3,9 @@ use std::ops::{Deref, Index}; use std::sync::Arc; use cairo_lang_casm; +use serde::de::Error; use cairo_lang_casm::hints::Hint; +use num_traits::Num; use cairo_lang_sierra::ids::FunctionId; use cairo_lang_starknet_classes::casm_contract_class::{CasmContractClass, CasmContractEntryPoint}; use cairo_lang_starknet_classes::contract_class::{ @@ -13,7 +15,7 @@ use cairo_lang_starknet_classes::contract_class::{ }; use cairo_lang_starknet_classes::NestedIntList; use cairo_lang_utils::bigint::BigUintAsHex; -use cairo_native::executor::contract::ContractExecutor; +use cairo_native::executor::AotContractExecutor; use cairo_vm::serde::deserialize_program::{ ApTracking, FlowTrackingData, @@ -26,8 +28,10 @@ use cairo_vm::types::program::Program; use cairo_vm::types::relocatable::MaybeRelocatable; use cairo_vm::vm::runners::cairo_runner::ExecutionResources; use itertools::Itertools; -use serde::de::Error as DeserializationError; -use serde::{Deserialize, Deserializer}; + +use serde::de::{Error as DeserializationError, Visitor}; +use serde::{Deserialize, Deserializer, Serialize, Serializer}; + use starknet_api::core::EntryPointSelector; use starknet_api::deprecated_contract_class::{ ContractClass as DeprecatedContractClass, @@ -41,7 +45,7 @@ use starknet_types_core::hash::{Poseidon, StarkHash}; use super::entry_point::EntryPointExecutionResult; use super::errors::EntryPointExecutionError; -use super::execution_utils::poseidon_hash_many_cost; +use super::execution_utils::{cairo_vm_to_sn_api_program, poseidon_hash_many_cost}; use super::native::utils::contract_entrypoint_to_entrypoint_selector; use crate::abi::abi_utils::selector_from_name; use crate::abi::constants::{self, CONSTRUCTOR_ENTRY_POINT_NAME}; @@ -62,13 +66,64 @@ pub mod test; pub type ContractClassResult = Result; -#[derive(Clone, Debug, PartialEq, derive_more::From)] +#[derive(Clone, Debug, PartialEq, derive_more::From, Eq)] pub enum ContractClass { V0(ContractClassV0), V1(ContractClassV1), V1Native(NativeContractClassV1), } +impl Serialize for ContractClass { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + match self { + ContractClass::V0(v0) => v0.serialize(serializer), + ContractClass::V1(v1) => v1.serialize(serializer), + ContractClass::V1Native(_) => serializer.serialize_none(), + } + } +} + + +impl<'de> Deserialize<'de> for ContractClass { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + struct ContractClassVisitor; + + impl<'de> Visitor<'de> for ContractClassVisitor { + type Value = ContractClass; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct ContractClass") + } + + fn visit_map(self, mut map: A) -> Result + where + A: serde::de::MapAccess<'de>, + { + // Try to deserialize as V0 + if let Ok(v0) = ContractClassV0::deserialize(serde::de::value::MapAccessDeserializer::new(&mut map)) { + return Ok(ContractClass::V0(v0)); + } + + // If that fails, try V1 + if let Ok(v1) = ContractClassV1::deserialize(serde::de::value::MapAccessDeserializer::new(&mut map)) { + return Ok(ContractClass::V1(v1)); + } + + // If both fail, return an error + Err(Error::custom("Failed to deserialize ContractClass")) + } + } + + deserializer.deserialize_map(ContractClassVisitor) + } +} + impl TryFrom for ContractClass { type Error = ProgramError; @@ -90,7 +145,7 @@ impl ContractClass { match self { ContractClass::V0(class) => class.estimate_casm_hash_computation_resources(), ContractClass::V1(class) => class.estimate_casm_hash_computation_resources(), - ContractClass::V1Native(_) => todo!("sierra estimate casm hash computation resources"), + ContractClass::V1Native(_) => Default::default(), } } @@ -103,7 +158,7 @@ impl ContractClass { panic!("get_visited_segments is not supported for v0 contracts.") } ContractClass::V1(class) => class.get_visited_segments(visited_pcs), - ContractClass::V1Native(_) => todo!("sierra visited segments"), + ContractClass::V1Native(_) => Ok(Default::default()) } } @@ -111,7 +166,7 @@ impl ContractClass { match self { ContractClass::V0(class) => class.bytecode_length(), ContractClass::V1(class) => class.bytecode_length(), - ContractClass::V1Native(_) => todo!("sierra estimate casm hash computation resources"), + ContractClass::V1Native(_) => Default::default(), } } } @@ -123,7 +178,7 @@ impl ContractClass { /// class. // Note: when deserializing from a SN API class JSON string, the ABI field is ignored // by serde, since it is not required for execution. -#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq)] +#[derive(Clone, Debug, Default, Serialize, Deserialize, Eq, PartialEq)] pub struct ContractClassV0(pub Arc); impl Deref for ContractClassV0 { type Target = ContractClassV0Inner; @@ -171,9 +226,9 @@ impl ContractClassV0 { } } -#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq)] +#[derive(Clone, Debug, Default, Serialize, Deserialize, Eq, PartialEq)] pub struct ContractClassV0Inner { - #[serde(deserialize_with = "deserialize_program")] + #[serde(deserialize_with = "deserialize_program", serialize_with = "serialize_program")] pub program: Program, pub entry_points_by_type: HashMap>, } @@ -204,6 +259,154 @@ impl Deref for ContractClassV1 { } } +impl Serialize for ContractClassV1 { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + // Convert the ContractClassV1 instance to CasmContractClass + let casm_contract_class: CasmContractClass = self + .try_into() + .map_err(|err: ProgramError| serde::ser::Error::custom(err.to_string()))?; + // Serialize the JSON string to bytes + casm_contract_class.serialize(serializer) + } +} + +impl<'de> Deserialize<'de> for ContractClassV1 { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + // Deserialize into a JSON value + let json_value: serde_json::Value = Deserialize::deserialize(deserializer)?; + // Convert into a JSON string + let json_string = serde_json::to_string(&json_value) + .map_err(|err| DeserializationError::custom(err.to_string()))?; + // Use try_from_json_string to deserialize into ContractClassV1 + ContractClassV1::try_from_json_string(&json_string) + .map_err(|err| DeserializationError::custom(err.to_string())) + } +} + +// Implementation of the TryInto trait to convert a reference of ContractClassV1 into +// CasmContractClass. +impl TryInto for &ContractClassV1 { + // Definition of the error type that can be returned during the conversion. + type Error = ProgramError; + // Implementation of the try_into function which performs the conversion. + fn try_into(self) -> Result { + // Converting the program data into a vector of BigUintAsHex. + let bytecode: Vec = self + .program + .iter_data() + .map(|x| cairo_lang_utils::bigint::BigUintAsHex { + value: x.get_int_ref().unwrap().to_biguint(), + }) + .collect(); + // Serialize the Program object to JSON bytes. + let serialized_program = self.program.serialize()?; + // Deserialize the JSON bytes into a serde_json::Value. + let json_value: serde_json::Value = serde_json::from_slice(&serialized_program)?; + // Extract the hints from the JSON value. + let hints = json_value.get("hints").ok_or_else(|| { + ProgramError::Parse(serde::ser::Error::custom("failed to parse hints")) + })?; + // Transform the hints into a vector of tuples (usize, Vec). + let hints: Vec<(usize, Vec)> = hints + .as_object() // Convert to JSON object. + .unwrap() + .iter() + .map(|(key, value)| { + // Transform each hint value into a Vec. + let hints: Vec = value + .as_array() // Convert to JSON array. + .unwrap() + .iter() + .map(|hint_params| { + // Extract the "code" parameter and convert to a string. + let hint_param_code = hint_params.get("code").unwrap().clone(); + let hint_string = hint_param_code.as_str().expect("failed to parse hint as string"); + // Retrieve the hint from the self.hints map. + self.hints.get(hint_string).expect("failed to get hint").clone() + }) + .collect(); + // Convert the key to usize and create a tuple (usize, Vec). + (key.parse().unwrap(), hints) + }) + .collect(); + // Define the bytecode segment lengths + let bytecode_segment_lengths = Some(self.bytecode_segment_lengths.clone()); + // Transform the entry points of type Constructor into CasmContractEntryPoint. + let constructor = self + .entry_points_by_type + .get(&EntryPointType::Constructor) + .unwrap_or(&vec![]) + .iter() + .map(|constructor| CasmContractEntryPoint { + selector: num_bigint::BigUint::from_bytes_be(&constructor.selector.0.to_bytes_be()), + offset: constructor.offset.0, + builtins: constructor + .builtins + .clone() + .into_iter() + .map(|x| x.to_string().into()) + .collect(), + }) + .collect(); + // Transform the entry points of type External into CasmContractEntryPoint. + let external = self + .entry_points_by_type + .get(&EntryPointType::External) + .unwrap_or(&vec![]) + .iter() + .map(|external| CasmContractEntryPoint { + selector: num_bigint::BigUint::from_bytes_be(&external.selector.0.to_bytes_be()), + offset: external.offset.0, + builtins: external + .builtins + .clone() + .into_iter() + .map(|x| x.to_string().into()) + .collect(), + }) + .collect(); + // Transform the entry points of type L1Handler into CasmContractEntryPoint. + let l1_handler = self + .entry_points_by_type + .get(&EntryPointType::L1Handler) + .unwrap_or(&vec![]) + .iter() + .map(|l1_handler| CasmContractEntryPoint { + selector: num_bigint::BigUint::from_bytes_be(&l1_handler.selector.0.to_bytes_be()), + offset: l1_handler.offset.0, + builtins: l1_handler + .builtins + .clone() + .into_iter() + .map(|x| x.to_string().into()) + .collect(), + }) + .collect(); + // Construct the CasmContractClass from the extracted and transformed data. + Ok(CasmContractClass { + prime: num_bigint::BigUint::from_str_radix(&self.program.prime()[2..], 16) + .expect("failed to parse prime"), + compiler_version: "".to_string(), + bytecode, + bytecode_segment_lengths, + hints, + pythonic_hints: None, + entry_points_by_type: + cairo_lang_starknet_classes::casm_contract_class::CasmContractEntryPoints { + constructor, + external, + l1_handler, + }, + }) + } +} + impl ContractClassV1 { fn constructor_selector(&self) -> Option { Some(self.0.entry_points_by_type[&EntryPointType::Constructor].first()?.selector) @@ -473,6 +676,16 @@ pub fn deserialize_program<'de, D: Deserializer<'de>>( .map_err(|err| DeserializationError::custom(err.to_string())) } +/// Converts the program type from Cairo VM into a SN API-compatible type. +pub fn serialize_program( + program: &Program, + serializer: S, +) -> Result { + let deprecated_program = cairo_vm_to_sn_api_program(program.clone()) + .map_err(|err| serde::ser::Error::custom(err.to_string()))?; + deprecated_program.serialize(serializer) +} + // V1 utilities. // TODO(spapini): Share with cairo-lang-runner. @@ -496,7 +709,12 @@ fn convert_entry_points_v1(external: Vec) -> Vec builtin, + None => { + BuiltinName::from_str_with_suffix(&builtin).expect("Unrecognized builtin.") + } + }) .collect(), }) .collect() @@ -574,7 +792,7 @@ impl ClassInfo { } } -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct NativeContractClassV1(pub Arc); impl Deref for NativeContractClassV1 { type Target = NativeContractClassV1Inner; @@ -600,7 +818,7 @@ impl NativeContractClassV1 { /// executor must be derived from sierra_program which in turn must be derived from /// sierra_contract_class. pub fn new( - executor: Arc, + executor: Arc, sierra_contract_class: SierraContractClass, ) -> Result { let contract = NativeContractClassV1Inner::new(executor, sierra_contract_class)?; @@ -628,19 +846,21 @@ impl NativeContractClassV1 { #[derive(Debug)] pub struct NativeContractClassV1Inner { - pub executor: Arc, + pub executor: Arc, entry_points_by_type: NativeContractEntryPoints, // Used for PartialEq sierra_program_hash: starknet_api::hash::StarkHash, } +impl Eq for NativeContractClassV1Inner {} + impl NativeContractClassV1Inner { /// See [NativeContractClassV1::new] fn new( - executor: Arc, + executor: Arc, sierra_contract_class: SierraContractClass, ) -> Result { - // This exception should never occur as it was also used to create the ContractExecutor + // This exception should never occur as it was also used to create the AotContractExecutor let sierra_program = sierra_contract_class.extract_sierra_program().expect("can't extract sierra program"); // Note [Cairo Native ABI] @@ -649,12 +869,9 @@ impl NativeContractClassV1Inner { // function name is what is used by Cairo Native to lookup the function. // Therefore it's not enough to know the function index and we need enrich the contract // entry point with FunctionIds from SierraProgram. - let lookup_fid: HashMap = - HashMap::from_iter(sierra_program.funcs.iter().map(|fid| { - // This exception should never occur as the id is also in [SierraContractClass] - let id: usize = fid.id.id.try_into().expect("function id exceeds usize"); - (id, &fid.id) - })); + let lookup_fid: HashMap = HashMap::from_iter( + sierra_program.funcs.iter().enumerate().map(|(idx, func)| (idx, &func.id)), + ); Ok(NativeContractClassV1Inner { executor, @@ -684,7 +901,7 @@ impl PartialEq for NativeContractClassV1Inner { } } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] /// Modelled after [SierraContractEntryPoints] /// and enriched with information for the Cairo Native ABI. /// See Note [Cairo Native ABI] @@ -735,7 +952,7 @@ impl Index for NativeContractEntryPoints { } } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] /// Provides a relation between a function in a contract and a compiled contract struct NativeEntryPoint { /// The selector is the key to find the function in the contract diff --git a/crates/blockifier/src/execution/contract_class_test.rs b/crates/blockifier/src/execution/contract_class_test.rs index 2bc8ab09a5..df80a9fa8c 100644 --- a/crates/blockifier/src/execution/contract_class_test.rs +++ b/crates/blockifier/src/execution/contract_class_test.rs @@ -1,11 +1,12 @@ use std::collections::HashSet; +use std::fs; use std::sync::Arc; use assert_matches::assert_matches; use cairo_lang_starknet_classes::NestedIntList; use rstest::rstest; -use crate::execution::contract_class::{ContractClassV1, ContractClassV1Inner}; +use crate::execution::contract_class::{ContractClassV0, ContractClassV1, ContractClassV1Inner}; use crate::transaction::errors::TransactionExecutionError; #[rstest] @@ -42,3 +43,32 @@ fn test_get_visited_segments() { TransactionExecutionError::InvalidSegmentStructure(907, 807) ); } + +#[test] +fn test_deserialization_of_contract_class_v0() { + let contract_class: ContractClassV0 = serde_json::from_slice( + &fs::read( + "ERC20/ERC20_Cairo0/ERC20_without_some_syscalls/ERC20/\ + erc20_contract_without_some_syscalls_compiled.json", + ) + .unwrap(), + ) + .expect("failed to deserialize contract class from file"); + + assert_eq!( + contract_class, + ContractClassV0::from_file( + "ERC20/ERC20_Cairo0/ERC20_without_some_syscalls/ERC20/\ + erc20_contract_without_some_syscalls_compiled.json", + ) + ); +} + +#[test] +fn test_deserialization_of_contract_class_v1() { + let contract_class: ContractClassV1 = + serde_json::from_slice(&fs::read("ERC20/ERC20_Cairo1/erc20.casm.json").unwrap()) + .expect("failed to deserialize contract class from file"); + + assert_eq!(contract_class, ContractClassV1::from_file("ERC20/ERC20_Cairo1/erc20.casm.json")); +} diff --git a/crates/blockifier/src/execution/execution_utils.rs b/crates/blockifier/src/execution/execution_utils.rs index 4373557198..a7a50f0ac2 100644 --- a/crates/blockifier/src/execution/execution_utils.rs +++ b/crates/blockifier/src/execution/execution_utils.rs @@ -21,6 +21,7 @@ use starknet_api::core::ClassHash; use starknet_api::deprecated_contract_class::Program as DeprecatedProgram; use starknet_api::transaction::Calldata; use starknet_types_core::felt::Felt; +use std::str::FromStr; use super::entry_point::ConstructorEntryPointExecutionResult; use super::errors::ConstructorEntryPointExecutionError; @@ -138,6 +139,13 @@ pub fn felt_range_from_ptr( Ok(values) } +#[derive(serde::Serialize, serde::Deserialize)] +pub struct ReferenceTmp { + pub ap_tracking_data: cairo_vm::serde::deserialize_program::ApTracking, + pub pc: Option, + pub value_address: cairo_vm::serde::deserialize_program::ValueAddress, +} + // TODO(Elin,01/05/2023): aim to use LC's implementation once it's in a separate crate. pub fn sn_api_to_cairo_vm_program(program: DeprecatedProgram) -> Result { let identifiers = serde_json::from_value::>(program.identifiers)?; @@ -154,7 +162,32 @@ pub fn sn_api_to_cairo_vm_program(program: DeprecatedProgram) -> Result(program.reference_manager)?; + + // Deserialize the references in ReferenceManager + let mut reference_manager = ReferenceManager::default(); + if let Some(references_value) = program.reference_manager.get("references") { + for reference_value in references_value + .as_array() + .unwrap_or_else(|| panic!("Expected 'references' to be an array")) + { + if reference_value.get("value_address").is_some() { + // Directly deserialize references_value without using deserialize_value_address + let tmp = serde_json::from_value::(reference_value.clone())?; + reference_manager.references.push( + cairo_vm::serde::deserialize_program::Reference { + ap_tracking_data: tmp.ap_tracking_data, + pc: tmp.pc, + value_address: tmp.value_address, + }, + ); + } else { + let tmp = serde_json::from_value::( + reference_value.clone(), + )?; + reference_manager.references.push(tmp); + } + } + } let program = Program::new( builtins, @@ -170,6 +203,91 @@ pub fn sn_api_to_cairo_vm_program(program: DeprecatedProgram) -> Result String { + match mr { + MaybeRelocatable::Int(value) => value.to_hex_string(), + _ => unimplemented!(), + } +} +// Helper function to process identifiers +fn process_identifiers( + json_value: &serde_json::Value, +) -> serde_json::Map { + json_value.get("identifiers").and_then(serde_json::Value::as_object).map_or_else( + serde_json::Map::new, + |identifiers_obj| { + identifiers_obj + .iter() + .filter_map(|(key, inner_value)| { + inner_value.as_object().map(|inner_obj| { + let filtered_inner_obj = inner_obj + .iter() + .filter_map(|(inner_key, inner_val)| { + if inner_val.is_null() { + return None; + } + // Rename the key if it's "type_" to "type" + let renamed_key = if inner_key == "type_" { + "type".to_string() + } else { + inner_key.to_string() + }; + // Check if the key is "value" and extract the "val" field to + // convert it to a JSON number + let value = match renamed_key.as_str() { + "value" => serde_json::Value::Number( + serde_json::Number::from_str( + &Felt::from_str(inner_val.as_str().unwrap()) + .unwrap() + .to_string(), + ) + .unwrap(), + ), + _ => inner_val.clone(), + }; + Some((renamed_key, value)) + }) + .collect::>(); + (key.to_string(), serde_json::Value::Object(filtered_inner_obj)) + }) + }) + .collect() + }, + ) +} +// Main function to convert Program to DeprecatedProgram +pub fn cairo_vm_to_sn_api_program(program: Program) -> Result { + // Serialize the Program object to JSON bytes + let serialized_program = program.serialize()?; + // Deserialize the JSON bytes into a Value + let json_value: serde_json::Value = serde_json::from_slice(&serialized_program)?; + // Convert the data segment to the expected hex string format + let data = serde_json::to_value( + program + .iter_data() + .cloned() + .map(|mr: MaybeRelocatable| maybe_relocatable_to_hex_string(&mr)) + .collect::>(), + )?; + // Process identifiers + let identifiers = process_identifiers(&json_value); + // println!("identifiers: {:?}", identifiers); + Ok(DeprecatedProgram { + attributes: json_value.get("attributes").cloned().unwrap_or_default(), + builtins: json_value.get("builtins").cloned().unwrap(), + compiler_version: json_value.get("compiler_version").cloned().unwrap_or_default(), + data, + debug_info: json_value.get("debug_info").cloned().unwrap_or_default(), + hints: json_value.get("hints").cloned().unwrap(), + identifiers: serde_json::Value::Object(identifiers), + main_scope: json_value.get("main_scope").cloned().unwrap_or_default(), + prime: json_value.get("prime").cloned().unwrap(), + reference_manager: json_value.get("reference_manager").cloned().unwrap(), + }) +} + + #[derive(Debug)] // Invariant: read-only. pub struct ReadOnlySegment { diff --git a/crates/blockifier/src/execution/native/entry_point_execution.rs b/crates/blockifier/src/execution/native/entry_point_execution.rs index bb503c9231..ecd9e1295b 100644 --- a/crates/blockifier/src/execution/native/entry_point_execution.rs +++ b/crates/blockifier/src/execution/native/entry_point_execution.rs @@ -30,8 +30,6 @@ pub fn execute_entry_point_call( context, ); - println!("Blockifier-Native: running the Native Executor"); let result = run_native_executor(&contract_class.executor, function_id, call, syscall_handler); - println!("Blockifier-Native: Native Executor finished running"); result } diff --git a/crates/blockifier/src/execution/native/syscall_handler.rs b/crates/blockifier/src/execution/native/syscall_handler.rs index 1271812e71..697e0197bc 100644 --- a/crates/blockifier/src/execution/native/syscall_handler.rs +++ b/crates/blockifier/src/execution/native/syscall_handler.rs @@ -932,7 +932,7 @@ where let lhs: Affine = p0.into(); let rhs: Affine = p1.into(); let result: Projective = lhs + rhs; - let result: Affine = result.into(); + let result: Affine = Affine::from(result); result.into() } @@ -1036,6 +1036,9 @@ where Curve::BaseField: From, { fn from(p: Secp256Point) -> Self { + if p.x.lo == 0 && p.x.hi == 0 && p.y.lo == 0 && p.y.hi == 0 { + return Affine::::identity(); + } Affine::::new(u256_to_biguint(p.x).into(), u256_to_biguint(p.y).into()) } } diff --git a/crates/blockifier/src/execution/native/utils.rs b/crates/blockifier/src/execution/native/utils.rs index cf0a8e95dc..a262731cb7 100644 --- a/crates/blockifier/src/execution/native/utils.rs +++ b/crates/blockifier/src/execution/native/utils.rs @@ -4,7 +4,7 @@ use ark_ff::BigInt; use cairo_lang_sierra::ids::FunctionId; use cairo_lang_starknet_classes::contract_class::ContractEntryPoint; use cairo_native::execution_result::ContractExecutionResult; -use cairo_native::executor::contract::ContractExecutor; +use cairo_native::executor::AotContractExecutor; use cairo_native::starknet::{ResourceBounds, SyscallResult, TxV2Info, U256}; use cairo_vm::vm::runners::cairo_runner::ExecutionResources; use itertools::Itertools; @@ -37,7 +37,7 @@ pub fn contract_entrypoint_to_entrypoint_selector( } pub fn run_native_executor( - native_executor: &ContractExecutor, + native_executor: &AotContractExecutor, function_id: &FunctionId, call: CallEntryPoint, mut syscall_handler: NativeSyscallHandler<'_>, diff --git a/crates/blockifier/src/test_utils/struct_impls.rs b/crates/blockifier/src/test_utils/struct_impls.rs index bb2cfe48af..6a2cd80f0e 100644 --- a/crates/blockifier/src/test_utils/struct_impls.rs +++ b/crates/blockifier/src/test_utils/struct_impls.rs @@ -1,6 +1,6 @@ use std::sync::Arc; -use cairo_native::executor::contract::ContractExecutor; +use cairo_native::executor::AotContractExecutor; use cairo_native::OptLevel; use cairo_vm::vm::runners::cairo_runner::ExecutionResources; use serde_json::Value; @@ -251,7 +251,7 @@ impl NativeContractClassV1 { serde_json::from_str(raw_contract_class)?; let sierra_program = sierra_contract_class.extract_sierra_program()?; - let executor = ContractExecutor::new(&sierra_program, OptLevel::Default)?; + let executor = AotContractExecutor::new(&sierra_program, OptLevel::Default)?; let contract_executor = Self::new(Arc::new(executor), sierra_contract_class)?; Ok(contract_executor) diff --git a/crates/starknet_api/Cargo.toml b/crates/starknet_api/Cargo.toml index be278c6d39..ff529155d4 100644 --- a/crates/starknet_api/Cargo.toml +++ b/crates/starknet_api/Cargo.toml @@ -10,21 +10,21 @@ description = "Starknet Rust types related to computation and execution." testing = [] [dependencies] -bitvec = "1.0.1" -cairo-lang-starknet-classes = "2.7.0-dev.0" -derive_more = "0.99.17" -hex = "0.4.3" -indexmap = { version = "2.1.0", features = ["serde"] } -itertools = "0.12.1" -primitive-types = { version = "0.12.1", features = ["serde"] } -serde = { version = "1.0.130", features = ["derive", "rc"] } -serde_json = "1.0.81" -sha3 = "0.10.8" -starknet-crypto = "0.5.1" -starknet-types-core = { version = "0.1.4", features = ["hash"] } -strum = "0.24.1" -strum_macros = "0.24.3" -thiserror = "1.0.31" +bitvec.workspace = true +cairo-lang-starknet-classes.workspace = true +derive_more.workspace = true +hex.workspace = true +indexmap = { workspace = true, features = ["serde"] } +itertools.workspace = true +primitive-types = { workspace = true, features = ["serde"] } +serde = { workspace = true, features = ["derive", "rc"] } +serde_json.workspace = true +sha3.workspace = true +starknet-crypto.workspace = true +starknet-types-core = { workspace = true, features = ["hash"] } +strum.workspace = true +strum_macros.workspace = true +thiserror.workspace = true [dev-dependencies] assert_matches = "1.5.0" diff --git a/crates/starknet_api/src/crypto/utils.rs b/crates/starknet_api/src/crypto/utils.rs index 170de7e4ce..0b9fc7d847 100644 --- a/crates/starknet_api/src/crypto/utils.rs +++ b/crates/starknet_api/src/crypto/utils.rs @@ -49,32 +49,24 @@ pub struct Signature { pub s: Felt, } -fn to_field_element(felt: &Felt) -> starknet_crypto::FieldElement { - starknet_crypto::FieldElement::from_mont(felt.to_raw_reversed()) -} - /// Verifies the authenticity of a signed message hash given the public key of the signer. pub fn verify_message_hash_signature( message_hash: &Felt, signature: &Signature, public_key: &PublicKey, ) -> Result { - starknet_crypto::verify( - &to_field_element(&public_key.0), - &to_field_element(message_hash), - &to_field_element(&signature.r), - &to_field_element(&signature.s), + starknet_crypto::verify(&public_key.0, message_hash, &signature.r, &signature.s).map_err( + |err| match err { + starknet_crypto::VerifyError::InvalidPublicKey => { + CryptoError::InvalidPublicKey(*public_key) + } + starknet_crypto::VerifyError::InvalidMessageHash => { + CryptoError::InvalidMessageHash(*message_hash) + } + starknet_crypto::VerifyError::InvalidR => CryptoError::InvalidR(signature.r), + starknet_crypto::VerifyError::InvalidS => CryptoError::InvalidS(signature.s), + }, ) - .map_err(|err| match err { - starknet_crypto::VerifyError::InvalidPublicKey => { - CryptoError::InvalidPublicKey(*public_key) - } - starknet_crypto::VerifyError::InvalidMessageHash => { - CryptoError::InvalidMessageHash(*message_hash) - } - starknet_crypto::VerifyError::InvalidR => CryptoError::InvalidR(signature.r), - starknet_crypto::VerifyError::InvalidS => CryptoError::InvalidS(signature.s), - }) } // Collect elements for applying hash chain.