diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84cbaeb5..e59505ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/ LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/ TABLEGEN_190_PREFIX: /usr/lib/llvm-19/ + CAIRO_NATIVE_RUNTIME_LIBRARY: libcairo_native_runtime.a steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@1.82.0 diff --git a/Cargo.lock b/Cargo.lock index b35e0b46..03e2ee99 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -61,9 +61,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "android-tzdata" @@ -146,7 +146,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -277,6 +277,12 @@ dependencies = [ "rand", ] +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + [[package]] name = "arrayvec" version = "0.7.6" @@ -307,6 +313,28 @@ dependencies = [ "event-listener", ] +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "async-trait" version = "0.1.83" @@ -315,7 +343,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -329,6 +357,19 @@ dependencies = [ "rustc_version", ] +[[package]] +name = "asynchronous-codec" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a860072022177f903e59730004fb5dc13db9275b79bb2aef7ba8ce831956c233" +dependencies = [ + "bytes", + "futures-sink", + "futures-util", + "memchr", + "pin-project-lite", +] + [[package]] name = "auto_impl" version = "1.2.0" @@ -337,7 +378,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -357,9 +398,9 @@ dependencies = [ "bitflags 1.3.2", "bytes", "futures-util", - "http", - "http-body", - "hyper", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.31", "itoa", "matchit", "memchr", @@ -371,7 +412,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "tokio", "tower", "tower-layer", @@ -387,8 +428,8 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http", - "http-body", + "http 0.2.12", + "http-body 0.4.6", "mime", "rustversion", "tower-layer", @@ -410,6 +451,12 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "base-x" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" + [[package]] name = "base16ct" version = "0.2.0" @@ -502,7 +549,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -524,7 +571,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.89", + "syn 2.0.90", "which", ] @@ -545,7 +592,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -608,7 +655,7 @@ dependencies = [ [[package]] name = "blockifier" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer?branch=native2.9.x#9d223311762880e24276bbd2af5073172b821af1" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" dependencies = [ "anyhow", "ark-ec", @@ -618,14 +665,12 @@ dependencies = [ "cached", "cairo-lang-casm", "cairo-lang-runner", - "cairo-lang-sierra", "cairo-lang-starknet-classes", - "cairo-lang-utils", "cairo-native", "cairo-vm", "derive_more 0.99.18", - "indexmap 2.6.0", - "itertools 0.10.5", + "indexmap 2.7.0", + "itertools 0.12.1", "keccak", "log", "num-bigint", @@ -637,26 +682,51 @@ dependencies = [ "phf", "rand", "rstest", + "semver", "serde", "serde_json", "sha2", - "sha3", - "sierra-emu", "starknet-types-core", "starknet_api", + "starknet_sierra_compile", "strum 0.25.0", "strum_macros 0.25.3", "tempfile", - "thiserror 1.0.69", + "thiserror", "toml", - "tracing", +] + +[[package]] +name = "blockifier_reexecution" +version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" +dependencies = [ + "assert_matches", + "blockifier", + "cairo-lang-starknet-classes", + "cairo-lang-utils", + "clap", + "flate2", + "google-cloud-storage", + "indexmap 2.7.0", + "papyrus_execution", + "pretty_assertions", + "retry", + "serde", + "serde_json", + "starknet-core 0.6.1", + "starknet-types-core", + "starknet_api", + "starknet_gateway", + "thiserror", + "tokio", ] [[package]] name = "bon" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "790d33b1027fac712b9cd2079bfb7978fe90a6aac7c7b97abe32377e699fe08f" +checksum = "9276fe602371cd8a7f70fe68c4db55b2d3e92c570627d6ed0427646edfa5cf47" dependencies = [ "bon-macros", "rustversion", @@ -664,9 +734,9 @@ dependencies = [ [[package]] name = "bon-macros" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447acd38643a31ee16063f92ee56c56b2694a4ecae79eba7b67a356f37b19575" +checksum = "94828b84b32b4f3ac3865f692fcdbc46c7d0dd87b29658a391d58a244e1ce45a" dependencies = [ "darling 0.20.10", "ident_case", @@ -674,7 +744,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -717,9 +787,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" dependencies = [ "serde", ] @@ -758,7 +828,7 @@ dependencies = [ "hashbrown 0.13.2", "instant", "once_cell", - "thiserror 1.0.69", + "thiserror", "tokio", ] @@ -818,7 +888,7 @@ dependencies = [ "rust-analyzer-salsa", "semver", "smol_str", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -902,7 +972,7 @@ dependencies = [ "itertools 0.12.1", "rust-analyzer-salsa", "serde", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -977,7 +1047,7 @@ checksum = "ac857ec4b564712f3e16e3314e23cc0787ab1c05cdfee83f1c8f9989a6eee40f" dependencies = [ "cairo-lang-debug", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -990,7 +1060,7 @@ dependencies = [ "cairo-lang-utils", "serde", "smol_str", - "thiserror 1.0.69", + "thiserror", "toml", ] @@ -1022,7 +1092,7 @@ dependencies = [ "sha2", "smol_str", "starknet-types-core", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -1075,7 +1145,7 @@ dependencies = [ "sha3", "smol_str", "starknet-types-core", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -1091,7 +1161,7 @@ dependencies = [ "itertools 0.12.1", "num-bigint", "num-traits", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -1107,7 +1177,7 @@ dependencies = [ "itertools 0.12.1", "num-bigint", "num-traits", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -1152,7 +1222,7 @@ dependencies = [ "num-bigint", "num-traits", "starknet-types-core", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -1192,7 +1262,7 @@ dependencies = [ "serde_json", "smol_str", "starknet-types-core", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -1215,7 +1285,7 @@ dependencies = [ "sha3", "smol_str", "starknet-types-core", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -1236,9 +1306,9 @@ dependencies = [ [[package]] name = "cairo-lang-syntax-codegen" -version = "2.9.0-dev.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b01d505ab26ca9ce829faf3a8dd097f5d7962d2eb8f136017a260694a6a72e8" +checksum = "80bede54808f2e5d26a8702711009eefe4a12e5a8f3a427ba9b081073c8e9d36" dependencies = [ "genco", "xshell", @@ -1291,7 +1361,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35df943ebcf8e1db11ee9f4f46f843dde5b71639ca79ea0d8caa7973f91d8b12" dependencies = [ "hashbrown 0.14.5", - "indexmap 2.6.0", + "indexmap 2.7.0", "itertools 0.12.1", "num-bigint", "num-traits", @@ -1303,7 +1373,8 @@ dependencies = [ [[package]] name = "cairo-native" version = "0.2.4" -source = "git+https://github.com/lambdaclass//cairo_native.git?rev=76e83965d3bf1252eb6c68200a3accd5fd1ec004#76e83965d3bf1252eb6c68200a3accd5fd1ec004" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bdebc70c3d563bc30078985ae3e975aa7dc4fa233631b5e0462a924c26c0dd9" dependencies = [ "anyhow", "aquamarine", @@ -1347,7 +1418,7 @@ dependencies = [ "starknet-types-core", "stats_alloc", "tempfile", - "thiserror 1.0.69", + "thiserror", "tracing", "tracing-subscriber", "utf8_iter", @@ -1356,7 +1427,8 @@ dependencies = [ [[package]] name = "cairo-native-runtime" version = "0.2.4" -source = "git+https://github.com/lambdaclass//cairo_native.git?rev=76e83965d3bf1252eb6c68200a3accd5fd1ec004#76e83965d3bf1252eb6c68200a3accd5fd1ec004" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf997252c402d6844f41357660cde3c11825ac5b3feafd0fb99b9dcdfb58aa3" dependencies = [ "cairo-lang-sierra-gas", "itertools 0.13.0", @@ -1409,9 +1481,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" dependencies = [ "serde", ] @@ -1427,7 +1499,7 @@ dependencies = [ "semver", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -1442,9 +1514,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" +checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" dependencies = [ "jobserver", "libc", @@ -1531,7 +1603,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1553,7 +1625,7 @@ dependencies = [ "k256", "serde", "sha2", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -1569,7 +1641,7 @@ dependencies = [ "pbkdf2 0.12.2", "rand", "sha2", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -1589,7 +1661,7 @@ dependencies = [ "serde_derive", "sha2", "sha3", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -1633,9 +1705,9 @@ checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca" [[package]] name = "const-hex" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487981fa1af147182687064d0a2c336586d337a606595ced9ffb0c685c250c73" +checksum = "4b0485bab839b018a8f1723fc5391819fea5f8f0f32288ef8a735fd096b6160c" dependencies = [ "cfg-if", "cpufeatures", @@ -1707,6 +1779,15 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +dependencies = [ + "memchr", +] + [[package]] name = "cpufeatures" version = "0.2.16" @@ -1787,6 +1868,33 @@ dependencies = [ "cipher", ] +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "darling" version = "0.14.4" @@ -1832,7 +1940,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1854,7 +1962,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1875,6 +1983,26 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +[[package]] +name = "data-encoding-macro" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1559b6cba622276d6d63706db152618eeb15b89b3e4041446b05876e352e639" +dependencies = [ + "data-encoding", + "data-encoding-macro-internal", +] + +[[package]] +name = "data-encoding-macro-internal" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "332d754c0af53bc87c108fed664d121ecf59207ec4196041f04d6ab9002ad33f" +dependencies = [ + "data-encoding", + "syn 1.0.109", +] + [[package]] name = "der" version = "0.7.9" @@ -1917,7 +2045,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -1937,7 +2065,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2032,7 +2160,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2042,10 +2170,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] -name = "downcast" -version = "0.11.0" +name = "dtoa" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dunce" @@ -2073,6 +2201,31 @@ dependencies = [ "spki", ] +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand_core", + "serde", + "sha2", + "subtle", + "zeroize", +] + [[package]] name = "educe" version = "0.5.11" @@ -2082,7 +2235,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2103,7 +2256,6 @@ dependencies = [ "ff", "generic-array", "group", - "pem-rfc7468", "pkcs8", "rand_core", "sec1", @@ -2161,7 +2313,7 @@ checksum = "4f4b100e337b021ae69f3e7dd82e230452c54ff833958446c4a3854c66dc9326" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2181,7 +2333,7 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2192,12 +2344,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2218,7 +2370,7 @@ dependencies = [ "serde_json", "sha2", "sha3", - "thiserror 1.0.69", + "thiserror", "uuid", ] @@ -2235,7 +2387,7 @@ dependencies = [ "serde", "serde_json", "sha3", - "thiserror 1.0.69", + "thiserror", "uint", ] @@ -2314,7 +2466,7 @@ dependencies = [ "pin-project", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -2333,10 +2485,10 @@ dependencies = [ "proc-macro2", "quote", "regex", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", - "syn 2.0.89", + "syn 2.0.90", "toml", "walkdir", ] @@ -2354,7 +2506,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2380,9 +2532,9 @@ dependencies = [ "serde", "serde_json", "strum 0.26.3", - "syn 2.0.89", + "syn 2.0.90", "tempfile", - "thiserror 1.0.69", + "thiserror", "tiny-keccak", "unicode-xid", ] @@ -2395,11 +2547,11 @@ checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" dependencies = [ "chrono", "ethers-core", - "reqwest", + "reqwest 0.11.27", "semver", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror", "tracing", ] @@ -2420,10 +2572,10 @@ dependencies = [ "futures-locks", "futures-util", "instant", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror", "tokio", "tracing", "tracing-futures", @@ -2447,15 +2599,15 @@ dependencies = [ "futures-timer", "futures-util", "hashers", - "http", + "http 0.2.12", "instant", - "jsonwebtoken", + "jsonwebtoken 8.3.0", "once_cell", "pin-project", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror", "tokio", "tokio-tungstenite", "tracing", @@ -2482,7 +2634,7 @@ dependencies = [ "ethers-core", "rand", "sha2", - "thiserror 1.0.69", + "thiserror", "tracing", ] @@ -2510,7 +2662,7 @@ dependencies = [ "serde_json", "solang-parser", "svm-rs", - "thiserror 1.0.69", + "thiserror", "tiny-keccak", "tokio", "tracing", @@ -2550,6 +2702,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "fixed-hash" version = "0.8.0" @@ -2614,12 +2772,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fragile" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" - [[package]] name = "fs2" version = "0.4.3" @@ -2651,6 +2803,16 @@ dependencies = [ "futures-util", ] +[[package]] +name = "futures-bounded" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91f328e7fb845fc832912fb6a34f40cf6d1888c92f974d1893a54e97b5ff542e" +dependencies = [ + "futures-timer", + "futures-util", +] + [[package]] name = "futures-channel" version = "0.3.31" @@ -2676,6 +2838,7 @@ dependencies = [ "futures-core", "futures-task", "futures-util", + "num_cpus", ] [[package]] @@ -2702,7 +2865,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2717,6 +2880,17 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +[[package]] +name = "futures-ticker" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9763058047f713632a52e916cc7f6a4b3fc6e9fc1ff8c5b1dc49e5a89041682e" +dependencies = [ + "futures", + "futures-timer", + "instant", +] + [[package]] name = "futures-timer" version = "3.0.3" @@ -2773,7 +2947,7 @@ checksum = "43eaff6bbc0b3a878361aced5ec6a2818ee7c541c5b33b5880dfa9a86c23e9e7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -2835,12 +3009,12 @@ dependencies = [ "futures-core", "futures-sink", "gloo-utils", - "http", + "http 0.2.12", "js-sys", "pin-project", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -2881,6 +3055,81 @@ dependencies = [ "microlp", ] +[[package]] +name = "google-cloud-auth" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57a13fbacc5e9c41ded3ad8d0373175a6b7a6ad430d99e89d314ac121b7ab06" +dependencies = [ + "async-trait", + "base64 0.21.7", + "google-cloud-metadata", + "google-cloud-token", + "home", + "jsonwebtoken 9.3.0", + "reqwest 0.12.9", + "serde", + "serde_json", + "thiserror", + "time", + "tokio", + "tracing", + "urlencoding", +] + +[[package]] +name = "google-cloud-metadata" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f945a208886a13d07636f38fb978da371d0abc3e34bad338124b9f8c135a8f" +dependencies = [ + "reqwest 0.12.9", + "thiserror", + "tokio", +] + +[[package]] +name = "google-cloud-storage" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7347a3d65cd64db51e5b4aebf0c68c484042948c6d53f856f58269bc9816360" +dependencies = [ + "anyhow", + "async-stream", + "async-trait", + "base64 0.21.7", + "bytes", + "futures-util", + "google-cloud-auth", + "google-cloud-metadata", + "google-cloud-token", + "hex", + "once_cell", + "percent-encoding", + "pkcs8", + "regex", + "reqwest 0.12.9", + "reqwest-middleware", + "ring 0.17.8", + "serde", + "serde_json", + "sha2", + "thiserror", + "time", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "google-cloud-token" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c12ba8b21d128a2ce8585955246977fbce4415f680ebf9199b6f9d6d725f" +dependencies = [ + "async-trait", +] + [[package]] name = "group" version = "0.13.0" @@ -2903,8 +3152,8 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 2.6.0", + "http 0.2.12", + "indexmap 2.7.0", "slab", "tokio", "tokio-util", @@ -2991,6 +3240,21 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hex_fmt" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + [[package]] name = "hmac" version = "0.12.1" @@ -3029,6 +3293,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -3036,7 +3311,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", "pin-project-lite", ] @@ -3069,8 +3367,8 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", - "http-body", + "http 0.2.12", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -3083,18 +3381,37 @@ dependencies = [ ] [[package]] -name = "hyper-rustls" -version = "0.24.2" +name = "hyper" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ + "bytes", + "futures-channel", "futures-util", - "http", - "hyper", - "log", - "rustls 0.21.12", - "rustls-native-certs", - "tokio", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper 0.14.31", + "log", + "rustls 0.21.12", + "rustls-native-certs", + "tokio", "tokio-rustls", ] @@ -3105,10 +3422,45 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.31", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.5.1", + "hyper-util", "native-tls", "tokio", "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.5.1", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", ] [[package]] @@ -3249,7 +3601,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -3353,7 +3705,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -3400,9 +3752,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", "hashbrown 0.15.2", @@ -3415,6 +3767,14 @@ version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" +[[package]] +name = "infra_utils" +version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" +dependencies = [ + "tokio", +] + [[package]] name = "inout" version = "0.1.3" @@ -3504,10 +3864,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -3538,12 +3899,12 @@ dependencies = [ "futures-channel", "futures-util", "gloo-net", - "http", + "http 0.2.12", "jsonrpsee-core", "pin-project", "rustls-native-certs", "soketto", - "thiserror 1.0.69", + "thiserror", "tokio", "tokio-rustls", "tokio-util", @@ -3564,7 +3925,7 @@ dependencies = [ "beef", "futures-timer", "futures-util", - "hyper", + "hyper 0.14.31", "jsonrpsee-types", "parking_lot", "rand", @@ -3572,7 +3933,7 @@ dependencies = [ "serde", "serde_json", "soketto", - "thiserror 1.0.69", + "thiserror", "tokio", "tracing", "wasm-bindgen-futures", @@ -3585,13 +3946,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c7b9f95208927653e7965a98525e7fc641781cab89f0e27c43fa2974405683" dependencies = [ "async-trait", - "hyper", + "hyper 0.14.31", "hyper-rustls", "jsonrpsee-core", "jsonrpsee-types", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror", "tokio", "tower", "tracing", @@ -3618,15 +3979,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a482bc4e25eebd0adb61a3468c722763c381225bd3ec46e926f709df8a8eb548" dependencies = [ "futures-util", - "http", - "hyper", + "http 0.2.12", + "hyper 0.14.31", "jsonrpsee-core", "jsonrpsee-types", "route-recognizer", "serde", "serde_json", "soketto", - "thiserror 1.0.69", + "thiserror", "tokio", "tokio-stream", "tokio-util", @@ -3644,7 +4005,7 @@ dependencies = [ "beef", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror", "tracing", ] @@ -3665,7 +4026,7 @@ version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d06eeabbb55f0af8405288390a358ebcceb6e79e1390741e6f152309c4d6076" dependencies = [ - "http", + "http 0.2.12", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-types", @@ -3679,13 +4040,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ "base64 0.21.7", - "pem", + "pem 1.1.1", "ring 0.16.20", "serde", "serde_json", "simple_asn1", ] +[[package]] +name = "jsonwebtoken" +version = "9.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" +dependencies = [ + "base64 0.21.7", + "js-sys", + "pem 3.0.4", + "ring 0.17.8", + "serde", + "serde_json", + "simple_asn1", +] + [[package]] name = "k256" version = "0.13.4" @@ -3779,15 +4155,15 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.165" +version = "0.2.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb4d3d38eab6c5239a362fa8bae48c03baf980a6e7079f063942d563ef3533e" +checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" [[package]] name = "libloading" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", "windows-targets 0.52.6", @@ -3813,7 +4189,188 @@ dependencies = [ "lifetimed-bytes", "mdbx-sys", "parking_lot", - "thiserror 1.0.69", + "thiserror", +] + +[[package]] +name = "libp2p" +version = "0.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681fb3f183edfbedd7a57d32ebe5dcdc0b9f94061185acf3c30249349cc6fc99" +dependencies = [ + "bytes", + "either", + "futures", + "futures-timer", + "getrandom", + "instant", + "libp2p-allow-block-list", + "libp2p-connection-limits", + "libp2p-core", + "libp2p-gossipsub", + "libp2p-identity", + "libp2p-kad", + "libp2p-swarm", + "multiaddr", + "pin-project", + "rw-stream-sink", + "thiserror", +] + +[[package]] +name = "libp2p-allow-block-list" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "107b238b794cb83ab53b74ad5dcf7cca3200899b72fe662840cfb52f5b0a32e6" +dependencies = [ + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", +] + +[[package]] +name = "libp2p-connection-limits" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7cd50a78ccfada14de94cbacd3ce4b0138157f376870f13d3a8422cd075b4fd" +dependencies = [ + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", +] + +[[package]] +name = "libp2p-core" +version = "0.41.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5a8920cbd8540059a01950c1e5c96ea8d89eb50c51cd366fc18bdf540a6e48f" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "libp2p-identity", + "multiaddr", + "multihash", + "multistream-select", + "once_cell", + "parking_lot", + "pin-project", + "quick-protobuf", + "rand", + "rw-stream-sink", + "serde", + "smallvec", + "thiserror", + "tracing", + "unsigned-varint 0.8.0", + "void", + "web-time", +] + +[[package]] +name = "libp2p-gossipsub" +version = "0.46.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d665144a616dadebdc5fff186b1233488cdcd8bfb1223218ff084b6d052c94f7" +dependencies = [ + "asynchronous-codec", + "base64 0.21.7", + "byteorder", + "bytes", + "either", + "fnv", + "futures", + "futures-ticker", + "getrandom", + "hex_fmt", + "instant", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "prometheus-client", + "quick-protobuf", + "quick-protobuf-codec", + "rand", + "regex", + "serde", + "sha2", + "smallvec", + "tracing", + "void", +] + +[[package]] +name = "libp2p-identity" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "257b5621d159b32282eac446bed6670c39c7dc68a200a992d8f056afa0066f6d" +dependencies = [ + "bs58", + "ed25519-dalek", + "hkdf", + "multihash", + "quick-protobuf", + "rand", + "serde", + "sha2", + "thiserror", + "tracing", + "zeroize", +] + +[[package]] +name = "libp2p-kad" +version = "0.45.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc5767727d062c4eac74dd812c998f0e488008e82cce9c33b463d38423f9ad2" +dependencies = [ + "arrayvec", + "asynchronous-codec", + "bytes", + "either", + "fnv", + "futures", + "futures-bounded", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "quick-protobuf", + "quick-protobuf-codec", + "rand", + "serde", + "sha2", + "smallvec", + "thiserror", + "tracing", + "uint", + "void", +] + +[[package]] +name = "libp2p-swarm" +version = "0.44.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80cae6cb75f89dbca53862f9ebe0b9f463aa7b302762fcfaafb9e51dcc9b0f7e" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-identity", + "lru", + "multistream-select", + "once_cell", + "rand", + "smallvec", + "tracing", + "void", ] [[package]] @@ -3959,7 +4516,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.89", + "syn 2.0.90", "tblgen-alt", "unindent", ] @@ -3982,9 +4539,12 @@ dependencies = [ [[package]] name = "mempool_test_utils" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer?branch=native2.9.x#9d223311762880e24276bbd2af5073172b821af1" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" dependencies = [ + "assert_matches", "blockifier", + "infra_utils", + "pretty_assertions", "serde_json", "starknet-types-core", "starknet_api", @@ -4009,7 +4569,7 @@ checksum = "38b4faf00617defe497754acde3024865bc143d44a86799b24e191ecff91354f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -4028,6 +4588,16 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -4045,11 +4615,10 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi", "libc", "wasi", "windows-sys 0.52.0", @@ -4065,30 +4634,58 @@ dependencies = [ ] [[package]] -name = "mockall" -version = "0.12.1" +name = "multiaddr" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43766c2b5203b10de348ffe19f7e54564b64f3d6018ff7648d1e2d6d3a0f0a48" +checksum = "fe6351f60b488e04c1d21bc69e56b89cb3f5e8f5d22557d6e8031bdfd79b6961" dependencies = [ - "cfg-if", - "downcast", - "fragile", - "lazy_static", - "mockall_derive", - "predicates", - "predicates-tree", + "arrayref", + "byteorder", + "data-encoding", + "libp2p-identity", + "multibase", + "multihash", + "percent-encoding", + "serde", + "static_assertions", + "unsigned-varint 0.8.0", + "url", ] [[package]] -name = "mockall_derive" -version = "0.12.1" +name = "multibase" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cbce79ec385a1d4f54baa90a76401eb15d9cab93685f62e7e9f942aa00ae2" +checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" dependencies = [ - "cfg-if", - "proc-macro2", - "quote", - "syn 2.0.89", + "base-x", + "data-encoding", + "data-encoding-macro", +] + +[[package]] +name = "multihash" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc41f430805af9d1cf4adae4ed2149c759b877b01d909a1f40256188d09345d2" +dependencies = [ + "core2", + "serde", + "unsigned-varint 0.8.0", +] + +[[package]] +name = "multistream-select" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea0df8e5eec2298a62b326ee4f0d7fe1a6b90a09dfcf9df37b38f947a8c42f19" +dependencies = [ + "bytes", + "futures", + "log", + "pin-project", + "smallvec", + "unsigned-varint 0.7.2", ] [[package]] @@ -4262,7 +4859,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -4340,7 +4937,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -4378,9 +4975,9 @@ dependencies = [ [[package]] name = "os_info" -version = "3.8.2" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" +checksum = "e5ca711d8b83edbb00b44d504503cd247c9c0bd8b0fa2694f2a1a3d8165379ce" dependencies = [ "log", "serde", @@ -4393,18 +4990,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "p256" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" -dependencies = [ - "ecdsa", - "elliptic-curve", - "primeorder", - "sha2", -] - [[package]] name = "page_size" version = "0.6.0" @@ -4418,12 +5003,12 @@ dependencies = [ [[package]] name = "papyrus_common" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer?branch=native2.9.x#9d223311762880e24276bbd2af5073172b821af1" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" dependencies = [ + "base64 0.13.1", "cairo-lang-starknet-classes", - "hex", - "indexmap 2.6.0", - "itertools 0.10.5", + "flate2", + "indexmap 2.7.0", "lazy_static", "rand", "serde", @@ -4431,34 +5016,35 @@ dependencies = [ "sha3", "starknet-types-core", "starknet_api", - "thiserror 1.0.69", + "thiserror", ] [[package]] name = "papyrus_config" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer?branch=native2.9.x#9d223311762880e24276bbd2af5073172b821af1" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" dependencies = [ "clap", - "itertools 0.10.5", + "infra_utils", + "itertools 0.12.1", "serde", "serde_json", "strum_macros 0.25.3", - "thiserror 1.0.69", + "thiserror", "validator", ] [[package]] name = "papyrus_execution" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer?branch=native2.9.x#9d223311762880e24276bbd2af5073172b821af1" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" dependencies = [ "anyhow", "blockifier", "cairo-lang-starknet-classes", "cairo-vm", - "indexmap 2.6.0", - "itertools 0.10.5", + "indexmap 2.7.0", + "itertools 0.12.1", "lazy_static", "papyrus_common", "papyrus_config", @@ -4467,24 +5053,33 @@ dependencies = [ "serde_json", "starknet-types-core", "starknet_api", - "thiserror 1.0.69", + "thiserror", "tracing", ] +[[package]] +name = "papyrus_network_types" +version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" +dependencies = [ + "libp2p", + "serde", +] + [[package]] name = "papyrus_proc_macros" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer?branch=native2.9.x#9d223311762880e24276bbd2af5073172b821af1" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" dependencies = [ "quote", - "syn 2.0.89", + "syn 2.0.90", "tracing", ] [[package]] name = "papyrus_rpc" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer?branch=native2.9.x#9d223311762880e24276bbd2af5073172b821af1" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" dependencies = [ "anyhow", "async-trait", @@ -4494,7 +5089,7 @@ dependencies = [ "flate2", "futures-util", "hex", - "hyper", + "hyper 0.14.31", "jsonrpsee", "lazy_static", "metrics", @@ -4518,14 +5113,14 @@ dependencies = [ [[package]] name = "papyrus_storage" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer?branch=native2.9.x#9d223311762880e24276bbd2af5073172b821af1" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" dependencies = [ "byteorder", "cairo-lang-casm", "cairo-lang-starknet-classes", "cairo-lang-utils", "human_bytes", - "indexmap 2.6.0", + "indexmap 2.7.0", "integer-encoding", "libmdbx", "memmap2", @@ -4541,7 +5136,7 @@ dependencies = [ "serde_json", "starknet-types-core", "starknet_api", - "thiserror 1.0.69", + "thiserror", "tracing", "validator", "zstd 0.13.2", @@ -4570,7 +5165,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -4662,6 +5257,16 @@ dependencies = [ "base64 0.13.1", ] +[[package]] +name = "pem" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +dependencies = [ + "base64 0.22.1", + "serde", +] + [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -4684,7 +5289,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.6.0", + "indexmap 2.7.0", ] [[package]] @@ -4727,7 +5332,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -4771,7 +5376,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -4838,32 +5443,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" -[[package]] -name = "predicates" -version = "3.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" -dependencies = [ - "anstyle", - "predicates-core", -] - -[[package]] -name = "predicates-core" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" - -[[package]] -name = "predicates-tree" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" -dependencies = [ - "predicates-core", - "termtree", -] - [[package]] name = "pretty_assertions" version = "1.4.1" @@ -4891,16 +5470,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.89", -] - -[[package]] -name = "primeorder" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" -dependencies = [ - "elliptic-curve", + "syn 2.0.90", ] [[package]] @@ -4969,6 +5539,29 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prometheus-client" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "504ee9ff529add891127c4827eb481bd69dc0ebc72e9a682e187db4caa60c3ca" +dependencies = [ + "dtoa", + "itoa", + "parking_lot", + "prometheus-client-derive-encode", +] + +[[package]] +name = "prometheus-client-derive-encode" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "proptest" version = "1.5.0" @@ -4985,6 +5578,28 @@ dependencies = [ "unarray", ] +[[package]] +name = "quick-protobuf" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" +dependencies = [ + "byteorder", +] + +[[package]] +name = "quick-protobuf-codec" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15a0580ab32b169745d7a39db2ba969226ca16738931be152a3209b409de2474" +dependencies = [ + "asynchronous-codec", + "bytes", + "quick-protobuf", + "thiserror", + "unsigned-varint 0.8.0", +] + [[package]] name = "quote" version = "1.0.37" @@ -5082,7 +5697,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -5160,46 +5775,113 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.27" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.31", + "hyper-rustls", + "hyper-tls 0.5.0", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls 0.21.12", + "rustls-pemfile 1.0.4", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 0.1.2", + "system-configuration", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 0.25.4", + "winreg", +] + +[[package]] +name = "reqwest" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-rustls", - "hyper-tls", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.5.1", + "hyper-tls 0.6.0", + "hyper-util", "ipnet", "js-sys", "log", "mime", + "mime_guess", "native-tls", "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.12", - "rustls-pemfile", + "rustls-pemfile 2.2.0", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", - "system-configuration", + "sync_wrapper 1.0.2", "tokio", "tokio-native-tls", - "tokio-rustls", + "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", - "webpki-roots 0.25.4", - "winreg", + "windows-registry", +] + +[[package]] +name = "reqwest-middleware" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562ceb5a604d3f7c885a792d42c199fd8af239d0a51b2fa6a78aafa092452b04" +dependencies = [ + "anyhow", + "async-trait", + "http 1.1.0", + "reqwest 0.12.9", + "serde", + "thiserror", + "tower-service", +] + +[[package]] +name = "retry" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9166d72162de3575f950507683fac47e30f6f2c3836b71b7fbc61aa517c9c5f4" +dependencies = [ + "rand", ] [[package]] @@ -5284,6 +5966,7 @@ name = "rpc-state-reader" version = "0.1.0" dependencies = [ "blockifier", + "blockifier_reexecution", "cairo-lang-starknet-classes", "cairo-lang-utils", "cairo-native", @@ -5332,7 +6015,7 @@ version = "0.17.0-pre.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719825638c59fd26a55412a24561c7c5bcf54364c88b9a7a04ba08a6eafaba8d" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.7.0", "lock_api", "oorandom", "parking_lot", @@ -5352,7 +6035,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5419,9 +6102,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.18" +version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ "log", "once_cell", @@ -5439,7 +6122,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.4", "schannel", "security-framework", ] @@ -5453,6 +6136,15 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "rustls-pki-types" version = "1.10.0" @@ -5486,6 +6178,17 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +[[package]] +name = "rw-stream-sink" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8c9026ff5d2f23da5e45bbc283f156383001bfb09c4e44256d02c1a685fe9a1" +dependencies = [ + "futures", + "pin-project", + "static_assertions", +] + [[package]] name = "ryu" version = "1.0.18" @@ -5531,7 +6234,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5565,7 +6268,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5671,7 +6374,7 @@ checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5682,7 +6385,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5726,7 +6429,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5776,7 +6479,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_derive", "serde_json", @@ -5793,7 +6496,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5805,7 +6508,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -5868,38 +6571,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "sierra-emu" -version = "0.1.0" -source = "git+https://github.com/lambdaclass/sierra-emu.git?rev=369a3eaebc0ab189f06dfc3662e270479a8ad17a#369a3eaebc0ab189f06dfc3662e270479a8ad17a" -dependencies = [ - "cairo-lang-compiler", - "cairo-lang-filesystem", - "cairo-lang-sierra", - "cairo-lang-sierra-ap-change", - "cairo-lang-sierra-gas", - "cairo-lang-utils", - "clap", - "k256", - "keccak", - "num-bigint", - "num-traits", - "p256", - "rand", - "sec1", - "serde", - "serde_json", - "sha2", - "smallvec", - "starknet-crypto 0.7.3", - "starknet-curve 0.5.1", - "starknet-types-core", - "tempfile", - "thiserror 2.0.3", - "tracing", - "tracing-subscriber", -] - [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -5927,7 +6598,7 @@ checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ "num-bigint", "num-traits", - "thiserror 1.0.69", + "thiserror", "time", ] @@ -5973,9 +6644,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -5990,7 +6661,7 @@ dependencies = [ "base64 0.13.1", "bytes", "futures", - "http", + "http 0.2.12", "httparse", "log", "rand", @@ -6007,7 +6678,7 @@ dependencies = [ "lalrpop", "lalrpop-util", "phf", - "thiserror 1.0.69", + "thiserror", "unicode-xid", ] @@ -6053,13 +6724,13 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "starknet" -version = "0.7.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351ffff1bcf6a1dc569a1b330dfd85779e16506e7d4a87baa8be3744cb5415a6" +checksum = "6f0623b045f3dc10aef030c9ddd4781cff9cbe1188b71063cc510b75d1f96be6" dependencies = [ "starknet-accounts", "starknet-contract", - "starknet-core 0.7.2", + "starknet-core 0.6.1", "starknet-crypto 0.6.2", "starknet-ff", "starknet-macros", @@ -6069,38 +6740,38 @@ dependencies = [ [[package]] name = "starknet-accounts" -version = "0.6.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7062b020f65d9da7f9dd9f1d97bfb644e881cda8ddb999799a799e6f2e408dd" +checksum = "68e97edc480348dca300e5a8234e6c4e6f2f1ac028f2b16fcce294ebe93d07f4" dependencies = [ "async-trait", "auto_impl", - "starknet-core 0.7.2", + "starknet-core 0.6.1", "starknet-providers", "starknet-signers", - "thiserror 1.0.69", + "thiserror", ] [[package]] name = "starknet-contract" -version = "0.6.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d858efc93d85de95065a5732cb3e94d0c746674964c0859aab442ffbb9de76b4" +checksum = "69b86e3f6b3ca9a5c45271ab10871c99f7dc82fee3199d9f8c7baa2a1829947d" dependencies = [ "serde", "serde_json", "serde_with 2.3.3", "starknet-accounts", - "starknet-core 0.7.2", + "starknet-core 0.6.1", "starknet-providers", - "thiserror 1.0.69", + "thiserror", ] [[package]] name = "starknet-core" -version = "0.7.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f1683ca7c63f0642310eddedb7d35056d8306084dff323d440711065c63ed87" +checksum = "14139b1c39bdc2f1e663c12090ff5108fe50ebe62c09e15e32988dfaf445a7e4" dependencies = [ "base64 0.21.7", "flate2", @@ -6132,26 +6803,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", - "num-integer", - "num-traits", - "rfc6979", - "sha2", - "starknet-crypto-codegen", - "starknet-curve 0.3.0", - "starknet-ff", - "zeroize", -] - [[package]] name = "starknet-crypto" version = "0.6.2" @@ -6199,16 +6850,7 @@ checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" dependencies = [ "starknet-curve 0.4.2", "starknet-ff", - "syn 2.0.89", -] - -[[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.90", ] [[package]] @@ -6251,43 +6893,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95d549d3078bdbe775d0deaa8ddb57a19942989ce7c1f2dfd60beeb322bb4945" dependencies = [ "starknet-core 0.10.0", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] name = "starknet-providers" -version = "0.7.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52072c2d258bf692affeccd602613d5f6c61a6ffc84da8f191ab4a1b0a5e24d1" +checksum = "c3b136c26b72ff1756f0844e0aa80bab680ceb99d63921826facbb8e7340ff82" dependencies = [ "async-trait", "auto_impl", "ethereum-types", "flate2", "log", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", "serde_with 2.3.3", - "starknet-core 0.7.2", - "thiserror 1.0.69", + "starknet-core 0.6.1", + "thiserror", "url", ] [[package]] name = "starknet-signers" -version = "0.5.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "347b1bfc09846aafe16d2b3a5bc2d8a2f845e2958602442182d265fbd6011c2e" +checksum = "d9386015d2e6dc3df285bfb33a3afd8ad7596c70ed38ab57019de4d2dfc7826f" dependencies = [ "async-trait", "auto_impl", "crypto-bigint", "eth-keystore", "rand", - "starknet-core 0.7.2", + "starknet-core 0.6.1", "starknet-crypto 0.6.2", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -6308,38 +6950,42 @@ dependencies = [ [[package]] name = "starknet_api" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer?branch=native2.9.x#9d223311762880e24276bbd2af5073172b821af1" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" dependencies = [ "bitvec", + "cairo-lang-runner", "cairo-lang-starknet-classes", "derive_more 0.99.18", "hex", - "indexmap 2.6.0", + "indexmap 2.7.0", "itertools 0.12.1", + "num-bigint", + "papyrus_proc_macros", + "pretty_assertions", "primitive-types", "serde", "serde_json", "sha3", - "starknet-crypto 0.5.2", + "starknet-crypto 0.7.3", "starknet-types-core", - "strum 0.24.1", - "strum_macros 0.24.3", - "thiserror 1.0.69", + "strum 0.25.0", + "strum_macros 0.25.3", + "thiserror", ] [[package]] name = "starknet_client" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer?branch=native2.9.x#9d223311762880e24276bbd2af5073172b821af1" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" dependencies = [ "async-trait", "cairo-lang-starknet-classes", - "http", - "indexmap 2.6.0", + "http 0.2.12", + "indexmap 2.7.0", "os_info", "papyrus_common", "papyrus_config", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", "serde_repr", @@ -6347,7 +6993,7 @@ dependencies = [ "starknet_api", "strum 0.25.0", "strum_macros 0.25.3", - "thiserror 1.0.69", + "thiserror", "tokio", "tokio-retry", "tracing", @@ -6357,77 +7003,98 @@ dependencies = [ [[package]] name = "starknet_gateway" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer?branch=native2.9.x#9d223311762880e24276bbd2af5073172b821af1" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" dependencies = [ "async-trait", "axum", "blockifier", "cairo-lang-starknet-classes", - "enum-assoc", - "hyper", "mempool_test_utils", "papyrus_config", + "papyrus_network_types", "papyrus_rpc", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", "starknet-types-core", "starknet_api", - "starknet_mempool_infra", + "starknet_gateway_types", "starknet_mempool_types", + "starknet_sequencer_infra", "starknet_sierra_compile", - "thiserror 1.0.69", + "thiserror", "tokio", "tracing", "validator", ] [[package]] -name = "starknet_mempool_infra" +name = "starknet_gateway_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer?branch=native2.9.x#9d223311762880e24276bbd2af5073172b821af1" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" dependencies = [ "async-trait", - "bincode 1.3.3", - "hyper", - "papyrus_config", - "rstest", + "axum", + "enum-assoc", + "papyrus_network_types", + "papyrus_proc_macros", + "papyrus_rpc", "serde", - "thiserror 1.0.69", - "tokio", + "serde_json", + "starknet_api", + "starknet_sequencer_infra", + "thiserror", "tracing", - "tracing-subscriber", - "validator", ] [[package]] name = "starknet_mempool_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer?branch=native2.9.x#9d223311762880e24276bbd2af5073172b821af1" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" dependencies = [ "async-trait", - "mockall", + "papyrus_network_types", "papyrus_proc_macros", "serde", "starknet_api", - "starknet_mempool_infra", - "thiserror 1.0.69", + "starknet_sequencer_infra", + "thiserror", +] + +[[package]] +name = "starknet_sequencer_infra" +version = "0.0.0" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" +dependencies = [ + "async-trait", + "bincode 1.3.3", + "hyper 0.14.31", + "papyrus_config", + "rstest", + "serde", + "thiserror", + "tokio", + "tracing", + "tracing-subscriber", + "validator", ] [[package]] name = "starknet_sierra_compile" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer?branch=native2.9.x#9d223311762880e24276bbd2af5073172b821af1" +source = "git+https://github.com/lambdaclass/sequencer.git?branch=replay#111c6fd7ea6895f6322c15865a6f7fafaf29781e" dependencies = [ "cairo-lang-sierra", "cairo-lang-starknet-classes", "cairo-lang-utils", + "cairo-native", "papyrus_config", "serde", "serde_json", "starknet-types-core", "starknet_api", - "thiserror 1.0.69", + "tempfile", + "thiserror", "validator", ] @@ -6468,12 +7135,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" @@ -6489,19 +7150,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" @@ -6512,7 +7160,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -6525,7 +7173,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -6544,12 +7192,12 @@ dependencies = [ "fs2", "hex", "once_cell", - "reqwest", + "reqwest 0.11.27", "semver", "serde", "serde_json", "sha2", - "thiserror 1.0.69", + "thiserror", "url", "zip", ] @@ -6567,9 +7215,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.89" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -6582,6 +7230,15 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + [[package]] name = "synstructure" version = "0.13.1" @@ -6590,7 +7247,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -6629,7 +7286,7 @@ dependencies = [ "bindgen 0.69.5", "cc", "paste", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -6656,12 +7313,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "termtree" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" - [[package]] name = "test-case" version = "3.3.1" @@ -6680,7 +7331,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -6691,7 +7342,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "test-case-core", ] @@ -6701,16 +7352,7 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" -dependencies = [ - "thiserror-impl 2.0.3", + "thiserror-impl", ] [[package]] @@ -6721,18 +7363,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -6856,7 +7487,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -6957,7 +7588,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.7.0", "toml_datetime", "winnow 0.5.40", ] @@ -6968,7 +7599,7 @@ version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.7.0", "serde", "serde_spanned", "toml_datetime", @@ -7010,9 +7641,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -7022,13 +7653,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -7064,9 +7695,9 @@ dependencies = [ [[package]] name = "tracing-serde" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" dependencies = [ "serde", "tracing-core", @@ -7074,9 +7705,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -7118,13 +7749,13 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 0.2.12", "httparse", "log", "rand", "rustls 0.21.12", "sha1", - "thiserror 1.0.69", + "thiserror", "url", "utf-8", ] @@ -7165,9 +7796,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c878a167baa8afd137494101a688ef8c67125089ff2249284bd2b5f9bfedb815" dependencies = [ - "thiserror 1.0.69", + "thiserror", ] +[[package]] +name = "unicase" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" + [[package]] name = "unicode-bidi" version = "0.3.17" @@ -7213,6 +7850,18 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" +[[package]] +name = "unsigned-varint" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" + +[[package]] +name = "unsigned-varint" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" + [[package]] name = "untrusted" version = "0.7.1" @@ -7235,7 +7884,7 @@ dependencies = [ "flate2", "log", "once_cell", - "rustls 0.23.18", + "rustls 0.23.19", "rustls-pki-types", "serde", "serde_json", @@ -7254,6 +7903,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "utf-8" version = "0.7.6" @@ -7351,6 +8006,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + [[package]] name = "walkdir" version = "2.5.0" @@ -7378,9 +8039,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" dependencies = [ "cfg-if", "once_cell", @@ -7389,36 +8050,37 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7426,28 +8088,51 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" + +[[package]] +name = "wasm-streams" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", @@ -7520,6 +8205,36 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -7721,7 +8436,7 @@ dependencies = [ "pharos", "rustc_version", "send_wrapper 0.6.0", - "thiserror 1.0.69", + "thiserror", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -7783,7 +8498,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "synstructure", ] @@ -7805,7 +8520,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -7825,7 +8540,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", "synstructure", ] @@ -7846,7 +8561,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] @@ -7868,7 +8583,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.89", + "syn 2.0.90", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 39682781..5bc40adf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,11 +12,12 @@ tracing = "0.1" serde_json = "1.0.116" serde_with = "3.11.0" serde = "1.0.197" -cairo-native = { git = "https://github.com/lambdaclass/cairo_native", rev = "76e83965d3bf1252eb6c68200a3accd5fd1ec004" } +cairo-native = "0.2.4" # Sequencer Dependencies -starknet_api = { git = "https://github.com/lambdaclass/sequencer", branch = "native2.9.x" } -blockifier = { git = "https://github.com/lambdaclass/sequencer", branch = "native2.9.x" } -starknet_gateway = { git = "https://github.com/lambdaclass/sequencer", branch = "native2.9.x" } +starknet_api = { git = "https://github.com/lambdaclass/sequencer.git", branch = "replay" } # main +blockifier = { git = "https://github.com/lambdaclass/sequencer.git", branch = "replay", features = ["cairo_native"] } # main +starknet_gateway = { git = "https://github.com/lambdaclass/sequencer.git", branch = "replay" } # main +blockifier_reexecution = { git = "https://github.com/lambdaclass/sequencer.git", branch = "replay" } # main [patch.'https://github.com/lambdaclass/cairo_native'] -cairo-native = { git = "https://github.com/lambdaclass//cairo_native.git", rev = "76e83965d3bf1252eb6c68200a3accd5fd1ec004" } +cairo-native = "=0.2.4" diff --git a/replay/src/benchmark.rs b/replay/src/benchmark.rs index de2f245e..398c5b47 100644 --- a/replay/src/benchmark.rs +++ b/replay/src/benchmark.rs @@ -2,6 +2,7 @@ use std::time::Instant; use blockifier::{ context::BlockContext, + execution::contract_class::RunnableCompiledClass, state::{cached_state::CachedState, state_api::StateReader}, }; use rpc_state_reader::{ @@ -176,13 +177,11 @@ impl StateReader for OptionalStateReader { self.get_inner().get_class_hash_at(contract_address) } - fn get_compiled_contract_class( + fn get_compiled_class( &self, class_hash: starknet_api::core::ClassHash, - ) -> blockifier::state::state_api::StateResult< - blockifier::execution::contract_class::ContractClass, - > { - self.get_inner().get_compiled_contract_class(class_hash) + ) -> blockifier::state::state_api::StateResult { + self.get_inner().get_compiled_class(class_hash) } fn get_compiled_class_hash( diff --git a/replay/src/main.rs b/replay/src/main.rs index ba8cc76b..ec78bc37 100644 --- a/replay/src/main.rs +++ b/replay/src/main.rs @@ -1,6 +1,6 @@ use blockifier::state::cached_state::CachedState; use blockifier::state::errors::StateError; -use blockifier::transaction::objects::TransactionExecutionInfo; +use blockifier::transaction::objects::{RevertError, TransactionExecutionInfo}; use clap::{Parser, Subcommand}; use rpc_state_reader::execution::execute_tx_configurable; @@ -359,8 +359,8 @@ fn compare_execution( let events_and_msgs = format!( "{{ events_number: {}, l2_to_l1_messages_number: {} }}", - exec_rsc.n_events + 1, - exec_rsc.message_cost_info.l2_to_l1_payload_lengths.len(), + exec_rsc.archival_data.event_summary.n_events + 1, + exec_rsc.messages.l2_to_l1_payload_lengths.len(), ); let rpc_events_and_msgs = format!( "{{ events_number: {}, l2_to_l1_messages_number: {} }}", @@ -370,25 +370,31 @@ fn compare_execution( // currently adding 1 because the sequencer is counting only the // events produced by the inner calls of a callinfo - let events_match = exec_rsc.n_events + 1 == rpc_receipt.events.len(); - let msgs_match = rpc_receipt.messages_sent.len() - == exec_rsc.message_cost_info.l2_to_l1_payload_lengths.len(); + let events_match = + exec_rsc.archival_data.event_summary.n_events + 1 == rpc_receipt.events.len(); + let msgs_match = + rpc_receipt.messages_sent.len() == exec_rsc.messages.l2_to_l1_payload_lengths.len(); let events_msgs_match = events_match && msgs_match; - let state_changes = exec_rsc.state_changes_for_fee; + let state_changes = exec_rsc.state.state_changes_for_fee; let state_changes_for_fee_str = format!( "{{ n_class_hash_updates: {}, n_compiled_class_hash_updates: {}, n_modified_contracts: {}, n_storage_updates: {} }}", - state_changes.n_class_hash_updates, - state_changes.n_compiled_class_hash_updates, - state_changes.n_modified_contracts, - state_changes.n_storage_updates + state_changes.state_changes_count.n_class_hash_updates, + state_changes.state_changes_count.n_compiled_class_hash_updates, + state_changes.state_changes_count.n_modified_contracts, + state_changes.state_changes_count.n_storage_updates ); let execution_gas = execution.receipt.fee; let rpc_gas = rpc_receipt.actual_fee; debug!(?execution_gas, ?rpc_gas, "execution actual fee"); + let revert_error = execution.revert_error.map(|err| match err { + RevertError::Execution(e) => e.to_string(), + RevertError::PostExecution(p) => p.to_string(), + }); + if !status_matches || !events_msgs_match { let root_of_error = if !status_matches { "EXECUTION STATUS DIVERGED" @@ -404,7 +410,7 @@ fn compare_execution( reverted, rpc_reverted, root_of_error = root_of_error, - execution_error_message = execution.revert_error, + execution_error_message = revert_error, n_events_and_messages = events_and_msgs, rpc_n_events_and_msgs = rpc_events_and_msgs, da_gas = da_gas_str, @@ -417,7 +423,7 @@ fn compare_execution( info!( reverted, rpc_reverted, - execution_error_message = execution.revert_error, + execution_error_message = revert_error, n_events_and_messages = events_and_msgs, rpc_n_events_and_msgs = rpc_events_and_msgs, da_gas = da_gas_str, diff --git a/replay/src/state_dump.rs b/replay/src/state_dump.rs index 4d2b24d0..2b838beb 100644 --- a/replay/src/state_dump.rs +++ b/replay/src/state_dump.rs @@ -14,18 +14,16 @@ use blockifier::{ cached_state::{CachedState, StateMaps, StorageEntry}, state_api::StateReader, }, - transaction::{ - errors::TransactionExecutionError, - objects::{GasVector, TransactionExecutionInfo}, - }, + transaction::{errors::TransactionExecutionError, objects::TransactionExecutionInfo}, }; use serde::{Deserialize, Serialize}; use serde_with::serde_as; use starknet_api::{ + contract_class::EntryPointType, core::{ClassHash, CompiledClassHash, ContractAddress, EntryPointSelector, Nonce}, - deprecated_contract_class::EntryPointType, + execution_resources::GasVector, state::StorageKey, - transaction::Calldata, + transaction::fields::Calldata, }; use starknet_types_core::felt::Felt; @@ -38,7 +36,7 @@ pub fn dump_state_diff( let _ = fs::create_dir_all(parent); } - let state_maps = SerializableStateMaps::from(state.to_state_diff()?); + let state_maps = SerializableStateMaps::from(state.to_state_diff()?.state_maps); let execution_info = SerializableExecutionInfo::new(execution_info); let info = Info { execution_info, @@ -123,6 +121,7 @@ struct SerializableExecutionInfo { impl SerializableExecutionInfo { pub fn new(execution_info: &TransactionExecutionInfo) -> Self { + let reverted = execution_info.revert_error.clone().map(|f| f.to_string()); Self { validate_call_info: execution_info .validate_call_info @@ -136,7 +135,7 @@ impl SerializableExecutionInfo { .fee_transfer_call_info .clone() .map(From::::from), - reverted: execution_info.revert_error.clone(), + reverted, receipt: SerializableTransactionReceipt { resources: SerializableTransactionResources { starknet_resources: SerializableStarknetResources { @@ -144,31 +143,40 @@ impl SerializableExecutionInfo { .receipt .resources .starknet_resources + .archival_data .calldata_length, state_changes_for_fee: SerializableStateChangesCount { n_storage_updates: execution_info .receipt .resources .starknet_resources + .state .state_changes_for_fee + .state_changes_count .n_storage_updates, n_class_hash_updates: execution_info .receipt .resources .starknet_resources + .state .state_changes_for_fee + .state_changes_count .n_class_hash_updates, n_compiled_class_hash_updates: execution_info .receipt .resources .starknet_resources + .state .state_changes_for_fee + .state_changes_count .n_compiled_class_hash_updates, n_modified_contracts: execution_info .receipt .resources .starknet_resources + .state .state_changes_for_fee + .state_changes_count .n_modified_contracts, }, message_cost_info: SerializableMessageL1CostInfo { @@ -176,22 +184,29 @@ impl SerializableExecutionInfo { .receipt .resources .starknet_resources - .message_cost_info + .messages .l2_to_l1_payload_lengths .clone(), message_segment_length: execution_info .receipt .resources .starknet_resources - .message_cost_info + .messages .message_segment_length, }, l1_handler_payload_size: execution_info .receipt .resources .starknet_resources + .messages .l1_handler_payload_size, - n_events: execution_info.receipt.resources.starknet_resources.n_events, + n_events: execution_info + .receipt + .resources + .starknet_resources + .archival_data + .event_summary + .n_events, }, }, da_gas: execution_info.receipt.da_gas, diff --git a/rpc-state-reader/Cargo.toml b/rpc-state-reader/Cargo.toml index e786239c..5a4af9fd 100644 --- a/rpc-state-reader/Cargo.toml +++ b/rpc-state-reader/Cargo.toml @@ -16,13 +16,14 @@ serde_json = { version = "1.0", features = [ "raw_value", ] } starknet_api = {workspace = true} -cairo-lang-starknet-classes = "2.9.0-dev.0" -cairo-lang-utils = "2.9.0-dev.0" +cairo-lang-starknet-classes = "=2.9.0-dev.0" +cairo-lang-utils = "=2.9.0-dev.0" cairo-native = { workspace = true } -starknet = "0.7.0" +starknet = "0.6.0" flate2 = "1.0.25" cairo-vm = "1.0.0-rc5" blockifier = { workspace = true } +blockifier_reexecution = { workspace = true } starknet_gateway = { workspace = true } tracing = { workspace = true } diff --git a/rpc-state-reader/src/execution.rs b/rpc-state-reader/src/execution.rs index 144829d4..85f504ff 100644 --- a/rpc-state-reader/src/execution.rs +++ b/rpc-state-reader/src/execution.rs @@ -1,33 +1,33 @@ +use crate::{ + objects::{RpcTransactionReceipt, RpcTransactionTrace}, + reader::{RpcChain, RpcStateReader}, +}; use blockifier::{ - blockifier::block::BlockInfo, bouncer::BouncerConfig, context::{BlockContext, ChainInfo, FeeTokenAddresses}, - execution::contract_class::{ClassInfo, ContractClass}, state::{cached_state::CachedState, state_api::StateReader}, + test_utils::MAX_FEE, transaction::{ - account_transaction::AccountTransaction, objects::{TransactionExecutionInfo, TransactionExecutionResult}, - transactions::{ - DeclareTransaction, DeployAccountTransaction, ExecutableTransaction, InvokeTransaction, - L1HandlerTransaction, - }, + transaction_execution::Transaction as BlockiTransaction, + transactions::ExecutableTransaction, }, - versioned_constants::VersionedConstants, + versioned_constants::{VersionedConstants, VersionedConstantsOverrides}, }; +use blockifier_reexecution::state_reader::compile::{ + legacy_to_contract_class_v0, sierra_to_contact_class_v1, +}; +use starknet::core::types::ContractClass as SNContractClass; use starknet_api::{ - block::BlockNumber, - core::{calculate_contract_address, ContractAddress, PatriciaKey}, + block::{BlockInfo, BlockNumber}, + contract_class::ClassInfo, + core::ContractAddress, felt, hash::StarkHash, patricia_key, transaction::{Transaction as SNTransaction, TransactionHash}, }; -use crate::{ - objects::{RpcTransactionReceipt, RpcTransactionTrace}, - reader::{RpcChain, RpcStateReader}, -}; - pub fn execute_tx( tx_hash: &str, network: RpcChain, @@ -45,7 +45,7 @@ pub fn execute_tx( let block_info = reader.get_block_info().unwrap(); // Get transaction before giving ownership of the reader - let transaction = reader.get_transaction(&tx_hash).unwrap(); + let tx = reader.get_transaction(&tx_hash).unwrap(); let trace = reader.get_transaction_trace(&tx_hash).unwrap(); let receipt = reader.get_transaction_receipt(&tx_hash).unwrap(); @@ -66,93 +66,70 @@ pub fn execute_tx( fee_token_addresses, }; let mut versioned_constants = - VersionedConstants::latest_constants_with_overrides(u32::MAX, usize::MAX); + VersionedConstants::get_versioned_constants(VersionedConstantsOverrides { + validate_max_n_steps: u32::MAX, + invoke_tx_max_n_steps: u32::MAX, + max_recursion_depth: usize::MAX, + }); versioned_constants.disable_cairo0_redeclaration = false; let block_context = BlockContext::new( block_info, chain_info, versioned_constants, - BouncerConfig::empty(), + BouncerConfig::max(), ); // Map starknet_api transaction to blockifier's - let blockifier_tx = match transaction { - SNTransaction::Invoke(tx) => { - let invoke = InvokeTransaction { - tx: starknet_api::executable_transaction::InvokeTransaction { tx, tx_hash }, - only_query: false, - }; - AccountTransaction::Invoke(invoke) - } - SNTransaction::DeployAccount(tx) => { - let contract_address = calculate_contract_address( - tx.contract_address_salt(), - tx.class_hash(), - &tx.constructor_calldata(), - ContractAddress::default(), - ) - .unwrap(); - AccountTransaction::DeployAccount(DeployAccountTransaction { - only_query: false, - tx: starknet_api::executable_transaction::DeployAccountTransaction { - tx, - tx_hash, - contract_address, - }, - }) + let blockifier_tx = match tx { + SNTransaction::Invoke(_) | SNTransaction::DeployAccount(_) => { + BlockiTransaction::from_api(tx, tx_hash, None, None, None, false).unwrap() } - SNTransaction::Declare(tx) => { - // Fetch the contract_class from the next block (as we don't have it in the previous one) + SNTransaction::Declare(ref declare_tx) => { + let block_number = block_context.block_info().block_number; + let network = parse_to_rpc_chain(&block_context.chain_info().chain_id.to_string()); + // we need to retrieve the next block in order to get the contract_class let next_reader = RpcStateReader::new(network, block_number.next().unwrap()); - let contract_class = next_reader - .get_compiled_contract_class(tx.class_hash()) + .get_contract_class(&declare_tx.class_hash()) .unwrap(); - let class_info = calculate_class_info_for_testing(contract_class); - let declare = DeclareTransaction::new(tx, tx_hash, class_info).unwrap(); - AccountTransaction::Declare(declare) + BlockiTransaction::from_api(tx, tx_hash, Some(class_info), None, None, false).unwrap() } - SNTransaction::L1Handler(tx) => { - // As L1Hanlder is not an account transaction we execute it here and return the result - let blockifier_tx = L1HandlerTransaction { - tx, - tx_hash, - paid_fee_on_l1: starknet_api::transaction::Fee(u128::MAX), - }; - return ( - blockifier_tx - .execute(&mut state, &block_context, true, true) - .unwrap(), - trace, - receipt, - ); + SNTransaction::L1Handler(_) => { + BlockiTransaction::from_api(tx, tx_hash, None, Some(MAX_FEE), None, false).unwrap() } - SNTransaction::Deploy(_) => todo!(), + _ => todo!(), }; ( blockifier_tx - .execute(&mut state, &block_context, true, true) + .execute(&mut state, &block_context, false, true) .unwrap(), trace, receipt, ) } -fn calculate_class_info_for_testing(contract_class: ContractClass) -> ClassInfo { - let sierra_program_length = match contract_class { - ContractClass::V0(_) => 0, - ContractClass::V1(_) => 100, - ContractClass::V1Native(_) => 100, - }; - ClassInfo::new(&contract_class, sierra_program_length, 100).unwrap() +fn calculate_class_info_for_testing(contract_class: SNContractClass) -> ClassInfo { + match contract_class { + SNContractClass::Sierra(s) => { + let abi = s.abi.len(); + let program_length = s.sierra_program.len(); + + ClassInfo::new(&sierra_to_contact_class_v1(s).unwrap(), program_length, abi).unwrap() + } + SNContractClass::Legacy(l) => { + let abi = l.abi.clone().unwrap().len(); + + ClassInfo::new(&legacy_to_contract_class_v0(l).unwrap(), 0, abi).unwrap() + } + } } pub fn execute_tx_configurable_with_state( - tx_hash: &TransactionHash, + tx_hash: TransactionHash, tx: SNTransaction, block_info: BlockInfo, _skip_validate: bool, @@ -181,66 +158,39 @@ pub fn execute_tx_configurable_with_state( fee_token_addresses: fee_token_address, }; let mut versioned_constants = - VersionedConstants::latest_constants_with_overrides(u32::MAX, usize::MAX); + VersionedConstants::get_versioned_constants(VersionedConstantsOverrides { + validate_max_n_steps: u32::MAX, + invoke_tx_max_n_steps: u32::MAX, + max_recursion_depth: usize::MAX, + }); versioned_constants.disable_cairo0_redeclaration = false; let block_context = BlockContext::new( block_info, chain_info, versioned_constants, - BouncerConfig::empty(), + BouncerConfig::max(), ); // Get transaction before giving ownership of the reader let blockifier_tx = match tx { - SNTransaction::Invoke(tx) => { - let invoke = InvokeTransaction { - tx: starknet_api::executable_transaction::InvokeTransaction { - tx, - tx_hash: *tx_hash, - }, - only_query: false, - }; - AccountTransaction::Invoke(invoke) - } - SNTransaction::DeployAccount(tx) => { - let contract_address = calculate_contract_address( - tx.contract_address_salt(), - tx.class_hash(), - &tx.constructor_calldata(), - ContractAddress::default(), - ) - .unwrap(); - AccountTransaction::DeployAccount(DeployAccountTransaction { - only_query: false, - tx: starknet_api::executable_transaction::DeployAccountTransaction { - tx, - tx_hash: *tx_hash, - contract_address, - }, - }) + SNTransaction::Invoke(_) | SNTransaction::DeployAccount(_) => { + BlockiTransaction::from_api(tx, tx_hash, None, None, None, false).unwrap() } - SNTransaction::Declare(tx) => { + SNTransaction::Declare(ref declare_tx) => { let block_number = block_context.block_info().block_number; let network = parse_to_rpc_chain(&chain_id.to_string()); // we need to retrieve the next block in order to get the contract_class let next_reader = RpcStateReader::new(network, block_number.next().unwrap()); let contract_class = next_reader - .get_compiled_contract_class(tx.class_hash()) + .get_contract_class(&declare_tx.class_hash()) .unwrap(); let class_info = calculate_class_info_for_testing(contract_class); - let declare = DeclareTransaction::new(tx, *tx_hash, class_info).unwrap(); - AccountTransaction::Declare(declare) + BlockiTransaction::from_api(tx, tx_hash, Some(class_info), None, None, false).unwrap() } - SNTransaction::L1Handler(tx) => { - // As L1Hanlder is not an account transaction we execute it here and return the result - let blockifier_tx = L1HandlerTransaction { - tx, - tx_hash: *tx_hash, - paid_fee_on_l1: starknet_api::transaction::Fee(u128::MAX), - }; - return blockifier_tx.execute(state, &block_context, charge_fee, true); + SNTransaction::L1Handler(_) => { + BlockiTransaction::from_api(tx, tx_hash, None, Some(MAX_FEE), None, false).unwrap() } _ => unimplemented!(), }; @@ -260,7 +210,7 @@ pub fn execute_tx_configurable( let tx = state.state.get_transaction(&tx_hash).unwrap(); let block_info = state.state.get_block_info().unwrap(); let blockifier_exec_info = execute_tx_configurable_with_state( - &tx_hash, + tx_hash, tx, block_info, skip_validate, @@ -282,54 +232,38 @@ pub fn execute_tx_with_blockifier( transaction: SNTransaction, transaction_hash: TransactionHash, ) -> TransactionExecutionResult { - let account_transaction: AccountTransaction = match transaction { - SNTransaction::Invoke(tx) => { - let invoke = InvokeTransaction { - tx: starknet_api::executable_transaction::InvokeTransaction { - tx, - tx_hash: transaction_hash, - }, - only_query: false, - }; - AccountTransaction::Invoke(invoke) - } - SNTransaction::DeployAccount(tx) => { - let contract_address = calculate_contract_address( - tx.contract_address_salt(), - tx.class_hash(), - &tx.constructor_calldata(), - ContractAddress::default(), - ) - .unwrap(); - AccountTransaction::DeployAccount(DeployAccountTransaction { - only_query: false, - tx: starknet_api::executable_transaction::DeployAccountTransaction { - tx, - tx_hash: transaction_hash, - contract_address, - }, - }) + let account_transaction: BlockiTransaction = match transaction { + SNTransaction::Invoke(_) | SNTransaction::DeployAccount(_) => { + BlockiTransaction::from_api(transaction, transaction_hash, None, None, None, false)? } - SNTransaction::Declare(tx) => { - let contract_class = state - .state - .get_compiled_contract_class(tx.class_hash()) - .unwrap(); - - let class_info = calculate_class_info_for_testing(contract_class); - - let declare = DeclareTransaction::new(tx, transaction_hash, class_info).unwrap(); - AccountTransaction::Declare(declare) - } - SNTransaction::L1Handler(tx) => { + // SNTransaction::Declare(ref declare_tx) => { + // let block_number = context.block_info().block_number; + // let network = parse_to_rpc_chain(&context.chain_info().chain_id.to_string()); + // // we need to retrieve the next block in order to get the contract_class + // let contract_class = state + // .get_compiled_class(&declare_tx.class_hash()) + // .unwrap(); + // let class_info = calculate_class_info_for_testing(contract_class); + + // BlockiTransaction::from_api( + // transaction, + // transaction_hash, + // Some(class_info), + // None, + // None, + // false, + // )? + // } + SNTransaction::L1Handler(_) => { // As L1Hanlder is not an account transaction we execute it here and return the result - let account_transaction = L1HandlerTransaction { - tx, - tx_hash: transaction_hash, - paid_fee_on_l1: starknet_api::transaction::Fee(u128::MAX), - }; - - return account_transaction.execute(state, &context, true, true); + BlockiTransaction::from_api( + transaction, + transaction_hash, + None, + Some(MAX_FEE), + None, + false, + )? } _ => unimplemented!(), }; @@ -349,7 +283,11 @@ fn parse_to_rpc_chain(network: &str) -> RpcChain { pub fn fetch_block_context(reader: &RpcStateReader) -> BlockContext { let block_info = reader.get_block_info().unwrap(); let mut versioned_constants = - VersionedConstants::latest_constants_with_overrides(u32::MAX, usize::MAX); + VersionedConstants::get_versioned_constants(VersionedConstantsOverrides { + validate_max_n_steps: u32::MAX, + invoke_tx_max_n_steps: u32::MAX, + max_recursion_depth: usize::MAX, + }); versioned_constants.disable_cairo0_redeclaration = false; let fee_token_addresses = FeeTokenAddresses { @@ -372,7 +310,7 @@ pub fn fetch_block_context(reader: &RpcStateReader) -> BlockContext { fee_token_addresses, }, versioned_constants, - BouncerConfig::empty(), + BouncerConfig::max(), ) } @@ -382,11 +320,14 @@ mod tests { use blockifier::{ execution::call_info::CallInfo, + fee::resources::{StarknetResources, StateResources}, state::cached_state::StateChangesCount, - transaction::objects::{GasVector, StarknetResources}, }; use pretty_assertions_sorted::assert_eq_sorted; - use starknet_api::block::BlockNumber; + use starknet_api::{ + block::BlockNumber, + execution_resources::{GasAmount, GasVector}, + }; use test_case::test_case; use super::*; @@ -408,9 +349,8 @@ mod tests { // To reexecute a transaction, we must use the state from its previous block let previous_block = BlockNumber(block_number - 1); let (tx_info, trace, _) = execute_tx(hash, chain, previous_block); - assert_eq!( - tx_info.revert_error, + tx_info.revert_error.map(|r| r.to_string()), trace.execute_invocation.unwrap().revert_reason ); @@ -600,7 +540,7 @@ mod tests { "0x04ba569a40a866fd1cbb2f3d3ba37ef68fb91267a4931a377d6acc6e5a854f9a", 648462, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 192, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(192), l2_gas: GasAmount(0) }, 7, 3, 0, @@ -611,13 +551,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 1, }, - false + false, + 1 )] #[test_case( "0x0355059efee7a38ba1fd5aef13d261914608dce7bdfacad92a71e396f0ad7a77", 661815, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 320, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(320), l2_gas: GasAmount(0) }, 9, 2, 0, @@ -628,13 +569,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 2, }, - false + false, + 0 )] #[test_case( "0x05324bac55fb9fb53e738195c2dcc1e7fed1334b6db824665e3e984293bec95e", 662246, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 320, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(320), l2_gas: GasAmount(0) }, 9, 2, 0, @@ -645,13 +587,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 2, }, - false + false, + 1 )] #[test_case( "0x670321c71835004fcab639e871ef402bb807351d126ccc4d93075ff2c31519d", 654001, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 320, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(320), l2_gas: GasAmount(0) }, 7, 2, 0, @@ -662,13 +605,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 2, }, - false + false, + 0 )] #[test_case( "0x06962f11a96849ebf05cd222313858a93a8c5f300493ed6c5859dd44f5f2b4e3", 654770, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 320, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(320), l2_gas: GasAmount(0) }, 7, 2, 0, @@ -679,13 +623,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 2, }, - false + false, + 1 )] #[test_case( "0x078b81326882ecd2dc6c5f844527c3f33e0cdb52701ded7b1aa4d220c5264f72", 653019, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 640, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(640), l2_gas: GasAmount(0) }, 28, 2, 0, @@ -696,13 +641,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 3, }, - false + false, + 0 )] #[test_case( "0x0780e3a498b4fd91ab458673891d3e8ee1453f9161f4bfcb93dd1e2c91c52e10", 650558, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 448, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(448), l2_gas: GasAmount(0) }, 24, 3, 0, @@ -713,13 +659,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 3, }, - false + false, + 2 )] #[test_case( "0x4f552c9430bd21ad300db56c8f4cae45d554a18fac20bf1703f180fac587d7e", 351226, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 128, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(128), l2_gas: GasAmount(0) }, 3, 0, 0, @@ -730,13 +677,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 0, }, - false + false, + 0 )] #[test_case( "0x176a92e8df0128d47f24eebc17174363457a956fa233cc6a7f8561bfbd5023a", 317093, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 128, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(128), l2_gas: GasAmount(0) }, 6, 2, 0, @@ -747,13 +695,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 1, }, - false + false, + 0 )] #[test_case( "0x026c17728b9cd08a061b1f17f08034eb70df58c1a96421e73ee6738ad258a94c", 169929, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 128, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(128), l2_gas: GasAmount(0) }, 8, 2, 0, @@ -764,13 +713,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 1, }, - false + false, + 0 )] #[test_case( "0x73ef9cde09f005ff6f411de510ecad4cdcf6c4d0dfc59137cff34a4fc74dfd", 654001, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 128, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(128), l2_gas: GasAmount(0) }, 5, 0, 0, @@ -781,13 +731,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 0, }, - false + false, + 1 )] #[test_case( "0x0743092843086fa6d7f4a296a226ee23766b8acf16728aef7195ce5414dc4d84", 186549, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 384, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(384), l2_gas: GasAmount(0) }, 7, 2, 0, @@ -798,13 +749,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 2, }, - false + false, + 1 )] #[test_case( "0x066e1f01420d8e433f6ef64309adb1a830e5af0ea67e3d935de273ca57b3ae5e", 662252, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 448, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(448), l2_gas: GasAmount(0) }, 18, 2, 0, @@ -815,7 +767,8 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 2, }, - false + false, + 0 )] // Check this tx, l1_data_gas should be 384 // https://starkscan.co/tx/0x04756d898323a8f884f5a6aabd6834677f4bbaeecc2522f18b3ae45b3f99cd1e @@ -823,7 +776,7 @@ mod tests { "0x04756d898323a8f884f5a6aabd6834677f4bbaeecc2522f18b3ae45b3f99cd1e", 662250, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 128, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(128), l2_gas: GasAmount(0) }, 10, 2, 0, @@ -834,13 +787,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 1, }, - false + false, + 0 )] #[test_case( "0x00f390691fd9e865f5aef9c7cc99889fb6c2038bc9b7e270e8a4fe224ccd404d", 662251, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 256, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(256), l2_gas: GasAmount(0) }, 12, 5, 0, @@ -851,13 +805,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 2, }, - false + false, + 1 )] #[test_case( "0x26be3e906db66973de1ca5eec1ddb4f30e3087dbdce9560778937071c3d3a83", 351269, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 128, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(128), l2_gas: GasAmount(0) }, 3, 0, 0, @@ -868,13 +823,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 0, }, - false + false, + 0 )] #[test_case( "0x0310c46edc795c82c71f600159fa9e6c6540cb294df9d156f685bfe62b31a5f4", 662249, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 640, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(640), l2_gas: GasAmount(0) }, 37, 2, 0, @@ -885,13 +841,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 3, }, - false + false, + 0 )] #[test_case( "0x06a09ffbf996178ac6e90101047e42fe29cb7108573b2ecf4b0ebd2cba544cb4", 662248, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 384, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(384), l2_gas: GasAmount(0) }, 4, 2, 0, @@ -902,13 +859,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 2, }, - false + false, + 0 )] #[test_case( "0x026e04e96ba1b75bfd066c8e138e17717ecb654909e6ac24007b644ac23e4b47", 536893, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 896, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(896), l2_gas: GasAmount(0) }, 24, 4, 0, @@ -919,13 +877,14 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 4, }, - false + false, + 1 )] #[test_case( "0x01351387ef63fd6fe5ec10fa57df9e006b2450b8c68d7eec8cfc7d220abc7eda", 644700, RpcChain::MainNet, - GasVector { l1_gas: 0, l1_data_gas: 128, l2_gas: 0 }, + GasVector { l1_gas: GasAmount(0), l1_data_gas: GasAmount(128), l2_gas: GasAmount(0) }, 8, 2, 0, @@ -936,7 +895,8 @@ mod tests { n_compiled_class_hash_updates: 0, n_modified_contracts: 1, }, - true + true, + 0 )] #[allow(clippy::too_many_arguments)] fn test_transaction_info( @@ -950,26 +910,28 @@ mod tests { l1_handler_payload_size: Option, starknet_chg: StateChangesCount, is_reverted: bool, + n_allocated_keys: usize, ) { let previous_block = BlockNumber(block_number - 1); let (tx_info, _, _) = execute_tx(hash, chain, previous_block); - let tx_receipt = tx_info.receipt; - let starknet_resources = tx_receipt.resources.starknet_resources; - let callinfo_iter = match tx_info.execute_call_info { - Some(c) => vec![c], - None => vec![CallInfo::default()], // there's no call info, so we take the default value to have all of it's atributes set to 0 - }; + let starknet_resources = tx_info.clone().receipt.resources.starknet_resources; + let versioned_constants = + VersionedConstants::get_versioned_constants(VersionedConstantsOverrides { + validate_max_n_steps: u32::MAX, + invoke_tx_max_n_steps: u32::MAX, + max_recursion_depth: usize::MAX, + }); + let state_resources = StateResources::new_for_testing(starknet_chg, n_allocated_keys); let starknet_rsc = StarknetResources::new( calldata_length, signature_length, code_size, - starknet_chg, + state_resources, l1_handler_payload_size, - callinfo_iter.iter(), + tx_info.summarize(&versioned_constants), ); - assert_eq!(is_reverted, tx_info.revert_error.is_some()); - assert_eq!(da_gas, tx_receipt.da_gas); + assert_eq!(da_gas, tx_info.receipt.da_gas); assert_eq!(starknet_rsc, starknet_resources); } @@ -1013,7 +975,7 @@ mod tests { assert!( !execution_info.is_reverted(), "{:?}", - execution_info.revert_error.unwrap_or_default() + execution_info.revert_error.unwrap() ) })); } diff --git a/rpc-state-reader/src/lib.rs b/rpc-state-reader/src/lib.rs index bff2b19e..13ede189 100644 --- a/rpc-state-reader/src/lib.rs +++ b/rpc-state-reader/src/lib.rs @@ -9,7 +9,7 @@ mod tests { use pretty_assertions_sorted::{assert_eq, assert_eq_sorted}; use starknet_api::{ class_hash, - core::{ClassHash, ContractAddress, Nonce, PatriciaKey}, + core::{ContractAddress, Nonce}, felt, hash::StarkHash, patricia_key, diff --git a/rpc-state-reader/src/objects.rs b/rpc-state-reader/src/objects.rs index e9757fd9..a2b471ba 100644 --- a/rpc-state-reader/src/objects.rs +++ b/rpc-state-reader/src/objects.rs @@ -4,13 +4,15 @@ use cairo_vm::vm::runners::cairo_runner::ExecutionResources; use serde::{Deserialize, Serialize}; use starknet_api::{ - block::BlockStatus, + block::{BlockHash, BlockNumber, BlockStatus, BlockTimestamp}, + core::{ContractAddress, GlobalRoot}, + data_availability::L1DataAvailabilityMode, hash::StarkHash, transaction::{ - Event, Fee, MessageToL1, Transaction, TransactionExecutionStatus, TransactionHash, + fields::Fee, Event, MessageToL1, Transaction, TransactionExecutionStatus, TransactionHash, }, }; -use starknet_gateway::rpc_objects::BlockHeader; +use starknet_gateway::rpc_objects::ResourcePrice; #[derive(Debug, Deserialize, Clone, Eq, PartialEq)] pub struct RpcTransactionTrace { @@ -58,6 +60,20 @@ pub struct FeePayment { // The following structures are taken from https://github.com/starkware-libs/sequencer, // but modified to suit our particular needs. +#[derive(Debug, Deserialize, Serialize)] +pub struct BlockHeader { + pub block_hash: BlockHash, + pub parent_hash: BlockHash, + pub block_number: BlockNumber, + pub sequencer_address: ContractAddress, + pub new_root: GlobalRoot, + pub timestamp: BlockTimestamp, + pub l1_gas_price: ResourcePrice, + pub l1_data_gas_price: ResourcePrice, + pub l1_da_mode: L1DataAvailabilityMode, + pub starknet_version: String, +} + #[derive(Debug, Deserialize, Serialize)] pub struct BlockWithTxHahes { #[serde(skip_serializing_if = "Option::is_none")] diff --git a/rpc-state-reader/src/reader.rs b/rpc-state-reader/src/reader.rs index 5c9ffbbc..158a7a8a 100644 --- a/rpc-state-reader/src/reader.rs +++ b/rpc-state-reader/src/reader.rs @@ -1,25 +1,28 @@ use std::{ env, fmt, - num::NonZeroU128, sync::Arc, thread, time::{Duration, Instant}, }; use blockifier::{ - blockifier::block::{BlockInfo, GasPrices}, - execution::contract_class::{ - ContractClass, ContractClassV0, ContractClassV0Inner, NativeContractClassV1, + blockifier::block::validated_gas_prices, + execution::{ + contract_class::{ + CompiledClassV0, CompiledClassV0Inner, CompiledClassV1, RunnableCompiledClass, + }, + native::contract_class::NativeCompiledClassV1, }, state::state_api::{StateReader, StateResult}, }; +use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; use cairo_lang_utils::bigint::BigUintAsHex; use cairo_vm::types::program::Program; use serde::Serialize; use serde_json::Value; use starknet::core::types::ContractClass as SNContractClass; use starknet_api::{ - block::{BlockNumber, GasPrice}, + block::{BlockInfo, BlockNumber, GasPrice, NonzeroGasPrice}, core::{ChainId, ClassHash, CompiledClassHash, ContractAddress, Nonce}, state::StorageKey, transaction::{Transaction, TransactionHash}, @@ -28,8 +31,7 @@ use starknet_gateway::{ config::RpcStateReaderConfig, errors::{serde_err_to_state_err, RPCStateReaderError, RPCStateReaderResult}, rpc_objects::{ - BlockHeader, GetBlockWithTxHashesParams, GetClassHashAtParams, GetNonceParams, - GetStorageAtParams, + GetBlockWithTxHashesParams, GetClassHashAtParams, GetNonceParams, GetStorageAtParams, }, rpc_state_reader::RpcStateReader as GatewayRpcStateReader, }; @@ -37,7 +39,10 @@ use tracing::{info, info_span}; use ureq::json; use crate::{ - objects::{self, BlockWithTxHahes, BlockWithTxs, RpcTransactionReceipt, RpcTransactionTrace}, + objects::{ + self, BlockHeader, BlockWithTxHahes, BlockWithTxs, RpcTransactionReceipt, + RpcTransactionTrace, + }, utils, }; @@ -145,8 +150,8 @@ impl RpcStateReader { pub fn get_block_info(&self) -> StateResult { // This function is inspired by sequencer's RpcStateReader::get_block_info - fn parse_gas_price(price: GasPrice) -> NonZeroU128 { - NonZeroU128::new(price.0).unwrap_or(NonZeroU128::MIN) + fn parse_gas_price(price: GasPrice) -> NonzeroGasPrice { + NonzeroGasPrice::new(price).unwrap_or(NonzeroGasPrice::MIN) } let params = GetBlockWithTxHashesParams { @@ -162,13 +167,13 @@ impl RpcStateReader { block_number: header.block_number, sequencer_address: header.sequencer_address, block_timestamp: header.timestamp, - gas_prices: GasPrices::new( + gas_prices: validated_gas_prices( parse_gas_price(header.l1_gas_price.price_in_wei), parse_gas_price(header.l1_gas_price.price_in_fri), parse_gas_price(header.l1_data_gas_price.price_in_wei), parse_gas_price(header.l1_data_gas_price.price_in_fri), - NonZeroU128::MIN, - NonZeroU128::MIN, + NonzeroGasPrice::MIN, + NonzeroGasPrice::MIN, ), use_kzg_da: true, }) @@ -288,7 +293,7 @@ impl StateReader for RpcStateReader { } } - fn get_compiled_contract_class(&self, class_hash: ClassHash) -> StateResult { + fn get_compiled_class(&self, class_hash: ClassHash) -> StateResult { Ok(match self.get_contract_class(&class_hash)? { SNContractClass::Legacy(compressed_legacy_cc) => { compile_legacy_cc(compressed_legacy_cc) @@ -307,7 +312,7 @@ impl StateReader for RpcStateReader { fn compile_sierra_cc( flattened_sierra_cc: starknet::core::types::FlattenedSierraClass, class_hash: ClassHash, -) -> ContractClass { +) -> RunnableCompiledClass { let middle_sierra: utils::MiddleSierraContractClass = { let v = serde_json::to_value(flattened_sierra_cc).unwrap(); serde_json::from_value(v).unwrap() @@ -343,26 +348,28 @@ fn compile_sierra_cc( "vm contract compilation finished" ); - ContractClass::V1(casm_cc.try_into().unwrap()) + RunnableCompiledClass::V1(casm_cc.try_into().unwrap()) } else { let executor = utils::get_native_executor(&sierra_cc, class_hash); + let casm = CasmContractClass::from_contract_class(sierra_cc, false, usize::MAX).unwrap(); + let casm = CompiledClassV1::try_from(casm).unwrap(); - ContractClass::V1Native(NativeContractClassV1::new(executor, sierra_cc).unwrap()) + RunnableCompiledClass::V1Native(NativeCompiledClassV1::new(executor, casm)) } } fn compile_legacy_cc( compressed_legacy_cc: starknet::core::types::CompressedLegacyContractClass, -) -> ContractClass { +) -> RunnableCompiledClass { let as_str = utils::decode_reader(compressed_legacy_cc.program).unwrap(); let program = Program::from_bytes(as_str.as_bytes(), None).unwrap(); let entry_points_by_type = utils::map_entry_points_by_type_legacy(compressed_legacy_cc.entry_points_by_type); - let inner = Arc::new(ContractClassV0Inner { + let inner = Arc::new(CompiledClassV0Inner { program, entry_points_by_type, }); - ContractClass::V0(ContractClassV0(inner)) + RunnableCompiledClass::V0(CompiledClassV0(inner)) } /// Retries the closure `MAX_RETRIES` times on RPC errors, @@ -395,7 +402,7 @@ fn bytecode_size(data: &[BigUintAsHex]) -> usize { #[cfg(test)] mod tests { - use std::num::NonZeroU128; + use starknet_api::block::FeeType; use super::*; @@ -406,10 +413,8 @@ mod tests { let block = reader.get_block_info().unwrap(); assert_eq!( - block - .gas_prices - .get_l1_gas_price_by_fee_type(&blockifier::transaction::objects::FeeType::Eth), - NonZeroU128::new(22804578690).unwrap() + block.gas_prices.l1_gas_price(&FeeType::Eth).get().0, + 22804578690 ); } diff --git a/rpc-state-reader/src/utils.rs b/rpc-state-reader/src/utils.rs index ec72b093..81c8308d 100644 --- a/rpc-state-reader/src/utils.rs +++ b/rpc-state-reader/src/utils.rs @@ -3,7 +3,7 @@ use std::{ fs, io::{self, Read}, path::PathBuf, - sync::{Arc, OnceLock, RwLock}, + sync::{OnceLock, RwLock}, time::Instant, }; @@ -13,8 +13,9 @@ use cairo_native::{executor::AotContractExecutor, OptLevel}; use serde::Deserialize; use starknet::core::types::{LegacyContractEntryPoint, LegacyEntryPointsByType}; use starknet_api::{ + contract_class::EntryPointType, core::{ClassHash, EntryPointSelector}, - deprecated_contract_class::{EntryPoint, EntryPointOffset, EntryPointType}, + deprecated_contract_class::{EntryPointOffset, EntryPointV0}, hash::StarkHash, }; use tracing::info; @@ -26,12 +27,12 @@ pub struct MiddleSierraContractClass { pub entry_points_by_type: ContractEntryPoints, } -static AOT_PROGRAM_CACHE: OnceLock>>> = +static AOT_PROGRAM_CACHE: OnceLock>> = OnceLock::new(); pub fn map_entry_points_by_type_legacy( entry_points_by_type: LegacyEntryPointsByType, -) -> HashMap> { +) -> HashMap> { let entry_types_to_points = HashMap::from([ ( EntryPointType::Constructor, @@ -41,9 +42,9 @@ pub fn map_entry_points_by_type_legacy( (EntryPointType::L1Handler, entry_points_by_type.l1_handler), ]); - let to_contract_entry_point = |entrypoint: &LegacyContractEntryPoint| -> EntryPoint { + let to_contract_entry_point = |entrypoint: &LegacyContractEntryPoint| -> EntryPointV0 { let felt: StarkHash = StarkHash::from_bytes_be(&entrypoint.selector.to_bytes_be()); - EntryPoint { + EntryPointV0 { offset: EntryPointOffset(entrypoint.offset as usize), selector: EntryPointSelector(felt), } @@ -71,13 +72,10 @@ pub fn decode_reader(bytes: Vec) -> io::Result { Ok(s) } -pub fn get_native_executor( - contract: &ContractClass, - class_hash: ClassHash, -) -> Arc { +pub fn get_native_executor(contract: &ContractClass, class_hash: ClassHash) -> AotContractExecutor { let cache_lock = AOT_PROGRAM_CACHE.get_or_init(|| RwLock::new(HashMap::new())); - let executor = cache_lock.read().unwrap().get(&class_hash).map(Arc::clone); + let executor = cache_lock.read().unwrap().get(&class_hash).cloned(); match executor { Some(executor) => executor, @@ -95,7 +93,7 @@ pub fn get_native_executor( } )); - let executor = Arc::new(if path.exists() { + let executor = if path.exists() { AotContractExecutor::load(&path).unwrap() } else { info!("starting native contract compilation"); @@ -121,9 +119,10 @@ pub fn get_native_executor( ); executor - }); + }; + + cache.insert(class_hash, executor.clone()); - cache.insert(class_hash, Arc::clone(&executor)); executor } }