From 44b369872de674af0187c815d0b10101065ba679 Mon Sep 17 00:00:00 2001 From: Alex Ostrovski Date: Wed, 16 Oct 2024 13:31:18 +0300 Subject: [PATCH 1/7] Sketch EVM emulator support --- Cargo.lock | 911 +++++++++++++++++++++++++++++++--------- Cargo.toml | 16 +- src/node/debug.rs | 15 +- src/node/eth.rs | 386 ++++++++--------- src/node/in_memory.rs | 224 +++++----- src/system_contracts.rs | 3 +- src/testing.rs | 1 + 7 files changed, 1038 insertions(+), 518 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 555f9fd4..c8458eac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,6 +12,17 @@ dependencies = [ "regex", ] +[[package]] +name = "addchain" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2e69442aa5628ea6951fa33e24efe8313f4321a91bd729fc2f75bdfc858570" +dependencies = [ + "num-bigint 0.3.3", + "num-integer", + "num-traits", +] + [[package]] name = "addr2line" version = "0.21.0" @@ -145,12 +156,42 @@ version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +[[package]] +name = "arr_macro" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a105bfda48707cf19220129e78fca01e9639433ffaef4163546ed8fb04120a5" +dependencies = [ + "arr_macro_impl", + "proc-macro-hack", +] + +[[package]] +name = "arr_macro_impl" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0609c78bd572f4edc74310dfb63a01f5609d53fa8b4dd7c4d98aef3b3e8d72d1" +dependencies = [ + "proc-macro-hack", + "quote 1.0.35", + "syn 1.0.109", +] + [[package]] name = "arrayref" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + [[package]] name = "arrayvec" version = "0.5.2" @@ -189,8 +230,8 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -200,8 +241,8 @@ version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -237,8 +278,8 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -406,7 +447,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" dependencies = [ - "num-bigint", + "num-bigint 0.4.4", "num-integer", "num-traits", "serde", @@ -420,7 +461,7 @@ checksum = "51d712318a27c7150326677b321a5fa91b55f6d9034ffd67f20319e147d40cee" dependencies = [ "autocfg", "libm", - "num-bigint", + "num-bigint 0.4.4", "num-integer", "num-traits", ] @@ -447,8 +488,8 @@ dependencies = [ "lazycell", "peeking_take_while", "prettyplease", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "regex", "rustc-hash", "shlex", @@ -469,8 +510,8 @@ dependencies = [ "lazycell", "log", "prettyplease", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "regex", "rustc-hash", "shlex", @@ -535,6 +576,17 @@ dependencies = [ "wyz 0.5.1", ] +[[package]] +name = "blake2" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" +dependencies = [ + "crypto-mac", + "digest 0.9.0", + "opaque-debug", +] + [[package]] name = "blake2" version = "0.10.6" @@ -544,6 +596,17 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "blake2-rfc_bellman_edition" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc60350286c7c3db13b98e91dbe5c8b6830a6821bc20af5b0c310ce94d74915" +dependencies = [ + "arrayvec 0.4.12", + "byteorder", + "constant_time_eq", +] + [[package]] name = "blake2_ce" version = "0.10.6" @@ -609,7 +672,7 @@ checksum = "68ec2f007ff8f90cc459f03e9f30ca1065440170f013c868823646e2e48d0234" dependencies = [ "arrayvec 0.7.4", "bincode", - "blake2", + "blake2 0.10.6", "const_format", "convert_case 0.6.0", "crossbeam", @@ -650,8 +713,8 @@ checksum = "bf4918709cc4dd777ad2b6303ed03cb37f3ca0ccede8c1b0d28ac6db8f4710e0" dependencies = [ "once_cell", "proc-macro-crate 2.0.0", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", "syn_derive", ] @@ -716,8 +779,8 @@ version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 1.0.109", ] @@ -1033,8 +1096,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck 0.4.1", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -1180,9 +1243,9 @@ version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", + "proc-macro2 1.0.86", + "quote 1.0.35", + "unicode-xid 0.2.4", ] [[package]] @@ -1351,13 +1414,23 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + [[package]] name = "ctor" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ - "quote", + "quote 1.0.35", "syn 2.0.77", ] @@ -1392,8 +1465,8 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -1415,8 +1488,8 @@ checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" dependencies = [ "fnv", "ident_case", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "strsim", "syn 1.0.109", ] @@ -1428,7 +1501,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core", - "quote", + "quote 1.0.35", "syn 1.0.109", ] @@ -1489,6 +1562,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", + "serde", ] [[package]] @@ -1497,8 +1571,8 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 1.0.109", ] @@ -1509,8 +1583,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case 0.4.0", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "rustc_version", "syn 1.0.109", ] @@ -1530,10 +1604,10 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", - "unicode-xid", + "unicode-xid 0.2.4", ] [[package]] @@ -1775,8 +1849,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" dependencies = [ "once_cell", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -2058,8 +2132,8 @@ dependencies = [ "ethers-etherscan", "eyre", "prettyplease", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "regex", "reqwest 0.11.24", "serde", @@ -2079,8 +2153,8 @@ dependencies = [ "const-hex", "ethers-contract-abigen", "ethers-core", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "serde_json", "syn 2.0.77", ] @@ -2112,7 +2186,7 @@ dependencies = [ "tempfile", "thiserror", "tiny-keccak 2.0.2", - "unicode-xid", + "unicode-xid 0.2.4", ] [[package]] @@ -2177,7 +2251,7 @@ dependencies = [ "hashers", "http 0.2.11", "instant", - "jsonwebtoken", + "jsonwebtoken 8.3.0", "once_cell", "pin-project", "reqwest 0.11.24", @@ -2404,6 +2478,39 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "franklin-crypto" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "971289216ea5c91872e5e0bb6989214b537bbce375d09fabea5c3ccfe031b204" +dependencies = [ + "arr_macro", + "bit-vec", + "blake2 0.9.2", + "blake2-rfc_bellman_edition", + "blake2s_simd", + "boojum", + "byteorder", + "derivative", + "digest 0.9.0", + "hex", + "indexmap 1.9.3", + "itertools 0.10.5", + "lazy_static", + "num-bigint 0.4.4", + "num-derive", + "num-integer", + "num-traits", + "rand 0.4.6", + "serde", + "sha2 0.9.9", + "sha3 0.9.1", + "smallvec", + "splitmut", + "tiny-keccak 1.5.0", + "zksync_bellman", +] + [[package]] name = "fs2" version = "0.4.3" @@ -2520,8 +2627,8 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -2604,8 +2711,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if 1.0.0", + "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -2679,6 +2788,81 @@ dependencies = [ "web-sys", ] +[[package]] +name = "google-cloud-auth" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1112c453c2e155b3e683204ffff52bcc6d6495d04b68d9e90cd24161270c5058" +dependencies = [ + "async-trait", + "base64 0.21.7", + "google-cloud-metadata", + "google-cloud-token", + "home", + "jsonwebtoken 9.3.0", + "reqwest 0.12.7", + "serde", + "serde_json", + "thiserror", + "time", + "tokio", + "tracing", + "urlencoding", +] + +[[package]] +name = "google-cloud-metadata" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f945a208886a13d07636f38fb978da371d0abc3e34bad338124b9f8c135a8f" +dependencies = [ + "reqwest 0.12.7", + "thiserror", + "tokio", +] + +[[package]] +name = "google-cloud-storage" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc0c5b7469142d91bd77959e69375bede324a5def07c7f29aa0d582586cba305" +dependencies = [ + "anyhow", + "async-stream", + "async-trait", + "base64 0.21.7", + "bytes", + "futures-util", + "google-cloud-auth", + "google-cloud-metadata", + "google-cloud-token", + "hex", + "once_cell", + "percent-encoding", + "pkcs8 0.10.2", + "regex", + "reqwest 0.12.7", + "reqwest-middleware", + "ring 0.17.7", + "serde", + "serde_json", + "sha2 0.10.8", + "thiserror", + "time", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "google-cloud-token" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c12ba8b21d128a2ce8585955246977fbce4415f680ebf9199b6f9d6d725f" +dependencies = [ + "async-trait", +] + [[package]] name = "group" version = "0.12.1" @@ -2739,6 +2923,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "handlebars" +version = "3.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4498fc115fa7d34de968184e473529abb40eeb6be8bc5f7faba3d08c316cb3e3" +dependencies = [ + "log", + "pest", + "pest_derive", + "quick-error", + "serde", + "serde_json", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -3162,8 +3360,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 1.0.109", ] @@ -3351,8 +3549,8 @@ version = "18.0.0" source = "git+https://github.com/matter-labs/jsonrpc.git?branch=master#12c53e3e20c09c2fb9966a4ef1b0ea63de172540" dependencies = [ "proc-macro-crate 0.1.5", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 1.0.109", ] @@ -3507,8 +3705,8 @@ checksum = "7895f186d5921065d96e16bd795e5ca89ac8356ec423fafc6e3d7cf8ec11aee4" dependencies = [ "heck 0.5.0", "proc-macro-crate 3.2.0", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -3584,13 +3782,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ "base64 0.21.7", - "pem", + "pem 1.1.1", "ring 0.16.20", "serde", "serde_json", "simple_asn1", ] +[[package]] +name = "jsonwebtoken" +version = "9.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" +dependencies = [ + "base64 0.21.7", + "js-sys", + "pem 3.0.4", + "ring 0.17.7", + "serde", + "serde_json", + "simple_asn1", +] + [[package]] name = "k256" version = "0.11.6" @@ -3645,7 +3858,7 @@ dependencies = [ "string_cache", "term", "tiny-keccak 2.0.2", - "unicode-xid", + "unicode-xid 0.2.4", ] [[package]] @@ -3779,8 +3992,8 @@ checksum = "dc487311295e0002e452025d6b580b77bb17286de87b57138f3b5db711cded68" dependencies = [ "beef", "fnv", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "regex-syntax 0.6.29", "syn 2.0.77", ] @@ -3865,8 +4078,8 @@ version = "5.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -3876,6 +4089,16 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + [[package]] name = "mini-moka" version = "0.10.3" @@ -3964,6 +4187,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + [[package]] name = "nom" version = "7.1.3" @@ -3990,7 +4219,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" dependencies = [ - "num-bigint", + "num-bigint 0.4.4", "num-complex", "num-integer", "num-iter", @@ -3998,6 +4227,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-bigint" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-bigint" version = "0.4.4" @@ -4043,6 +4283,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +[[package]] +name = "num-derive" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eafd0b45c5537c3ba526f79d3e75120036502bebacbb3f3220914067ce39dbf2" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "syn 0.15.44", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -4081,7 +4332,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", - "num-bigint", + "num-bigint 0.4.4", "num-integer", "num-traits", "serde", @@ -4132,8 +4383,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -4144,8 +4395,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ "proc-macro-crate 2.0.0", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -4199,8 +4450,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" dependencies = [ "bytes", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 1.0.109", ] @@ -4225,8 +4476,8 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -4435,8 +4686,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" dependencies = [ "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 1.0.109", ] @@ -4447,8 +4698,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ "proc-macro-crate 2.0.0", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 1.0.109", ] @@ -4566,6 +4817,16 @@ dependencies = [ "base64 0.13.1", ] +[[package]] +name = "pem" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +dependencies = [ + "base64 0.22.1", + "serde", +] + [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -4581,6 +4842,51 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pest" +version = "2.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2 1.0.86", + "quote 1.0.35", + "syn 2.0.77", +] + +[[package]] +name = "pest_meta" +version = "2.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" +dependencies = [ + "once_cell", + "pest", + "sha2 0.10.8", +] + [[package]] name = "petgraph" version = "0.6.4" @@ -4629,8 +4935,8 @@ checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ "phf_generator", "phf_shared 0.11.2", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -4667,8 +4973,8 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -4755,7 +5061,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.86", "syn 2.0.77", ] @@ -4839,8 +5145,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 1.0.109", "version_check", ] @@ -4851,11 +5157,26 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "version_check", ] +[[package]] +name = "proc-macro-hack" +version = "0.5.20+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" + +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +dependencies = [ + "unicode-xid 0.1.0", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -4883,8 +5204,8 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -4954,8 +5275,8 @@ checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", "itertools 0.11.0", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -4967,8 +5288,8 @@ checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", "itertools 0.12.1", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -5039,8 +5360,8 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 1.0.109", ] @@ -5055,6 +5376,12 @@ dependencies = [ "unicase", ] +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + [[package]] name = "quick-protobuf" version = "0.8.1" @@ -5064,13 +5391,22 @@ dependencies = [ "byteorder", ] +[[package]] +name = "quote" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +dependencies = [ + "proc-macro2 0.4.30", +] + [[package]] name = "quote" version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.86", ] [[package]] @@ -5387,6 +5723,7 @@ dependencies = [ "js-sys", "log", "mime", + "mime_guess", "native-tls", "once_cell", "percent-encoding", @@ -5399,14 +5736,56 @@ dependencies = [ "system-configuration 0.6.1", "tokio", "tokio-native-tls", + "tokio-util 0.7.10", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "windows-registry", ] +[[package]] +name = "reqwest-middleware" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562ceb5a604d3f7c885a792d42c199fd8af239d0a51b2fa6a78aafa092452b04" +dependencies = [ + "anyhow", + "async-trait", + "http 1.1.0", + "reqwest 0.12.7", + "serde", + "thiserror", + "tower-service", +] + +[[package]] +name = "rescue_poseidon" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82900c877a0ba5362ac5756efbd82c5b795dc509011c1253e2389d8708f1389d" +dependencies = [ + "addchain", + "arrayvec 0.7.4", + "blake2 0.10.6", + "byteorder", + "derivative", + "franklin-crypto", + "lazy_static", + "log", + "num-bigint 0.3.3", + "num-integer", + "num-iter", + "num-traits", + "rand 0.4.6", + "serde", + "sha3 0.9.1", + "smallvec", + "typemap_rev", +] + [[package]] name = "rfc6979" version = "0.3.1" @@ -5490,8 +5869,8 @@ version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 1.0.109", ] @@ -5512,8 +5891,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 1.0.109", ] @@ -5773,8 +6152,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 1.0.109", ] @@ -5886,7 +6265,7 @@ dependencies = [ "core-foundation", "core-foundation-sys", "libc", - "num-bigint", + "num-bigint 0.4.4", "security-framework-sys", ] @@ -6060,8 +6439,8 @@ version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -6103,6 +6482,7 @@ version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" dependencies = [ + "base64 0.13.1", "hex", "serde", "serde_with_macros", @@ -6115,8 +6495,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" dependencies = [ "darling", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 1.0.109", ] @@ -6267,7 +6647,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ - "num-bigint", + "num-bigint 0.4.4", "num-traits", "thiserror", "time", @@ -6349,7 +6729,7 @@ dependencies = [ "lalrpop-util", "phf", "thiserror", - "unicode-xid", + "unicode-xid 0.2.4", ] [[package]] @@ -6387,6 +6767,12 @@ dependencies = [ "der 0.7.8", ] +[[package]] +name = "splitmut" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c85070f382340e8b23a75808e83573ddf65f9ad9143df9573ca37c1ed2ee956a" + [[package]] name = "sqlformat" version = "0.2.3" @@ -6461,8 +6847,8 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cac0692bcc9de3b073e8d747391827297e075c7710ff6276d9f7a1f3d58c6657" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "sqlx-core", "sqlx-macros-core", "syn 2.0.77", @@ -6479,8 +6865,8 @@ dependencies = [ "heck 0.5.0", "hex", "once_cell", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "serde", "serde_json", "sha2 0.10.8", @@ -6567,7 +6953,7 @@ dependencies = [ "log", "md-5", "memchr", - "num-bigint", + "num-bigint 0.4.4", "once_cell", "rand 0.8.5", "rust_decimal", @@ -6673,8 +7059,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck 0.4.1", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "rustversion", "syn 2.0.77", ] @@ -6686,8 +7072,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ "heck 0.5.0", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "rustversion", "syn 2.0.77", ] @@ -6718,14 +7104,25 @@ dependencies = [ "zip", ] +[[package]] +name = "syn" +version = "0.15.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid 0.1.0", +] + [[package]] name = "syn" version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "unicode-ident", ] @@ -6735,8 +7132,8 @@ version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "unicode-ident", ] @@ -6747,8 +7144,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" dependencies = [ "proc-macro-error", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -6879,8 +7276,8 @@ version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -6994,8 +7391,8 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -7231,8 +7628,8 @@ version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -7349,12 +7746,24 @@ dependencies = [ "utf-8", ] +[[package]] +name = "typemap_rev" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74b08b0c1257381af16a5c3605254d529d3e7e109f3c62befc5d168968192998" + [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + [[package]] name = "uint" version = "0.9.5" @@ -7424,6 +7833,12 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + [[package]] name = "unicode-xid" version = "0.2.4" @@ -7442,7 +7857,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ad948c1cb799b1a70f836077721a92a35ac177d4daddf4c20a633786d4cf618" dependencies = [ - "quote", + "quote 1.0.35", "syn 1.0.109", ] @@ -7489,6 +7904,12 @@ dependencies = [ "serde", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "utf-8" version = "0.7.6" @@ -7571,8 +7992,8 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a511871dc5de990a3b2a0e715facfbc5da848c0c0395597a1415029fb7c250a" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -7626,8 +8047,8 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", "wasm-bindgen-shared", ] @@ -7650,7 +8071,7 @@ version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ - "quote", + "quote 1.0.35", "wasm-bindgen-macro-support", ] @@ -7660,8 +8081,8 @@ version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -7673,6 +8094,19 @@ version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" +[[package]] +name = "wasm-streams" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "web-sys" version = "0.3.67" @@ -8033,8 +8467,8 @@ version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -8053,8 +8487,8 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 2.0.77", ] @@ -8281,7 +8715,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0769f7b27d8fb06e715da3290c575cac5d04d10a557faef180e847afce50ac4" dependencies = [ "bitflags 2.6.0", - "blake2", + "blake2 0.10.6", "ethereum-types 0.14.1", "k256 0.11.6", "lazy_static", @@ -8296,7 +8730,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6be7bd5f0e0b61211f544147289640b4712715589d7f2fe5229d92a7a3ac64c0" dependencies = [ "bitflags 2.6.0", - "blake2", + "blake2 0.10.6", "ethereum-types 0.14.1", "k256 0.13.3", "lazy_static", @@ -8311,7 +8745,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79055eae1b6c1ab80793ed9d77d2964c9c896afa4b5dfed278cf58cd10acfe8f" dependencies = [ "bitflags 2.6.0", - "blake2", + "blake2 0.10.6", "ethereum-types 0.14.1", "k256 0.13.3", "lazy_static", @@ -8327,7 +8761,7 @@ version = "1.5.0" source = "git+https://github.com/matter-labs/era-zkevm_opcode_defs.git?branch=v1.5.0#109d9f734804a8b9dc0531c0b576e2a0f55a40de" dependencies = [ "bitflags 2.6.0", - "blake2", + "blake2 0.10.6", "ethereum-types 0.14.1", "k256 0.13.3", "lazy_static", @@ -8361,13 +8795,14 @@ dependencies = [ [[package]] name = "zksync_basic_types" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "anyhow", "chrono", "ethabi 18.0.0", "hex", "num_enum 0.7.2", + "secrecy", "serde", "serde_json", "serde_with", @@ -8402,9 +8837,9 @@ dependencies = [ [[package]] name = "zksync_concurrency" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4724d51934e475c846ba9e6ed169e25587385188b928a9ecfbbf616092a1c17" +checksum = "035269d811b3770debca372141ab64cad067dce8e58cb39a48cb7617d30c626b" dependencies = [ "anyhow", "once_cell", @@ -8422,13 +8857,17 @@ dependencies = [ [[package]] name = "zksync_config" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "anyhow", "rand 0.8.5", "secrecy", "serde", + "strum 0.26.3", + "strum_macros 0.26.4", + "time", "url", + "vise", "zksync_basic_types", "zksync_concurrency", "zksync_consensus_utils", @@ -8437,9 +8876,9 @@ dependencies = [ [[package]] name = "zksync_consensus_crypto" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7760e7a140f16f0435fbf2ad9a4b09feaad74568d05b553751d222f4803a42e" +checksum = "49e38d1b5ed28c66e785caff53ea4863375555d818aafa03290397192dd3e665" dependencies = [ "anyhow", "blst", @@ -8447,7 +8886,7 @@ dependencies = [ "elliptic-curve 0.13.8", "hex", "k256 0.13.3", - "num-bigint", + "num-bigint 0.4.4", "num-traits", "rand 0.8.5", "sha3 0.10.8", @@ -8458,14 +8897,14 @@ dependencies = [ [[package]] name = "zksync_consensus_roles" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96f903187836210602beba27655e111e22efb229ef90bd2a95a3d6799b31685c" +checksum = "e49fbd4e69b276058f3dfc06cf6ada0e8caa6ed826e81289e4d596da95a0f17a" dependencies = [ "anyhow", "bit-vec", "hex", - "num-bigint", + "num-bigint 0.4.4", "prost 0.12.3", "rand 0.8.5", "serde", @@ -8480,9 +8919,9 @@ dependencies = [ [[package]] name = "zksync_consensus_storage" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff43cfd03ea205c763e74362dc6ec5a4d74b6b1baef0fb134dde92a8880397f7" +checksum = "b2b2aab4ed18b13cd584f4edcc2546c8da82f89ac62e525063e12935ff28c9be" dependencies = [ "anyhow", "async-trait", @@ -8500,9 +8939,9 @@ dependencies = [ [[package]] name = "zksync_consensus_utils" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1020308512c01ab80327fb874b5b61c6fd513a6b26c8a5fce3e077600da04e4b" +checksum = "10bac8f471b182d4fa3d40cf158aac3624fe636a1ff0b4cf3fe26a0e20c68a42" dependencies = [ "anyhow", "rand 0.8.5", @@ -8513,7 +8952,7 @@ dependencies = [ [[package]] name = "zksync_contracts" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "envy", "ethabi 18.0.0", @@ -8527,10 +8966,10 @@ dependencies = [ [[package]] name = "zksync_crypto_primitives" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "anyhow", - "blake2", + "blake2 0.10.6", "hex", "rand 0.8.5", "secp256k1", @@ -8549,15 +8988,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5939e2df4288c263c706ff18ac718e984149223ad4289d6d957d767dcfc04c81" dependencies = [ "proc-macro-error", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "syn 1.0.109", ] [[package]] name = "zksync_dal" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "anyhow", "bigdecimal 0.4.5", @@ -8576,10 +9015,13 @@ dependencies = [ "tracing", "vise", "zksync_concurrency", + "zksync_consensus_crypto", "zksync_consensus_roles", "zksync_consensus_storage", + "zksync_consensus_utils", "zksync_contracts", "zksync_db_connection", + "zksync_l1_contract_interface", "zksync_protobuf", "zksync_protobuf_build", "zksync_system_constants", @@ -8591,7 +9033,7 @@ dependencies = [ [[package]] name = "zksync_db_connection" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "anyhow", "rand 0.8.5", @@ -8608,7 +9050,7 @@ dependencies = [ [[package]] name = "zksync_eth_client" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "async-trait", "jsonrpsee", @@ -8626,12 +9068,13 @@ dependencies = [ [[package]] name = "zksync_eth_signer" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "async-trait", "rlp", "thiserror", - "zksync_types", + "zksync_basic_types", + "zksync_crypto_primitives", ] [[package]] @@ -8653,19 +9096,52 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f91e58e75d65877f09f83bc3dca8f054847ae7ec4f3e64bfa610a557edd8e8e" dependencies = [ - "num-bigint", + "num-bigint 0.4.4", "num-integer", "num-traits", - "proc-macro2", - "quote", + "proc-macro2 1.0.86", + "quote 1.0.35", "serde", "syn 1.0.109", ] +[[package]] +name = "zksync_kzg" +version = "0.150.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edb8a9c76c172a6d639855ee342b9a670e3ba472f5ae302f771b1c3ee777dc88" +dependencies = [ + "boojum", + "derivative", + "hex", + "once_cell", + "rayon", + "serde", + "serde_json", + "serde_with", + "zkevm_circuits 0.150.5", +] + +[[package]] +name = "zksync_l1_contract_interface" +version = "0.1.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +dependencies = [ + "anyhow", + "hex", + "once_cell", + "sha2 0.10.8", + "sha3 0.10.8", + "zksync_kzg", + "zksync_prover_interface", + "zksync_solidity_vk_codegen", + "zksync_types", +] + [[package]] name = "zksync_mini_merkle_tree" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "once_cell", "zksync_basic_types", @@ -8675,7 +9151,7 @@ dependencies = [ [[package]] name = "zksync_multivm" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "anyhow", "circuit_sequencer_api 0.133.1", @@ -8683,6 +9159,7 @@ dependencies = [ "circuit_sequencer_api 0.141.2", "circuit_sequencer_api 0.142.2", "circuit_sequencer_api 0.150.5", + "ethabi 18.0.0", "hex", "itertools 0.10.5", "once_cell", @@ -8705,7 +9182,7 @@ dependencies = [ [[package]] name = "zksync_node_fee_model" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "anyhow", "async-trait", @@ -8721,6 +9198,30 @@ dependencies = [ "zksync_web3_decl", ] +[[package]] +name = "zksync_object_store" +version = "0.1.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +dependencies = [ + "anyhow", + "async-trait", + "bincode", + "flate2", + "google-cloud-auth", + "google-cloud-storage", + "http 1.1.0", + "prost 0.12.3", + "rand 0.8.5", + "reqwest 0.12.7", + "serde_json", + "tokio", + "tracing", + "vise", + "zksync_config", + "zksync_protobuf", + "zksync_types", +] + [[package]] name = "zksync_pairing" version = "0.30.1" @@ -8736,9 +9237,9 @@ dependencies = [ [[package]] name = "zksync_protobuf" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2d9ce9b9697daae6023c8da5cfe8764690a9d9c91ff32b8e1e54a7c8301fb3" +checksum = "abd55c64f54cb10967a435422f66ff5880ae14a232b245517c7ce38da32e0cab" dependencies = [ "anyhow", "bit-vec", @@ -8757,25 +9258,40 @@ dependencies = [ [[package]] name = "zksync_protobuf_build" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "903c23a12e160a703f9b68d0dd961daa24156af912ca1bc9efb74969f3acc645" +checksum = "4121952bcaf711005dd554612fc6e2de9b30cb58088508df87f1d38046ce8ac8" dependencies = [ "anyhow", "heck 0.5.0", "prettyplease", - "proc-macro2", + "proc-macro2 1.0.86", "prost-build", "prost-reflect", "protox", - "quote", + "quote 1.0.35", "syn 2.0.77", ] +[[package]] +name = "zksync_prover_interface" +version = "0.1.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +dependencies = [ + "chrono", + "circuit_sequencer_api 0.150.5", + "serde", + "serde_with", + "strum 0.26.3", + "zksync_multivm", + "zksync_object_store", + "zksync_types", +] + [[package]] name = "zksync_shared_metrics" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "rustc_version", "tracing", @@ -8784,10 +9300,27 @@ dependencies = [ "zksync_types", ] +[[package]] +name = "zksync_solidity_vk_codegen" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b310ab8a21681270e73f177ddf7974cabb7a96f0624ab8b008fd6ee1f9b4f687" +dependencies = [ + "ethereum-types 0.14.1", + "franklin-crypto", + "handlebars", + "hex", + "paste", + "rescue_poseidon", + "serde", + "serde_derive", + "serde_json", +] + [[package]] name = "zksync_state" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "anyhow", "async-trait", @@ -8810,7 +9343,7 @@ dependencies = [ [[package]] name = "zksync_storage" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "num_cpus", "once_cell", @@ -8823,7 +9356,7 @@ dependencies = [ [[package]] name = "zksync_system_constants" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "once_cell", "zksync_basic_types", @@ -8833,11 +9366,11 @@ dependencies = [ [[package]] name = "zksync_types" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "anyhow", "bigdecimal 0.4.5", - "blake2", + "blake2 0.10.6", "chrono", "derive_more 1.0.0", "hex", @@ -8868,7 +9401,7 @@ dependencies = [ [[package]] name = "zksync_utils" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "anyhow", "bigdecimal 0.4.5", @@ -8890,7 +9423,7 @@ dependencies = [ [[package]] name = "zksync_vlog" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "anyhow", "chrono", @@ -8915,8 +9448,8 @@ dependencies = [ [[package]] name = "zksync_vm2" -version = "0.1.0" -source = "git+https://github.com/matter-labs/vm2.git?rev=74577d9be13b1bff9d1a712389731f669b179e47#74577d9be13b1bff9d1a712389731f669b179e47" +version = "0.2.1" +source = "git+https://github.com/matter-labs/vm2.git?rev=a233d44bbe61dc6a758a754c3b78fe4f83e56699#a233d44bbe61dc6a758a754c3b78fe4f83e56699" dependencies = [ "enum_dispatch", "primitive-types 0.12.2", @@ -8927,8 +9460,8 @@ dependencies = [ [[package]] name = "zksync_vm2_interface" -version = "0.1.0" -source = "git+https://github.com/matter-labs/vm2.git?rev=74577d9be13b1bff9d1a712389731f669b179e47#74577d9be13b1bff9d1a712389731f669b179e47" +version = "0.2.1" +source = "git+https://github.com/matter-labs/vm2.git?rev=a233d44bbe61dc6a758a754c3b78fe4f83e56699#a233d44bbe61dc6a758a754c3b78fe4f83e56699" dependencies = [ "primitive-types 0.12.2", ] @@ -8936,7 +9469,7 @@ dependencies = [ [[package]] name = "zksync_vm_interface" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "anyhow", "async-trait", @@ -8953,7 +9486,7 @@ dependencies = [ [[package]] name = "zksync_web3_decl" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7#7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 121cfb7f..6b56c976 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,14 +12,14 @@ publish = false # We don't want to pub [dependencies] zkevm_opcode_defs = { git = "https://github.com/matter-labs/era-zkevm_opcode_defs.git", branch = "v1.5.0" } -zksync_basic_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" } -zksync_node_fee_model = { git = "https://github.com/matter-labs/zksync-era.git", rev = "7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" } -zksync_multivm = { git = "https://github.com/matter-labs/zksync-era.git", rev = "7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" } -zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", rev = "7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" } -zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" } -zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", rev = "7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" } -zksync_state = { git = "https://github.com/matter-labs/zksync-era.git", rev = "7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7" } -zksync_web3_decl = { git = "https://github.com/matter-labs/zksync-era.git", rev = "7ad0425e00a44e0dd1c3abf38ab2f6335c2f86e7", features = [ +zksync_basic_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } +zksync_node_fee_model = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } +zksync_multivm = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } +zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } +zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } +zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } +zksync_state = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } +zksync_web3_decl = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae", features = [ "server", ] } sha3 = "0.10.6" diff --git a/src/node/debug.rs b/src/node/debug.rs index 443443ea..441b754f 100644 --- a/src/node/debug.rs +++ b/src/node/debug.rs @@ -158,24 +158,19 @@ impl DebugNames ))) })?; - let mut l2_tx = match L2Tx::from_request(request.into(), MAX_TX_SIZE) { - Ok(tx) => tx, - Err(e) => { - let error = Web3Error::SerializationError(e); - return Err(into_jsrpc_error(error)); - } - }; + let system_contracts = inner.system_contracts.contracts_for_l2_call(); + let allow_no_target = system_contracts.evm_emulator.is_some(); + let mut l2_tx = L2Tx::from_request(request.into(), MAX_TX_SIZE, allow_no_target) + .map_err(|err| into_jsrpc_error(Web3Error::SerializationError(err)))?; let execution_mode = zksync_multivm::interface::TxExecutionMode::EthCall; let storage = StorageView::new(&inner.fork_storage).into_rc_ptr(); - let bootloader_code = inner.system_contracts.contracts_for_l2_call(); - // init vm let (mut l1_batch_env, _block_context) = inner.create_l1_batch_env(storage.clone()); // update the enforced_base_fee within l1_batch_env to match the logic in zksync_core l1_batch_env.enforced_base_fee = Some(l2_tx.common_data.fee.max_fee_per_gas.as_u64()); - let system_env = inner.create_system_env(bootloader_code.clone(), execution_mode); + let system_env = inner.create_system_env(system_contracts.clone(), execution_mode); let mut vm: Vm<_, HistoryDisabled> = Vm::new(l1_batch_env, system_env, storage); // We must inject *some* signature (otherwise bootloader code fails to generate hash). diff --git a/src/node/eth.rs b/src/node/eth.rs index 30995480..3908ae42 100644 --- a/src/node/eth.rs +++ b/src/node/eth.rs @@ -1,5 +1,6 @@ use std::collections::HashSet; +use anyhow::Context as _; use colored::Colorize; use futures::FutureExt; use itertools::Itertools; @@ -7,7 +8,7 @@ use zksync_basic_types::{ web3::{self, Bytes}, AccountTreeId, Address, H160, H256, U256, U64, }; -use zksync_multivm::interface::{ExecutionResult, TxExecutionMode}; +use zksync_multivm::interface::ExecutionResult; use zksync_multivm::vm_latest::constants::ETH_CALL_GAS_LIMIT; use zksync_types::{ api::{Block, BlockIdVariant, BlockNumber, TransactionVariant}, @@ -30,11 +31,173 @@ use crate::{ namespaces::{EthNamespaceT, EthTestNodeNamespaceT, RpcResult}, node::{InMemoryNode, TransactionResult, MAX_TX_SIZE, PROTOCOL_VERSION}, utils::{ - self, h256_to_u64, into_jsrpc_error, into_jsrpc_error_message, not_implemented, - report_into_jsrpc_error, IntoBoxedFuture, + self, h256_to_u64, into_jsrpc_error, not_implemented, report_into_jsrpc_error, + IntoBoxedFuture, }, }; +impl InMemoryNode { + fn call_impl( + &self, + req: zksync_types::transaction_request::CallRequest, + ) -> Result { + let system_contracts = self.system_contracts_for_l2_call()?; + let allow_no_target = system_contracts.evm_emulator.is_some(); + + let mut tx = L2Tx::from_request(req.into(), MAX_TX_SIZE, allow_no_target)?; + tx.common_data.fee.gas_limit = ETH_CALL_GAS_LIMIT.into(); + let call_result = self + .run_l2_call(tx, system_contracts) + .context("Invalid data due to invalid name")?; + + match call_result { + ExecutionResult::Success { output } => Ok(output.into()), + ExecutionResult::Revert { output } => { + let message = output.to_user_friendly_string(); + let pretty_message = format!( + "execution reverted{}{}", + if message.is_empty() { "" } else { ": " }, + message + ); + + tracing::info!("{}", pretty_message.on_red()); + Err(Web3Error::SubmitTransactionError( + pretty_message, + output.encoded_data(), + )) + } + ExecutionResult::Halt { reason } => { + let message = reason.to_string(); + let pretty_message = format!( + "execution halted {}{}", + if message.is_empty() { "" } else { ": " }, + message + ); + + tracing::info!("{}", pretty_message.on_red()); + Err(Web3Error::SubmitTransactionError(pretty_message, vec![])) + } + } + } + + fn send_raw_transaction_impl(&self, tx_bytes: Bytes) -> Result { + let chain_id = self + .get_inner() + .read() + .map_err(|_| anyhow::anyhow!("Failed to acquire read lock for chain ID retrieval"))? + .fork_storage + .chain_id; + + let (tx_req, hash) = TransactionRequest::from_bytes(&tx_bytes.0, chain_id)?; + let system_contracts = self.system_contracts_for_tx(tx_req.from.unwrap_or_default())?; + let allow_no_target = system_contracts.evm_emulator.is_some(); + let mut l2_tx = L2Tx::from_request(tx_req, MAX_TX_SIZE, allow_no_target)?; + + l2_tx.set_input(tx_bytes.0, hash); + if hash != l2_tx.hash() { + let err = anyhow::anyhow!( + "Invalid transaction data: computed hash does not match the provided hash." + ); + return Err(err.into()); + }; + + self.run_l2_tx(l2_tx, system_contracts).map_err(|err| { + Web3Error::SubmitTransactionError( + format!("Execution error: {err}"), + hash.as_bytes().to_vec(), + ) + })?; + Ok(hash) + } + + fn send_transaction_impl( + &self, + tx: zksync_types::transaction_request::CallRequest, + ) -> Result { + let (chain_id, l1_gas_price) = { + let reader = self + .inner + .read() + .map_err(|_| anyhow::anyhow!("Failed to acquire read lock"))?; + ( + reader.fork_storage.chain_id, + reader.fee_input_provider.l1_gas_price, + ) + }; + + let mut tx_req = TransactionRequest::from(tx.clone()); + // Users might expect a "sensible default" + if tx.gas.is_none() { + tx_req.gas = U256::from(MAX_L1_TRANSACTION_GAS_LIMIT); + } + + tx_req.chain_id = Some(chain_id.as_u64()); + + // EIP-1559 gas fields should be processed separately + if tx.gas_price.is_some() { + if tx.max_fee_per_gas.is_some() || tx.max_priority_fee_per_gas.is_some() { + let err = anyhow::anyhow!("Transaction contains unsupported fields: max_fee_per_gas or max_priority_fee_per_gas"); + tracing::error!("{err}"); + return Err(err.into()); + } + } else { + tx_req.gas_price = tx.max_fee_per_gas.unwrap_or(U256::from(l1_gas_price)); + tx_req.max_priority_fee_per_gas = tx.max_priority_fee_per_gas; + if tx_req.transaction_type.is_none() { + tx_req.transaction_type = Some(zksync_types::EIP_1559_TX_TYPE.into()); + } + } + // Needed to calculate hash + tx_req.r = Some(U256::default()); + tx_req.s = Some(U256::default()); + tx_req.v = Some(U64::from(27)); + + let hash = tx_req.get_tx_hash()?; + let bytes = tx_req.get_signed_bytes(&PackedEthSignature::from_rsv( + &H256::default(), + &H256::default(), + 27, + ))?; + + let system_contracts = self.system_contracts_for_tx(tx_req.from.unwrap_or_default())?; + let allow_no_target = system_contracts.evm_emulator.is_some(); + let mut l2_tx: L2Tx = L2Tx::from_request(tx_req, MAX_TX_SIZE, allow_no_target)?; + + // `v` was overwritten with 0 during converting into l2 tx + let mut signature = vec![0u8; 65]; + signature[64] = 27; + l2_tx.common_data.signature = signature; + + l2_tx.set_input(bytes, hash); + + { + let reader = self + .inner + .read() + .map_err(|_| anyhow::anyhow!("Failed to acquire read lock for accounts."))?; + if !reader + .impersonated_accounts + .contains(&l2_tx.common_data.initiator_address) + { + let err = anyhow::anyhow!( + "Initiator address {:?} is not allowed to perform transactions", + l2_tx.common_data.initiator_address + ); + tracing::error!("{err}"); + return Err(err.into()); + } + } + + self.run_l2_tx(l2_tx, system_contracts).map_err(|err| { + Web3Error::SubmitTransactionError( + format!("Execution error: {err}"), + hash.as_bytes().to_vec(), + ) + })?; + Ok(hash) + } +} + impl EthNamespaceT for InMemoryNode { @@ -64,59 +227,9 @@ impl EthNamespa req: zksync_types::transaction_request::CallRequest, _block: Option, ) -> RpcResult { - match L2Tx::from_request(req.into(), MAX_TX_SIZE) { - Ok(mut tx) => { - tx.common_data.fee.gas_limit = ETH_CALL_GAS_LIMIT.into(); - let result = self.run_l2_call(tx); - - match result { - Ok(execution_result) => match execution_result { - ExecutionResult::Success { output } => { - Ok(output.into()).into_boxed_future() - } - ExecutionResult::Revert { output } => { - let message = output.to_user_friendly_string(); - let pretty_message = format!( - "execution reverted{}{}", - if message.is_empty() { "" } else { ": " }, - message - ); - - tracing::info!("{}", pretty_message.on_red()); - Err(into_jsrpc_error(Web3Error::SubmitTransactionError( - pretty_message, - output.encoded_data(), - ))) - .into_boxed_future() - } - ExecutionResult::Halt { reason } => { - let message = reason.to_string(); - let pretty_message = format!( - "execution halted {}{}", - if message.is_empty() { "" } else { ": " }, - message - ); - - tracing::info!("{}", pretty_message.on_red()); - Err(into_jsrpc_error(Web3Error::SubmitTransactionError( - pretty_message, - vec![], - ))) - .into_boxed_future() - } - }, - Err(e) => { - let error_message = format!("Invalid data due to invalid name: {}", e); - let error = Web3Error::InternalError(anyhow::Error::msg(error_message)); - Err(into_jsrpc_error(error)).into_boxed_future() - } - } - } - Err(e) => { - let error = Web3Error::SerializationError(e); - Err(into_jsrpc_error(error)).into_boxed_future() - } - } + self.call_impl(req) + .map_err(into_jsrpc_error) + .into_boxed_future() } /// Returns the balance of the specified address. @@ -358,52 +471,10 @@ impl EthNamespa /// # Returns /// /// A future that resolves to the hash of the transaction if successful, or an error if the transaction is invalid or execution fails. - fn send_raw_transaction(&self, tx_bytes: Bytes) -> RpcResult { - let chain_id = match self.get_inner().read() { - Ok(reader) => reader.fork_storage.chain_id, - Err(_) => { - return futures::future::err(into_jsrpc_error(Web3Error::InternalError( - anyhow::Error::msg("Failed to acquire read lock for chain ID retrieval"), - ))) - .boxed() - } - }; - - let (tx_req, hash) = match TransactionRequest::from_bytes(&tx_bytes.0, chain_id) { - Ok(result) => result, - Err(e) => { - return futures::future::err(into_jsrpc_error(Web3Error::SerializationError(e))) - .boxed() - } - }; - - let mut l2_tx: L2Tx = match L2Tx::from_request(tx_req, MAX_TX_SIZE) { - Ok(tx) => tx, - Err(e) => { - return futures::future::err(into_jsrpc_error(Web3Error::SerializationError(e))) - .boxed() - } - }; - - l2_tx.set_input(tx_bytes.0, hash); - if hash != l2_tx.hash() { - let error_message = - "Invalid transaction data: computed hash does not match the provided hash."; - let web3_error = Web3Error::InternalError(anyhow::Error::msg(error_message)); - return futures::future::err(into_jsrpc_error(web3_error)).boxed(); - }; - - match self.run_l2_tx(l2_tx.clone(), TxExecutionMode::VerifyExecute) { - Ok(_) => Ok(hash).into_boxed_future(), - Err(e) => { - let error_message = format!("Execution error: {}", e); - futures::future::err(into_jsrpc_error(Web3Error::SubmitTransactionError( - error_message, - l2_tx.hash().as_bytes().to_vec(), - ))) - .boxed() - } - } + fn send_raw_transaction(&self, tx_bytes: Bytes) -> RpcResult { + self.send_raw_transaction_impl(tx_bytes) + .map_err(into_jsrpc_error) + .into_boxed_future() } /// Returns a block by its hash. Currently, only hashes for blocks in memory are supported. @@ -1391,113 +1462,10 @@ impl EthTestNod fn send_transaction( &self, tx: zksync_types::transaction_request::CallRequest, - ) -> jsonrpc_core::BoxFuture> { - let (chain_id, l1_gas_price) = match self.get_inner().read() { - Ok(reader) => ( - reader.fork_storage.chain_id, - reader.fee_input_provider.l1_gas_price, - ), - Err(_) => { - return futures::future::err(into_jsrpc_error_message( - "Failed to acquire read lock for chain ID retrieval.".to_string(), - )) - .boxed() - } - }; - - let mut tx_req = TransactionRequest::from(tx.clone()); - // Users might expect a "sensible default" - if tx.gas.is_none() { - tx_req.gas = U256::from(MAX_L1_TRANSACTION_GAS_LIMIT); - } - - tx_req.chain_id = Some(chain_id.as_u64()); - - // EIP-1559 gas fields should be processed separately - if tx.gas_price.is_some() { - if tx.max_fee_per_gas.is_some() || tx.max_priority_fee_per_gas.is_some() { - let error_message = "Transaction contains unsupported fields: max_fee_per_gas or max_priority_fee_per_gas"; - tracing::error!("{}", error_message); - return futures::future::err(into_jsrpc_error_message(error_message.to_string())) - .boxed(); - } - } else { - tx_req.gas_price = tx.max_fee_per_gas.unwrap_or(U256::from(l1_gas_price)); - tx_req.max_priority_fee_per_gas = tx.max_priority_fee_per_gas; - if tx_req.transaction_type.is_none() { - tx_req.transaction_type = Some(zksync_types::EIP_1559_TX_TYPE.into()); - } - } - // Needed to calculate hash - tx_req.r = Some(U256::default()); - tx_req.s = Some(U256::default()); - tx_req.v = Some(U64::from(27)); - - let hash = match tx_req.get_tx_hash() { - Ok(result) => result, - Err(e) => { - tracing::error!("Transaction request serialization error: {}", e); - return futures::future::err(into_jsrpc_error(Web3Error::SerializationError(e))) - .boxed(); - } - }; - let bytes = match tx_req.get_signed_bytes(&PackedEthSignature::from_rsv( - &H256::default(), - &H256::default(), - 27, - )) { - Ok(result) => result, - Err(e) => { - tracing::error!("Transaction request serialization error: {}", e); - return futures::future::err(into_jsrpc_error(Web3Error::SerializationError(e))) - .boxed(); - } - }; - let mut l2_tx: L2Tx = match L2Tx::from_request(tx_req, MAX_TX_SIZE) { - Ok(tx) => tx, - Err(e) => { - tracing::error!("Transaction serialization error: {}", e); - return futures::future::err(into_jsrpc_error(Web3Error::SerializationError(e))) - .boxed(); - } - }; - - // `v` was overwritten with 0 during converting into l2 tx - let mut signature = vec![0u8; 65]; - signature[64] = 27; - l2_tx.common_data.signature = signature; - - l2_tx.set_input(bytes, hash); - - match self.get_inner().read() { - Ok(reader) => { - if !reader - .impersonated_accounts - .contains(&l2_tx.common_data.initiator_address) - { - let error_message = format!( - "Initiator address {:?} is not allowed to perform transactions", - l2_tx.common_data.initiator_address - ); - tracing::error!("{}", error_message); - return futures::future::err(into_jsrpc_error_message(error_message)).boxed(); - } - } - Err(_) => { - return futures::future::err(into_jsrpc_error_message( - "Failed to acquire read lock for accounts.".to_string(), - )) - .boxed() - } - } - - match self.run_l2_tx(l2_tx.clone(), TxExecutionMode::VerifyExecute) { - Ok(_) => Ok(l2_tx.hash()).into_boxed_future(), - Err(e) => { - let error_message = format!("Execution error: {}", e); - futures::future::err(into_jsrpc_error_message(error_message)).boxed() - } - } + ) -> jsonrpc_core::BoxFuture> { + self.send_transaction_impl(tx) + .map_err(into_jsrpc_error) + .into_boxed_future() } } diff --git a/src/node/in_memory.rs b/src/node/in_memory.rs index 5e6b70f4..d84ce27d 100644 --- a/src/node/in_memory.rs +++ b/src/node/in_memory.rs @@ -20,6 +20,7 @@ use crate::{ system_contracts::{self, SystemContracts}, utils::{bytecode_to_factory_dep, create_debug_output, into_jsrpc_error, to_human_size}, }; +use anyhow::Context as _; use colored::Colorize; use indexmap::IndexMap; use once_cell::sync::OnceCell; @@ -53,7 +54,7 @@ use zksync_multivm::{ vm_latest::{ constants::{BATCH_GAS_LIMIT, MAX_VM_PUBDATA_PER_BATCH}, utils::l2_blocks::load_last_l2_block, - ToTracerPointer, TracerPointer, Vm, + ToTracerPointer, Vm, }, }; use zksync_node_fee_model::BatchFeeModelInputProvider; @@ -404,15 +405,22 @@ impl InMemoryNodeInner { let is_eip712 = request_with_gas_per_pubdata_overridden .eip712_meta .is_some(); + let initiator_address = request_with_gas_per_pubdata_overridden + .from + .unwrap_or_default(); + let impersonating = self.impersonated_accounts.contains(&initiator_address); + let system_contracts = self + .system_contracts + .contracts_for_fee_estimate(impersonating) + .clone(); + let allow_no_target = system_contracts.evm_emulator.is_some(); - let mut l2_tx = - match L2Tx::from_request(request_with_gas_per_pubdata_overridden.into(), MAX_TX_SIZE) { - Ok(tx) => tx, - Err(e) => { - let error = Web3Error::SerializationError(e); - return Err(into_jsrpc_error(error)); - } - }; + let mut l2_tx = L2Tx::from_request( + request_with_gas_per_pubdata_overridden.into(), + MAX_TX_SIZE, + allow_no_target, + ) + .map_err(|err| into_jsrpc_error(Web3Error::SerializationError(err)))?; let tx: Transaction = l2_tx.clone().into(); @@ -465,16 +473,7 @@ impl InMemoryNodeInner { let (mut batch_env, _) = self.create_l1_batch_env(storage.clone()); batch_env.fee_input = fee_input; - let impersonating = self - .impersonated_accounts - .contains(&l2_tx.common_data.initiator_address); - - let system_env = self.create_system_env( - self.system_contracts - .contracts_for_fee_estimate(impersonating) - .clone(), - execution_mode, - ); + let system_env = self.create_system_env(system_contracts, execution_mode); // When the pubdata cost grows very high, the total gas limit required may become very high as well. If // we do binary search over any possible gas limit naively, we may end up with a very high number of iterations, @@ -975,11 +974,14 @@ impl InMemoryNode { } /// Applies multiple transactions - but still one per L1 batch. - pub fn apply_txs(&self, txs: Vec) -> Result<(), String> { + pub fn apply_txs(&self, txs: Vec) -> anyhow::Result<()> { tracing::info!("Running {:?} transactions (one per batch)", txs.len()); for tx in txs { - self.run_l2_tx(tx, TxExecutionMode::VerifyExecute)?; + // Getting contracts is reasonably cheap, so we don't cache them. We may need differing contracts + // depending on whether impersonation should be enabled for a transaction. + let system_contracts = self.system_contracts_for_tx(tx.initiator_account())?; + self.run_l2_tx(tx, system_contracts)?; } Ok(()) @@ -1009,23 +1011,55 @@ impl InMemoryNode { inner.rich_accounts.insert(address); } + pub fn system_contracts_for_l2_call(&self) -> anyhow::Result { + let inner = self + .inner + .read() + .map_err(|_| anyhow::anyhow!("Failed to acquire read lock"))?; + Ok(inner.system_contracts.contracts_for_l2_call().clone()) + } + + pub fn system_contracts_for_tx( + &self, + tx_initiator: Address, + ) -> anyhow::Result { + let inner = self + .inner + .read() + .map_err(|_| anyhow::anyhow!("Failed to acquire read lock"))?; + Ok(if inner.impersonated_accounts.contains(&tx_initiator) { + tracing::info!("🕵️ Executing tx from impersonated account {tx_initiator:?}"); + inner + .system_contracts + .contracts(TxExecutionMode::VerifyExecute, true) + .clone() + } else { + inner + .system_contracts + .contracts(TxExecutionMode::VerifyExecute, false) + .clone() + }) + } + /// Runs L2 'eth call' method - that doesn't commit to a block. - pub fn run_l2_call(&self, mut l2_tx: L2Tx) -> Result { + pub fn run_l2_call( + &self, + mut l2_tx: L2Tx, + base_contracts: BaseSystemContracts, + ) -> anyhow::Result { let execution_mode = TxExecutionMode::EthCall; let inner = self .inner - .write() - .map_err(|e| format!("Failed to acquire write lock: {}", e))?; + .read() + .map_err(|_| anyhow::anyhow!("Failed to acquire write lock"))?; let storage = StorageView::new(&inner.fork_storage).into_rc_ptr(); - let bootloader_code = inner.system_contracts.contracts_for_l2_call(); - // init vm let (batch_env, _) = inner.create_l1_batch_env(storage.clone()); - let system_env = inner.create_system_env(bootloader_code.clone(), execution_mode); + let system_env = inner.create_system_env(base_contracts, execution_mode); let mut vm: Vm<_, HistoryDisabled> = Vm::new(batch_env, system_env, storage.clone()); @@ -1251,13 +1285,13 @@ impl InMemoryNode { } } - // Validates L2 transaction - fn validate_tx(&self, tx: &L2Tx) -> Result<(), String> { + /// Validates L2 transaction + fn validate_tx(&self, tx: &L2Tx) -> anyhow::Result<()> { let max_gas = U256::from(u64::MAX); if tx.common_data.fee.gas_limit > max_gas || tx.common_data.fee.gas_per_pubdata_limit > max_gas { - return Err("exceeds block gas limit".into()); + anyhow::bail!("exceeds block gas limit"); } let l2_gas_price = self @@ -1272,7 +1306,7 @@ impl InMemoryNode { tx.hash(), tx.common_data.fee.max_fee_per_gas ); - return Err("block base fee higher than max fee per gas".into()); + anyhow::bail!("block base fee higher than max fee per gas"); } if tx.common_data.fee.max_fee_per_gas < tx.common_data.fee.max_priority_fee_per_gas { @@ -1281,7 +1315,7 @@ impl InMemoryNode { tx.hash(), tx.common_data.fee.max_fee_per_gas ); - return Err("max priority fee per gas higher than max fee per gas".into()); + anyhow::bail!("max priority fee per gas higher than max fee per gas"); } Ok(()) } @@ -1311,36 +1345,16 @@ impl InMemoryNode { pub fn run_l2_tx_raw( &self, l2_tx: L2Tx, - execution_mode: TxExecutionMode, - mut tracers: Vec< - TracerPointer>, zksync_multivm::vm_latest::HistoryDisabled>, - >, + system_contracts: BaseSystemContracts, execute_bootloader: bool, - ) -> Result { + ) -> anyhow::Result { let inner = self .inner .read() - .map_err(|e| format!("Failed to acquire read lock: {}", e))?; - + .map_err(|_| anyhow::anyhow!("Failed to acquire read lock"))?; let storage = StorageView::new(inner.fork_storage.clone()).into_rc_ptr(); - let (batch_env, block_ctx) = inner.create_l1_batch_env(storage.clone()); - - let bootloader_code = { - if inner - .impersonated_accounts - .contains(&l2_tx.common_data.initiator_address) - { - tracing::info!( - "🕵️ Executing tx from impersonated account {:?}", - l2_tx.common_data.initiator_address - ); - inner.system_contracts.contracts(execution_mode, true) - } else { - inner.system_contracts.contracts(execution_mode, false) - } - }; - let system_env = inner.create_system_env(bootloader_code.clone(), execution_mode); + let system_env = inner.create_system_env(system_contracts, TxExecutionMode::VerifyExecute); let mut vm: Vm<_, HistoryDisabled> = Vm::new(batch_env.clone(), system_env, storage.clone()); @@ -1350,19 +1364,17 @@ impl InMemoryNode { let call_tracer_result = Arc::new(OnceCell::default()); let bootloader_debug_result = Arc::new(OnceCell::default()); - tracers.push(CallErrorTracer::new().into_tracer_pointer()); - tracers.push(CallTracer::new(call_tracer_result.clone()).into_tracer_pointer()); - tracers.push( + let tracers = vec![ + CallErrorTracer::new().into_tracer_pointer(), + CallTracer::new(call_tracer_result.clone()).into_tracer_pointer(), BootloaderDebugTracer { result: bootloader_debug_result.clone(), } .into_tracer_pointer(), - ); - + ]; let (compressed_bytecodes, tx_result) = vm.inspect_transaction_with_bytecode_compression(&mut tracers.into(), tx.clone(), true); - let compressed_bytecodes = - compressed_bytecodes.map_err(|err| format!("failed compressing bytecodes: {err:?}"))?; + let compressed_bytecodes = compressed_bytecodes.context("failed compressing bytecodes")?; let call_traces = call_tracer_result.get().unwrap(); @@ -1476,15 +1488,12 @@ impl InMemoryNode { }; let mut bytecodes = HashMap::new(); - for b in compressed_bytecodes.iter() { - let hashcode = match bytecode_to_factory_dep(b.original.clone()) { - Ok(hc) => hc, - Err(error) => { - tracing::error!("{}", format!("cannot convert bytecode: {}", error).on_red()); - return Err(error.to_string()); - } - }; - bytecodes.insert(hashcode.0, hashcode.1); + for b in &*compressed_bytecodes { + let (hash, bytecode) = bytecode_to_factory_dep(b.original.clone()).map_err(|err| { + tracing::error!("{}", format!("cannot convert bytecode: {err}").on_red()); + err + })?; + bytecodes.insert(hash, bytecode); } if execute_bootloader { vm.execute(VmExecutionMode::Bootloader); @@ -1503,19 +1512,18 @@ impl InMemoryNode { } /// Runs L2 transaction and commits it to a new block. - pub fn run_l2_tx(&self, l2_tx: L2Tx, execution_mode: TxExecutionMode) -> Result<(), String> { + pub fn run_l2_tx( + &self, + l2_tx: L2Tx, + system_contracts: BaseSystemContracts, + ) -> anyhow::Result<()> { let tx_hash = l2_tx.hash(); let transaction_type = l2_tx.common_data.transaction_type; tracing::info!(""); tracing::info!("Validating {}", format!("{:?}", tx_hash).bold()); - match self.validate_tx(&l2_tx) { - Ok(_) => (), - Err(e) => { - return Err(e); - } - }; + self.validate_tx(&l2_tx)?; tracing::info!("Executing {}", format!("{:?}", tx_hash).bold()); @@ -1523,24 +1531,24 @@ impl InMemoryNode { let mut inner = self .inner .write() - .map_err(|e| format!("Failed to acquire write lock: {}", e))?; + .map_err(|_| anyhow::anyhow!("Failed to acquire write lock"))?; inner.filters.notify_new_pending_transaction(tx_hash); } let (keys, result, call_traces, block, bytecodes, block_ctx) = - self.run_l2_tx_raw(l2_tx.clone(), execution_mode, vec![], true)?; + self.run_l2_tx_raw(l2_tx.clone(), system_contracts, true)?; if let ExecutionResult::Halt { reason } = result.result { // Halt means that something went really bad with the transaction execution (in most cases invalid signature, // but it could also be bootloader panic etc). // In such case, we should not persist the VM data, and we should pretend that transaction never existed. - return Err(format!("Transaction HALT: {}", reason)); + anyhow::bail!("Transaction HALT: {reason}"); } // Write all the mutated keys (storage slots). let mut inner = self .inner .write() - .map_err(|e| format!("Failed to acquire write lock: {}", e))?; + .map_err(|_| anyhow::anyhow!("Failed to acquire write lock"))?; for (key, value) in keys.iter() { inner.fork_storage.set_value(*key, *value); } @@ -1811,9 +1819,11 @@ mod tests { .build(); node.set_rich_account(tx.common_data.initiator_address); - let result = node.run_l2_tx(tx, TxExecutionMode::VerifyExecute); - - assert_eq!(result.err(), Some("exceeds block gas limit".into())); + let system_contracts = node + .system_contracts_for_tx(tx.initiator_account()) + .unwrap(); + let err = node.run_l2_tx(tx, system_contracts).unwrap_err(); + assert_eq!(err.to_string(), "exceeds block gas limit"); } #[tokio::test] @@ -1824,11 +1834,14 @@ mod tests { .build(); node.set_rich_account(tx.common_data.initiator_address); - let result = node.run_l2_tx(tx, TxExecutionMode::VerifyExecute); + let system_contracts = node + .system_contracts_for_tx(tx.initiator_account()) + .unwrap(); + let err = node.run_l2_tx(tx, system_contracts).unwrap_err(); assert_eq!( - result.err(), - Some("block base fee higher than max fee per gas".into()) + err.to_string(), + "block base fee higher than max fee per gas" ); } @@ -1840,11 +1853,14 @@ mod tests { .build(); node.set_rich_account(tx.common_data.initiator_address); - let result = node.run_l2_tx(tx, TxExecutionMode::VerifyExecute); + let system_contracts = node + .system_contracts_for_tx(tx.initiator_account()) + .unwrap(); + let err = node.run_l2_tx(tx, system_contracts).unwrap_err(); assert_eq!( - result.err(), - Some("max priority fee per gas higher than max fee per gas".into()) + err.to_string(), + "max priority fee per gas higher than max fee per gas" ); } @@ -1885,7 +1901,10 @@ mod tests { let node = InMemoryNode::::default(); let tx = testing::TransactionBuilder::new().build(); node.set_rich_account(tx.common_data.initiator_address); - node.run_l2_tx(tx, TxExecutionMode::VerifyExecute).unwrap(); + let system_contracts = node + .system_contracts_for_tx(tx.initiator_account()) + .unwrap(); + node.run_l2_tx(tx, system_contracts).unwrap(); let external_storage = node.inner.read().unwrap().fork_storage.clone(); // Execute next transaction using a fresh in-memory node and the external fork storage @@ -1914,13 +1933,12 @@ mod tests { Default::default(), ); - node.run_l2_tx_raw( - testing::TransactionBuilder::new().build(), - TxExecutionMode::VerifyExecute, - vec![], - true, - ) - .expect("transaction must pass with external storage"); + let tx = testing::TransactionBuilder::new().build(); + let system_contracts = node + .system_contracts_for_tx(tx.initiator_account()) + .unwrap(); + node.run_l2_tx_raw(tx, system_contracts, true) + .expect("transaction must pass with external storage"); } #[tokio::test] @@ -1968,8 +1986,12 @@ mod tests { .expect("failed signing tx"); tx.common_data.transaction_type = TransactionType::LegacyTransaction; tx.set_input(vec![], H256::repeat_byte(0x2)); + + let system_contracts = node + .system_contracts_for_tx(tx.initiator_account()) + .unwrap(); let (_, result, ..) = node - .run_l2_tx_raw(tx, TxExecutionMode::VerifyExecute, vec![], true) + .run_l2_tx_raw(tx, system_contracts, true) .expect("failed tx"); match result.result { diff --git a/src/system_contracts.rs b/src/system_contracts.rs index 823c4d81..00b8fab0 100644 --- a/src/system_contracts.rs +++ b/src/system_contracts.rs @@ -33,7 +33,7 @@ pub struct SystemContracts { pub fn get_deployed_contracts(options: &Options) -> Vec { match options { Options::BuiltIn | Options::BuiltInWithoutSecurity => COMPILED_IN_SYSTEM_CONTRACTS.clone(), - Options::Local => get_system_smart_contracts(), + Options::Local => get_system_smart_contracts(false), // FIXME: select based on something } } @@ -121,6 +121,7 @@ fn bsc_load_with_bootloader( BaseSystemContracts { bootloader, default_aa, + evm_emulator: None, // FIXME: load when local } } diff --git a/src/testing.rs b/src/testing.rs index da9f9970..4ed4388f 100644 --- a/src/testing.rs +++ b/src/testing.rs @@ -653,6 +653,7 @@ pub fn default_tx_execution_info() -> TxExecutionInfo { logs: Default::default(), statistics: Default::default(), refunds: Default::default(), + new_known_factory_deps: None, }, } } From 34b3cd48592b88dd1b2c655c270474668eb43c62 Mon Sep 17 00:00:00 2001 From: Alex Ostrovski Date: Wed, 16 Oct 2024 13:35:25 +0300 Subject: [PATCH 2/7] Remove `zksync_state` dependency --- Cargo.lock | 233 +--------------------------------- Cargo.toml | 1 - src/bootloader_debug.rs | 2 +- src/deps/mod.rs | 2 +- src/deps/storage_view.rs | 2 +- src/fork.rs | 4 +- src/node/call_error_tracer.rs | 2 +- src/node/in_memory.rs | 2 +- src/node/in_memory_ext.rs | 2 +- src/utils.rs | 2 +- 10 files changed, 11 insertions(+), 241 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c8458eac..298c3c6a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -307,7 +307,7 @@ version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3ddc4a5b231dd6958b140ff3151b6412b3f4321fab354f399eec8f14b06df62" dependencies = [ - "bindgen 0.69.4", + "bindgen", "cc", "cmake", "dunce", @@ -363,18 +363,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "backon" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d67782c3f868daa71d3533538e98a8e13713231969def7536e8039606fc46bf0" -dependencies = [ - "fastrand", - "futures-core", - "pin-project", - "tokio", -] - [[package]] name = "backtrace" version = "0.3.69" @@ -475,27 +463,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.65.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" -dependencies = [ - "bitflags 1.3.2", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "peeking_take_while", - "prettyplease", - "proc-macro2 1.0.86", - "quote 1.0.35", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.77", -] - [[package]] name = "bindgen" version = "0.69.4" @@ -784,12 +751,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "bytecount" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" - [[package]] name = "byteorder" version = "1.5.0" @@ -844,19 +805,6 @@ dependencies = [ "serde", ] -[[package]] -name = "cargo_metadata" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" -dependencies = [ - "camino", - "cargo-platform", - "semver", - "serde", - "serde_json", -] - [[package]] name = "cargo_metadata" version = "0.18.1" @@ -1505,19 +1453,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if 1.0.0", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core 0.9.9", -] - [[package]] name = "data-encoding" version = "2.5.0" @@ -1924,7 +1859,6 @@ dependencies = [ "zksync_contracts", "zksync_multivm", "zksync_node_fee_model", - "zksync_state", "zksync_types", "zksync_utils", "zksync_web3_decl", @@ -1940,15 +1874,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "error-chain" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" -dependencies = [ - "version_check", -] - [[package]] name = "etcetera" version = "0.8.0" @@ -2167,7 +2092,7 @@ checksum = "aab3cef6cc1c9fd7f787043c81ad3052eff2b96a3878ef1526aa446311bdbfc9" dependencies = [ "arrayvec 0.7.4", "bytes", - "cargo_metadata 0.18.1", + "cargo_metadata", "chrono", "const-hex", "elliptic-curve 0.13.8", @@ -3915,22 +3840,6 @@ dependencies = [ "redox_syscall 0.4.1", ] -[[package]] -name = "librocksdb-sys" -version = "0.11.0+8.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" -dependencies = [ - "bindgen 0.65.1", - "bzip2-sys", - "cc", - "glob", - "libc", - "libz-sys", - "lz4-sys", - "zstd-sys", -] - [[package]] name = "libsqlite3-sys" version = "0.30.1" @@ -3942,17 +3851,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "libz-sys" -version = "1.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037731f5d3aaa87a5675e895b63ddff1a87624bc29f77004ea829809654e48f6" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - [[package]] name = "linux-raw-sys" version = "0.4.13" @@ -4007,16 +3905,6 @@ dependencies = [ "logos-codegen", ] -[[package]] -name = "lz4-sys" -version = "1.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "maplit" version = "1.0.2" @@ -4099,21 +3987,6 @@ dependencies = [ "unicase", ] -[[package]] -name = "mini-moka" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c325dfab65f261f386debee8b0969da215b3fa0037e74c8a1234db7ba986d803" -dependencies = [ - "crossbeam-channel", - "crossbeam-utils", - "dashmap", - "skeptic", - "smallvec", - "tagptr", - "triomphe", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -4802,12 +4675,6 @@ dependencies = [ "hmac", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "pem" version = "1.1.1" @@ -5365,17 +5232,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "pulldown-cmark" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" -dependencies = [ - "bitflags 2.6.0", - "memchr", - "unicase", -] - [[package]] name = "quick-error" version = "2.0.1" @@ -5896,16 +5752,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "rocksdb" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" -dependencies = [ - "libc", - "librocksdb-sys", -] - [[package]] name = "route-recognizer" version = "0.3.1" @@ -6659,21 +6505,6 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" -[[package]] -name = "skeptic" -version = "0.13.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d23b015676c90a0f01c197bfdc786c20342c73a0afdda9025adb0bc42940a8" -dependencies = [ - "bytecount", - "cargo_metadata 0.14.2", - "error-chain", - "glob", - "pulldown-cmark", - "tempfile", - "walkdir", -] - [[package]] name = "slab" version = "0.4.9" @@ -7206,12 +7037,6 @@ dependencies = [ "libc", ] -[[package]] -name = "tagptr" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" - [[package]] name = "tap" version = "1.0.1" @@ -7714,12 +7539,6 @@ dependencies = [ "tracing-serde", ] -[[package]] -name = "triomphe" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" - [[package]] name = "try-lock" version = "0.2.5" @@ -9288,18 +9107,6 @@ dependencies = [ "zksync_types", ] -[[package]] -name = "zksync_shared_metrics" -version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" -dependencies = [ - "rustc_version", - "tracing", - "vise", - "zksync_dal", - "zksync_types", -] - [[package]] name = "zksync_solidity_vk_codegen" version = "0.30.1" @@ -9317,42 +9124,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "zksync_state" -version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" -dependencies = [ - "anyhow", - "async-trait", - "backon", - "chrono", - "itertools 0.10.5", - "mini-moka", - "once_cell", - "tokio", - "tracing", - "vise", - "zksync_dal", - "zksync_shared_metrics", - "zksync_storage", - "zksync_types", - "zksync_utils", - "zksync_vm_interface", -] - -[[package]] -name = "zksync_storage" -version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" -dependencies = [ - "num_cpus", - "once_cell", - "rocksdb", - "thread_local", - "tracing", - "vise", -] - [[package]] name = "zksync_system_constants" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 6b56c976..57aee558 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,6 @@ zksync_multivm = { git = "https://github.com/matter-labs/zksync-era.git", rev = zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } -zksync_state = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } zksync_web3_decl = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae", features = [ "server", ] } diff --git a/src/bootloader_debug.rs b/src/bootloader_debug.rs index 5aef27a7..816147b6 100644 --- a/src/bootloader_debug.rs +++ b/src/bootloader_debug.rs @@ -5,11 +5,11 @@ use zksync_multivm::{ use once_cell::sync::OnceCell; use zksync_basic_types::U256; +use zksync_multivm::interface::storage::WriteStorage; use zksync_multivm::vm_latest::{ constants::BOOTLOADER_HEAP_PAGE, BootloaderState, HistoryMode, SimpleMemory, VmTracer, ZkSyncVmState, }; -use zksync_state::interface::WriteStorage; /// Magic value that we put in bootloader.yul at the beginning of the debug section - to detect that /// debugger was enabled. diff --git a/src/deps/mod.rs b/src/deps/mod.rs index 060ee37a..5b74258b 100644 --- a/src/deps/mod.rs +++ b/src/deps/mod.rs @@ -5,7 +5,7 @@ use zksync_types::{ H256, }; pub mod storage_view; -use zksync_state::interface::ReadStorage; +use zksync_multivm::interface::storage::ReadStorage; /// In-memory storage. #[derive(Debug, Default, Clone, PartialEq)] diff --git a/src/deps/storage_view.rs b/src/deps/storage_view.rs index ae950652..a628ba2f 100644 --- a/src/deps/storage_view.rs +++ b/src/deps/storage_view.rs @@ -1,6 +1,6 @@ use std::{cell::RefCell, collections::HashMap, fmt, rc::Rc}; -use zksync_state::interface::{ReadStorage, WriteStorage}; +use zksync_multivm::interface::storage::{ReadStorage, WriteStorage}; use zksync_types::{StorageKey, StorageValue, H256}; /// `StorageView` is a buffer for `StorageLog`s between storage and transaction execution code. diff --git a/src/fork.rs b/src/fork.rs index 71d30c63..29aab0ca 100644 --- a/src/fork.rs +++ b/src/fork.rs @@ -28,7 +28,7 @@ use zksync_types::{ ProtocolVersionId, StorageKey, }; -use zksync_state::interface::ReadStorage; +use zksync_multivm::interface::storage::ReadStorage; use zksync_utils::{bytecode::hash_bytecode, h256_to_u256}; use zksync_web3_decl::{ @@ -723,7 +723,7 @@ impl ForkDetails { #[cfg(test)] mod tests { use zksync_basic_types::{AccountTreeId, L1BatchNumber, H256}; - use zksync_state::interface::ReadStorage; + use zksync_multivm::interface::storage::ReadStorage; use zksync_types::{api::TransactionVariant, StorageKey}; use crate::config::cache::CacheConfig; diff --git a/src/node/call_error_tracer.rs b/src/node/call_error_tracer.rs index 8af50257..ae10614f 100644 --- a/src/node/call_error_tracer.rs +++ b/src/node/call_error_tracer.rs @@ -1,3 +1,4 @@ +use zksync_multivm::interface::storage::WriteStorage; use zksync_multivm::{ tracers::dynamic::vm_1_5_0::DynTracer, vm_latest::{HistoryMode, SimpleMemory, VmTracer}, @@ -6,7 +7,6 @@ use zksync_multivm::{ vm_state::ErrorFlags, }, }; -use zksync_state::interface::WriteStorage; pub struct CallErrorTracer {} diff --git a/src/node/in_memory.rs b/src/node/in_memory.rs index d84ce27d..f913428b 100644 --- a/src/node/in_memory.rs +++ b/src/node/in_memory.rs @@ -36,6 +36,7 @@ use zksync_basic_types::{ U256, U64, }; use zksync_contracts::BaseSystemContracts; +use zksync_multivm::interface::storage::{ReadStorage, StoragePtr, WriteStorage}; use zksync_multivm::{ interface::{ Call, ExecutionResult, L1BatchEnv, L2Block, L2BlockEnv, SystemEnv, TxExecutionMode, @@ -58,7 +59,6 @@ use zksync_multivm::{ }, }; use zksync_node_fee_model::BatchFeeModelInputProvider; -use zksync_state::interface::{ReadStorage, StoragePtr, WriteStorage}; use zksync_types::{ api::{Block, DebugCall, Log, TransactionReceipt, TransactionVariant}, block::{unpack_block_info, L2BlockHasher}, diff --git a/src/node/in_memory_ext.rs b/src/node/in_memory_ext.rs index 0a793246..0be7e286 100644 --- a/src/node/in_memory_ext.rs +++ b/src/node/in_memory_ext.rs @@ -398,7 +398,7 @@ mod tests { use std::str::FromStr; use std::sync::{Arc, RwLock}; use zksync_basic_types::{Nonce, H256}; - use zksync_state::interface::ReadStorage; + use zksync_multivm::interface::storage::ReadStorage; use zksync_types::{api::BlockNumber, fee::Fee, l2::L2Tx, PackedEthSignature}; #[tokio::test] diff --git a/src/utils.rs b/src/utils.rs index f9bba0da..f62f4449 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -8,12 +8,12 @@ use futures::Future; use jsonrpc_core::{Error, ErrorCode}; use zkevm_opcode_defs::utils::bytecode_to_code_hash; use zksync_basic_types::{H256, U256, U64}; +use zksync_multivm::interface::storage::WriteStorage; use zksync_multivm::interface::{ Call, CallType, ExecutionResult, VmExecutionResultAndLogs, VmFactory, VmInterfaceExt, }; use zksync_multivm::vm_latest::HistoryDisabled; use zksync_multivm::vm_latest::Vm; -use zksync_state::interface::WriteStorage; use zksync_types::api::{BlockNumber, DebugCall, DebugCallType}; use zksync_types::l2::L2Tx; use zksync_types::web3::Bytes; From 89e767477cf2865309ca6e87be4e5ad1b925761e Mon Sep 17 00:00:00 2001 From: Alex Ostrovski Date: Wed, 16 Oct 2024 16:28:55 +0300 Subject: [PATCH 3/7] Allow EVM emulation via command-line arg --- src/config/cli.rs | 4 ++ src/config/mod.rs | 10 ++++ src/deps/mod.rs | 6 +- src/fork.rs | 6 +- src/node/in_memory.rs | 22 ++++++-- src/node/in_memory_ext.rs | 2 +- src/system_contracts.rs | 113 ++++++++++++++++++++++---------------- 7 files changed, 107 insertions(+), 56 deletions(-) diff --git a/src/config/cli.rs b/src/config/cli.rs index b6ddb85d..1aa08b67 100644 --- a/src/config/cli.rs +++ b/src/config/cli.rs @@ -74,6 +74,10 @@ pub struct Cli { #[arg(long)] pub dev_system_contracts: Option, + /// Enables EVM emulation. Currently, this requires local system contracts because there is no canonical EVM interpreter released yet. + #[arg(long, requires = "dev-system-contracts")] + pub emulate_evm: bool, + /// Log filter level - default: info #[arg(long)] pub log: Option, diff --git a/src/config/mod.rs b/src/config/mod.rs index df036715..b35af3b3 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -88,6 +88,14 @@ impl TestNodeConfig { DevSystemContracts::Local => system_contracts::Options::Local, }; } + if opt.emulate_evm { + assert_eq!( + self.node.system_contracts_options, + system_contracts::Options::Local, + "EVM emulation currently requires using local contracts" + ); + self.node.use_evm_emulator = true; + } // [`GasConfig`] if let Some(l1_gas_price) = &opt.l1_gas_price { @@ -140,6 +148,7 @@ pub mod node { pub show_gas_details: ShowGasDetails, pub resolve_hashes: bool, pub system_contracts_options: system_contracts::Options, + pub use_evm_emulator: bool, } impl Default for InMemoryNodeConfig { @@ -153,6 +162,7 @@ pub mod node { show_gas_details: Default::default(), resolve_hashes: Default::default(), system_contracts_options: Default::default(), + use_evm_emulator: false, } } } diff --git a/src/deps/mod.rs b/src/deps/mod.rs index 5b74258b..3e886afd 100644 --- a/src/deps/mod.rs +++ b/src/deps/mod.rs @@ -20,8 +20,12 @@ impl InMemoryStorage { chain_id: L2ChainId, bytecode_hasher: impl Fn(&[u8]) -> H256, system_contracts_options: &crate::system_contracts::Options, + use_evm_emulator: bool, ) -> Self { - let contracts = crate::system_contracts::get_deployed_contracts(system_contracts_options); + let contracts = crate::system_contracts::get_deployed_contracts( + system_contracts_options, + use_evm_emulator, + ); let system_context_init_log = get_system_context_init_logs(chain_id); diff --git a/src/fork.rs b/src/fork.rs index 29aab0ca..d85d1b37 100644 --- a/src/fork.rs +++ b/src/fork.rs @@ -124,6 +124,7 @@ impl ForkStorage { pub fn new( fork: Option, system_contracts_options: &system_contracts::Options, + use_evm_emulator: bool, ) -> Self { let chain_id = fork .as_ref() @@ -137,6 +138,7 @@ impl ForkStorage { chain_id, hash_bytecode, system_contracts_options, + use_evm_emulator, ), value_read_cache: Default::default(), fork, @@ -769,11 +771,11 @@ mod tests { }; let mut fork_storage: ForkStorage = - ForkStorage::new(Some(fork_details), &options); + ForkStorage::new(Some(fork_details), &options, false); assert!(fork_storage.is_write_initial(&never_written_key)); assert!(!fork_storage.is_write_initial(&key_with_some_value)); - // This is the current limitation of the sytem. In theory, this should return false - as the value was written, but we don't have the API to the + // This is the current limitation of the system. In theory, this should return false - as the value was written, but we don't have the API to the // backend to get this information. assert!(fork_storage.is_write_initial(&key_with_value_0)); diff --git a/src/node/in_memory.rs b/src/node/in_memory.rs index f913428b..f9b646d4 100644 --- a/src/node/in_memory.rs +++ b/src/node/in_memory.rs @@ -237,10 +237,17 @@ impl InMemoryNodeInner { blocks, block_hashes, filters: Default::default(), - fork_storage: ForkStorage::new(fork, &config.system_contracts_options), + fork_storage: ForkStorage::new( + fork, + &config.system_contracts_options, + config.use_evm_emulator, + ), config, console_log_handler: ConsoleLogHandler::default(), - system_contracts: SystemContracts::from_options(&config.system_contracts_options), + system_contracts: SystemContracts::from_options( + &config.system_contracts_options, + config.use_evm_emulator, + ), impersonated_accounts: Default::default(), rich_accounts: HashSet::new(), previous_states: Default::default(), @@ -268,10 +275,17 @@ impl InMemoryNodeInner { blocks, block_hashes, filters: Default::default(), - fork_storage: ForkStorage::new(fork, &config.system_contracts_options), + fork_storage: ForkStorage::new( + fork, + &config.system_contracts_options, + config.use_evm_emulator, + ), config, console_log_handler: ConsoleLogHandler::default(), - system_contracts: SystemContracts::from_options(&config.system_contracts_options), + system_contracts: SystemContracts::from_options( + &config.system_contracts_options, + config.use_evm_emulator, + ), impersonated_accounts: Default::default(), rich_accounts: HashSet::new(), previous_states: Default::default(), diff --git a/src/node/in_memory_ext.rs b/src/node/in_memory_ext.rs index 0be7e286..4eebb901 100644 --- a/src/node/in_memory_ext.rs +++ b/src/node/in_memory_ext.rs @@ -514,7 +514,7 @@ mod tests { blocks: Default::default(), block_hashes: Default::default(), filters: Default::default(), - fork_storage: ForkStorage::new(None, &old_system_contracts_options), + fork_storage: ForkStorage::new(None, &old_system_contracts_options, false), config: Default::default(), console_log_handler: Default::default(), system_contracts: Default::default(), diff --git a/src/system_contracts.rs b/src/system_contracts.rs index 00b8fab0..2b662d54 100644 --- a/src/system_contracts.rs +++ b/src/system_contracts.rs @@ -1,6 +1,6 @@ use serde::Deserialize; use zksync_contracts::{ - read_sys_contract_bytecode, read_zbin_bytecode, BaseSystemContracts, ContractLanguage, + read_bootloader_code, read_sys_contract_bytecode, BaseSystemContracts, ContractLanguage, SystemContractCode, }; use zksync_multivm::interface::TxExecutionMode; @@ -30,30 +30,39 @@ pub struct SystemContracts { pub fee_estimate_impersonating_contracts: BaseSystemContracts, } -pub fn get_deployed_contracts(options: &Options) -> Vec { +pub fn get_deployed_contracts( + options: &Options, + use_evm_emulator: bool, +) -> Vec { match options { Options::BuiltIn | Options::BuiltInWithoutSecurity => COMPILED_IN_SYSTEM_CONTRACTS.clone(), - Options::Local => get_system_smart_contracts(false), // FIXME: select based on something + Options::Local => get_system_smart_contracts(use_evm_emulator), } } impl Default for SystemContracts { /// Creates SystemContracts that use compiled-in contracts. fn default() -> Self { - SystemContracts::from_options(&Options::BuiltIn) + SystemContracts::from_options(&Options::BuiltIn, false) } } impl SystemContracts { /// Creates the SystemContracts that use the complied contracts from ZKSYNC_HOME path. /// These are loaded at binary runtime. - pub fn from_options(options: &Options) -> Self { + pub fn from_options(options: &Options, use_evm_emulator: bool) -> Self { Self { - baseline_contracts: baseline_contracts(options), - playground_contracts: playground(options), - fee_estimate_contracts: fee_estimate_contracts(options), - baseline_impersonating_contracts: baseline_impersonating_contracts(options), - fee_estimate_impersonating_contracts: fee_estimate_impersonating_contracts(options), + baseline_contracts: baseline_contracts(options, use_evm_emulator), + playground_contracts: playground(options, use_evm_emulator), + fee_estimate_contracts: fee_estimate_contracts(options, use_evm_emulator), + baseline_impersonating_contracts: baseline_impersonating_contracts( + options, + use_evm_emulator, + ), + fee_estimate_impersonating_contracts: fee_estimate_impersonating_contracts( + options, + use_evm_emulator, + ), } } pub fn contracts_for_l2_call(&self) -> &BaseSystemContracts { @@ -91,6 +100,7 @@ impl SystemContracts { fn bsc_load_with_bootloader( bootloader_bytecode: Vec, options: &Options, + use_evm_emulator: bool, ) -> BaseSystemContracts { let hash = hash_bytecode(&bootloader_bytecode); @@ -99,7 +109,7 @@ fn bsc_load_with_bootloader( hash, }; - let bytecode = match options { + let aa_bytecode = match options { Options::BuiltIn => bytecode_from_slice( "DefaultAccount", include_bytes!("deps/contracts/DefaultAccount.json"), @@ -111,94 +121,101 @@ fn bsc_load_with_bootloader( ), }; - let hash = hash_bytecode(&bytecode); - + let aa_hash = hash_bytecode(&aa_bytecode); let default_aa = SystemContractCode { - code: bytes_to_be_words(bytecode), - hash, + code: bytes_to_be_words(aa_bytecode), + hash: aa_hash, + }; + + let evm_emulator = if use_evm_emulator { + let evm_emulator_bytecode = match options { + Options::Local => { + read_sys_contract_bytecode("", "EvmInterpreter", ContractLanguage::Yul) + } + Options::BuiltIn | Options::BuiltInWithoutSecurity => { + panic!("no built-in EVM emulator yet") + } + }; + let evm_emulator_hash = hash_bytecode(&evm_emulator_bytecode); + Some(SystemContractCode { + code: bytes_to_be_words(evm_emulator_bytecode), + hash: evm_emulator_hash, + }) + } else { + None }; BaseSystemContracts { bootloader, default_aa, - evm_emulator: None, // FIXME: load when local + evm_emulator, } } /// BaseSystemContracts with playground bootloader - used for handling 'eth_calls'. -pub fn playground(options: &Options) -> BaseSystemContracts { +pub fn playground(options: &Options, use_evm_emulator: bool) -> BaseSystemContracts { let bootloader_bytecode = match options { Options::BuiltIn | Options::BuiltInWithoutSecurity => { include_bytes!("deps/contracts/playground_batch.yul.zbin").to_vec() } - Options::Local => read_zbin_bytecode( - "contracts/system-contracts/bootloader/build/artifacts/playground_batch.yul.zbin", - ), + Options::Local => read_bootloader_code("playground_batch"), }; - bsc_load_with_bootloader(bootloader_bytecode, options) + bsc_load_with_bootloader(bootloader_bytecode, options, use_evm_emulator) } /// Returns the system contracts for fee estimation. /// -/// # Arguments -/// -/// * `use_local_contracts` - A boolean indicating whether to use local contracts or not. -/// /// # Returns /// /// A `BaseSystemContracts` struct containing the system contracts used for handling 'eth_estimateGas'. /// It sets ENSURE_RETURNED_MAGIC to 0 and BOOTLOADER_TYPE to 'playground_block' -pub fn fee_estimate_contracts(options: &Options) -> BaseSystemContracts { +pub fn fee_estimate_contracts(options: &Options, use_evm_emulator: bool) -> BaseSystemContracts { let bootloader_bytecode = match options { Options::BuiltIn | Options::BuiltInWithoutSecurity => { include_bytes!("deps/contracts/fee_estimate.yul.zbin").to_vec() } - Options::Local => read_zbin_bytecode( - "contracts/system-contracts/bootloader/build/artifacts/fee_estimate.yul.zbin", - ), + Options::Local => read_bootloader_code("fee_estimate"), }; - bsc_load_with_bootloader(bootloader_bytecode, options) + bsc_load_with_bootloader(bootloader_bytecode, options, use_evm_emulator) } -pub fn fee_estimate_impersonating_contracts(options: &Options) -> BaseSystemContracts { +pub fn fee_estimate_impersonating_contracts( + options: &Options, + use_evm_emulator: bool, +) -> BaseSystemContracts { let bootloader_bytecode = match options { Options::BuiltIn | Options::BuiltInWithoutSecurity => { include_bytes!("deps/contracts/fee_estimate_impersonating.yul.zbin").to_vec() } - Options::Local => { - // Account impersonating is not supported with the local contracts - read_zbin_bytecode( - "contracts/system-contracts/bootloader/build/artifacts/fee_estimate.yul.zbin", - ) - } + // Account impersonating is not supported with the local contracts + Options::Local => read_bootloader_code("fee_estimate"), }; - bsc_load_with_bootloader(bootloader_bytecode, options) + bsc_load_with_bootloader(bootloader_bytecode, options, use_evm_emulator) } -pub fn baseline_contracts(options: &Options) -> BaseSystemContracts { +pub fn baseline_contracts(options: &Options, use_evm_emulator: bool) -> BaseSystemContracts { let bootloader_bytecode = match options { Options::BuiltIn | Options::BuiltInWithoutSecurity => { include_bytes!("deps/contracts/proved_batch.yul.zbin").to_vec() } - Options::Local => read_zbin_bytecode( - "contracts/system-contracts/bootloader/build/artifacts/proved_batch.yul.zbin", - ), + Options::Local => read_bootloader_code("proved_batch"), }; - bsc_load_with_bootloader(bootloader_bytecode, options) + bsc_load_with_bootloader(bootloader_bytecode, options, use_evm_emulator) } -pub fn baseline_impersonating_contracts(options: &Options) -> BaseSystemContracts { +pub fn baseline_impersonating_contracts( + options: &Options, + use_evm_emulator: bool, +) -> BaseSystemContracts { let bootloader_bytecode = match options { Options::BuiltIn | Options::BuiltInWithoutSecurity => { include_bytes!("deps/contracts/proved_batch_impersonating.yul.zbin").to_vec() } // Account impersonating is not supported with the local contracts - Options::Local => read_zbin_bytecode( - "contracts/system-contracts/bootloader/build/artifacts/proved_batch.yul.zbin", - ), + Options::Local => read_bootloader_code("proved_batch"), }; - bsc_load_with_bootloader(bootloader_bytecode, options) + bsc_load_with_bootloader(bootloader_bytecode, options, use_evm_emulator) } From 63d7f294366fda4dd07ebe25a3b4937219ff9884 Mon Sep 17 00:00:00 2001 From: Alex Ostrovski Date: Thu, 17 Oct 2024 10:10:28 +0300 Subject: [PATCH 4/7] Fix transparent error messages --- src/node/eth.rs | 10 +++++----- src/utils.rs | 27 ++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/node/eth.rs b/src/node/eth.rs index 3908ae42..b7c87f7b 100644 --- a/src/node/eth.rs +++ b/src/node/eth.rs @@ -32,7 +32,7 @@ use crate::{ node::{InMemoryNode, TransactionResult, MAX_TX_SIZE, PROTOCOL_VERSION}, utils::{ self, h256_to_u64, into_jsrpc_error, not_implemented, report_into_jsrpc_error, - IntoBoxedFuture, + IntoBoxedFuture, TransparentError, }, }; @@ -136,9 +136,9 @@ impl InMemoryNo // EIP-1559 gas fields should be processed separately if tx.gas_price.is_some() { if tx.max_fee_per_gas.is_some() || tx.max_priority_fee_per_gas.is_some() { - let err = anyhow::anyhow!("Transaction contains unsupported fields: max_fee_per_gas or max_priority_fee_per_gas"); + let err = "Transaction contains unsupported fields: max_fee_per_gas or max_priority_fee_per_gas"; tracing::error!("{err}"); - return Err(err.into()); + return Err(TransparentError(err.into()).into()); } } else { tx_req.gas_price = tx.max_fee_per_gas.unwrap_or(U256::from(l1_gas_price)); @@ -179,12 +179,12 @@ impl InMemoryNo .impersonated_accounts .contains(&l2_tx.common_data.initiator_address) { - let err = anyhow::anyhow!( + let err = format!( "Initiator address {:?} is not allowed to perform transactions", l2_tx.common_data.initiator_address ); tracing::error!("{err}"); - return Err(err.into()); + return Err(TransparentError(err).into()); } } diff --git a/src/utils.rs b/src/utils.rs index f62f4449..b7df5137 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -294,8 +294,15 @@ pub fn into_jsrpc_error(err: Web3Error) -> Error { ErrorCode::ServerError(3) } }, - message: match err { + message: match &err { Web3Error::SubmitTransactionError(_, _) => err.to_string(), + Web3Error::InternalError(err) => { + if let Some(TransparentError(message)) = err.downcast_ref() { + message.clone() + } else { + err.to_string() + } + } _ => err.to_string(), }, data: match err { @@ -307,6 +314,24 @@ pub fn into_jsrpc_error(err: Web3Error) -> Error { } } +/// Error that can be converted to a [`Web3Error`] and has transparent JSON-RPC error message (unlike `anyhow::Error` conversions). +#[derive(Debug)] +pub(crate) struct TransparentError(pub String); + +impl fmt::Display for TransparentError { + fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { + formatter.write_str(&self.0) + } +} + +impl std::error::Error for TransparentError {} + +impl From for Web3Error { + fn from(err: TransparentError) -> Self { + Self::InternalError(err.into()) + } +} + pub fn into_jsrpc_error_message(msg: String) -> Error { Error { code: ErrorCode::InternalError, From f2e7fca56340ea1ca585c19f4ab1df97b2dd1f79 Mon Sep 17 00:00:00 2001 From: Alex Ostrovski Date: Mon, 21 Oct 2024 15:02:42 +0300 Subject: [PATCH 5/7] Update `zksync-era` revision --- Cargo.lock | 222 +++++++++++++++++++++------------------- Cargo.toml | 14 +-- src/system_contracts.rs | 4 +- 3 files changed, 126 insertions(+), 114 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 298c3c6a..8228a4ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -51,9 +51,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ "getrandom 0.2.12", "once_cell", @@ -62,9 +62,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.7" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if 1.0.0", "once_cell", @@ -83,9 +83,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "android-tzdata" @@ -664,9 +664,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.3.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d4d6dafc1a3bb54687538972158f07b2c948bc57d5890df22c0739098b3028" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" dependencies = [ "borsh-derive", "cfg_aliases", @@ -674,12 +674,12 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.3.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4918709cc4dd777ad2b6303ed03cb37f3ca0ccede8c1b0d28ac6db8f4710e0" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.2.0", "proc-macro2 1.0.86", "quote 1.0.35", "syn 2.0.77", @@ -859,9 +859,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" @@ -926,14 +926,14 @@ dependencies = [ [[package]] name = "circuit_encodings" -version = "0.150.5" +version = "0.150.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e67617688c66640c84f9b98ff26d48f7898dca4faeb45241a4f21ec333788e7b" +checksum = "f5128d4b8fbb27ac453f573a95601058e74487bdafd22a3168cded66bf340c28" dependencies = [ "derivative", "serde", - "zk_evm 0.150.5", - "zkevm_circuits 0.150.5", + "zk_evm 0.150.6", + "zkevm_circuits 0.150.6", ] [[package]] @@ -993,11 +993,11 @@ dependencies = [ [[package]] name = "circuit_sequencer_api" -version = "0.150.5" +version = "0.150.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21017310971d4a051e4a52ad70eed11d1ae69defeca8314f73a3a4bad16705a9" +checksum = "093d0c2c0b39144ddb4e1e88d73d95067ce34ec7750808b2eed01edbb510b88e" dependencies = [ - "circuit_encodings 0.150.5", + "circuit_encodings 0.150.6", "derivative", "rayon", "serde", @@ -1244,9 +1244,9 @@ dependencies = [ [[package]] name = "crc" -version = "3.0.1" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" dependencies = [ "crc-catalog", ] @@ -1670,9 +1670,9 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek", "ed25519", @@ -2294,9 +2294,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.6" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "findshlibs" @@ -2310,12 +2310,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" - [[package]] name = "firestorm" version = "0.5.1" @@ -2364,9 +2358,9 @@ dependencies = [ [[package]] name = "flume" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" dependencies = [ "futures-core", "futures-sink", @@ -2868,7 +2862,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.7", + "ahash 0.7.8", ] [[package]] @@ -2877,7 +2871,7 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.7", + "ahash 0.8.11", "allocator-api2", ] @@ -4267,7 +4261,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.2.0", "proc-macro2 1.0.86", "quote 1.0.35", "syn 2.0.77", @@ -4578,9 +4572,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -5432,6 +5426,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +dependencies = [ + "bitflags 2.6.0", +] + [[package]] name = "redox_users" version = "0.4.4" @@ -5703,9 +5706,9 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" +checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" dependencies = [ "bitvec 1.0.1", "bytecheck", @@ -5721,9 +5724,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" +checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.35", @@ -5780,9 +5783,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.34.2" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "755392e1a2f77afd95580d3f0d0e94ac83eeeb7167552c9b5bca549e61a94d83" +checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" dependencies = [ "arrayvec 0.7.4", "borsh", @@ -6483,9 +6486,9 @@ dependencies = [ [[package]] name = "simdutf8" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "simple_asn1" @@ -6606,11 +6609,10 @@ checksum = "c85070f382340e8b23a75808e83573ddf65f9ad9143df9573ca37c1ed2ee956a" [[package]] name = "sqlformat" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" +checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" dependencies = [ - "itertools 0.12.1", "nom", "unicode_categories", ] @@ -6850,13 +6852,13 @@ dependencies = [ [[package]] name = "stringprep" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" dependencies = [ - "finl_unicode", "unicode-bidi", "unicode-normalization", + "unicode-properties", ] [[package]] @@ -7640,6 +7642,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" + [[package]] name = "unicode-segmentation" version = "1.10.1" @@ -7847,6 +7855,12 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + [[package]] name = "wasm-bindgen" version = "0.2.90" @@ -7975,9 +7989,13 @@ dependencies = [ [[package]] name = "whoami" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" +dependencies = [ + "redox_syscall 0.5.7", + "wasite", +] [[package]] name = "winapi" @@ -8273,18 +8291,18 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2 1.0.86", "quote 1.0.35", @@ -8399,9 +8417,9 @@ dependencies = [ [[package]] name = "zk_evm" -version = "0.150.5" +version = "0.150.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6e69931f24db5cf333b714721e8d80ff88bfdb7da8c3dc7882612ffddb8d27" +checksum = "c14bda6c101389145cd01fac900f1392876bc0284d98faf7f376237baa2cb19d" dependencies = [ "anyhow", "lazy_static", @@ -8409,7 +8427,7 @@ dependencies = [ "serde", "serde_json", "static_assertions", - "zk_evm_abstractions 0.150.5", + "zk_evm_abstractions 0.150.6", ] [[package]] @@ -8440,15 +8458,15 @@ dependencies = [ [[package]] name = "zk_evm_abstractions" -version = "0.150.5" +version = "0.150.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6b0720261ab55490fe3a96e96de30d5d7b277940b52ea7f52dbf564eb1748" +checksum = "a008f2442fc6a508bdd1f902380242cb6ff11b8b27acdac2677c6d9f75cbb004" dependencies = [ "anyhow", "num_enum 0.6.1", "serde", "static_assertions", - "zkevm_opcode_defs 0.150.5", + "zkevm_opcode_defs 0.150.6", ] [[package]] @@ -8497,9 +8515,9 @@ dependencies = [ [[package]] name = "zkevm_circuits" -version = "0.150.5" +version = "0.150.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784fa7cfb51e17c5ced112bca43da30b3468b2347b7af0427ad9638759fb140e" +checksum = "1f68518aedd5358b17224771bb78bacd912cf66011aeda98b1f887cfb9e0972f" dependencies = [ "arrayvec 0.7.4", "boojum", @@ -8511,7 +8529,7 @@ dependencies = [ "seq-macro", "serde", "smallvec", - "zkevm_opcode_defs 0.150.5", + "zkevm_opcode_defs 0.150.6", "zksync_cs_derive", ] @@ -8559,9 +8577,9 @@ dependencies = [ [[package]] name = "zkevm_opcode_defs" -version = "0.150.5" +version = "0.150.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79055eae1b6c1ab80793ed9d77d2964c9c896afa4b5dfed278cf58cd10acfe8f" +checksum = "762b5f1c1b283c5388995a85d40a05aef1c14f50eb904998b7e9364739f5b899" dependencies = [ "bitflags 2.6.0", "blake2 0.10.6", @@ -8614,7 +8632,7 @@ dependencies = [ [[package]] name = "zksync_basic_types" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "anyhow", "chrono", @@ -8676,7 +8694,7 @@ dependencies = [ [[package]] name = "zksync_config" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "anyhow", "rand 0.8.5", @@ -8771,7 +8789,7 @@ dependencies = [ [[package]] name = "zksync_contracts" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "envy", "ethabi 18.0.0", @@ -8785,7 +8803,7 @@ dependencies = [ [[package]] name = "zksync_crypto_primitives" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "anyhow", "blake2 0.10.6", @@ -8815,7 +8833,7 @@ dependencies = [ [[package]] name = "zksync_dal" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "anyhow", "bigdecimal 0.4.5", @@ -8852,7 +8870,7 @@ dependencies = [ [[package]] name = "zksync_db_connection" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "anyhow", "rand 0.8.5", @@ -8869,7 +8887,7 @@ dependencies = [ [[package]] name = "zksync_eth_client" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "async-trait", "jsonrpsee", @@ -8887,7 +8905,7 @@ dependencies = [ [[package]] name = "zksync_eth_signer" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "async-trait", "rlp", @@ -8926,9 +8944,9 @@ dependencies = [ [[package]] name = "zksync_kzg" -version = "0.150.5" +version = "0.150.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb8a9c76c172a6d639855ee342b9a670e3ba472f5ae302f771b1c3ee777dc88" +checksum = "6c006b6b7a27cc50ff0c515b6d0b197dbb907bbf65d1d2ea42fc3ed21b315642" dependencies = [ "boojum", "derivative", @@ -8938,13 +8956,13 @@ dependencies = [ "serde", "serde_json", "serde_with", - "zkevm_circuits 0.150.5", + "zkevm_circuits 0.150.6", ] [[package]] name = "zksync_l1_contract_interface" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "anyhow", "hex", @@ -8960,7 +8978,7 @@ dependencies = [ [[package]] name = "zksync_mini_merkle_tree" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "once_cell", "zksync_basic_types", @@ -8970,14 +8988,14 @@ dependencies = [ [[package]] name = "zksync_multivm" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "anyhow", "circuit_sequencer_api 0.133.1", "circuit_sequencer_api 0.140.3", "circuit_sequencer_api 0.141.2", "circuit_sequencer_api 0.142.2", - "circuit_sequencer_api 0.150.5", + "circuit_sequencer_api 0.150.6", "ethabi 18.0.0", "hex", "itertools 0.10.5", @@ -8989,7 +9007,7 @@ dependencies = [ "zk_evm 0.133.0", "zk_evm 0.140.0", "zk_evm 0.141.0", - "zk_evm 0.150.5", + "zk_evm 0.150.6", "zksync_contracts", "zksync_system_constants", "zksync_types", @@ -9001,11 +9019,10 @@ dependencies = [ [[package]] name = "zksync_node_fee_model" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "anyhow", "async-trait", - "bigdecimal 0.4.5", "tokio", "tracing", "vise", @@ -9013,14 +9030,13 @@ dependencies = [ "zksync_dal", "zksync_eth_client", "zksync_types", - "zksync_utils", "zksync_web3_decl", ] [[package]] name = "zksync_object_store" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "anyhow", "async-trait", @@ -9095,10 +9111,10 @@ dependencies = [ [[package]] name = "zksync_prover_interface" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "chrono", - "circuit_sequencer_api 0.150.5", + "circuit_sequencer_api 0.150.6", "serde", "serde_with", "strum 0.26.3", @@ -9127,7 +9143,7 @@ dependencies = [ [[package]] name = "zksync_system_constants" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "once_cell", "zksync_basic_types", @@ -9137,7 +9153,7 @@ dependencies = [ [[package]] name = "zksync_types" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "anyhow", "bigdecimal 0.4.5", @@ -9151,7 +9167,6 @@ dependencies = [ "once_cell", "prost 0.12.3", "rlp", - "secp256k1", "serde", "serde_json", "serde_with", @@ -9159,7 +9174,6 @@ dependencies = [ "thiserror", "tracing", "zksync_basic_types", - "zksync_config", "zksync_contracts", "zksync_crypto_primitives", "zksync_mini_merkle_tree", @@ -9172,7 +9186,7 @@ dependencies = [ [[package]] name = "zksync_utils" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "anyhow", "bigdecimal 0.4.5", @@ -9194,7 +9208,7 @@ dependencies = [ [[package]] name = "zksync_vlog" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "anyhow", "chrono", @@ -9220,19 +9234,19 @@ dependencies = [ [[package]] name = "zksync_vm2" version = "0.2.1" -source = "git+https://github.com/matter-labs/vm2.git?rev=a233d44bbe61dc6a758a754c3b78fe4f83e56699#a233d44bbe61dc6a758a754c3b78fe4f83e56699" +source = "git+https://github.com/matter-labs/vm2.git?rev=df5bec3d04d64d434f9b0ccb285ba4681008f7b3#df5bec3d04d64d434f9b0ccb285ba4681008f7b3" dependencies = [ "enum_dispatch", "primitive-types 0.12.2", - "zk_evm_abstractions 0.150.5", - "zkevm_opcode_defs 0.150.5", + "zk_evm_abstractions 0.150.6", + "zkevm_opcode_defs 0.150.6", "zksync_vm2_interface", ] [[package]] name = "zksync_vm2_interface" version = "0.2.1" -source = "git+https://github.com/matter-labs/vm2.git?rev=a233d44bbe61dc6a758a754c3b78fe4f83e56699#a233d44bbe61dc6a758a754c3b78fe4f83e56699" +source = "git+https://github.com/matter-labs/vm2.git?rev=df5bec3d04d64d434f9b0ccb285ba4681008f7b3#df5bec3d04d64d434f9b0ccb285ba4681008f7b3" dependencies = [ "primitive-types 0.12.2", ] @@ -9240,7 +9254,7 @@ dependencies = [ [[package]] name = "zksync_vm_interface" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "anyhow", "async-trait", @@ -9257,7 +9271,7 @@ dependencies = [ [[package]] name = "zksync_web3_decl" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=67475292ff770d2edd6884be27f976a4144778ae#67475292ff770d2edd6884be27f976a4144778ae" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 57aee558..069659d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,13 +12,13 @@ publish = false # We don't want to pub [dependencies] zkevm_opcode_defs = { git = "https://github.com/matter-labs/era-zkevm_opcode_defs.git", branch = "v1.5.0" } -zksync_basic_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } -zksync_node_fee_model = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } -zksync_multivm = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } -zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } -zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } -zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae" } -zksync_web3_decl = { git = "https://github.com/matter-labs/zksync-era.git", rev = "67475292ff770d2edd6884be27f976a4144778ae", features = [ +zksync_basic_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "cfbcc11be0826e8c55fafa84ae01b2aead25d127" } +zksync_node_fee_model = { git = "https://github.com/matter-labs/zksync-era.git", rev = "cfbcc11be0826e8c55fafa84ae01b2aead25d127" } +zksync_multivm = { git = "https://github.com/matter-labs/zksync-era.git", rev = "cfbcc11be0826e8c55fafa84ae01b2aead25d127" } +zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", rev = "cfbcc11be0826e8c55fafa84ae01b2aead25d127" } +zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "cfbcc11be0826e8c55fafa84ae01b2aead25d127" } +zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", rev = "cfbcc11be0826e8c55fafa84ae01b2aead25d127" } +zksync_web3_decl = { git = "https://github.com/matter-labs/zksync-era.git", rev = "cfbcc11be0826e8c55fafa84ae01b2aead25d127", features = [ "server", ] } sha3 = "0.10.6" diff --git a/src/system_contracts.rs b/src/system_contracts.rs index 2b662d54..6b2aa05d 100644 --- a/src/system_contracts.rs +++ b/src/system_contracts.rs @@ -129,9 +129,7 @@ fn bsc_load_with_bootloader( let evm_emulator = if use_evm_emulator { let evm_emulator_bytecode = match options { - Options::Local => { - read_sys_contract_bytecode("", "EvmInterpreter", ContractLanguage::Yul) - } + Options::Local => read_sys_contract_bytecode("", "EvmEmulator", ContractLanguage::Yul), Options::BuiltIn | Options::BuiltInWithoutSecurity => { panic!("no built-in EVM emulator yet") } From d73a0048d24d11fabb04a7d74a50635595213257 Mon Sep 17 00:00:00 2001 From: Alex Ostrovski Date: Mon, 21 Oct 2024 15:09:22 +0300 Subject: [PATCH 6/7] Remove `zksync_node_fee_model` dependency --- Cargo.lock | 1707 ++++------------------------------------- Cargo.toml | 1 - src/node/fee_model.rs | 17 +- src/node/in_memory.rs | 33 +- 4 files changed, 152 insertions(+), 1606 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8228a4ad..6202d69f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,17 +12,6 @@ dependencies = [ "regex", ] -[[package]] -name = "addchain" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2e69442aa5628ea6951fa33e24efe8313f4321a91bd729fc2f75bdfc858570" -dependencies = [ - "num-bigint 0.3.3", - "num-integer", - "num-traits", -] - [[package]] name = "addr2line" version = "0.21.0" @@ -49,29 +38,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom 0.2.12", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if 1.0.0", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.2" @@ -81,12 +47,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - [[package]] name = "android-tzdata" version = "0.1.1" @@ -156,42 +116,12 @@ version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" -[[package]] -name = "arr_macro" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a105bfda48707cf19220129e78fca01e9639433ffaef4163546ed8fb04120a5" -dependencies = [ - "arr_macro_impl", - "proc-macro-hack", -] - -[[package]] -name = "arr_macro_impl" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0609c78bd572f4edc74310dfb63a01f5609d53fa8b4dd7c4d98aef3b3e8d72d1" -dependencies = [ - "proc-macro-hack", - "quote 1.0.35", - "syn 1.0.109", -] - [[package]] name = "arrayref" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" -[[package]] -name = "arrayvec" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" -dependencies = [ - "nodrop", -] - [[package]] name = "arrayvec" version = "0.5.2" @@ -230,8 +160,8 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -241,8 +171,8 @@ version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -257,15 +187,6 @@ dependencies = [ "rustc_version", ] -[[package]] -name = "atoi" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" -dependencies = [ - "num-traits", -] - [[package]] name = "atomic-waker" version = "1.1.2" @@ -278,8 +199,8 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -435,7 +356,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" dependencies = [ - "num-bigint 0.4.4", + "num-bigint", "num-integer", "num-traits", "serde", @@ -449,7 +370,7 @@ checksum = "51d712318a27c7150326677b321a5fa91b55f6d9034ffd67f20319e147d40cee" dependencies = [ "autocfg", "libm", - "num-bigint 0.4.4", + "num-bigint", "num-integer", "num-traits", ] @@ -477,8 +398,8 @@ dependencies = [ "lazycell", "log", "prettyplease", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "regex", "rustc-hash", "shlex", @@ -515,9 +436,6 @@ name = "bitflags" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" -dependencies = [ - "serde", -] [[package]] name = "bitvec" @@ -543,17 +461,6 @@ dependencies = [ "wyz 0.5.1", ] -[[package]] -name = "blake2" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" -dependencies = [ - "crypto-mac", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "blake2" version = "0.10.6" @@ -563,17 +470,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "blake2-rfc_bellman_edition" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc60350286c7c3db13b98e91dbe5c8b6830a6821bc20af5b0c310ce94d74915" -dependencies = [ - "arrayvec 0.4.12", - "byteorder", - "constant_time_eq", -] - [[package]] name = "blake2_ce" version = "0.10.6" @@ -619,18 +515,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" -[[package]] -name = "blst" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" -dependencies = [ - "cc", - "glob", - "threadpool", - "zeroize", -] - [[package]] name = "boojum" version = "0.30.1" @@ -639,7 +523,7 @@ checksum = "68ec2f007ff8f90cc459f03e9f30ca1065440170f013c868823646e2e48d0234" dependencies = [ "arrayvec 0.7.4", "bincode", - "blake2 0.10.6", + "blake2", "const_format", "convert_case 0.6.0", "crossbeam", @@ -662,30 +546,6 @@ dependencies = [ "zksync_pairing", ] -[[package]] -name = "borsh" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" -dependencies = [ - "borsh-derive", - "cfg_aliases", -] - -[[package]] -name = "borsh-derive" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" -dependencies = [ - "once_cell", - "proc-macro-crate 3.2.0", - "proc-macro2 1.0.86", - "quote 1.0.35", - "syn 2.0.77", - "syn_derive", -] - [[package]] name = "bs58" version = "0.5.0" @@ -729,28 +589,6 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" -[[package]] -name = "bytecheck" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" -dependencies = [ - "bytecheck_derive", - "ptr_meta", - "simdutf8", -] - -[[package]] -name = "bytecheck_derive" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" -dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", - "syn 1.0.109", -] - [[package]] name = "byteorder" version = "1.5.0" @@ -857,12 +695,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - [[package]] name = "chrono" version = "0.4.38" @@ -1044,8 +876,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -1148,15 +980,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bed69047ed42e52c7e38d6421eeb8ceefb4f2a2b52eed59137f7bad7908f6800" -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "const-hex" version = "1.10.0" @@ -1191,9 +1014,9 @@ version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", - "unicode-xid 0.2.4", + "proc-macro2", + "quote", + "unicode-xid", ] [[package]] @@ -1242,21 +1065,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" - [[package]] name = "crc32fast" version = "1.3.2" @@ -1362,23 +1170,13 @@ dependencies = [ "typenum", ] -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "ctor" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ - "quote 1.0.35", + "quote", "syn 2.0.77", ] @@ -1391,33 +1189,6 @@ dependencies = [ "cipher", ] -[[package]] -name = "curve25519-dalek" -version = "4.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "curve25519-dalek-derive", - "digest 0.10.7", - "fiat-crypto", - "rustc_version", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" -dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", - "syn 2.0.77", -] - [[package]] name = "darling" version = "0.13.4" @@ -1436,8 +1207,8 @@ checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "strsim", "syn 1.0.109", ] @@ -1449,7 +1220,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core", - "quote 1.0.35", + "quote", "syn 1.0.109", ] @@ -1506,8 +1277,8 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -1518,8 +1289,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case 0.4.0", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "rustc_version", "syn 1.0.109", ] @@ -1539,10 +1310,10 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", - "unicode-xid 0.2.4", + "unicode-xid", ] [[package]] @@ -1614,12 +1385,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - [[package]] name = "dtoa" version = "1.0.9" @@ -1658,39 +1423,11 @@ dependencies = [ "spki 0.7.3", ] -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "pkcs8 0.10.2", - "signature 2.2.0", -] - -[[package]] -name = "ed25519-dalek" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand_core 0.6.4", - "serde", - "sha2 0.10.8", - "subtle", - "zeroize", -] - [[package]] name = "either" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" -dependencies = [ - "serde", -] [[package]] name = "elliptic-curve" @@ -1784,8 +1521,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" dependencies = [ "once_cell", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -1858,7 +1595,6 @@ dependencies = [ "zksync_basic_types", "zksync_contracts", "zksync_multivm", - "zksync_node_fee_model", "zksync_types", "zksync_utils", "zksync_web3_decl", @@ -1874,17 +1610,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "etcetera" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" -dependencies = [ - "cfg-if 1.0.0", - "home", - "windows-sys 0.48.0", -] - [[package]] name = "eth-keystore" version = "0.5.0" @@ -2057,8 +1782,8 @@ dependencies = [ "ethers-etherscan", "eyre", "prettyplease", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "regex", "reqwest 0.11.24", "serde", @@ -2078,8 +1803,8 @@ dependencies = [ "const-hex", "ethers-contract-abigen", "ethers-core", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "serde_json", "syn 2.0.77", ] @@ -2111,7 +1836,7 @@ dependencies = [ "tempfile", "thiserror", "tiny-keccak 2.0.2", - "unicode-xid 0.2.4", + "unicode-xid", ] [[package]] @@ -2176,7 +1901,7 @@ dependencies = [ "hashers", "http 0.2.11", "instant", - "jsonwebtoken 8.3.0", + "jsonwebtoken", "once_cell", "pin-project", "reqwest 0.11.24", @@ -2245,17 +1970,6 @@ dependencies = [ "yansi 0.5.1", ] -[[package]] -name = "event-listener" -version = "5.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - [[package]] name = "eyre" version = "0.6.12" @@ -2292,12 +2006,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "fiat-crypto" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" - [[package]] name = "findshlibs" version = "0.10.2" @@ -2356,17 +2064,6 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "flume" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" -dependencies = [ - "futures-core", - "futures-sink", - "spin 0.9.8", -] - [[package]] name = "fnv" version = "1.0.7" @@ -2397,39 +2094,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "franklin-crypto" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "971289216ea5c91872e5e0bb6989214b537bbce375d09fabea5c3ccfe031b204" -dependencies = [ - "arr_macro", - "bit-vec", - "blake2 0.9.2", - "blake2-rfc_bellman_edition", - "blake2s_simd", - "boojum", - "byteorder", - "derivative", - "digest 0.9.0", - "hex", - "indexmap 1.9.3", - "itertools 0.10.5", - "lazy_static", - "num-bigint 0.4.4", - "num-derive", - "num-integer", - "num-traits", - "rand 0.4.6", - "serde", - "sha2 0.9.9", - "sha3 0.9.1", - "smallvec", - "splitmut", - "tiny-keccak 1.5.0", - "zksync_bellman", -] - [[package]] name = "fs2" version = "0.4.3" @@ -2513,17 +2177,6 @@ dependencies = [ "num_cpus", ] -[[package]] -name = "futures-intrusive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" -dependencies = [ - "futures-core", - "lock_api", - "parking_lot 0.12.1", -] - [[package]] name = "futures-io" version = "0.3.30" @@ -2546,8 +2199,8 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -2630,10 +2283,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if 1.0.0", - "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -2708,85 +2359,10 @@ dependencies = [ ] [[package]] -name = "google-cloud-auth" -version = "0.16.0" +name = "group" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1112c453c2e155b3e683204ffff52bcc6d6495d04b68d9e90cd24161270c5058" -dependencies = [ - "async-trait", - "base64 0.21.7", - "google-cloud-metadata", - "google-cloud-token", - "home", - "jsonwebtoken 9.3.0", - "reqwest 0.12.7", - "serde", - "serde_json", - "thiserror", - "time", - "tokio", - "tracing", - "urlencoding", -] - -[[package]] -name = "google-cloud-metadata" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f945a208886a13d07636f38fb978da371d0abc3e34bad338124b9f8c135a8f" -dependencies = [ - "reqwest 0.12.7", - "thiserror", - "tokio", -] - -[[package]] -name = "google-cloud-storage" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc0c5b7469142d91bd77959e69375bede324a5def07c7f29aa0d582586cba305" -dependencies = [ - "anyhow", - "async-stream", - "async-trait", - "base64 0.21.7", - "bytes", - "futures-util", - "google-cloud-auth", - "google-cloud-metadata", - "google-cloud-token", - "hex", - "once_cell", - "percent-encoding", - "pkcs8 0.10.2", - "regex", - "reqwest 0.12.7", - "reqwest-middleware", - "ring 0.17.7", - "serde", - "serde_json", - "sha2 0.10.8", - "thiserror", - "time", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "google-cloud-token" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f49c12ba8b21d128a2ce8585955246977fbce4415f680ebf9199b6f9d6d725f" -dependencies = [ - "async-trait", -] - -[[package]] -name = "group" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff 0.12.1", "rand_core 0.6.4", @@ -2842,38 +2418,17 @@ dependencies = [ "tracing", ] -[[package]] -name = "handlebars" -version = "3.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4498fc115fa7d34de968184e473529abb40eeb6be8bc5f7faba3d08c316cb3e3" -dependencies = [ - "log", - "pest", - "pest_derive", - "quick-error", - "serde", - "serde_json", -] - [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.8", -] [[package]] name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash 0.8.11", - "allocator-api2", -] [[package]] name = "hashers" @@ -2884,15 +2439,6 @@ dependencies = [ "fxhash", ] -[[package]] -name = "hashlink" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" -dependencies = [ - "hashbrown 0.14.5", -] - [[package]] name = "heck" version = "0.4.1" @@ -2917,15 +2463,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hkdf" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" -dependencies = [ - "hmac", -] - [[package]] name = "hmac" version = "0.12.1" @@ -3279,8 +2816,8 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -3334,15 +2871,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -[[package]] -name = "ipnetwork" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf466541e9d546596ee94f9f69590f89473455f88372423e0008fc1a7daf100e" -dependencies = [ - "serde", -] - [[package]] name = "is-terminal" version = "0.4.10" @@ -3468,8 +2996,8 @@ version = "18.0.0" source = "git+https://github.com/matter-labs/jsonrpc.git?branch=master#12c53e3e20c09c2fb9966a4ef1b0ea63de172540" dependencies = [ "proc-macro-crate 0.1.5", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -3624,8 +3152,8 @@ checksum = "7895f186d5921065d96e16bd795e5ca89ac8356ec423fafc6e3d7cf8ec11aee4" dependencies = [ "heck 0.5.0", "proc-macro-crate 3.2.0", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -3701,28 +3229,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ "base64 0.21.7", - "pem 1.1.1", + "pem", "ring 0.16.20", "serde", "serde_json", "simple_asn1", ] -[[package]] -name = "jsonwebtoken" -version = "9.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" -dependencies = [ - "base64 0.21.7", - "js-sys", - "pem 3.0.4", - "ring 0.17.7", - "serde", - "serde_json", - "simple_asn1", -] - [[package]] name = "k256" version = "0.11.6" @@ -3777,7 +3290,7 @@ dependencies = [ "string_cache", "term", "tiny-keccak 2.0.2", - "unicode-xid 0.2.4", + "unicode-xid", ] [[package]] @@ -3791,9 +3304,6 @@ name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -dependencies = [ - "spin 0.9.8", -] [[package]] name = "lazycell" @@ -3834,17 +3344,6 @@ dependencies = [ "redox_syscall 0.4.1", ] -[[package]] -name = "libsqlite3-sys" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - [[package]] name = "linux-raw-sys" version = "0.4.13" @@ -3884,8 +3383,8 @@ checksum = "dc487311295e0002e452025d6b580b77bb17286de87b57138f3b5db711cded68" dependencies = [ "beef", "fnv", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "regex-syntax 0.6.29", "syn 2.0.77", ] @@ -3960,8 +3459,8 @@ version = "5.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -3971,16 +3470,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "mime_guess" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" -dependencies = [ - "mime", - "unicase", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -4054,12 +3543,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - [[package]] name = "nom" version = "7.1.3" @@ -4086,7 +3569,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" dependencies = [ - "num-bigint 0.4.4", + "num-bigint", "num-complex", "num-integer", "num-iter", @@ -4094,17 +3577,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-bigint" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-bigint" version = "0.4.4" @@ -4117,23 +3589,6 @@ dependencies = [ "serde", ] -[[package]] -name = "num-bigint-dig" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" -dependencies = [ - "byteorder", - "lazy_static", - "libm", - "num-integer", - "num-iter", - "num-traits", - "rand 0.8.5", - "smallvec", - "zeroize", -] - [[package]] name = "num-complex" version = "0.4.4" @@ -4150,17 +3605,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" -[[package]] -name = "num-derive" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eafd0b45c5537c3ba526f79d3e75120036502bebacbb3f3220914067ce39dbf2" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", -] - [[package]] name = "num-integer" version = "0.1.45" @@ -4199,7 +3643,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", - "num-bigint 0.4.4", + "num-bigint", "num-integer", "num-traits", "serde", @@ -4250,8 +3694,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ "proc-macro-crate 1.3.1", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -4262,8 +3706,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ "proc-macro-crate 3.2.0", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -4317,8 +3761,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" dependencies = [ "bytes", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -4343,8 +3787,8 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -4553,8 +3997,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" dependencies = [ "proc-macro-crate 1.3.1", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -4565,17 +4009,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ "proc-macro-crate 2.0.0", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 1.0.109", ] -[[package]] -name = "parking" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" - [[package]] name = "parking_lot" version = "0.11.2" @@ -4678,16 +4116,6 @@ dependencies = [ "base64 0.13.1", ] -[[package]] -name = "pem" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" -dependencies = [ - "base64 0.22.1", - "serde", -] - [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -4703,51 +4131,6 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "pest" -version = "2.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" -dependencies = [ - "memchr", - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pest_derive" -version = "2.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2 1.0.86", - "quote 1.0.35", - "syn 2.0.77", -] - -[[package]] -name = "pest_meta" -version = "2.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" -dependencies = [ - "once_cell", - "pest", - "sha2 0.10.8", -] - [[package]] name = "petgraph" version = "0.6.4" @@ -4796,8 +4179,8 @@ checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ "phf_generator", "phf_shared 0.11.2", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -4834,8 +4217,8 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -4851,17 +4234,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs1" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" -dependencies = [ - "der 0.7.8", - "pkcs8 0.10.2", - "spki 0.7.3", -] - [[package]] name = "pkcs8" version = "0.9.0" @@ -4922,7 +4294,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ - "proc-macro2 1.0.86", + "proc-macro2", "syn 2.0.77", ] @@ -5006,8 +4378,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 1.0.109", "version_check", ] @@ -5018,26 +4390,11 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - [[package]] name = "proc-macro2" version = "1.0.86" @@ -5065,8 +4422,8 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -5136,8 +4493,8 @@ checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", "itertools 0.11.0", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -5149,8 +4506,8 @@ checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", "itertools 0.12.1", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -5206,32 +4563,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "ptr_meta" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" -dependencies = [ - "ptr_meta_derive", -] - -[[package]] -name = "ptr_meta_derive" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" -dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", - "syn 1.0.109", -] - -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - [[package]] name = "quick-protobuf" version = "0.8.1" @@ -5241,22 +4572,13 @@ dependencies = [ "byteorder", ] -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", -] - [[package]] name = "quote" version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ - "proc-macro2 1.0.86", + "proc-macro2", ] [[package]] @@ -5426,15 +4748,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" -dependencies = [ - "bitflags 2.6.0", -] - [[package]] name = "redox_users" version = "0.4.4" @@ -5505,15 +4818,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "rend" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" -dependencies = [ - "bytecheck", -] - [[package]] name = "reqwest" version = "0.11.24" @@ -5582,7 +4886,6 @@ dependencies = [ "js-sys", "log", "mime", - "mime_guess", "native-tls", "once_cell", "percent-encoding", @@ -5595,65 +4898,23 @@ dependencies = [ "system-configuration 0.6.1", "tokio", "tokio-native-tls", - "tokio-util 0.7.10", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", "web-sys", "windows-registry", ] [[package]] -name = "reqwest-middleware" -version = "0.3.3" +name = "rfc6979" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562ceb5a604d3f7c885a792d42c199fd8af239d0a51b2fa6a78aafa092452b04" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ - "anyhow", - "async-trait", - "http 1.1.0", - "reqwest 0.12.7", - "serde", - "thiserror", - "tower-service", -] - -[[package]] -name = "rescue_poseidon" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82900c877a0ba5362ac5756efbd82c5b795dc509011c1253e2389d8708f1389d" -dependencies = [ - "addchain", - "arrayvec 0.7.4", - "blake2 0.10.6", - "byteorder", - "derivative", - "franklin-crypto", - "lazy_static", - "log", - "num-bigint 0.3.3", - "num-integer", - "num-iter", - "num-traits", - "rand 0.4.6", - "serde", - "sha3 0.9.1", - "smallvec", - "typemap_rev", -] - -[[package]] -name = "rfc6979" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" -dependencies = [ - "crypto-bigint 0.4.9", - "hmac", - "zeroize", + "crypto-bigint 0.4.9", + "hmac", + "zeroize", ] [[package]] @@ -5704,35 +4965,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "rkyv" -version = "0.7.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" -dependencies = [ - "bitvec 1.0.1", - "bytecheck", - "bytes", - "hashbrown 0.12.3", - "ptr_meta", - "rend", - "rkyv_derive", - "seahash", - "tinyvec", - "uuid 1.7.0", -] - -[[package]] -name = "rkyv_derive" -version = "0.7.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" -dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", - "syn 1.0.109", -] - [[package]] name = "rlp" version = "0.5.2" @@ -5750,8 +4982,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -5761,42 +4993,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" -[[package]] -name = "rsa" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" -dependencies = [ - "const-oid", - "digest 0.10.7", - "num-bigint-dig", - "num-integer", - "num-traits", - "pkcs1", - "pkcs8 0.10.2", - "rand_core 0.6.4", - "signature 2.2.0", - "spki 0.7.3", - "subtle", - "zeroize", -] - -[[package]] -name = "rust_decimal" -version = "1.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" -dependencies = [ - "arrayvec 0.7.4", - "borsh", - "bytes", - "num-traits", - "rand 0.8.5", - "rkyv", - "serde", - "serde_json", -] - [[package]] name = "rustc-demangle" version = "0.1.23" @@ -6001,8 +5197,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ "proc-macro-crate 1.3.1", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -6043,12 +5239,6 @@ dependencies = [ "untrusted 0.9.0", ] -[[package]] -name = "seahash" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" - [[package]] name = "sec1" version = "0.3.0" @@ -6114,7 +5304,7 @@ dependencies = [ "core-foundation", "core-foundation-sys", "libc", - "num-bigint 0.4.4", + "num-bigint", "security-framework-sys", ] @@ -6288,8 +5478,8 @@ version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -6331,7 +5521,6 @@ version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" dependencies = [ - "base64 0.13.1", "hex", "serde", "serde_with_macros", @@ -6344,8 +5533,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" dependencies = [ "darling", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -6484,19 +5673,13 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "simdutf8" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" - [[package]] name = "simple_asn1" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ - "num-bigint 0.4.4", + "num-bigint", "num-traits", "thiserror", "time", @@ -6563,7 +5746,7 @@ dependencies = [ "lalrpop-util", "phf", "thiserror", - "unicode-xid 0.2.4", + "unicode-xid", ] [[package]] @@ -6577,9 +5760,6 @@ name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] [[package]] name = "spki" @@ -6601,230 +5781,6 @@ dependencies = [ "der 0.7.8", ] -[[package]] -name = "splitmut" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85070f382340e8b23a75808e83573ddf65f9ad9143df9573ca37c1ed2ee956a" - -[[package]] -name = "sqlformat" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" -dependencies = [ - "nom", - "unicode_categories", -] - -[[package]] -name = "sqlx" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93334716a037193fac19df402f8571269c84a00852f6a7066b5d2616dcd64d3e" -dependencies = [ - "sqlx-core", - "sqlx-macros", - "sqlx-mysql", - "sqlx-postgres", - "sqlx-sqlite", -] - -[[package]] -name = "sqlx-core" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d8060b456358185f7d50c55d9b5066ad956956fddec42ee2e8567134a8936e" -dependencies = [ - "atoi", - "bigdecimal 0.4.5", - "byteorder", - "bytes", - "chrono", - "crc", - "crossbeam-queue", - "either", - "event-listener", - "futures-channel", - "futures-core", - "futures-intrusive", - "futures-io", - "futures-util", - "hashbrown 0.14.5", - "hashlink", - "hex", - "indexmap 2.5.0", - "ipnetwork", - "log", - "memchr", - "native-tls", - "once_cell", - "paste", - "percent-encoding", - "rust_decimal", - "serde", - "serde_json", - "sha2 0.10.8", - "smallvec", - "sqlformat", - "thiserror", - "tokio", - "tokio-stream", - "tracing", - "url", -] - -[[package]] -name = "sqlx-macros" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac0692bcc9de3b073e8d747391827297e075c7710ff6276d9f7a1f3d58c6657" -dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", - "sqlx-core", - "sqlx-macros-core", - "syn 2.0.77", -] - -[[package]] -name = "sqlx-macros-core" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1804e8a7c7865599c9c79be146dc8a9fd8cc86935fa641d3ea58e5f0688abaa5" -dependencies = [ - "dotenvy", - "either", - "heck 0.5.0", - "hex", - "once_cell", - "proc-macro2 1.0.86", - "quote 1.0.35", - "serde", - "serde_json", - "sha2 0.10.8", - "sqlx-core", - "sqlx-mysql", - "sqlx-postgres", - "sqlx-sqlite", - "syn 2.0.77", - "tempfile", - "tokio", - "url", -] - -[[package]] -name = "sqlx-mysql" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64bb4714269afa44aef2755150a0fc19d756fb580a67db8885608cf02f47d06a" -dependencies = [ - "atoi", - "base64 0.22.1", - "bigdecimal 0.4.5", - "bitflags 2.6.0", - "byteorder", - "bytes", - "chrono", - "crc", - "digest 0.10.7", - "dotenvy", - "either", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "generic-array", - "hex", - "hkdf", - "hmac", - "itoa", - "log", - "md-5", - "memchr", - "once_cell", - "percent-encoding", - "rand 0.8.5", - "rsa", - "rust_decimal", - "serde", - "sha1", - "sha2 0.10.8", - "smallvec", - "sqlx-core", - "stringprep", - "thiserror", - "tracing", - "whoami", -] - -[[package]] -name = "sqlx-postgres" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa91a732d854c5d7726349bb4bb879bb9478993ceb764247660aee25f67c2f8" -dependencies = [ - "atoi", - "base64 0.22.1", - "bigdecimal 0.4.5", - "bitflags 2.6.0", - "byteorder", - "chrono", - "crc", - "dotenvy", - "etcetera", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "hex", - "hkdf", - "hmac", - "home", - "ipnetwork", - "itoa", - "log", - "md-5", - "memchr", - "num-bigint 0.4.4", - "once_cell", - "rand 0.8.5", - "rust_decimal", - "serde", - "serde_json", - "sha2 0.10.8", - "smallvec", - "sqlx-core", - "stringprep", - "thiserror", - "tracing", - "whoami", -] - -[[package]] -name = "sqlx-sqlite" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5b2cf34a45953bfd3daaf3db0f7a7878ab9b7a6b91b422d24a7a9e4c857b680" -dependencies = [ - "atoi", - "chrono", - "flume", - "futures-channel", - "futures-core", - "futures-executor", - "futures-intrusive", - "futures-util", - "libsqlite3-sys", - "log", - "percent-encoding", - "serde", - "serde_urlencoded", - "sqlx-core", - "tracing", - "url", -] - [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -6850,17 +5806,6 @@ dependencies = [ "precomputed-hash", ] -[[package]] -name = "stringprep" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" -dependencies = [ - "unicode-bidi", - "unicode-normalization", - "unicode-properties", -] - [[package]] name = "strsim" version = "0.10.0" @@ -6892,8 +5837,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "rustversion", "syn 2.0.77", ] @@ -6905,8 +5850,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ "heck 0.5.0", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "rustversion", "syn 2.0.77", ] @@ -6937,25 +5882,14 @@ dependencies = [ "zip", ] -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", -] - [[package]] name = "syn" version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "unicode-ident", ] @@ -6965,23 +5899,11 @@ version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "unicode-ident", ] -[[package]] -name = "syn_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" -dependencies = [ - "proc-macro-error", - "proc-macro2 1.0.86", - "quote 1.0.35", - "syn 2.0.77", -] - [[package]] name = "sync_wrapper" version = "0.1.2" @@ -7103,8 +6025,8 @@ version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -7118,15 +6040,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - [[package]] name = "time" version = "0.3.36" @@ -7218,8 +6131,8 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -7455,8 +6368,8 @@ version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -7567,24 +6480,12 @@ dependencies = [ "utf-8", ] -[[package]] -name = "typemap_rev" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74b08b0c1257381af16a5c3605254d529d3e7e109f3c62befc5d168968192998" - [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "ucd-trie" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" - [[package]] name = "uint" version = "0.9.5" @@ -7642,12 +6543,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-properties" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" - [[package]] name = "unicode-segmentation" version = "1.10.1" @@ -7660,31 +6555,19 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - [[package]] name = "unicode-xid" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "unicode_categories" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" - [[package]] name = "unroll" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ad948c1cb799b1a70f836077721a92a35ac177d4daddf4c20a633786d4cf618" dependencies = [ - "quote 1.0.35", + "quote", "syn 1.0.109", ] @@ -7731,12 +6614,6 @@ dependencies = [ "serde", ] -[[package]] -name = "urlencoding" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" - [[package]] name = "utf-8" version = "0.7.6" @@ -7819,8 +6696,8 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a511871dc5de990a3b2a0e715facfbc5da848c0c0395597a1415029fb7c250a" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", ] @@ -7855,12 +6732,6 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" - [[package]] name = "wasm-bindgen" version = "0.2.90" @@ -7880,8 +6751,8 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", "wasm-bindgen-shared", ] @@ -7904,7 +6775,7 @@ version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ - "quote 1.0.35", + "quote", "wasm-bindgen-macro-support", ] @@ -7914,8 +6785,8 @@ version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -7927,19 +6798,6 @@ version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" -[[package]] -name = "wasm-streams" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "web-sys" version = "0.3.67" @@ -7987,16 +6845,6 @@ dependencies = [ "rustix", ] -[[package]] -name = "whoami" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" -dependencies = [ - "redox_syscall 0.5.7", - "wasite", -] - [[package]] name = "winapi" version = "0.3.9" @@ -8289,45 +7137,11 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", - "syn 2.0.77", -] - [[package]] name = "zeroize" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2 1.0.86", - "quote 1.0.35", - "syn 2.0.77", -] [[package]] name = "zip" @@ -8552,7 +7366,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0769f7b27d8fb06e715da3290c575cac5d04d10a557faef180e847afce50ac4" dependencies = [ "bitflags 2.6.0", - "blake2 0.10.6", + "blake2", "ethereum-types 0.14.1", "k256 0.11.6", "lazy_static", @@ -8567,7 +7381,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6be7bd5f0e0b61211f544147289640b4712715589d7f2fe5229d92a7a3ac64c0" dependencies = [ "bitflags 2.6.0", - "blake2 0.10.6", + "blake2", "ethereum-types 0.14.1", "k256 0.13.3", "lazy_static", @@ -8582,7 +7396,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "762b5f1c1b283c5388995a85d40a05aef1c14f50eb904998b7e9364739f5b899" dependencies = [ "bitflags 2.6.0", - "blake2 0.10.6", + "blake2", "ethereum-types 0.14.1", "k256 0.13.3", "lazy_static", @@ -8598,7 +7412,7 @@ version = "1.5.0" source = "git+https://github.com/matter-labs/era-zkevm_opcode_defs.git?branch=v1.5.0#109d9f734804a8b9dc0531c0b576e2a0f55a40de" dependencies = [ "bitflags 2.6.0", - "blake2 0.10.6", + "blake2", "ethereum-types 0.14.1", "k256 0.13.3", "lazy_static", @@ -8711,69 +7525,6 @@ dependencies = [ "zksync_crypto_primitives", ] -[[package]] -name = "zksync_consensus_crypto" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49e38d1b5ed28c66e785caff53ea4863375555d818aafa03290397192dd3e665" -dependencies = [ - "anyhow", - "blst", - "ed25519-dalek", - "elliptic-curve 0.13.8", - "hex", - "k256 0.13.3", - "num-bigint 0.4.4", - "num-traits", - "rand 0.8.5", - "sha3 0.10.8", - "thiserror", - "tracing", - "zeroize", -] - -[[package]] -name = "zksync_consensus_roles" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e49fbd4e69b276058f3dfc06cf6ada0e8caa6ed826e81289e4d596da95a0f17a" -dependencies = [ - "anyhow", - "bit-vec", - "hex", - "num-bigint 0.4.4", - "prost 0.12.3", - "rand 0.8.5", - "serde", - "thiserror", - "tracing", - "zksync_concurrency", - "zksync_consensus_crypto", - "zksync_consensus_utils", - "zksync_protobuf", - "zksync_protobuf_build", -] - -[[package]] -name = "zksync_consensus_storage" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b2aab4ed18b13cd584f4edcc2546c8da82f89ac62e525063e12935ff28c9be" -dependencies = [ - "anyhow", - "async-trait", - "prost 0.12.3", - "rand 0.8.5", - "thiserror", - "tracing", - "vise", - "zksync_concurrency", - "zksync_consensus_crypto", - "zksync_consensus_roles", - "zksync_protobuf", - "zksync_protobuf_build", -] - [[package]] name = "zksync_consensus_utils" version = "0.5.0" @@ -8806,7 +7557,7 @@ version = "0.1.0" source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" dependencies = [ "anyhow", - "blake2 0.10.6", + "blake2", "hex", "rand 0.8.5", "secp256k1", @@ -8825,95 +7576,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5939e2df4288c263c706ff18ac718e984149223ad4289d6d957d767dcfc04c81" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "syn 1.0.109", ] -[[package]] -name = "zksync_dal" -version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" -dependencies = [ - "anyhow", - "bigdecimal 0.4.5", - "bincode", - "chrono", - "hex", - "itertools 0.10.5", - "prost 0.12.3", - "rand 0.8.5", - "serde", - "serde_json", - "sqlx", - "strum 0.26.3", - "thiserror", - "tokio", - "tracing", - "vise", - "zksync_concurrency", - "zksync_consensus_crypto", - "zksync_consensus_roles", - "zksync_consensus_storage", - "zksync_consensus_utils", - "zksync_contracts", - "zksync_db_connection", - "zksync_l1_contract_interface", - "zksync_protobuf", - "zksync_protobuf_build", - "zksync_system_constants", - "zksync_types", - "zksync_utils", - "zksync_vm_interface", -] - -[[package]] -name = "zksync_db_connection" -version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" -dependencies = [ - "anyhow", - "rand 0.8.5", - "serde", - "serde_json", - "sqlx", - "thiserror", - "tokio", - "tracing", - "vise", - "zksync_basic_types", -] - -[[package]] -name = "zksync_eth_client" -version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" -dependencies = [ - "async-trait", - "jsonrpsee", - "rlp", - "thiserror", - "tracing", - "vise", - "zksync_config", - "zksync_contracts", - "zksync_eth_signer", - "zksync_types", - "zksync_web3_decl", -] - -[[package]] -name = "zksync_eth_signer" -version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" -dependencies = [ - "async-trait", - "rlp", - "thiserror", - "zksync_basic_types", - "zksync_crypto_primitives", -] - [[package]] name = "zksync_ff" version = "0.30.1" @@ -8933,48 +7600,15 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f91e58e75d65877f09f83bc3dca8f054847ae7ec4f3e64bfa610a557edd8e8e" dependencies = [ - "num-bigint 0.4.4", + "num-bigint", "num-integer", "num-traits", - "proc-macro2 1.0.86", - "quote 1.0.35", + "proc-macro2", + "quote", "serde", "syn 1.0.109", ] -[[package]] -name = "zksync_kzg" -version = "0.150.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c006b6b7a27cc50ff0c515b6d0b197dbb907bbf65d1d2ea42fc3ed21b315642" -dependencies = [ - "boojum", - "derivative", - "hex", - "once_cell", - "rayon", - "serde", - "serde_json", - "serde_with", - "zkevm_circuits 0.150.6", -] - -[[package]] -name = "zksync_l1_contract_interface" -version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" -dependencies = [ - "anyhow", - "hex", - "once_cell", - "sha2 0.10.8", - "sha3 0.10.8", - "zksync_kzg", - "zksync_prover_interface", - "zksync_solidity_vk_codegen", - "zksync_types", -] - [[package]] name = "zksync_mini_merkle_tree" version = "0.1.0" @@ -9016,47 +7650,6 @@ dependencies = [ "zksync_vm_interface", ] -[[package]] -name = "zksync_node_fee_model" -version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" -dependencies = [ - "anyhow", - "async-trait", - "tokio", - "tracing", - "vise", - "zksync_config", - "zksync_dal", - "zksync_eth_client", - "zksync_types", - "zksync_web3_decl", -] - -[[package]] -name = "zksync_object_store" -version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" -dependencies = [ - "anyhow", - "async-trait", - "bincode", - "flate2", - "google-cloud-auth", - "google-cloud-storage", - "http 1.1.0", - "prost 0.12.3", - "rand 0.8.5", - "reqwest 0.12.7", - "serde_json", - "tokio", - "tracing", - "vise", - "zksync_config", - "zksync_protobuf", - "zksync_types", -] - [[package]] name = "zksync_pairing" version = "0.30.1" @@ -9100,46 +7693,14 @@ dependencies = [ "anyhow", "heck 0.5.0", "prettyplease", - "proc-macro2 1.0.86", + "proc-macro2", "prost-build", "prost-reflect", "protox", - "quote 1.0.35", + "quote", "syn 2.0.77", ] -[[package]] -name = "zksync_prover_interface" -version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c55fafa84ae01b2aead25d127#cfbcc11be0826e8c55fafa84ae01b2aead25d127" -dependencies = [ - "chrono", - "circuit_sequencer_api 0.150.6", - "serde", - "serde_with", - "strum 0.26.3", - "zksync_multivm", - "zksync_object_store", - "zksync_types", -] - -[[package]] -name = "zksync_solidity_vk_codegen" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b310ab8a21681270e73f177ddf7974cabb7a96f0624ab8b008fd6ee1f9b4f687" -dependencies = [ - "ethereum-types 0.14.1", - "franklin-crypto", - "handlebars", - "hex", - "paste", - "rescue_poseidon", - "serde", - "serde_derive", - "serde_json", -] - [[package]] name = "zksync_system_constants" version = "0.1.0" @@ -9157,7 +7718,7 @@ source = "git+https://github.com/matter-labs/zksync-era.git?rev=cfbcc11be0826e8c dependencies = [ "anyhow", "bigdecimal 0.4.5", - "blake2 0.10.6", + "blake2", "chrono", "derive_more 1.0.0", "hex", diff --git a/Cargo.toml b/Cargo.toml index 069659d1..c0784e9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,6 @@ publish = false # We don't want to pub [dependencies] zkevm_opcode_defs = { git = "https://github.com/matter-labs/era-zkevm_opcode_defs.git", branch = "v1.5.0" } zksync_basic_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "cfbcc11be0826e8c55fafa84ae01b2aead25d127" } -zksync_node_fee_model = { git = "https://github.com/matter-labs/zksync-era.git", rev = "cfbcc11be0826e8c55fafa84ae01b2aead25d127" } zksync_multivm = { git = "https://github.com/matter-labs/zksync-era.git", rev = "cfbcc11be0826e8c55fafa84ae01b2aead25d127" } zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", rev = "cfbcc11be0826e8c55fafa84ae01b2aead25d127" } zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "cfbcc11be0826e8c55fafa84ae01b2aead25d127" } diff --git a/src/node/fee_model.rs b/src/node/fee_model.rs index 1f03bfcb..9984422a 100644 --- a/src/node/fee_model.rs +++ b/src/node/fee_model.rs @@ -1,6 +1,4 @@ -use std::fmt::Debug; -use zksync_node_fee_model::BatchFeeModelInputProvider; -use zksync_types::fee_model::{FeeModelConfigV2, FeeParams, FeeParamsV2}; +use zksync_types::fee_model::{BatchFeeInput, FeeModelConfigV2, FeeParams, FeeParamsV2}; use zksync_types::L1_GAS_PER_PUBDATA_BYTE; use crate::config::gas::{ @@ -103,10 +101,8 @@ impl TestNodeFeeInputProvider { max_pubdata_per_batch: self.max_pubdata_per_batch, } } -} -impl BatchFeeModelInputProvider for TestNodeFeeInputProvider { - fn get_fee_model_params(&self) -> FeeParams { + fn get_params(&self) -> FeeParams { // TODO: consider using old fee model for the olds blocks, when forking FeeParams::V2(FeeParamsV2::new( self.get_fee_model_config(), @@ -115,6 +111,15 @@ impl BatchFeeModelInputProvider for TestNodeFeeInputProvider { Default::default(), )) } + + pub(crate) fn get_batch_fee_input(&self) -> BatchFeeInput { + self.get_params().scale(1.0, 1.0) + } + + pub(crate) fn get_batch_fee_input_scaled(&self) -> BatchFeeInput { + let scale_factor = self.estimate_gas_price_scale_factor; + self.get_params().scale(scale_factor, scale_factor) + } } impl Default for TestNodeFeeInputProvider { diff --git a/src/node/in_memory.rs b/src/node/in_memory.rs index f9b646d4..933db585 100644 --- a/src/node/in_memory.rs +++ b/src/node/in_memory.rs @@ -10,7 +10,7 @@ use crate::{ constants::{LEGACY_RICH_WALLETS, RICH_WALLETS}, deps::{storage_view::StorageView, InMemoryStorage}, filters::EthFilters, - fork::{block_on, ForkDetails, ForkSource, ForkStorage}, + fork::{ForkDetails, ForkSource, ForkStorage}, formatter, node::{ call_error_tracer::CallErrorTracer, fee_model::TestNodeFeeInputProvider, @@ -58,7 +58,6 @@ use zksync_multivm::{ ToTracerPointer, Vm, }, }; -use zksync_node_fee_model::BatchFeeModelInputProvider; use zksync_types::{ api::{Block, DebugCall, Log, TransactionReceipt, TransactionVariant}, block::{unpack_block_info, L2BlockHasher}, @@ -325,29 +324,21 @@ impl InMemoryNodeInner { ) .new_batch(); - let fee_input: BatchFeeInput; - - if let Some(fork) = &self + let fee_input = if let Some(fork) = &self .fork_storage .inner .read() .expect("fork_storage lock is already held by the current thread") .fork { - fee_input = BatchFeeInput::PubdataIndependent(PubdataIndependentBatchFeeModelInput { + BatchFeeInput::PubdataIndependent(PubdataIndependentBatchFeeModelInput { l1_gas_price: fork.l1_gas_price, fair_l2_gas_price: fork.l2_fair_gas_price, fair_pubdata_price: fork.fair_pubdata_price, - }); + }) } else { - let fee_input_provider = self.fee_input_provider.clone(); - fee_input = block_on(async move { - fee_input_provider - .get_batch_fee_input_scaled(1.0, 1.0) - .await - .unwrap() - }); - } + self.fee_input_provider.get_batch_fee_input() + }; let batch_env = L1BatchEnv { // TODO: set the previous batch hash properly (take from fork, when forking, and from local storage, when this is not the first block). @@ -438,18 +429,8 @@ impl InMemoryNodeInner { let tx: Transaction = l2_tx.clone().into(); - let fee_input_provider = self.fee_input_provider.clone(); let fee_input = { - let fee_input = block_on(async move { - fee_input_provider - .get_batch_fee_input_scaled( - fee_input_provider.estimate_gas_price_scale_factor, - fee_input_provider.estimate_gas_price_scale_factor, - ) - .await - .unwrap() - }); - + let fee_input = self.fee_input_provider.get_batch_fee_input_scaled(); // In order for execution to pass smoothly, we need to ensure that block's required gasPerPubdata will be // <= to the one in the transaction itself. adjust_pubdata_price_for_tx( From 17e0d31ad856ccff15a3805ac0410f3a35998584 Mon Sep 17 00:00:00 2001 From: Alex Ostrovski Date: Tue, 22 Oct 2024 12:51:44 +0300 Subject: [PATCH 7/7] Do not panic on missing recipient --- src/utils.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index b7df5137..8a328dbb 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -207,9 +207,7 @@ pub fn create_debug_output( output: output.clone().into(), r#type: calltype, from: l2_tx.initiator_account(), - to: l2_tx - .recipient_account() - .expect("must have recipient address"), + to: l2_tx.recipient_account().unwrap_or_default(), gas: l2_tx.common_data.fee.gas_limit, value: l2_tx.execute.value, input: l2_tx.execute.calldata().into(), @@ -222,9 +220,7 @@ pub fn create_debug_output( output: Default::default(), r#type: calltype, from: l2_tx.initiator_account(), - to: l2_tx - .recipient_account() - .expect("must have recipient address"), + to: l2_tx.recipient_account().unwrap_or_default(), gas: l2_tx.common_data.fee.gas_limit, value: l2_tx.execute.value, input: l2_tx.execute.calldata().into(),