diff --git a/Cargo.lock b/Cargo.lock index 724fa19..8fafdb5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -514,15 +514,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - [[package]] name = "bincode" version = "2.0.0-rc.3" @@ -655,7 +646,7 @@ dependencies = [ [[package]] name = "blockifier" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "anyhow", "ark-ec", @@ -670,6 +661,7 @@ dependencies = [ "cairo-vm", "derive_more 0.99.18", "indexmap 2.7.0", + "infra_utils", "itertools 0.12.1", "keccak", "log", @@ -686,6 +678,7 @@ dependencies = [ "serde", "serde_json", "sha2", + "stacker", "starknet-types-core", "starknet_api", "starknet_sierra_compile", @@ -699,7 +692,7 @@ dependencies = [ [[package]] name = "blockifier_reexecution" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "assert_matches", "blockifier", @@ -724,9 +717,9 @@ dependencies = [ [[package]] name = "bon" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9276fe602371cd8a7f70fe68c4db55b2d3e92c570627d6ed0427646edfa5cf47" +checksum = "f265cdb2e8501f1c952749e78babe8f1937be92c98120e5f78fc72d634682bad" dependencies = [ "bon-macros", "rustversion", @@ -734,9 +727,9 @@ dependencies = [ [[package]] name = "bon-macros" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94828b84b32b4f3ac3865f692fcdbc46c7d0dd87b29658a391d58a244e1ce45a" +checksum = "38aa5c627cd7706490e5b003d685f8b9d69bc343b1a00b9fdd01e75fdf6827cf" dependencies = [ "darling 0.20.10", "ident_case", @@ -759,9 +752,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" +checksum = "786a307d683a5bf92e6fd5fd69a7eb613751668d1d8d67d802846dfe367c62c8" dependencies = [ "memchr", "serde", @@ -1306,9 +1299,9 @@ dependencies = [ [[package]] name = "cairo-lang-syntax-codegen" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80bede54808f2e5d26a8702711009eefe4a12e5a8f3a427ba9b081073c8e9d36" +checksum = "fd7990586c9bb37eaa875ffeb218bdecf96f87881d03263ebf84fcd46514ca9f" dependencies = [ "genco", "xshell", @@ -1446,7 +1439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58363ad8065ed891e3b14a8191b707677c7c7cb5b9d10030822506786d8d8108" dependencies = [ "anyhow", - "bincode 2.0.0-rc.3", + "bincode", "bitvec", "generic-array", "hashbrown 0.14.5", @@ -1514,9 +1507,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.2" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" +checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf" dependencies = [ "jobserver", "libc", @@ -1540,9 +1533,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1724,18 +1717,18 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const_format" -version = "0.2.33" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c655d81ff1114fb0dcdea9225ea9f0cc712a6f8d189378e82bdf62a473a64b" +checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" dependencies = [ "const_format_proc_macros", ] [[package]] name = "const_format_proc_macros" -version = "0.2.33" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff1a44b93f47b1bac19a27932f5c591e43d1ba357ee4f61526c8a25603f0eb1" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" dependencies = [ "proc-macro2", "quote", @@ -2688,9 +2681,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "ff" @@ -3770,9 +3763,10 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "infra_utils" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "tokio", + "tracing", ] [[package]] @@ -3864,9 +3858,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ "once_cell", "wasm-bindgen", @@ -4155,9 +4149,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.167" +version = "0.2.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" +checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" [[package]] name = "libloading" @@ -4539,7 +4533,7 @@ dependencies = [ [[package]] name = "mempool_test_utils" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "assert_matches", "blockifier", @@ -4665,9 +4659,9 @@ dependencies = [ [[package]] name = "multihash" -version = "0.19.2" +version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc41f430805af9d1cf4adae4ed2149c759b877b01d909a1f40256188d09345d2" +checksum = "6b430e7953c29dd6a09afc29ff0bb69c6e306329ee6794700aee27b76a1aea8d" dependencies = [ "core2", "serde", @@ -5003,7 +4997,7 @@ dependencies = [ [[package]] name = "papyrus_common" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "base64 0.13.1", "cairo-lang-starknet-classes", @@ -5022,7 +5016,7 @@ dependencies = [ [[package]] name = "papyrus_config" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "clap", "infra_utils", @@ -5037,7 +5031,7 @@ dependencies = [ [[package]] name = "papyrus_execution" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "anyhow", "blockifier", @@ -5060,7 +5054,7 @@ dependencies = [ [[package]] name = "papyrus_network_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "libp2p", "serde", @@ -5069,7 +5063,7 @@ dependencies = [ [[package]] name = "papyrus_proc_macros" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "quote", "syn 2.0.90", @@ -5079,7 +5073,7 @@ dependencies = [ [[package]] name = "papyrus_rpc" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "anyhow", "async-trait", @@ -5113,7 +5107,7 @@ dependencies = [ [[package]] name = "papyrus_storage" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "byteorder", "cairo-lang-casm", @@ -5144,9 +5138,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", "bitvec", @@ -5578,6 +5572,15 @@ dependencies = [ "unarray", ] +[[package]] +name = "psm" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810" +dependencies = [ + "cc", +] + [[package]] name = "quick-protobuf" version = "0.8.1" @@ -5682,9 +5685,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ "bitflags 2.6.0", ] @@ -6077,15 +6080,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.41" +version = "0.38.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" dependencies = [ "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6102,9 +6105,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.19" +version = "0.23.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ "log", "once_cell", @@ -6338,9 +6341,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" dependencies = [ "serde", ] @@ -6359,18 +6362,18 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", @@ -6722,6 +6725,19 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "stacker" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "windows-sys 0.59.0", +] + [[package]] name = "starknet" version = "0.6.0" @@ -6950,7 +6966,7 @@ dependencies = [ [[package]] name = "starknet_api" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "bitvec", "cairo-lang-runner", @@ -6958,11 +6974,12 @@ dependencies = [ "derive_more 0.99.18", "hex", "indexmap 2.7.0", + "infra_utils", "itertools 0.12.1", "num-bigint", - "papyrus_proc_macros", "pretty_assertions", "primitive-types", + "semver", "serde", "serde_json", "sha3", @@ -6976,7 +6993,7 @@ dependencies = [ [[package]] name = "starknet_client" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "async-trait", "cairo-lang-starknet-classes", @@ -7003,7 +7020,7 @@ dependencies = [ [[package]] name = "starknet_gateway" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "async-trait", "axum", @@ -7031,7 +7048,7 @@ dependencies = [ [[package]] name = "starknet_gateway_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "async-trait", "axum", @@ -7050,7 +7067,7 @@ dependencies = [ [[package]] name = "starknet_mempool_types" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "async-trait", "papyrus_network_types", @@ -7064,14 +7081,15 @@ dependencies = [ [[package]] name = "starknet_sequencer_infra" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "async-trait", - "bincode 1.3.3", "hyper 0.14.31", "papyrus_config", "rstest", "serde", + "serde_json", + "starknet_api", "thiserror", "tokio", "tracing", @@ -7082,12 +7100,13 @@ dependencies = [ [[package]] name = "starknet_sierra_compile" version = "0.0.0" -source = "git+https://github.com/lambdaclass/sequencer.git?rev=2ad9ecad71bd71304b80c36992f41568c82313ad#2ad9ecad71bd71304b80c36992f41568c82313ad" +source = "git+https://github.com/lambdaclass/sequencer.git?rev=eb3d5537d2148262ce4dc8edbd7794ec030e017b#eb3d5537d2148262ce4dc8edbd7794ec030e017b" dependencies = [ "cairo-lang-sierra", "cairo-lang-starknet-classes", "cairo-lang-utils", "cairo-native", + "infra_utils", "papyrus_config", "serde", "serde_json", @@ -7884,7 +7903,7 @@ dependencies = [ "flate2", "log", "once_cell", - "rustls 0.23.19", + "rustls 0.23.20", "rustls-pki-types", "serde", "serde_json", @@ -8039,9 +8058,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if", "once_cell", @@ -8050,13 +8069,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn 2.0.90", @@ -8065,9 +8083,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.47" +version = "0.4.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" dependencies = [ "cfg-if", "js-sys", @@ -8078,9 +8096,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -8088,9 +8106,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", @@ -8101,9 +8119,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "wasm-streams" @@ -8120,9 +8138,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/Cargo.toml b/Cargo.toml index 95485b7..3f3c6bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ serde_with = "3.11.0" serde = "1.0.197" cairo-native = "0.2.4" # Sequencer Dependencies -starknet_api = { git = "https://github.com/lambdaclass/sequencer.git", rev = "2ad9ecad71bd71304b80c36992f41568c82313ad" } # replay -blockifier = { git = "https://github.com/lambdaclass/sequencer.git", rev = "2ad9ecad71bd71304b80c36992f41568c82313ad", features = ["cairo_native"] } # replay -starknet_gateway = { git = "https://github.com/lambdaclass/sequencer.git", rev = "2ad9ecad71bd71304b80c36992f41568c82313ad" } # replay -blockifier_reexecution = { git = "https://github.com/lambdaclass/sequencer.git", rev = "2ad9ecad71bd71304b80c36992f41568c82313ad" } # replay +starknet_api = { git = "https://github.com/lambdaclass/sequencer.git", rev = "eb3d5537d2148262ce4dc8edbd7794ec030e017b" } # replay +blockifier = { git = "https://github.com/lambdaclass/sequencer.git", rev = "eb3d5537d2148262ce4dc8edbd7794ec030e017b", features = ["cairo_native"] } # replay +starknet_gateway = { git = "https://github.com/lambdaclass/sequencer.git", rev = "eb3d5537d2148262ce4dc8edbd7794ec030e017b" } # replay +blockifier_reexecution = { git = "https://github.com/lambdaclass/sequencer.git", rev = "eb3d5537d2148262ce4dc8edbd7794ec030e017b" } # replay diff --git a/rpc-state-reader/src/execution.rs b/rpc-state-reader/src/execution.rs index fd2e464..345527a 100644 --- a/rpc-state-reader/src/execution.rs +++ b/rpc-state-reader/src/execution.rs @@ -7,6 +7,7 @@ use blockifier::{ context::{BlockContext, ChainInfo, FeeTokenAddresses}, state::{cached_state::CachedState, state_api::StateReader}, test_utils::MAX_FEE, + transaction::account_transaction::ExecutionFlags, transaction::{ objects::{TransactionExecutionInfo, TransactionExecutionResult}, transaction_execution::Transaction as BlockiTransaction, @@ -20,7 +21,7 @@ use blockifier_reexecution::state_reader::compile::{ use starknet::core::types::ContractClass as SNContractClass; use starknet_api::{ block::{BlockInfo, BlockNumber}, - contract_class::ClassInfo, + contract_class::{ClassInfo, SierraVersion}, core::ContractAddress, felt, hash::StarkHash, @@ -80,10 +81,16 @@ pub fn execute_tx( BouncerConfig::max(), ); + let exec_flags = ExecutionFlags { + charge_fee: false, + only_query: false, + validate: true, + }; + // Map starknet_api transaction to blockifier's let blockifier_tx = match tx { SNTransaction::Invoke(_) | SNTransaction::DeployAccount(_) => { - BlockiTransaction::from_api(tx, tx_hash, None, None, None, false).unwrap() + BlockiTransaction::from_api(tx, tx_hash, None, None, None, exec_flags).unwrap() } SNTransaction::Declare(ref declare_tx) => { let block_number = block_context.block_info().block_number; @@ -95,18 +102,17 @@ pub fn execute_tx( .unwrap(); let class_info = calculate_class_info_for_testing(contract_class); - BlockiTransaction::from_api(tx, tx_hash, Some(class_info), None, None, false).unwrap() + BlockiTransaction::from_api(tx, tx_hash, Some(class_info), None, None, exec_flags) + .unwrap() } SNTransaction::L1Handler(_) => { - BlockiTransaction::from_api(tx, tx_hash, None, Some(MAX_FEE), None, false).unwrap() + BlockiTransaction::from_api(tx, tx_hash, None, Some(MAX_FEE), None, exec_flags).unwrap() } _ => todo!(), }; ( - blockifier_tx - .execute(&mut state, &block_context, false, true) - .unwrap(), + blockifier_tx.execute(&mut state, &block_context).unwrap(), trace, receipt, ) @@ -117,13 +123,25 @@ fn calculate_class_info_for_testing(contract_class: SNContractClass) -> ClassInf 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() + let sierra_version = SierraVersion::extract_from_program(&s.sierra_program).unwrap(); + ClassInfo::new( + &sierra_to_contact_class_v1(s).unwrap(), + program_length, + abi, + sierra_version, + ) + .unwrap() } SNContractClass::Legacy(l) => { let abi = l.abi.clone().unwrap().len(); - ClassInfo::new(&legacy_to_contract_class_v0(l).unwrap(), 0, abi).unwrap() + ClassInfo::new( + &legacy_to_contract_class_v0(l).unwrap(), + 0, + abi, + SierraVersion::DEPRECATED, + ) + .unwrap() } } } @@ -172,10 +190,16 @@ pub fn execute_tx_configurable_with_state( BouncerConfig::max(), ); + let exec_flags = ExecutionFlags { + charge_fee, + only_query: false, + validate: true, + }; + // Get transaction before giving ownership of the reader let blockifier_tx = match tx { SNTransaction::Invoke(_) | SNTransaction::DeployAccount(_) => { - BlockiTransaction::from_api(tx, tx_hash, None, None, None, false).unwrap() + BlockiTransaction::from_api(tx, tx_hash, None, None, None, exec_flags).unwrap() } SNTransaction::Declare(ref declare_tx) => { let block_number = block_context.block_info().block_number; @@ -187,15 +211,16 @@ pub fn execute_tx_configurable_with_state( .unwrap(); let class_info = calculate_class_info_for_testing(contract_class); - BlockiTransaction::from_api(tx, tx_hash, Some(class_info), None, None, false).unwrap() + BlockiTransaction::from_api(tx, tx_hash, Some(class_info), None, None, exec_flags) + .unwrap() } SNTransaction::L1Handler(_) => { - BlockiTransaction::from_api(tx, tx_hash, None, Some(MAX_FEE), None, false).unwrap() + BlockiTransaction::from_api(tx, tx_hash, None, Some(MAX_FEE), None, exec_flags).unwrap() } _ => unimplemented!(), }; - blockifier_tx.execute(state, &block_context, charge_fee, true) + blockifier_tx.execute(state, &block_context) } pub fn execute_tx_configurable( @@ -232,10 +257,21 @@ pub fn execute_tx_with_blockifier( transaction: SNTransaction, transaction_hash: TransactionHash, ) -> TransactionExecutionResult { + let exec_flags = ExecutionFlags { + charge_fee: false, + only_query: false, + validate: true, + }; + let account_transaction: BlockiTransaction = match transaction { - SNTransaction::Invoke(_) | SNTransaction::DeployAccount(_) => { - BlockiTransaction::from_api(transaction, transaction_hash, None, None, None, false)? - } + SNTransaction::Invoke(_) | SNTransaction::DeployAccount(_) => BlockiTransaction::from_api( + transaction, + transaction_hash, + None, + None, + None, + exec_flags, + )?, // 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()); @@ -251,7 +287,7 @@ pub fn execute_tx_with_blockifier( // Some(class_info), // None, // None, - // false, + // exec_flags, // )? // } SNTransaction::L1Handler(_) => { @@ -262,13 +298,13 @@ pub fn execute_tx_with_blockifier( None, Some(MAX_FEE), None, - false, + exec_flags, )? } _ => unimplemented!(), }; - account_transaction.execute(state, &context, false, true) + account_transaction.execute(state, &context) } fn parse_to_rpc_chain(network: &str) -> RpcChain { @@ -316,17 +352,25 @@ pub fn fetch_block_context(reader: &RpcStateReader) -> BlockContext { #[cfg(test)] mod tests { - use std::thread; + use std::{ + collections::{HashMap, HashSet}, + thread, + }; use blockifier::{ - execution::call_info::CallInfo, + execution::call_info::{CallInfo, ChargedResources, EventSummary, ExecutionSummary}, fee::resources::{StarknetResources, StateResources}, state::cached_state::StateChangesCount, }; + use cairo_vm::{ + types::builtin_name::BuiltinName, vm::runners::cairo_runner::ExecutionResources, + }; use pretty_assertions_sorted::assert_eq_sorted; use starknet_api::{ block::BlockNumber, + class_hash, execution_resources::{GasAmount, GasVector}, + state::StorageKey, }; use test_case::test_case; @@ -552,7 +596,104 @@ mod tests { n_modified_contracts: 1, }, false, - 1 + 1, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 3035, + n_memory_holes: 74, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::pedersen, 4), + (BuiltinName::range_check, 75), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253"), + class_hash!("0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), + ), + StorageKey( + patricia_key!( + "0x558d16edafba7ea87e7b3e97642103a3b83511a8439f83d345c8cc1fb8c1cea" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x301976036fab639ccfd796c13864cd6988e6d0449b0ca749fd505b83d57fcc4" + ), + ), + StorageKey( + patricia_key!( + "0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x301976036fab639ccfd796c13864cd6988e6d0449b0ca749fd505b83d57fcc4" + ), + ), + StorageKey( + patricia_key!( + "0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" + ), + ), + StorageKey( + patricia_key!( + "0x558d16edafba7ea87e7b3e97642103a3b83511a8439f83d345c8cc1fb8c1ceb" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" + ), + ), + StorageKey( + patricia_key!( + "0x4531ecd0aefdd998d337d3dfc40af9bb3512edac441f2a31e0d499233086fec" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" + ), + ), + StorageKey( + patricia_key!( + "0x4531ecd0aefdd998d337d3dfc40af9bb3512edac441f2a31e0d499233086feb" + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 1, + total_event_keys: 1, + total_event_data_size: 4, + }, + } )] #[test_case( "0x0355059efee7a38ba1fd5aef13d261914608dce7bdfacad92a71e396f0ad7a77", @@ -570,7 +711,95 @@ mod tests { n_modified_contracts: 2, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 3457, + n_memory_holes: 26, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::pedersen, 4), + (BuiltinName::range_check, 74), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x309c042d3729173c7f2f91a34f04d8c509c1b292d334679ef1aabf8da0899cc"), + class_hash!("0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b"), + class_hash!("0x3530cc4759d78042f1b543bf797f5f3d647cde0388c33734cf91b7f7b9314a9"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!( + "0x269ea391a9c99cb6cee43ff589169f547cbc48d7554fdfbbfa7f97f516da700" + ), + ), + StorageKey( + patricia_key!( + "0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" + ), + ), + StorageKey( + patricia_key!( + "0x4009513ce606f0ec0973e1bd057b7a36ac14f1a203569e30713140e5c928dad" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" + ), + ), + StorageKey( + patricia_key!( + "0x4009513ce606f0ec0973e1bd057b7a36ac14f1a203569e30713140e5c928dac" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" + ), + ), + StorageKey( + patricia_key!( + "0x5460e3ada357c552adbe9fdd830aabe59b7a3b43284240fb606458be8c6e0a" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" + ), + ), + StorageKey( + patricia_key!( + "0x5460e3ada357c552adbe9fdd830aabe59b7a3b43284240fb606458be8c6e09" + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 2, + total_event_data_size: 7, + }, + } )] #[test_case( "0x05324bac55fb9fb53e738195c2dcc1e7fed1334b6db824665e3e984293bec95e", @@ -588,7 +817,95 @@ mod tests { n_modified_contracts: 2, }, false, - 1 + 1, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 3457, + n_memory_holes: 26, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::pedersen, 4), + (BuiltinName::range_check, 74), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918"), + class_hash!("0x33434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2"), + class_hash!("0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" + ), + ), + StorageKey( + patricia_key!( + "0x15ce587ff19a4baa941545deb4359e7d29b8ea3b224829a514425adbc5371d3" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" + ), + ), + StorageKey( + patricia_key!( + "0x15ce587ff19a4baa941545deb4359e7d29b8ea3b224829a514425adbc5371d2" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" + ), + ), + StorageKey( + patricia_key!( + "0x3aeff2c4fa75aace8f3974aa291ed288c2946cb2c89d3d45f43ec2e3d341266" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" + ), + ), + StorageKey( + patricia_key!( + "0x3aeff2c4fa75aace8f3974aa291ed288c2946cb2c89d3d45f43ec2e3d341267" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x69a7818562b608ce8c5d0039e7f6d1c6ee55f36978f633b151858d85c022d2f" + ), + ), + StorageKey( + patricia_key!( + "0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc" + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 2, + total_event_data_size: 7, + }, + } )] #[test_case( "0x670321c71835004fcab639e871ef402bb807351d126ccc4d93075ff2c31519d", @@ -606,7 +923,82 @@ mod tests { n_modified_contracts: 2, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 3938, + n_memory_holes: 63, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::pedersen, 4), + (BuiltinName::range_check, 76), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003"), + class_hash!("0x5ffbcfeb50d200a0677c48a129a11245a3fc519d1d98d76882d1c9a1b19c6ed"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!( + "0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8" + ), + ), + StorageKey( + patricia_key!( + "0x6e73f308bbb7e97d64ea61262979f73ade2cad94f7d2a8b9c4a9d6debbf27ef" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8" + ), + ), + StorageKey( + patricia_key!( + "0x547f8114927592559689f3723f98f995af7f74cbda36db122195f71cf3c2693" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8" + ), + ), + StorageKey( + patricia_key!( + "0x547f8114927592559689f3723f98f995af7f74cbda36db122195f71cf3c2692" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8" + ), + ), + StorageKey( + patricia_key!( + "0x6e73f308bbb7e97d64ea61262979f73ade2cad94f7d2a8b9c4a9d6debbf27ee" + ), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 3, + total_event_data_size: 7, + }, + } )] #[test_case( "0x06962f11a96849ebf05cd222313858a93a8c5f300493ed6c5859dd44f5f2b4e3", @@ -624,7 +1016,76 @@ mod tests { n_modified_contracts: 2, }, false, - 1 + 1, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 3411, + n_memory_holes: 30, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::pedersen, 4), + (BuiltinName::range_check, 76), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003"), + class_hash!("0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" + ), + ), + StorageKey( + patricia_key!( + "0xb1c927d569cd996d8f1c1b677ccee5bc7fe8e0f97f706d1cce28f5fd17b44d" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" + ), + ), + StorageKey( + patricia_key!( + "0xb1c927d569cd996d8f1c1b677ccee5bc7fe8e0f97f706d1cce28f5fd17b44e" + ), + ), + ), + ( + ContractAddress( + patricia_key!( + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" + ), + ), + StorageKey( + patricia_key!("0x26e662f47f90b15254e3da267636a7893da2164e73385b47acdf2605d70350b"), + ), + ), + ( + ContractAddress( + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), + ), + StorageKey( + patricia_key!("0x26e662f47f90b15254e3da267636a7893da2164e73385b47acdf2605d70350c"), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 3, + total_event_data_size: 7, + }, + } )] #[test_case( "0x078b81326882ecd2dc6c5f844527c3f33e0cdb52701ded7b1aa4d220c5264f72", @@ -642,7 +1103,305 @@ mod tests { n_modified_contracts: 3, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 45076, + n_memory_holes: 1809, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::pedersen, 39), + (BuiltinName::range_check, 1435), + (BuiltinName::segment_arena, 2), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x4f9849485e35f4a1c57d69b297feda94e743151f788202a6d731173babf4aec"), + class_hash!("0x7f3777c99f3700505ea966676aac4a0d692c2a9f5e667f4c606b51ca1dd3420"), + class_hash!("0x7b33a07ec099c227130ddffc9d74ad813fbcb8e0ff1c0f3ce097958e3dfc70b"), + class_hash!("0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253"), + class_hash!("0x5ffbcfeb50d200a0677c48a129a11245a3fc519d1d98d76882d1c9a1b19c6ed"), + class_hash!("0x4ac055f14361bb6f7bf4b9af6e96ca68825e6037e9bdf87ea0b2c641dea73ae"), + class_hash!("0x182dfcf12cf38789f5937a1b920f0513195131a408716224ac8273f371d9d0a"), + class_hash!("0x5ee939756c1a60b029c594da00e637bf5923bf04a86ff163e877e899c0840eb"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04863"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95e"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04864"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5a2c887b4759dcad85a9164f219f88ac0098570bf6dbb934fb24f95fc45220c"), + ), + StorageKey( + patricia_key!("0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04864"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x2a8ae95dddffb0c09b9e1d7dacea66d3d564bd00c190cd4c9660a7e8a555fb0"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), + ), + StorageKey( + patricia_key!("0x261d7b045ffcfe9aad8e2d16a5e9195fdd1ff58e84f6019048cf342c79501b2"), + ), + ), + ( + ContractAddress( + patricia_key!("0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f"), + ), + StorageKey( + patricia_key!("0xc157281c325105632605b5874203b6a26582ef61f9507a569aa5d2a7637cd7"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x493875a3926558b908441a8fd6642a9f5b85f7fc5e39289c3a83b72b2eca837"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x27171399f13c5078064c25dff40dadf2762e5c393b7154209964e7a80e04863"), + ), + ), + ( + ContractAddress( + patricia_key!("0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f"), + ), + StorageKey( + patricia_key!("0x2232b2e1d8025562b381e10d97d2aa29b0ba14ab2fb65abaf36ea6179ff1067"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), + ), + StorageKey( + patricia_key!("0x1f5dba4f0e386fe3e03022985e50076614214c29faad4f1a66fd553c39c47ed"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x493875a3926558b908441a8fd6642a9f5b85f7fc5e39289c3a83b72b2eca838"), + ), + ), + ( + ContractAddress( + patricia_key!("0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f"), + ), + StorageKey( + patricia_key!("0x2c98037748f28d346ea45305cb75d2b43b6a280f2bbf0a033fcdb7c23dacb94"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x1aa58c2130812a393a81be1c126ab39cc69de7d4cc9091535a3738bff6bca5a"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95e"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95d"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbd"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbe"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), + ), + StorageKey( + patricia_key!("0x587f8a359f3afbadaac7e3a22b5d00fa5f08794c82353701e04afb0485d8c1"), + ), + ), + ( + ContractAddress( + patricia_key!("0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f"), + ), + StorageKey( + patricia_key!("0x2dd61772d8928d37542f9463273c969d38b38efa4c26744578f0890f1534d3d"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), + ), + StorageKey( + patricia_key!("0x1bee0233b83cc233e905a16e35ad64d3720b430ffc95ac935ee81f1c2bb70a8"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), + ), + StorageKey( + patricia_key!("0x3e9df762c67f04c3d19de6f877d7906e3a52e992c3f97013dc2450ab7851c9"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), + ), + StorageKey( + patricia_key!("0x511270adbc9dd47783d90b9494051b71a2ca036eae8193fa3ea697266d1202"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), + ), + StorageKey( + patricia_key!("0x1f5dba4f0e386fe3e03022985e50076614214c29faad4f1a66fd553c39c47ee"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x2c40cfaa9c0aeba40ea0b8f5818e1a12c44c5e9c01c31beb8fd21f5dab2f95d"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5a2c887b4759dcad85a9164f219f88ac0098570bf6dbb934fb24f95fc45220c"), + ), + StorageKey( + patricia_key!("0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5ef8800d242c5d5e218605d6a10e81449529d4144185f95bf4b8fb669424516"), + ), + StorageKey( + patricia_key!("0x3e9df762c67f04c3d19de6f877d7906e3a52e992c3f97013dc2450ab7851ca"), + ), + ), + ( + ContractAddress( + patricia_key!("0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f"), + ), + StorageKey( + patricia_key!("0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbe"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x29e4f0fb421255927c6fe4a10d0d56fb9cad419f02b4456a1cebd6da07fabbd"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x2a8ae95dddffb0c09b9e1d7dacea66d3d564bd00c190cd4c9660a7e8a555fb1"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x1aa58c2130812a393a81be1c126ab39cc69de7d4cc9091535a3738bff6bca5b"), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 12, + total_event_keys: 12, + total_event_data_size: 58, + }, + } )] #[test_case( "0x0780e3a498b4fd91ab458673891d3e8ee1453f9161f4bfcb93dd1e2c91c52e10", @@ -660,7 +1419,116 @@ mod tests { n_modified_contracts: 3, }, false, - 2 + 2, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 7394, + n_memory_holes: 222, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::range_check, 272), + (BuiltinName::pedersen, 26), + (BuiltinName::poseidon, 1) + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x5ffbcfeb50d200a0677c48a129a11245a3fc519d1d98d76882d1c9a1b19c6ed"), + class_hash!("0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253"), + class_hash!("0x6312b8cc5222001e694fedc019c1160ff478ad6ae0fb066dc354b75bf9b5454"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!("0x784cdb1e85de7d857e859b4ad93b0cf2e354f9612e74fc19a1c4d0f4cfc5c3c"), + ), + StorageKey( + patricia_key!("0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463"), + ), + ), + ( + ContractAddress( + patricia_key!("0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007"), + ), + StorageKey( + patricia_key!("0x3e4e1993901faad3dd005be17839130abdccb4c36ab73f74dd3f05333e2b8ef"), + ), + ), + ( + ContractAddress( + patricia_key!("0x784cdb1e85de7d857e859b4ad93b0cf2e354f9612e74fc19a1c4d0f4cfc5c3c"), + ), + StorageKey( + patricia_key!("0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76"), + ), + ), + ( + ContractAddress( + patricia_key!("0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007"), + ), + StorageKey( + patricia_key!("0x3e4e1993901faad3dd005be17839130abdccb4c36ab73f74dd3f05333e2b8f0"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180"), + ), + StorageKey( + patricia_key!("0x75f128ea43bc75b11cb0532e6873df6e9398b11d788ffbdd600a4546e83c10d"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180"), + ), + StorageKey( + patricia_key!("0x6bd3a5ce5dcb97eaa770a5a3c9e4f5c752d99c61823a1d3d086688ee21a1247"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180"), + ), + StorageKey( + patricia_key!("0xb59f37c0f9d09ea41ec01867728e0af61d0339b945f7d193fd07f4f96cfee8"), + ), + ), + ( + ContractAddress( + patricia_key!("0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007"), + ), + StorageKey( + patricia_key!("0x6e568983c06797c6e39843d87ff5e9ae88dc8bec182bbbe3936a32647fc9a1a"), + ), + ), + ( + ContractAddress( + patricia_key!("0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007"), + ), + StorageKey( + patricia_key!("0x6e568983c06797c6e39843d87ff5e9ae88dc8bec182bbbe3936a32647fc9a19"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6e05b85d84a254faa07938b867b76aca1f1d95ebeb6bb44894c1d1912ec3180"), + ), + StorageKey( + patricia_key!("0x1a22f545ba9d916b44403905200f55b36377a2e761b2184577679b0d7f7bc94"), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 2, + total_event_data_size: 6, + }, + } )] #[test_case( "0x4f552c9430bd21ad300db56c8f4cae45d554a18fac20bf1703f180fac587d7e", @@ -678,7 +1546,107 @@ mod tests { n_modified_contracts: 0, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 8422, + n_memory_holes: 40, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::range_check, 161), + (BuiltinName::pedersen, 4), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x2760f25d5a4fb2bdde5f561fd0b44a3dee78c28903577d37d669939d97036a0"), + class_hash!("0x4f5bce5f70bb1fcf6573f68205d3e74538c46c14dc47d37bdbde4c1abaf4e1e"), + class_hash!("0xd0e183745e9dae3e4e78a8ffedcce0903fc4900beace4e0abf192d4c202da3"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), + ), + StorageKey( + patricia_key!("0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970"), + ), + ), + ( + ContractAddress( + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), + ), + StorageKey( + patricia_key!("0xc88ee7a00e0b95f1138ef53d396c4327eeed7f9677bbd02ce82a663537b1cf"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x45ef7281f1485fd8d0298fc971ec7f2f8cf67d18b32a5e2cc876c957753332b"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x1390569bb0a3a722eb4228e8700301347da081211d5c2ded2db22ef389551ab"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x45ef7281f1485fd8d0298fc971ec7f2f8cf67d18b32a5e2cc876c957753332c"), + ), + ), + ( + ContractAddress( + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), + ), + StorageKey( + patricia_key!("0x1dc79e2fd056704ede52dca5746b720269aaa5da53301dff546657c16ca07af"), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 2, + total_event_data_size: 7, + }, + } )] #[test_case( "0x176a92e8df0128d47f24eebc17174363457a956fa233cc6a7f8561bfbd5023a", @@ -696,7 +1664,32 @@ mod tests { n_modified_contracts: 1, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 2263, + n_memory_holes: 7, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::range_check, 38), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003"), + class_hash!("0x2d49ae8a5475e2185e6044592f034e85011d53e29b527b4ea35aed4063d9e44"), + ]), + visited_storage_entries: HashSet::new(), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 3, + total_event_data_size: 5, + }, + } )] #[test_case( "0x026c17728b9cd08a061b1f17f08034eb70df58c1a96421e73ee6738ad258a94c", @@ -714,7 +1707,42 @@ mod tests { n_modified_contracts: 1, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 2430, + n_memory_holes: 3, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::range_check, 39), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x33434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2"), + class_hash!("0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918"), + class_hash!("0x2d49ae8a5475e2185e6044592f034e85011d53e29b527b4ea35aed4063d9e44"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!("0x68826cd135a7ae273d26bf0b93de662db2e7dd0a6f765327b77c98a5d3b600d"), + ), + StorageKey( + patricia_key!("0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc"), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 2, + total_event_data_size: 5, + }, + } )] #[test_case( "0x73ef9cde09f005ff6f411de510ecad4cdcf6c4d0dfc59137cff34a4fc74dfd", @@ -732,7 +1760,90 @@ mod tests { n_modified_contracts: 0, }, false, - 1 + 1, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 3086, + n_memory_holes: 55, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::range_check, 72), + (BuiltinName::pedersen, 3), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x7f3777c99f3700505ea966676aac4a0d692c2a9f5e667f4c606b51ca1dd3420"), + class_hash!("0x358663e6ed9d37efd33d4661e20b2bad143e0f92076b0c91fe65f31ccf55046"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), + ), + StorageKey( + patricia_key!("0x290e00617050a68193b715654df85cc41c3b79f263373d66459c8a3d5780b46"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x77e2b393d935021c9cd33f5a6869ff1742f4e87bc38cc5ed18f10c9eb7fe8d9"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x1390569bb0a3a722eb4228e8700301347da081211d5c2ded2db22ef389551ab"), + ), + ), + ( + ContractAddress( + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), + ), + StorageKey( + patricia_key!("0xc88ee7a00e0b95f1138ef53d396c4327eeed7f9677bbd02ce82a663537b1cf"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x77e2b393d935021c9cd33f5a6869ff1742f4e87bc38cc5ed18f10c9eb7fe8d8"), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 4, + total_event_data_size: 6, + }, + } )] #[test_case( "0x0743092843086fa6d7f4a296a226ee23766b8acf16728aef7195ce5414dc4d84", @@ -750,7 +1861,108 @@ mod tests { n_modified_contracts: 2, }, false, - 1 + 1, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 39395, + n_memory_holes: 118, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::range_check, 1234), + (BuiltinName::pedersen, 9), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x4572af1cd59b8b91055ebb78df8f1d11c59f5270018b291366ba4585d4cdff0"), + class_hash!("0x33434ad846cdd5f23eb73ff09fe6fddd568284a0fb7d1be20ee482f044dabe2"), + class_hash!("0x7f7125c5958bf48de9d6a3ad045f845095d9572dc1a4b77da365f358c478cce"), + class_hash!("0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), + ), + StorageKey( + patricia_key!("0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0"), + ), + ), + ( + ContractAddress( + patricia_key!("0x8819d617fb205534ef545e2fcd15db7b2f43e98e65e242dad41ca4fe7d5256"), + ), + StorageKey( + patricia_key!("0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), + ), + StorageKey( + patricia_key!("0x28bbddb888b5f48fac1bfff91a9c86f45de0488d1418b204a4a77fddbf13d72"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), + ), + StorageKey( + patricia_key!("0x31b2db582739d919e49855d464d4ef21e6bfd0aa6db07d6f4cf006bf32ec7e8"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), + ), + StorageKey( + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), + ), + StorageKey( + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), + ), + StorageKey( + patricia_key!("0x20ddb4628d547df787159e32a15efecfbfb960110c425c74e6b35421adca448"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), + ), + StorageKey( + patricia_key!("0x28bbddb888b5f48fac1bfff91a9c86f45de0488d1418b204a4a77fddbf13d73"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6a05844a03bb9e744479e3298f54705a35966ab04140d3d8dd797c1f6dc49d0"), + ), + StorageKey( + patricia_key!("0x64adb0d4dfddace954f8460d8327cb16ec952a7221eaab02a02294c5aad7a63"), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 3, + total_event_keys: 3, + total_event_data_size: 10, + }, + } )] #[test_case( "0x066e1f01420d8e433f6ef64309adb1a830e5af0ea67e3d935de273ca57b3ae5e", @@ -768,7 +1980,133 @@ mod tests { n_modified_contracts: 2, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 30042, + n_memory_holes: 3584, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::range_check, 1369), + (BuiltinName::poseidon, 36), + (BuiltinName::pedersen, 3), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x589a40e9cd8784359c066db1adaf6cf0d92322ce579fc0c19739649beae132"), + class_hash!("0x3c8904d062171ab62c1f2e52e2b33299c305626a8f8a253a1544a6ad774121b"), + class_hash!("0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003"), + class_hash!("0x5dde112c893e2f5ed85b92a08d93cfa5579ce95d27afb34e47b7e7aad59c1c0"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x12ed0a68687678217e8e212e851aaaf26f24b745382184bac5b8f83e2089d09"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x1161aad19d349dc80ba5fb3bf52b82512f548b6631d4fc936347426e587f612"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x67ac2c2c96afe3312ea11413b2fdbf75b345d6f37dc435bc3e3fc2178780165"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x6c876061653ded49c5f4b2be528a17c0b99c707c36010da0dfdf7e86c88ed14"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x64cc83b312a847fec159095793816da6b9251610ebd55497d7e8fdbe0db5b8c"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x67ac2c2c96afe3312ea11413b2fdbf75b345d6f37dc435bc3e3fc2178780166"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x3eaa3e4be55bc8ada64d23f168b178d714a85ad9971bf1d5ff6bd6b703775dc"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x67ac2c2c96afe3312ea11413b2fdbf75b345d6f37dc435bc3e3fc2178780164"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x5602256700ad140f3346bd762776cec457aaa1a4c6597607818faa0f1086386"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x64cc83b312a847fec159095793816da6b9251610ebd55497d7e8fdbe0db5b8d"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x4a7ca3168783dab075bc552295fca05ea8d02a2bdeb461946b10187ef4b122d"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x4a7ca3168783dab075bc552295fca05ea8d02a2bdeb461946b10187ef4b122c"), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 5, + total_event_keys: 10, + total_event_data_size: 63, + }, + } )] // Check this tx, l1_data_gas should be 384 // https://starkscan.co/tx/0x04756d898323a8f884f5a6aabd6834677f4bbaeecc2522f18b3ae45b3f99cd1e @@ -788,7 +2126,74 @@ mod tests { n_modified_contracts: 1, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 8108, + n_memory_holes: 893, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::pedersen, 3), + (BuiltinName::range_check, 165), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x6551d5af6e4eb4fac2f9fea06948a49a6d12d924e43a63e6034a6a75e749577"), + class_hash!("0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), + ), + StorageKey( + patricia_key!("0x235a4d83b9b27bde6943b4e26301642f73f6fb6e5cda141734b02962b9d7f9d"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), + ), + StorageKey( + patricia_key!("0x291625bbd3d00024377934a31b5cdf6dfcc1e76776985889e17efb47b3ce2f0"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), + ), + StorageKey( + patricia_key!("0x1e44381b0f95a657a83284ece260c1948e6c965da4d357f7fbd6b557342cdc0"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), + ), + StorageKey( + patricia_key!("0x7d42c1838d13fa94d3f00304fe618766ad0ada8e0138966e8161b47a92c7e69"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), + ), + StorageKey( + patricia_key!("0x144978e3c7c8da8f54b97b4fa49320e49d8c70be0c35f42ba1e78465949d19c"), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 1, + total_event_keys: 2, + total_event_data_size: 4, + }, + } )] #[test_case( "0x00f390691fd9e865f5aef9c7cc99889fb6c2038bc9b7e270e8a4fe224ccd404d", @@ -806,7 +2211,100 @@ mod tests { n_modified_contracts: 2, }, false, - 1 + 1, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 8068, + n_memory_holes: 605, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::poseidon, 10), + (BuiltinName::range_check, 250), + (BuiltinName::pedersen, 1), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x36078334509b514626504edc9fb252328d1a240e4e948bef8d0c08dff45927f"), + class_hash!("0x5dde112c893e2f5ed85b92a08d93cfa5579ce95d27afb34e47b7e7aad59c1c0"), + class_hash!("0x7992c30dd1dc4ce93b44e37e3c48b37635ca31f16c8518e88e15ff5686face"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x79cd4284246c43115a8376850d14c1f78570cde561a096ad209a50f653d722f"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x5046041b2f3c48f2f3b7ed44f3d4233fd85427a20ac2dd9e7b23da551e06d2b"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x6164114d6518ebb3e8846b99c34c706b00f7bb475b3c5b8f67f85d336527162"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x79cd4284246c43115a8376850d14c1f78570cde561a096ad209a50f653d7231"), + ), + ), + ( + ContractAddress( + patricia_key!("0x1e637c300d7c105df1f620c34f08a99b0757f177f2d9d52a7a6d6a337f5cad6"), + ), + StorageKey( + patricia_key!("0x587f8a359f3afbadaac7e3a22b5d00fa5f08794c82353701e04afb0485d8c1"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x12ed0a68687678217e8e212e851aaaf26f24b745382184bac5b8f83e2089d09"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x79cd4284246c43115a8376850d14c1f78570cde561a096ad209a50f653d7230"), + ), + ), + ( + ContractAddress( + patricia_key!("0x422d33a3638dcc4c62e72e1d6942cd31eb643ef596ccac2351e0e21f6cd4bf4"), + ), + StorageKey( + patricia_key!("0x3117bb5a3b11d2eb8edb4980b76562d25525d1fcfa8f4873c0a2737a8e05ab6"), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 3, + total_event_keys: 5, + total_event_data_size: 15, + }, + } )] #[test_case( "0x26be3e906db66973de1ca5eec1ddb4f30e3087dbdce9560778937071c3d3a83", @@ -824,7 +2322,107 @@ mod tests { n_modified_contracts: 0, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 8414, + n_memory_holes: 44, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::pedersen, 4), + (BuiltinName::range_check, 161), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0xd0e183745e9dae3e4e78a8ffedcce0903fc4900beace4e0abf192d4c202da3"), + class_hash!("0x2760f25d5a4fb2bdde5f561fd0b44a3dee78c28903577d37d669939d97036a0"), + class_hash!("0x4f5bce5f70bb1fcf6573f68205d3e74538c46c14dc47d37bdbde4c1abaf4e1e"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970"), + ), + ), + ( + ContractAddress( + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), + ), + StorageKey( + patricia_key!("0xc88ee7a00e0b95f1138ef53d396c4327eeed7f9677bbd02ce82a663537b1cf"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455b"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x1390569bb0a3a722eb4228e8700301347da081211d5c2ded2db22ef389551ab"), + ), + ), + ( + ContractAddress( + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), + ), + StorageKey( + patricia_key!("0x5d2e9527cbeb1a51aa084b0de7501f343b7b1bf24a0c427d6204a7b7988970"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x1b9e3d38adfc69623b8d12acf32adfde1319fb40263927c8fc287371bc2d571"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x110e2f729c9c2b988559994a3daccd838cf52faf88e18101373e67dd061455a"), + ), + ), + ( + ContractAddress( + patricia_key!("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"), + ), + StorageKey( + patricia_key!("0x1b9e3d38adfc69623b8d12acf32adfde1319fb40263927c8fc287371bc2d570"), + ), + ), + ( + ContractAddress( + patricia_key!("0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82"), + ), + StorageKey( + patricia_key!("0x1dc79e2fd056704ede52dca5746b720269aaa5da53301dff546657c16ca07af"), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 2, + total_event_keys: 2, + total_event_data_size: 7, + }, + } )] #[test_case( "0x0310c46edc795c82c71f600159fa9e6c6540cb294df9d156f685bfe62b31a5f4", @@ -842,7 +2440,278 @@ mod tests { n_modified_contracts: 3, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 63180, + n_memory_holes: 8239, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::bitwise, 84), + (BuiltinName::pedersen, 79), + (BuiltinName::range_check, 4897), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x5fdb47de4edfd5983f6a82a1beeb1aab2b69d3674b90730aa1693d94d73f0d3"), + class_hash!("0x27067191f94e301b528b1624e7998d51606412522aab9621fb2c1899b983eeb"), + class_hash!("0x29927c8af6bccf3f6fda035981e765a7bdbf18a2dc0d630494f8758aa908e2b"), + class_hash!("0x3e8d67c8817de7a2185d418e88d321c89772a9722b752c6fe097192114621be"), + class_hash!("0x4ad3c1dc8413453db314497945b6903e1c766495a1e60492d44da9c2a986e4b"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x40dff85b22ceb4de5477d6577f334c914f8efefed9f5c892934c0f6e966ed7"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x174ca4d40ded1b191eeaafb8c222368024fdf0ac894af16ecb51b7ec8477901"), + ), + ), + ( + ContractAddress( + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), + ), + StorageKey( + patricia_key!("0x3a8d0fa789f88e7211b601b97145655c736104895afee9fba450449b3abed8e"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x3251cfd36c995a7f163e76498e247f8b2d61aeda83a746bd61d4e7da5fe5699"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x100000001"), + ), + ), + ( + ContractAddress( + patricia_key!("0x43e4f09c32d13d43a880e85f69f7de93ceda62d6cf2581a582c6db635548fdc"), + ), + StorageKey( + patricia_key!("0x60648f61481391ac1803a92eaa5009bc1438ef6e8d10598d265bf5829d312f5"), + ), + ), + ( + ContractAddress( + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), + ), + StorageKey( + patricia_key!("0x43e1ef374bc5f9e49c6c9764a9aac6e36bc8e3df0ca3bffb3cde5a0990ca369"), + ), + ), + ( + ContractAddress( + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), + ), + StorageKey( + patricia_key!("0x586729208869bc7ed12aa50c7a1834a1eef579d05efcc17ee1217a1722f9ba3"), + ), + ), + ( + ContractAddress( + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), + ), + StorageKey( + patricia_key!("0x4dbfe544ed63377b3d819a142e245f56921729b4c3e205f87e66b64af007236"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x3110bae189a1cca17a6da4ee778f0076e1ea99cefa11a9b532fe7c064deb948"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x45fb8ffc8b8d0d2521fdc1b3558fea0c43ed03911387994698ae9e504026d44"), + ), + ), + ( + ContractAddress( + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), + ), + StorageKey( + patricia_key!("0x3a8d0fa789f88e7211b601b97145655c736104895afee9fba450449b3abed8f"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x40dff85b22ceb4de5477d6577f334c914f8efefed9f5c892934c0f6e966ed6"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x1"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x0"), + ), + ), + ( + ContractAddress( + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), + ), + StorageKey( + patricia_key!("0x586729208869bc7ed12aa50c7a1834a1eef579d05efcc17ee1217a1722f9ba4"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x4428af60ea017cd8ac5a041f3777f8b2d7450f8474e471bcbae608cca7975ae"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x356fd6aa989033f329e6a5aceb143ba7d0667fd7f74fbbf9457080dd9352c0b"), + ), + ), + ( + ContractAddress( + patricia_key!("0x43e4f09c32d13d43a880e85f69f7de93ceda62d6cf2581a582c6db635548fdc"), + ), + StorageKey( + patricia_key!("0x281a85306374a5ab27f0bbc385296a54bcd314a1948b6cf61c4ea1bc44bb9f8"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x73ffd08441115d89e71906f927d21e18c97a612c56116b40280b8ee6ae5e1f6"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x100000000"), + ), + ), + ( + ContractAddress( + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), + ), + StorageKey( + patricia_key!("0x4dbfe544ed63377b3d819a142e245f56921729b4c3e205f87e66b64af007235"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x6aff514d3c14935bb84bfc2f5e443daa68c6b9af02150bce2904dc5cee89fb4"), + ), + ), + ( + ContractAddress( + patricia_key!("0x43e4f09c32d13d43a880e85f69f7de93ceda62d6cf2581a582c6db635548fdc"), + ), + StorageKey( + patricia_key!("0x60648f61481391ac1803a92eaa5009bc1438ef6e8d10598d265bf5829d312f4"), + ), + ), + ( + ContractAddress( + patricia_key!("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"), + ), + StorageKey( + patricia_key!("0x43e1ef374bc5f9e49c6c9764a9aac6e36bc8e3df0ca3bffb3cde5a0990ca36a"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x68153282240797844a90a332ec1b2eabf7d15c42ba228e0c249720e6914176f"), + ), + ), + ( + ContractAddress( + patricia_key!("0x4505a9f06f2bd639b6601f37a4dc0908bb70e8e0e0c34b1220827d64f4fc066"), + ), + StorageKey( + patricia_key!("0x281a85306374a5ab27f0bbc385296a54bcd314a1948b6cf61c4ea1bc44bb9f8"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x6267108c93bc853ce42efb890b0793116c50e5a98b13e024640da0d272115a8"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0x45fb8ffc8b8d0d2521fdc1b3558fea0c43ed03911387994698ae9e504026d43"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b"), + ), + StorageKey( + patricia_key!("0xd5ee72ce4ea000d334dd7d37bd432beb488d5ceae18a4a955e14901a851ec7"), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 9, + total_event_keys: 10, + total_event_data_size: 83, + }, + } )] #[test_case( "0x06a09ffbf996178ac6e90101047e42fe29cb7108573b2ecf4b0ebd2cba544cb4", @@ -860,7 +2729,98 @@ mod tests { n_modified_contracts: 2, }, false, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 3730, + n_memory_holes: 100, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::range_check, 78), + (BuiltinName::pedersen, 3), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x6551d5af6e4eb4fac2f9fea06948a49a6d12d924e43a63e6034a6a75e749577"), + class_hash!("0x816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), + ), + StorageKey( + patricia_key!("0x401109fe98501f72c01ea79ad5b48c227ec2706d706723cfec3fa5d4ba54c90"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), + ), + StorageKey( + patricia_key!("0x291625bbd3d00024377934a31b5cdf6dfcc1e76776985889e17efb47b3ce2f0"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), + ), + StorageKey( + patricia_key!("0x144978e3c7c8da8f54b97b4fa49320e49d8c70be0c35f42ba1e78465949d19c"), + ), + ), + ( + ContractAddress( + patricia_key!("0xce305af75e878121f5691150fdd386dff5af073f7e56f4882f62e02bb05a45"), + ), + StorageKey( + patricia_key!("0x282372af1ee63ce325edc788cde17330918ef2f8b9a33039b5bd8dcf192ec76"), + ), + ), + ( + ContractAddress( + patricia_key!("0xce305af75e878121f5691150fdd386dff5af073f7e56f4882f62e02bb05a45"), + ), + StorageKey( + patricia_key!("0x3779d024ee75b674955ff5025ec51faffd55610d2f586d2f7a4ce7b6b5d2463"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), + ), + StorageKey( + patricia_key!("0x1e44381b0f95a657a83284ece260c1948e6c965da4d357f7fbd6b557342cdc0"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), + ), + StorageKey( + patricia_key!("0x3db6ec55ed007baefa72e1ff639054f691cb3009b778edb59a37aa04690682c"), + ), + ), + ( + ContractAddress( + patricia_key!("0x6182278e63816ff4080ed07d668f991df6773fd13db0ea10971096033411b11"), + ), + StorageKey( + patricia_key!("0x235a4d83b9b27bde6943b4e26301642f73f6fb6e5cda141734b02962b9d7f9d"), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 1, + total_event_keys: 1, + total_event_data_size: 2, + }, + } )] #[test_case( "0x026e04e96ba1b75bfd066c8e138e17717ecb654909e6ac24007b644ac23e4b47", @@ -878,7 +2838,390 @@ mod tests { n_modified_contracts: 4, }, false, - 1 + 1, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 60919, + n_memory_holes: 975, + builtin_instance_counter: HashMap::from_iter([ + (BuiltinName::range_check, 1715), + (BuiltinName::pedersen, 43), + ]), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x5ad7636491f8a6b210c137e6191bc12daf31171b6c6e670fe1387697810403a"), + class_hash!("0xdb2ed00ec7872d4d093f3acb479d7ef2b56bcc7fc793707c1fb04ec66c6b10"), + class_hash!("0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003"), + class_hash!("0x26fe8ea36ec7703569cfe4693b05102940bf122647c4dbf0abc0bb919ce27bd"), + class_hash!("0x4c2a0ab0698957bd725745ff6dfdda0e874ade8681770fe8990016a6fa9cf04"), + class_hash!("0x2b39bc3f4c1fd5bef8b7d21504c44e0da59cf27b350551b13d913da52e40d3b"), + class_hash!("0x2580632f25bbee45da5a1a1ef49d03a984f78dde4019069aa9f25aac06f941a"), + class_hash!("0x7b5cd6a6949cc1730f89d795f2442f6ab431ea6c9a5be00685d50f97433c5eb"), + class_hash!("0x52c7ba99c77fc38dd3346beea6c0753c3471f2e3135af5bb837d6c9523fff62"), + class_hash!("0x7197021c108b0cc57ae354f5ad02222c4b3d7344664e6dd602a0e2298595434"), + class_hash!("0x64e7d628b1b2aa04a35fe6610b005689e8b591058f7f92bf4eb234e67cf403b"), + class_hash!("0x2760f25d5a4fb2bdde5f561fd0b44a3dee78c28903577d37d669939d97036a0"), + ]), + visited_storage_entries: HashSet::from_iter([ + ( + ContractAddress( + patricia_key!("0xdad44c139a476c7a17fc8141e6db680e9abc9f56fe249a105094c44382c2fd"), + ), + StorageKey( + patricia_key!("0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), + ), + StorageKey( + patricia_key!("0x3b3a699bb6ef37ff4b9c4e14319c7d8e9c9bdd10ff402d1ebde18c62ae58382"), + ), + ), + ( + ContractAddress( + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), + ), + StorageKey( + patricia_key!("0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa4f"), + ), + ), + ( + ContractAddress( + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), + ), + StorageKey( + patricia_key!("0x1c76cd4f3f79786d9e5d1298f47170de4bf0222337c680c5377ec772d3ce96b"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), + ), + StorageKey( + patricia_key!("0x3351bce4793f90e4aa00447357c2d34ac08611756193d8249009e0396dd7b41"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), + ), + StorageKey( + patricia_key!("0x34fea4b03b28c51f5bea6524bf41d06209d8306dc2376d4d730b14fea79ec8c"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x1c76cd4f3f79786d9e5d1298f47170de4bf0222337c680c5377ec772d3ce96b"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ad"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ac"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), + ), + StorageKey( + patricia_key!("0x3b3a699bb6ef37ff4b9c4e14319c7d8e9c9bdd10ff402d1ebde18c62ae58381"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa50"), + ), + ), + ( + ContractAddress( + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), + ), + StorageKey( + patricia_key!("0x7dd6927869f0f6501f10407d6de416a90d2272af189f8b24d12acc09c2df5e6"), + ), + ), + ( + ContractAddress( + patricia_key!("0xdad44c139a476c7a17fc8141e6db680e9abc9f56fe249a105094c44382c2fd"), + ), + StorageKey( + patricia_key!("0x5c722fd91dec49f67eb170afb8e7e54ebe6f35b6b7f4fec3fdd0bad96606126"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa4f"), + ), + ), + ( + ContractAddress( + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), + ), + StorageKey( + patricia_key!("0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d9"), + ), + ), + ( + ContractAddress( + patricia_key!("0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a"), + ), + StorageKey( + patricia_key!("0x119407278bb67ccb5306f7b08343c96f7b6933a06f3173067d21e98725a2b59"), + ), + ), + ( + ContractAddress( + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), + ), + StorageKey( + patricia_key!("0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d8"), + ), + ), + ( + ContractAddress( + patricia_key!("0x41fd22b238fa21cfcf5dd45a8548974d8263b3a531a60388411c5e230f97023"), + ), + StorageKey( + patricia_key!("0x139825585c3389ee852d93d2706b57d5bf8d4ba85922ef0689a691627211b05"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), + ), + StorageKey( + patricia_key!("0x2ec31623436b0fbcbbd71b2b3eed2887c8156077098a52a9256a9e0edb833f"), + ), + ), + ( + ContractAddress( + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), + ), + StorageKey( + patricia_key!("0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ac"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), + ), + StorageKey( + patricia_key!("0x1e6f3e4333da349f86a03f030be7f2c76d8266a97c625746ebb9d3220a39d87"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), + ), + StorageKey( + patricia_key!("0x57c60b189063035eed65879a14ad5f6e718027a212dafbe52f9bcd79e9f4fb"), + ), + ), + ( + ContractAddress( + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), + ), + StorageKey( + patricia_key!("0x6f4db3b80b3f05685fbb3cbcb6dc5a676c638925269901e02993ca6c121fa50"), + ), + ), + ( + ContractAddress( + patricia_key!("0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a"), + ), + StorageKey( + patricia_key!("0x2ded64caa8ae4aba3291cc1f172d4b8fda206d4d1b5660c7565e7461c727929"), + ), + ), + ( + ContractAddress( + patricia_key!("0x12f8e318fe04a1fe8bffe005ea4bbd19cb77a656b4f42682aab8a0ed20702f0"), + ), + StorageKey( + patricia_key!("0x5d6c55cbfbeaef29110e02a1f4a1228488feec6f59b3f2f77d24245272e799a"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x18d7b079b471cfde70d671fc55b3c06d4363cdc22201c09924822902a33e01a"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d9"), + ), + ), + ( + ContractAddress( + patricia_key!("0x41fd22b238fa21cfcf5dd45a8548974d8263b3a531a60388411c5e230f97023"), + ), + StorageKey( + patricia_key!("0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x18d7b079b471cfde70d671fc55b3c06d4363cdc22201c09924822902a33e019"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), + ), + StorageKey( + patricia_key!("0x57c60b189063035eed65879a14ad5f6e718027a212dafbe52f9bcd79e9f4fa"), + ), + ), + ( + ContractAddress( + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), + ), + StorageKey( + patricia_key!("0x3ad6945aa849b77ba309199d76ea4555be65368391ba450fab8ea6248431ea0"), + ), + ), + ( + ContractAddress( + patricia_key!("0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a"), + ), + StorageKey( + patricia_key!("0x1f7cb1620ff9ec226d1c4c618ea516ebdd5a65005c2f457158cdd0d4d77ab4b"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), + ), + StorageKey( + patricia_key!("0x2ec31623436b0fbcbbd71b2b3eed2887c8156077098a52a9256a9e0edb8340"), + ), + ), + ( + ContractAddress( + patricia_key!("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"), + ), + StorageKey( + patricia_key!("0x5a7a0269b464f3a77a50c4de3ef3ba7e2c253c514f440ef75786d28d59007d8"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), + ), + StorageKey( + patricia_key!("0x3f1abe37754ee6ca6d8dfa1036089f78a07ebe8f3b1e336cdbf3274d25becd0"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), + ), + StorageKey( + patricia_key!("0x37d931bc5c74214b7c669bc431e9dc2c39cba57516e0ab3c5a7ceb2d1c9e5c1"), + ), + ), + ( + ContractAddress( + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), + ), + StorageKey( + patricia_key!("0x3ad6945aa849b77ba309199d76ea4555be65368391ba450fab8ea6248431e9f"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), + ), + StorageKey( + patricia_key!("0x35bfc9b032421f93a52912870bbb09af6c896d21d00165845f0c04715df1468"), + ), + ), + ( + ContractAddress( + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), + ), + StorageKey( + patricia_key!("0x7dd6927869f0f6501f10407d6de416a90d2272af189f8b24d12acc09c2df5e5"), + ), + ), + ( + ContractAddress( + patricia_key!("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"), + ), + StorageKey( + patricia_key!("0x2f91121a0e63b29dc1d6a4afc3a3963209345391a124869e657665e749659ad"), + ), + ), + ( + ContractAddress( + patricia_key!("0xf6f4cf62e3c010e0ac2451cc7807b5eec19a40b0faacd00cca3914280fdf5a"), + ), + StorageKey( + patricia_key!("0x26be8966924075afd93cd2a84013cca637468173cc02904002dc3d0caf30b61"), + ), + ), + ( + ContractAddress( + patricia_key!("0x5801bdad32f343035fb242e98d1e9371ae85bc1543962fedea16c59b35bd19b"), + ), + StorageKey( + patricia_key!( + "0x1e6f3e4333da349f86a03f030be7f2c76d8266a97c625746ebb9d3220a39d88" + ), + ), + ), + ( + ContractAddress( + patricia_key!("0x12f8e318fe04a1fe8bffe005ea4bbd19cb77a656b4f42682aab8a0ed20702f0"), + ), + StorageKey( + patricia_key!("0x5d6c55cbfbeaef29110e02a1f4a1228488feec6f59b3f2f77d24245272e7999"), + ), + ), + ]), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 11, + total_event_keys: 12, + total_event_data_size: 54, + }, + } )] #[test_case( "0x01351387ef63fd6fe5ec10fa57df9e006b2450b8c68d7eec8cfc7d220abc7eda", @@ -896,7 +3239,29 @@ mod tests { n_modified_contracts: 1, }, true, - 0 + 0, + ExecutionSummary { + charged_resources: ChargedResources { + vm_resources: ExecutionResources { + n_steps: 28, + n_memory_holes: 0, + builtin_instance_counter: HashMap::new(), + }, + gas_for_fee: GasAmount( + 0, + ), + }, + executed_class_hashes: HashSet::from_iter([ + class_hash!("0x33478650b3b71be225cbad55fda8a590022eea17be3212d0ccbf3d364b1e448"), + ]), + visited_storage_entries: HashSet::new(), + l2_to_l1_payload_lengths: vec![], + event_summary: EventSummary { + n_events: 0, + total_event_keys: 0, + total_event_data_size: 0, + }, + } )] #[allow(clippy::too_many_arguments)] fn test_transaction_info( @@ -911,16 +3276,11 @@ mod tests { starknet_chg: StateChangesCount, is_reverted: bool, n_allocated_keys: usize, + execution_summary: ExecutionSummary, ) { let previous_block = BlockNumber(block_number - 1); let (tx_info, _, _) = execute_tx(hash, chain, previous_block); 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, @@ -928,7 +3288,7 @@ mod tests { code_size, state_resources, l1_handler_payload_size, - tx_info.summarize(&versioned_constants), + execution_summary, ); assert_eq!(is_reverted, tx_info.revert_error.is_some()); assert_eq!(da_gas, tx_info.receipt.da_gas); @@ -954,7 +3314,6 @@ mod tests { /// time, helping to uncover any possible concurrency bug that we may have fn test_concurrency(tx_hash: &str, block_number: u64, chain: RpcChain) { let reader = RpcStateReader::new(RpcChain::MainNet, BlockNumber(block_number - 1)); - let context = fetch_block_context(&reader); let tx_hash = TransactionHash(felt!(tx_hash)); let tx = reader.get_transaction(&tx_hash).unwrap();