From e2d162957b8c458f244dfcca1a6b92173742e476 Mon Sep 17 00:00:00 2001 From: mm-zk Date: Wed, 16 Aug 2023 07:49:30 +0200 Subject: [PATCH 01/13] broken -but partially works --- Cargo.lock | 5561 ++++++++++++++++++++++++++---- Cargo.toml | 34 +- anvil/core/Cargo.toml | 7 +- chisel/Cargo.toml | 3 +- cli/src/cmd/forge/test/filter.rs | 6 +- cli/src/cmd/forge/test/mod.rs | 105 +- cli/src/cmd/forge/zksolc.rs | 178 +- cli/src/cmd/utils.rs | 6 +- evm/Cargo.toml | 5 +- evm/src/executor/backend/mod.rs | 47 +- evm/src/executor/mod.rs | 14 +- forge/src/multi_runner.rs | 107 +- forge/src/runner.rs | 8 +- ui/Cargo.toml | 10 +- 14 files changed, 5245 insertions(+), 846 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 92f0a6f53..123bfe00b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,6 +12,214 @@ dependencies = [ "regex", ] +[[package]] +name = "actix-codec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617a8268e3537fe1d8c9ead925fca49ef6400927ee7bc26750e90ecee14ce4b8" +dependencies = [ + "bitflags 1.3.2", + "bytes 1.4.0", + "futures-core", + "futures-sink", + "memchr", + "pin-project-lite", + "tokio", + "tokio-util 0.7.8", + "tracing", +] + +[[package]] +name = "actix-cors" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b340e9cfa5b08690aae90fb61beb44e9b06f44fe3d0f93781aaa58cfba86245e" +dependencies = [ + "actix-utils", + "actix-web", + "derive_more", + "futures-util", + "log", + "once_cell", + "smallvec 1.11.0", +] + +[[package]] +name = "actix-http" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2079246596c18b4a33e274ae10c0e50613f4d32a4198e09c7b93771013fed74" +dependencies = [ + "actix-codec", + "actix-rt", + "actix-service", + "actix-utils", + "ahash 0.8.3", + "base64 0.21.2", + "bitflags 1.3.2", + "brotli", + "bytes 1.4.0", + "bytestring", + "derive_more", + "encoding_rs", + "flate2", + "futures-core", + "h2", + "http", + "httparse", + "httpdate", + "itoa 1.0.9", + "language-tags", + "local-channel", + "mime", + "percent-encoding", + "pin-project-lite", + "rand 0.8.5", + "sha1", + "smallvec 1.11.0", + "tokio", + "tokio-util 0.7.8", + "tracing", + "zstd 0.12.4", +] + +[[package]] +name = "actix-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" +dependencies = [ + "quote 1.0.32", + "syn 2.0.28", +] + +[[package]] +name = "actix-router" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66ff4d247d2b160861fa2866457e85706833527840e4133f8f49aa423a38799" +dependencies = [ + "bytestring", + "http", + "regex", + "serde", + "tracing", +] + +[[package]] +name = "actix-rt" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15265b6b8e2347670eb363c47fc8c75208b4a4994b27192f345fcbe707804f3e" +dependencies = [ + "actix-macros", + "futures-core", + "tokio", +] + +[[package]] +name = "actix-server" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e8613a75dd50cc45f473cee3c34d59ed677c0f7b44480ce3b8247d7dc519327" +dependencies = [ + "actix-rt", + "actix-service", + "actix-utils", + "futures-core", + "futures-util", + "mio 0.8.8", + "num_cpus", + "socket2 0.4.9", + "tokio", + "tracing", +] + +[[package]] +name = "actix-service" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a" +dependencies = [ + "futures-core", + "paste", + "pin-project-lite", +] + +[[package]] +name = "actix-utils" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" +dependencies = [ + "local-waker", + "pin-project-lite", +] + +[[package]] +name = "actix-web" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3cb42f9566ab176e1ef0b8b3a896529062b4efc6be0123046095914c4c1c96" +dependencies = [ + "actix-codec", + "actix-http", + "actix-macros", + "actix-router", + "actix-rt", + "actix-server", + "actix-service", + "actix-utils", + "actix-web-codegen", + "ahash 0.7.6", + "bytes 1.4.0", + "bytestring", + "cfg-if 1.0.0", + "cookie", + "derive_more", + "encoding_rs", + "futures-core", + "futures-util", + "http", + "itoa 1.0.9", + "language-tags", + "log", + "mime", + "once_cell", + "pin-project-lite", + "regex", + "serde", + "serde_json", + "serde_urlencoded", + "smallvec 1.11.0", + "socket2 0.4.9", + "time 0.3.25", + "url", +] + +[[package]] +name = "actix-web-codegen" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2262160a7ae29e3415554a3f1fc04c764b1540c116aa524683208078b7a75bc9" +dependencies = [ + "actix-router", + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 1.0.109", +] + +[[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.20.0" @@ -27,17 +235,60 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aes" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" +dependencies = [ + "aes-soft", + "aesni", + "cipher 0.2.5", +] + [[package]] name = "aes" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ - "cfg-if", - "cipher", + "cfg-if 1.0.0", + "cipher 0.4.4", "cpufeatures", ] +[[package]] +name = "aes-ctr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7729c3cde54d67063be556aeac75a81330d802f0259500ca40cb52967f975763" +dependencies = [ + "aes-soft", + "aesni", + "cipher 0.2.5", + "ctr 0.6.0", +] + +[[package]] +name = "aes-soft" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" +dependencies = [ + "cipher 0.2.5", + "opaque-debug 0.3.0", +] + +[[package]] +name = "aesni" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" +dependencies = [ + "cipher 0.2.5", + "opaque-debug 0.3.0", +] + [[package]] name = "ahash" version = "0.7.6" @@ -55,28 +306,44 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", + "getrandom 0.2.10", "once_cell", "version_check", ] [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "86b8f9420f797f2d9e935edf629310eb938a0d839f984e25327f3c7eed22300c" dependencies = [ "memchr", ] +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + [[package]] name = "alloy-rlp" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f938f00332d63a5b0ac687bd6f46d03884638948921d9f8b50c59563d421ae25" dependencies = [ - "arrayvec", - "bytes", + "arrayvec 0.7.4", + "bytes 1.4.0", "smol_str", ] @@ -120,7 +387,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -164,9 +431,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -182,7 +449,7 @@ dependencies = [ "async-trait", "auto_impl", "axum", - "bytes", + "bytes 1.4.0", "chrono", "clap 4.3.21", "clap_complete", @@ -190,8 +457,8 @@ dependencies = [ "crc 3.0.1", "ctrlc", "ethereum-forkid", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-solc 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers 2.0.8", + "ethers-solc 2.0.8", "fdlimit", "flate2", "forge", @@ -199,11 +466,11 @@ dependencies = [ "foundry-config", "foundry-evm", "foundry-utils", - "futures", + "futures 0.3.28", "hash-db", "hyper", "memory-db", - "parking_lot", + "parking_lot 0.12.1", "pretty_assertions", "serde", "serde_json", @@ -223,8 +490,8 @@ dependencies = [ name = "anvil-core" version = "0.1.0" dependencies = [ - "bytes", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "bytes 1.4.0", + "ethers-core 2.0.8", "foundry-evm", "hash-db", "hash256-std-hasher", @@ -253,17 +520,17 @@ dependencies = [ "anvil-rpc", "async-trait", "axum", - "bytes", + "bytes 1.4.0", "clap 4.3.21", - "futures", + "futures 0.3.28", "hyper", "parity-tokio-ipc", - "parking_lot", + "parking_lot 0.12.1", "pin-project", "serde", "serde_json", "thiserror", - "tokio-util", + "tokio-util 0.7.8", "tower-http 0.4.3", "tracing", ] @@ -295,7 +562,7 @@ dependencies = [ "ark-serialize 0.3.0", "ark-std 0.3.0", "derivative", - "num-bigint", + "num-bigint 0.4.3", "num-traits", "paste", "rustc_version 0.3.3", @@ -315,7 +582,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools", - "num-bigint", + "num-bigint 0.4.3", "num-traits", "paste", "rustc_version 0.4.0", @@ -328,7 +595,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" dependencies = [ - "quote", + "quote 1.0.32", "syn 1.0.109", ] @@ -338,7 +605,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ - "quote", + "quote 1.0.32", "syn 1.0.109", ] @@ -348,9 +615,9 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" dependencies = [ - "num-bigint", + "num-bigint 0.4.3", "num-traits", - "quote", + "quote 1.0.32", "syn 1.0.109", ] @@ -360,10 +627,10 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint", + "num-bigint 0.4.3", "num-traits", - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 1.0.109", ] @@ -385,7 +652,7 @@ checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ "ark-std 0.4.0", "digest 0.10.7", - "num-bigint", + "num-bigint 0.4.3", ] [[package]] @@ -408,6 +675,27 @@ dependencies = [ "rand 0.8.5", ] +[[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.32", + "syn 1.0.109", +] + [[package]] name = "array-init" version = "0.0.4" @@ -417,6 +705,27 @@ dependencies = [ "nodrop", ] +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + [[package]] name = "arrayvec" version = "0.7.4" @@ -432,6 +741,37 @@ dependencies = [ "term", ] +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + +[[package]] +name = "async-compression" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b74f44609f0f91493e3082d3734d98497e094777144380ea4db9f9905dd5b6" +dependencies = [ + "brotli", + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", + "zstd 0.12.4", + "zstd-safe 6.0.6", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener", +] + [[package]] name = "async-priority-channel" version = "0.1.0" @@ -447,8 +787,30 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 2.0.28", +] + +[[package]] +name = "async-stream" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] @@ -458,8 +820,8 @@ version = "0.1.72" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] @@ -469,11 +831,20 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" dependencies = [ - "futures", + "futures 0.3.28", "pharos", "rustc_version 0.4.0", ] +[[package]] +name = "atoi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616896e05fc0e2649463a93a15183c6a16bf03413a7af88ef1285ddedfa9cda5" +dependencies = [ + "num-traits", +] + [[package]] name = "atomic" version = "0.5.3" @@ -494,7 +865,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi 0.1.19", "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -504,11 +875,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" dependencies = [ "proc-macro-error", - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 1.0.109", ] +[[package]] +name = "autocfg" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" +dependencies = [ + "autocfg 1.1.0", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -525,12 +905,12 @@ dependencies = [ "axum-core", "base64 0.13.1", "bitflags 1.3.2", - "bytes", + "bytes 1.4.0", "futures-util", "http", "http-body", "hyper", - "itoa", + "itoa 1.0.9", "matchit", "memchr", "mime", @@ -539,7 +919,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sha-1", + "sha-1 0.10.1", "sync_wrapper", "tokio", "tokio-tungstenite 0.17.2", @@ -556,7 +936,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37e5939e02c56fecd5c017c37df4238c0a839fa76b7f97acdd7efb804fd181cc" dependencies = [ "async-trait", - "bytes", + "bytes 1.4.0", "futures-util", "http", "http-body", @@ -566,20 +946,38 @@ dependencies = [ ] [[package]] -name = "backtrace" -version = "0.3.68" +name = "backon" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1a6197b2120bb2185a267f6515038558b019e92b832bb0320e96d66268dcf9" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "pin-project", + "tokio", +] + +[[package]] +name = "backtrace" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" dependencies = [ "addr2line", "cc", - "cfg-if", + "cfg-if 1.0.0", "libc", "miniz_oxide", "object", "rustc-demangle", ] +[[package]] +name = "base16ct" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" + [[package]] name = "base16ct" version = "0.2.0" @@ -610,6 +1008,50 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dabbe35f96fb9507f7330793dc490461b2962659ac5d427181e451a623751d1" +[[package]] +name = "beef" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" +dependencies = [ + "serde", +] + +[[package]] +name = "bellman_ce" +version = "0.3.2" +source = "git+https://github.com/matter-labs/bellman?branch=dev#bbac0559fdc440b2331eca1c347a30559a3dd969" +dependencies = [ + "arrayvec 0.7.4", + "bit-vec", + "blake2s_const", + "blake2s_simd", + "byteorder", + "cfg-if 1.0.0", + "crossbeam 0.7.3", + "futures 0.3.28", + "hex", + "lazy_static", + "num_cpus", + "pairing_ce", + "rand 0.4.6", + "serde", + "smallvec 1.11.0", + "tiny-keccak 1.5.0", +] + +[[package]] +name = "bigdecimal" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc403c26e6b03005522e6e8053384c4e881dfe5b2bf041c0c2c49be33d64a539" +dependencies = [ + "num-bigint 0.3.3", + "num-integer", + "num-traits", + "serde", +] + [[package]] name = "bincode" version = "1.3.3" @@ -619,6 +1061,27 @@ 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.66", + "quote 1.0.32", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.28", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -633,6 +1096,9 @@ name = "bit-vec" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +dependencies = [ + "serde", +] [[package]] name = "bitflags" @@ -656,17 +1122,93 @@ dependencies = [ "radium 0.3.0", ] +[[package]] +name = "bitvec" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" +dependencies = [ + "funty 1.1.0", + "radium 0.6.2", + "tap", + "wyz 0.2.0", +] + [[package]] name = "bitvec" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "funty", + "funty 2.0.0", "radium 0.7.0", "serde", "tap", - "wyz", + "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 0.8.0", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +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 = "blake2s_const" +version = "0.6.0" +source = "git+https://github.com/matter-labs/bellman?branch=dev#bbac0559fdc440b2331eca1c347a30559a3dd969" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "constant_time_eq", +] + +[[package]] +name = "blake2s_simd" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e461a7034e85b211a4acb57ee2e6730b32912b06c08cc242243c39fc21ae6a2" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding 0.1.5", + "byte-tools", + "byteorder", + "generic-array 0.12.4", ] [[package]] @@ -675,7 +1217,8 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array", + "block-padding 0.2.1", + "generic-array 0.14.7", ] [[package]] @@ -684,7 +1227,53 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array", + "generic-array 0.14.7", +] + +[[package]] +name = "block-modes" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" +dependencies = [ + "block-padding 0.2.1", + "cipher 0.2.5", +] + +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "brotli" +version = "3.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "2.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", ] [[package]] @@ -734,12 +1323,34 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + +[[package]] +name = "bytecount" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" + [[package]] name = "byteorder" version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +[[package]] +name = "bytes" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +dependencies = [ + "byteorder", + "iovec", +] + [[package]] name = "bytes" version = "1.4.0" @@ -749,6 +1360,15 @@ dependencies = [ "serde", ] +[[package]] +name = "bytestring" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "238e4886760d98c4f899360c834fa93e62cf7f721ac3c2da375cbdf4b8679aae" +dependencies = [ + "bytes 1.4.0", +] + [[package]] name = "bzip2" version = "0.4.4" @@ -788,6 +1408,19 @@ 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 1.0.18", + "serde", + "serde_json", +] + [[package]] name = "cargo_metadata" version = "0.15.4" @@ -828,18 +1461,18 @@ version = "0.2.0" dependencies = [ "async-trait", "chrono", - "ethers-contract 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-etherscan 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-providers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-signers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-contract 2.0.8", + "ethers-core 2.0.8", + "ethers-etherscan 2.0.8", + "ethers-providers 2.0.8", + "ethers-signers 2.0.8", "evm-disassembler", "eyre", "foundry-common", "foundry-config", "foundry-evm", "foundry-utils", - "futures", + "futures 0.3.28", "hex", "num_cpus", "rayon", @@ -868,6 +1501,21 @@ dependencies = [ "libc", ] +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + [[package]] name = "cfg-if" version = "1.0.0" @@ -878,12 +1526,12 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" name = "chisel" version = "0.1.0" dependencies = [ - "bytes", + "bytes 1.4.0", "clap 4.3.21", "criterion", "dirs 5.0.1", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-solc 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers 2.0.8", + "ethers-solc 2.0.8", "eyre", "forge", "forge-fmt", @@ -918,10 +1566,11 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", + "rustc-serialize", "serde", - "time 0.1.45", + "time 0.1.43", "wasm-bindgen", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -951,6 +1600,15 @@ dependencies = [ "half", ] +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array 0.14.7", +] + [[package]] name = "cipher" version = "0.4.4" @@ -961,6 +1619,40 @@ dependencies = [ "inout", ] +[[package]] +name = "circuit_testing" +version = "0.1.0" +source = "git+https://github.com/matter-labs/era-circuit_testing.git?branch=main#abd44b507840f836da6e084aaacb2ba8a7cb1df6" +dependencies = [ + "bellman_ce", +] + +[[package]] +name = "clang-sys" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "2.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +dependencies = [ + "ansi_term", + "atty", + "bitflags 1.3.2", + "strsim 0.8.0", + "textwrap 0.11.0", + "unicode-width", + "vec_map", +] + [[package]] name = "clap" version = "3.2.25" @@ -970,7 +1662,7 @@ dependencies = [ "bitflags 1.3.2", "clap_lex 0.2.4", "indexmap 1.9.3", - "textwrap", + "textwrap 0.16.0", ] [[package]] @@ -994,7 +1686,7 @@ dependencies = [ "anstyle", "clap_lex 0.5.0", "once_cell", - "strsim", + "strsim 0.10.0", "terminal_size", "unicase", "unicode-width", @@ -1025,9 +1717,9 @@ version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ - "heck", - "proc-macro2", - "quote", + "heck 0.4.1", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] @@ -1056,7 +1748,7 @@ dependencies = [ "terminfo", "thiserror", "which", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1067,7 +1759,41 @@ checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" dependencies = [ "error-code", "str-buf", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "codegen" +version = "0.1.0" +source = "git+https://github.com/matter-labs/solidity_plonk_verifier.git?branch=dev#07954802c13fb087efb5874c2ce521f843d614fd" +dependencies = [ + "ethereum-types 0.14.1", + "franklin-crypto", + "handlebars", + "hex", + "paste", + "rescue_poseidon", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "codegen" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff61280aed771c3070e7dcc9e050c66f1eb1e3b96431ba66f9f74641d02fc41d" +dependencies = [ + "indexmap 1.9.3", ] [[package]] @@ -1082,10 +1808,10 @@ dependencies = [ "digest 0.10.7", "getrandom 0.2.10", "hmac 0.12.1", - "k256", + "k256 0.13.1", "lazy_static", "serde", - "sha2 0.10.7", + "sha2 0.10.6", "thiserror", ] @@ -1102,7 +1828,7 @@ dependencies = [ "once_cell", "pbkdf2 0.12.2", "rand 0.8.5", - "sha2 0.10.7", + "sha2 0.10.6", "thiserror", ] @@ -1116,13 +1842,13 @@ dependencies = [ "bech32", "bs58", "digest 0.10.7", - "generic-array", + "generic-array 0.14.7", "hex", "ripemd", "serde", "serde_derive", - "sha2 0.10.7", - "sha3", + "sha2 0.10.6", + "sha3 0.10.6", "thiserror", ] @@ -1134,8 +1860,8 @@ checksum = "863cc93703bfc6f02f4401b42663b767783179f4080d89a0c4876766c7c0fb78" dependencies = [ "async-trait", "byteorder", - "cfg-if", - "futures", + "cfg-if 1.0.0", + "futures 0.3.28", "hex", "hidapi-rusb", "js-sys", @@ -1185,6 +1911,27 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +[[package]] +name = "colored" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" +dependencies = [ + "is-terminal", + "lazy_static", + "windows-sys 0.48.0", +] + +[[package]] +name = "combine" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +dependencies = [ + "bytes 1.4.0", + "memchr", +] + [[package]] name = "comfy-table" version = "6.2.0" @@ -1206,7 +1953,7 @@ dependencies = [ "async-trait", "nix", "tokio", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1222,6 +1969,12 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "const-oid" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" + [[package]] name = "const-oid" version = "0.9.5" @@ -1241,10 +1994,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] -name = "core-foundation" -version = "0.9.3" +name = "convert_case" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "cookie" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" +dependencies = [ + "percent-encoding", + "time 0.3.25", + "version_check", +] + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", @@ -1274,15 +2047,30 @@ dependencies = [ "build_const", ] +[[package]] +name = "crc" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" +dependencies = [ + "crc-catalog 1.1.1", +] + [[package]] name = "crc" version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" dependencies = [ - "crc-catalog", + "crc-catalog 2.2.0", ] +[[package]] +name = "crc-catalog" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" + [[package]] name = "crc-catalog" version = "2.2.0" @@ -1295,7 +2083,7 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -1310,7 +2098,7 @@ dependencies = [ "ciborium", "clap 3.2.25", "criterion-plot", - "futures", + "futures 0.3.28", "itertools", "lazy_static", "num-traits", @@ -1336,14 +2124,63 @@ dependencies = [ "itertools", ] +[[package]] +name = "crossbeam" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69323bff1fb41c635347b8ead484a5ca6c3f11914d784170b158d8449ab07f8e" +dependencies = [ + "cfg-if 0.1.10", + "crossbeam-channel 0.4.4", + "crossbeam-deque 0.7.4", + "crossbeam-epoch 0.8.2", + "crossbeam-queue 0.2.3", + "crossbeam-utils 0.7.2", +] + +[[package]] +name = "crossbeam" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-channel 0.5.8", + "crossbeam-deque 0.8.3", + "crossbeam-epoch 0.9.15", + "crossbeam-queue 0.3.8", + "crossbeam-utils 0.8.16", +] + +[[package]] +name = "crossbeam-channel" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" +dependencies = [ + "crossbeam-utils 0.7.2", + "maybe-uninit", +] + [[package]] name = "crossbeam-channel" version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ - "cfg-if", - "crossbeam-utils", + "cfg-if 1.0.0", + "crossbeam-utils 0.8.16", +] + +[[package]] +name = "crossbeam-deque" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" +dependencies = [ + "crossbeam-epoch 0.8.2", + "crossbeam-utils 0.7.2", + "maybe-uninit", ] [[package]] @@ -1352,9 +2189,24 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", + "cfg-if 1.0.0", + "crossbeam-epoch 0.9.15", + "crossbeam-utils 0.8.16", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +dependencies = [ + "autocfg 1.1.0", + "cfg-if 0.1.10", + "crossbeam-utils 0.7.2", + "lazy_static", + "maybe-uninit", + "memoffset 0.5.6", + "scopeguard", ] [[package]] @@ -1363,20 +2215,52 @@ version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", + "autocfg 1.1.0", + "cfg-if 1.0.0", + "crossbeam-utils 0.8.16", "memoffset 0.9.0", "scopeguard", ] +[[package]] +name = "crossbeam-queue" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" +dependencies = [ + "cfg-if 0.1.10", + "crossbeam-utils 0.7.2", + "maybe-uninit", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils 0.8.16", +] + +[[package]] +name = "crossbeam-utils" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +dependencies = [ + "autocfg 1.1.0", + "cfg-if 0.1.10", + "lazy_static", +] + [[package]] name = "crossbeam-utils" version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -1388,11 +2272,11 @@ dependencies = [ "bitflags 1.3.2", "crossterm_winapi", "libc", - "mio", - "parking_lot", + "mio 0.8.8", + "parking_lot 0.12.1", "signal-hook", "signal-hook-mio", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1404,11 +2288,11 @@ dependencies = [ "bitflags 1.3.2", "crossterm_winapi", "libc", - "mio", - "parking_lot", + "mio 0.8.8", + "parking_lot 0.12.1", "signal-hook", "signal-hook-mio", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1417,7 +2301,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1426,13 +2310,35 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-bigint" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +dependencies = [ + "generic-array 0.14.7", + "subtle", +] + +[[package]] +name = "crypto-bigint" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +dependencies = [ + "generic-array 0.14.7", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + [[package]] name = "crypto-bigint" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" dependencies = [ - "generic-array", + "generic-array 0.14.7", "rand_core 0.6.4", "subtle", "zeroize", @@ -1444,27 +2350,68 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array", + "generic-array 0.14.7", "typenum", ] +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array 0.14.7", + "subtle", +] + +[[package]] +name = "crypto-mac" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" +dependencies = [ + "generic-array 0.14.7", + "subtle", +] + [[package]] name = "crypto-mac" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array", + "generic-array 0.14.7", "subtle", ] +[[package]] +name = "cs_derive" +version = "0.1.0" +source = "git+https://github.com/matter-labs/era-sync_vm.git?branch=v1.3.3#22d9d3a2018df8d4ac4bc0b0ada61c191d0cee30" +dependencies = [ + "proc-macro-error", + "proc-macro2 1.0.66", + "quote 1.0.32", + "serde", + "syn 1.0.109", +] + +[[package]] +name = "ctr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" +dependencies = [ + "cipher 0.2.5", +] + [[package]] name = "ctr" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] @@ -1486,8 +2433,8 @@ dependencies = [ "curl-sys", "libc", "schannel", - "socket2", - "winapi", + "socket2 0.4.9", + "winapi 0.3.9", ] [[package]] @@ -1502,7 +2449,42 @@ dependencies = [ "libz-sys", "pkg-config", "vcpkg", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "darling" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2 1.0.66", + "quote 1.0.32", + "strsim 0.10.0", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +dependencies = [ + "darling_core", + "quote 1.0.32", + "syn 1.0.109", ] [[package]] @@ -1511,11 +2493,11 @@ version = "5.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "hashbrown 0.14.0", "lock_api", "once_cell", - "parking_lot_core", + "parking_lot_core 0.9.8", ] [[package]] @@ -1524,13 +2506,44 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +[[package]] +name = "debugid" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" +dependencies = [ + "serde", + "uuid 1.4.1", +] + +[[package]] +name = "der" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +dependencies = [ + "const-oid 0.7.1", + "crypto-bigint 0.3.2", + "pem-rfc7468", +] + +[[package]] +name = "der" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +dependencies = [ + "const-oid 0.9.5", + "zeroize", +] + [[package]] name = "der" version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ - "const-oid", + "const-oid 0.9.5", "zeroize", ] @@ -1539,6 +2552,9 @@ name = "deranged" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" +dependencies = [ + "serde", +] [[package]] name = "derivative" @@ -1546,8 +2562,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.66", + "quote 1.0.32", "syn 1.0.109", ] @@ -1557,9 +2573,9 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "convert_case", - "proc-macro2", - "quote", + "convert_case 0.4.0", + "proc-macro2 1.0.66", + "quote 1.0.32", "rustc_version 0.4.0", "syn 1.0.109", ] @@ -1580,13 +2596,22 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + [[package]] name = "digest" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array", + "generic-array 0.14.7", ] [[package]] @@ -1596,11 +2621,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", - "const-oid", + "const-oid 0.9.5", "crypto-common", "subtle", ] +[[package]] +name = "dirs" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" +dependencies = [ + "dirs-sys 0.3.7", +] + [[package]] name = "dirs" version = "4.0.0" @@ -1625,7 +2659,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "dirs-sys-next", ] @@ -1637,7 +2671,7 @@ checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", "redox_users", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1660,9 +2694,15 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", - "winapi", + "winapi 0.3.9", ] +[[package]] +name = "dotenv" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" + [[package]] name = "dotenvy" version = "0.15.7" @@ -1675,18 +2715,30 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +[[package]] +name = "ecdsa" +version = "0.14.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +dependencies = [ + "der 0.6.1", + "elliptic-curve 0.12.3", + "rfc6979 0.3.1", + "signature 1.6.4", +] + [[package]] name = "ecdsa" version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ - "der", + "der 0.7.8", "digest 0.10.7", - "elliptic-curve", - "rfc6979", - "signature", - "spki", + "elliptic-curve 0.13.5", + "rfc6979 0.4.0", + "signature 2.1.0", + "spki 0.7.2", ] [[package]] @@ -1694,6 +2746,9 @@ name = "either" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +dependencies = [ + "serde", +] [[package]] name = "elasticlunr-rs" @@ -1707,21 +2762,41 @@ dependencies = [ "serde_json", ] +[[package]] +name = "elliptic-curve" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +dependencies = [ + "base16ct 0.1.1", + "crypto-bigint 0.4.9", + "der 0.6.1", + "digest 0.10.7", + "ff 0.12.1", + "generic-array 0.14.7", + "group 0.12.1", + "pkcs8 0.9.0", + "rand_core 0.6.4", + "sec1 0.3.0", + "subtle", + "zeroize", +] + [[package]] name = "elliptic-curve" version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" dependencies = [ - "base16ct", - "crypto-bigint", + "base16ct 0.2.0", + "crypto-bigint 0.5.2", "digest 0.10.7", - "ff", - "generic-array", - "group", - "pkcs8", + "ff 0.13.0", + "generic-array 0.14.7", + "group 0.13.0", + "pkcs8 0.10.2", "rand_core 0.6.4", - "sec1", + "sec1 0.7.3", "subtle", "zeroize", ] @@ -1747,7 +2822,7 @@ version = "0.8.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -1763,14 +2838,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf56acd72bb22d2824e66ae8e9e5ada4d0de17a69c7fd35569dde2ada8ec9116" dependencies = [ "base64 0.13.1", - "bytes", + "bytes 1.4.0", "hex", - "k256", + "k256 0.13.1", "log", "rand 0.8.5", "rlp", "serde", - "sha3", + "sha3 0.10.6", "zeroize", ] @@ -1781,15 +2856,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0be7b2ac146c1f99fe245c02d16af0696450d8e06c135db75e10eeb9e642c20d" dependencies = [ "base64 0.21.2", - "bytes", + "bytes 1.4.0", "hex", - "k256", + "k256 0.13.1", "log", "rand 0.8.5", "rlp", "serde", "serde-hex", - "sha3", + "sha3 0.10.6", "zeroize", ] @@ -1799,11 +2874,24 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b893c4eb2dc092c811165f84dc7447fae16fb66521717968c34c509b39b1a5c5" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + [[package]] name = "env_logger" version = "0.10.0" @@ -1817,12 +2905,57 @@ dependencies = [ "termcolor", ] +[[package]] +name = "envy" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f47e0157f2cb54f5ae1bd371b30a2ae4311e1c028f575cd4e81de7353215965" +dependencies = [ + "serde", +] + [[package]] name = "equivalent" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "era_test_node" +version = "1.0.3" +dependencies = [ + "anyhow", + "bigdecimal", + "clap 4.3.21", + "colored", + "ethabi 16.0.0", + "eyre", + "futures 0.3.28", + "hex", + "itertools", + "jsonrpc-core 18.0.0 (git+https://github.com/matter-labs/jsonrpc.git?branch=master)", + "jsonrpc-core-client", + "jsonrpc-derive", + "jsonrpc-http-server", + "lazy_static", + "once_cell", + "reqwest", + "serde", + "serde_json", + "tokio", + "tracing", + "tracing-subscriber", + "vlog", + "vm", + "zksync_basic_types", + "zksync_contracts", + "zksync_core", + "zksync_state", + "zksync_types", + "zksync_utils", + "zksync_web3_decl", +] + [[package]] name = "errno" version = "0.3.2" @@ -1845,7 +2978,16 @@ dependencies = [ ] [[package]] -name = "error-code" +name = "error-chain" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" +dependencies = [ + "version_check", +] + +[[package]] +name = "error-code" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" @@ -1860,20 +3002,35 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" dependencies = [ - "aes", - "ctr", + "aes 0.8.3", + "ctr 0.9.2", "digest 0.10.7", "hex", "hmac 0.12.1", "pbkdf2 0.11.0", "rand 0.8.5", - "scrypt", + "scrypt 0.10.0", + "serde", + "serde_json", + "sha2 0.10.6", + "sha3 0.10.6", + "thiserror", + "uuid 0.8.2", +] + +[[package]] +name = "ethabi" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c98847055d934070b90e806e12d3936b787d0a115068981c1d8dfd5dfef5a5" +dependencies = [ + "ethereum-types 0.12.1", + "hex", "serde", "serde_json", - "sha2 0.10.7", - "sha3", + "sha3 0.9.1", "thiserror", - "uuid", + "uint", ] [[package]] @@ -1882,17 +3039,30 @@ version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" dependencies = [ - "ethereum-types", + "ethereum-types 0.14.1", "hex", "once_cell", "regex", "serde", "serde_json", - "sha3", + "sha3 0.10.6", "thiserror", "uint", ] +[[package]] +name = "ethbloom" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" +dependencies = [ + "crunchy", + "fixed-hash 0.7.0", + "impl-rlp", + "impl-serde 0.3.2", + "tiny-keccak 2.0.2", +] + [[package]] name = "ethbloom" version = "0.13.0" @@ -1900,12 +3070,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", - "fixed-hash", - "impl-codec", + "fixed-hash 0.8.0", + "impl-codec 0.6.0", "impl-rlp", - "impl-serde", + "impl-serde 0.4.0", "scale-info", - "tiny-keccak", + "tiny-keccak 2.0.2", ] [[package]] @@ -1917,26 +3087,54 @@ dependencies = [ "crc 1.8.1", "fastrlp", "maplit", - "primitive-types", + "primitive-types 0.12.1", "thiserror", ] +[[package]] +name = "ethereum-types" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" +dependencies = [ + "ethbloom 0.11.1", + "fixed-hash 0.7.0", + "impl-rlp", + "impl-serde 0.3.2", + "primitive-types 0.10.1", + "uint", +] + [[package]] name = "ethereum-types" version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", + "ethbloom 0.13.0", + "fixed-hash 0.8.0", + "impl-codec 0.6.0", "impl-rlp", - "impl-serde", - "primitive-types", + "impl-serde 0.4.0", + "primitive-types 0.12.1", "scale-info", "uint", ] +[[package]] +name = "ethers" +version = "2.0.8" +dependencies = [ + "ethers-addressbook 2.0.8", + "ethers-contract 2.0.8", + "ethers-core 2.0.8", + "ethers-etherscan 2.0.8", + "ethers-middleware 2.0.8", + "ethers-providers 2.0.8", + "ethers-signers 2.0.8", + "ethers-solc 2.0.8", +] + [[package]] name = "ethers" version = "2.0.8" @@ -1954,18 +3152,13 @@ dependencies = [ ] [[package]] -name = "ethers" +name = "ethers-addressbook" version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs#5145992e4b03fdaebcc4d35aa7ee44504ca82b5a" dependencies = [ - "ethers-addressbook 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-contract 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-etherscan 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-middleware 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-providers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-signers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-solc 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-core 2.0.8", + "once_cell", + "serde", + "serde_json", ] [[package]] @@ -1981,14 +3174,21 @@ dependencies = [ ] [[package]] -name = "ethers-addressbook" +name = "ethers-contract" version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs#5145992e4b03fdaebcc4d35aa7ee44504ca82b5a" dependencies = [ - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-contract-abigen 2.0.8", + "ethers-contract-derive 2.0.8", + "ethers-core 2.0.8", + "ethers-providers 2.0.8", + "ethers-signers 2.0.8", + "futures-util", + "hex", "once_cell", + "pin-project", "serde", "serde_json", + "thiserror", ] [[package]] @@ -2011,40 +3211,19 @@ dependencies = [ "thiserror", ] -[[package]] -name = "ethers-contract" -version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs#5145992e4b03fdaebcc4d35aa7ee44504ca82b5a" -dependencies = [ - "ethers-contract-abigen 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-contract-derive 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-providers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-signers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "futures-util", - "hex", - "once_cell", - "pin-project", - "serde", - "serde_json", - "thiserror", -] - [[package]] name = "ethers-contract-abigen" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155ea1b84d169d231317ed86e307af6f2bed6b40dd17e5e94bc84da21cadb21c" dependencies = [ "Inflector", "dunce", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-etherscan 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-core 2.0.8", + "ethers-etherscan 2.0.8", "eyre", "hex", "prettyplease", - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "regex", "reqwest", "serde", @@ -2057,17 +3236,18 @@ dependencies = [ [[package]] name = "ethers-contract-abigen" version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs#5145992e4b03fdaebcc4d35aa7ee44504ca82b5a" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "155ea1b84d169d231317ed86e307af6f2bed6b40dd17e5e94bc84da21cadb21c" dependencies = [ "Inflector", "dunce", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-etherscan 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-etherscan 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "eyre", "hex", "prettyplease", - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "regex", "reqwest", "serde", @@ -2080,15 +3260,13 @@ dependencies = [ [[package]] name = "ethers-contract-derive" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8567ff196c4a37c1a8c90ec73bda0ad2062e191e4f0a6dc4d943e2ec4830fc88" dependencies = [ "Inflector", - "ethers-contract-abigen 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-contract-abigen 2.0.8", + "ethers-core 2.0.8", "hex", - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "serde_json", "syn 2.0.28", ] @@ -2096,14 +3274,15 @@ dependencies = [ [[package]] name = "ethers-contract-derive" version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs#5145992e4b03fdaebcc4d35aa7ee44504ca82b5a" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8567ff196c4a37c1a8c90ec73bda0ad2062e191e4f0a6dc4d943e2ec4830fc88" dependencies = [ "Inflector", - "ethers-contract-abigen 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-contract-abigen 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "hex", - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "serde_json", "syn 2.0.28", ] @@ -2111,18 +3290,16 @@ dependencies = [ [[package]] name = "ethers-core" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60ca2514feb98918a0a31de7e1983c29f2267ebf61b2dc5d4294f91e5b866623" dependencies = [ - "arrayvec", - "bytes", - "cargo_metadata 0.15.4", + "arrayvec 0.7.4", + "bytes 1.4.0", + "cargo_metadata 0.17.0", "chrono", - "elliptic-curve", - "ethabi", - "generic-array", + "elliptic-curve 0.13.5", + "ethabi 18.0.0", + "generic-array 0.14.7", "hex", - "k256", + "k256 0.13.1", "num_enum", "once_cell", "open-fastrlp", @@ -2134,24 +3311,25 @@ dependencies = [ "syn 2.0.28", "tempfile", "thiserror", - "tiny-keccak", - "unicode-xid", + "tiny-keccak 2.0.2", + "unicode-xid 0.2.4", ] [[package]] name = "ethers-core" version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs#5145992e4b03fdaebcc4d35aa7ee44504ca82b5a" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60ca2514feb98918a0a31de7e1983c29f2267ebf61b2dc5d4294f91e5b866623" dependencies = [ - "arrayvec", - "bytes", - "cargo_metadata 0.17.0", + "arrayvec 0.7.4", + "bytes 1.4.0", + "cargo_metadata 0.15.4", "chrono", - "elliptic-curve", - "ethabi", - "generic-array", + "elliptic-curve 0.13.5", + "ethabi 18.0.0", + "generic-array 0.14.7", "hex", - "k256", + "k256 0.13.1", "num_enum", "once_cell", "open-fastrlp", @@ -2163,17 +3341,16 @@ dependencies = [ "syn 2.0.28", "tempfile", "thiserror", - "tiny-keccak", - "unicode-xid", + "tiny-keccak 2.0.2", + "unicode-xid 0.2.4", ] [[package]] name = "ethers-etherscan" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22b3a8269d3df0ed6364bc05b4735b95f4bf830ce3aef87d5e760fb0e93e5b91" dependencies = [ - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-core 2.0.8", + "ethers-solc 2.0.8", "reqwest", "semver 1.0.18", "serde", @@ -2185,10 +3362,10 @@ dependencies = [ [[package]] name = "ethers-etherscan" version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs#5145992e4b03fdaebcc4d35aa7ee44504ca82b5a" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22b3a8269d3df0ed6364bc05b4735b95f4bf830ce3aef87d5e760fb0e93e5b91" dependencies = [ - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-solc 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest", "semver 1.0.18", "serde", @@ -2200,16 +3377,14 @@ dependencies = [ [[package]] name = "ethers-middleware" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c339aad74ae5c451d27e0e49c7a3c7d22620b119b4f9291d7aa21f72d7f366" dependencies = [ "async-trait", "auto_impl", - "ethers-contract 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-etherscan 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-providers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-signers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-contract 2.0.8", + "ethers-core 2.0.8", + "ethers-etherscan 2.0.8", + "ethers-providers 2.0.8", + "ethers-signers 2.0.8", "futures-channel", "futures-locks", "futures-util", @@ -2227,15 +3402,16 @@ dependencies = [ [[package]] name = "ethers-middleware" version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs#5145992e4b03fdaebcc4d35aa7ee44504ca82b5a" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c339aad74ae5c451d27e0e49c7a3c7d22620b119b4f9291d7aa21f72d7f366" dependencies = [ "async-trait", "auto_impl", - "ethers-contract 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-etherscan 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-providers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-signers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-contract 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-etherscan 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-providers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-signers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "futures-channel", "futures-locks", "futures-util", @@ -2253,15 +3429,14 @@ dependencies = [ [[package]] name = "ethers-providers" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b411b119f1cf0efb69e2190883dee731251882bb21270f893ee9513b3a697c48" dependencies = [ "async-trait", "auto_impl", "base64 0.21.2", - "bytes", - "enr 0.8.1", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 1.4.0", + "enr 0.9.0", + "ethers-core 2.0.8", + "futures-channel", "futures-core", "futures-timer", "futures-util", @@ -2269,6 +3444,7 @@ dependencies = [ "hex", "http", "instant", + "jsonwebtoken", "once_cell", "pin-project", "reqwest", @@ -2283,21 +3459,22 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "winapi 0.3.9", "ws_stream_wasm", ] [[package]] name = "ethers-providers" version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs#5145992e4b03fdaebcc4d35aa7ee44504ca82b5a" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b411b119f1cf0efb69e2190883dee731251882bb21270f893ee9513b3a697c48" dependencies = [ "async-trait", "auto_impl", "base64 0.21.2", - "bytes", - "enr 0.9.0", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "futures-channel", + "bytes 1.4.0", + "enr 0.8.1", + "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "futures-core", "futures-timer", "futures-util", @@ -2305,7 +3482,6 @@ dependencies = [ "hex", "http", "instant", - "jsonwebtoken", "once_cell", "pin-project", "reqwest", @@ -2320,65 +3496,64 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winapi", "ws_stream_wasm", ] [[package]] name = "ethers-signers" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4864d387456a9c09a1157fa10e1528b29d90f1d859443acf06a1b23365fb518c" dependencies = [ "async-trait", "coins-bip32", "coins-bip39", - "elliptic-curve", + "coins-ledger", + "elliptic-curve 0.13.5", "eth-keystore", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-core 2.0.8", + "futures-executor", + "futures-util", "hex", + "home", "rand 0.8.5", - "sha2 0.10.7", + "rusoto_core", + "rusoto_kms", + "semver 1.0.18", + "sha2 0.10.6", + "spki 0.7.2", "thiserror", "tracing", + "trezor-client", ] [[package]] name = "ethers-signers" version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs#5145992e4b03fdaebcc4d35aa7ee44504ca82b5a" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4864d387456a9c09a1157fa10e1528b29d90f1d859443acf06a1b23365fb518c" dependencies = [ "async-trait", "coins-bip32", "coins-bip39", - "coins-ledger", - "elliptic-curve", + "elliptic-curve 0.13.5", "eth-keystore", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "futures-executor", - "futures-util", + "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "hex", - "home", "rand 0.8.5", - "rusoto_core", - "rusoto_kms", - "semver 1.0.18", - "sha2 0.10.7", - "spki", + "sha2 0.10.6", "thiserror", "tracing", - "trezor-client", ] [[package]] name = "ethers-solc" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6c2b9625a2c639d46625f88acc2092a3cb35786c37f7c2128b3ca20f639b3c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", + "dirs 5.0.1", "dunce", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-core 2.0.8", + "fs_extra", + "futures-util", "glob", "hex", "home", @@ -2386,15 +3561,19 @@ dependencies = [ "num_cpus", "once_cell", "path-slash", + "rand 0.8.5", "rayon", "regex", "semver 1.0.18", "serde", "serde_json", + "sha2 0.10.6", "solang-parser", - "svm-rs 0.2.23", + "svm-rs 0.3.0", + "svm-rs-builds", + "tempfile", "thiserror", - "tiny-keccak", + "tiny-keccak 2.0.2", "tokio", "tracing", "walkdir", @@ -2404,14 +3583,12 @@ dependencies = [ [[package]] name = "ethers-solc" version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs#5145992e4b03fdaebcc4d35aa7ee44504ca82b5a" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6c2b9625a2c639d46625f88acc2092a3cb35786c37f7c2128b3ca20f639b3c" dependencies = [ - "cfg-if", - "dirs 5.0.1", + "cfg-if 1.0.0", "dunce", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "fs_extra", - "futures-util", + "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "glob", "hex", "home", @@ -2419,19 +3596,15 @@ dependencies = [ "num_cpus", "once_cell", "path-slash", - "rand 0.8.5", "rayon", "regex", "semver 1.0.18", "serde", "serde_json", - "sha2 0.10.7", "solang-parser", - "svm-rs 0.3.0", - "svm-rs-builds", - "tempfile", + "svm-rs 0.2.23", "thiserror", - "tiny-keccak", + "tiny-keccak 2.0.2", "tokio", "tracing", "walkdir", @@ -2464,6 +3637,21 @@ dependencies = [ "once_cell", ] +[[package]] +name = "fake-simd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + [[package]] name = "fastrand" version = "2.0.0" @@ -2476,9 +3664,9 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "auto_impl", - "bytes", + "bytes 1.4.0", "fastrlp-derive", ] @@ -2488,9 +3676,9 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4caf31122bfc780557fdcd80897e95f12cc4d7217f8ac6b9d150df828a38ee8" dependencies = [ - "bytes", - "proc-macro2", - "quote", + "bytes 1.4.0", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] @@ -2500,8 +3688,8 @@ version = "3.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5" dependencies = [ - "cfg-if", - "rustix 0.38.7", + "cfg-if 1.0.0", + "rustix 0.38.8", "windows-sys 0.48.0", ] @@ -2514,6 +3702,16 @@ dependencies = [ "libc", ] +[[package]] +name = "ff" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "ff" version = "0.13.0" @@ -2524,6 +3722,34 @@ dependencies = [ "subtle", ] +[[package]] +name = "ff_ce" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b538e4231443a5b9c507caee3356f016d832cf7393d2d90f03ea3180d4e3fbc" +dependencies = [ + "byteorder", + "ff_derive_ce", + "hex", + "rand 0.4.6", + "serde", +] + +[[package]] +name = "ff_derive_ce" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b96fbccd88dbb1fac4ee4a07c2fcc4ca719a74ffbd9d2b9d41d8c8eb073d8b20" +dependencies = [ + "num-bigint 0.4.3", + "num-integer", + "num-traits", + "proc-macro2 1.0.66", + "quote 1.0.32", + "serde", + "syn 1.0.109", +] + [[package]] name = "figment" version = "0.10.10" @@ -2531,7 +3757,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4547e226f4c9ab860571e070a9034192b3175580ecea38da34fcdb53a018c9a5" dependencies = [ "atomic", - "parking_lot", + "parking_lot 0.12.1", "pear", "serde", "tempfile", @@ -2546,12 +3772,36 @@ version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall 0.3.5", "windows-sys 0.48.0", ] +[[package]] +name = "findshlibs" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40b9e59cd0f7e0806cca4be089683ecb6434e602038df21fe6bf6711b2f07f64" +dependencies = [ + "cc", + "lazy_static", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "fixed-hash" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + [[package]] name = "fixed-hash" version = "0.8.0" @@ -2606,7 +3856,7 @@ name = "forge" version = "0.2.0" dependencies = [ "comfy-table", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers 2.0.8", "eyre", "foundry-common", "foundry-config", @@ -2615,7 +3865,7 @@ dependencies = [ "glob", "hex", "once_cell", - "parking_lot", + "parking_lot 0.12.1", "proptest", "rayon", "regex", @@ -2636,8 +3886,8 @@ dependencies = [ "auto_impl", "clap 4.3.21", "derive_more", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-solc 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-core 2.0.8", + "ethers-solc 2.0.8", "eyre", "forge-fmt", "foundry-common", @@ -2663,7 +3913,7 @@ name = "forge-fmt" version = "0.2.0" dependencies = [ "ariadne", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-core 2.0.8", "foundry-config", "itertools", "pretty_assertions", @@ -2688,10 +3938,10 @@ dependencies = [ name = "foundry-abi" version = "0.1.0" dependencies = [ - "ethers-contract 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-contract-abigen 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-providers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-contract 2.0.8", + "ethers-contract-abigen 2.0.8", + "ethers-core 2.0.8", + "ethers-providers 2.0.8", "eyre", "foundry-macros", "syn 2.0.28", @@ -2702,8 +3952,8 @@ name = "foundry-binder" version = "0.1.0" dependencies = [ "curl", - "ethers-contract 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-solc 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-contract 2.0.8", + "ethers-solc 2.0.8", "eyre", "foundry-config", "git2", @@ -2720,7 +3970,7 @@ dependencies = [ "anvil", "anyhow", "async-trait", - "bytes", + "bytes 1.4.0", "cast 0.2.0", "clap 4.3.21", "clap_complete", @@ -2732,8 +3982,8 @@ dependencies = [ "dirs 5.0.1", "dotenvy", "dunce", - "ethabi", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethabi 18.0.0", + "ethers 2.0.8", "eyre", "forge", "forge-doc", @@ -2743,13 +3993,13 @@ dependencies = [ "foundry-config", "foundry-evm", "foundry-utils", - "futures", + "futures 0.3.28", "globset", "hex", "indicatif", "itertools", "once_cell", - "parking_lot", + "parking_lot 0.12.1", "path-slash", "pkg-config", "pretty_assertions", @@ -2765,7 +4015,7 @@ dependencies = [ "serial_test", "similar", "solang-parser", - "strsim", + "strsim 0.10.0", "strum 0.25.0", "svm-rs 0.3.0", "tempfile", @@ -2789,13 +4039,13 @@ dependencies = [ name = "foundry-cli-test-utils" version = "0.1.0" dependencies = [ - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-solc 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers 2.0.8", + "ethers-solc 2.0.8", "eyre", "foundry-common", "foundry-config", "once_cell", - "parking_lot", + "parking_lot 0.12.1", "pretty_assertions", "regex", "serde_json", @@ -2811,11 +4061,11 @@ dependencies = [ "clap 4.3.21", "comfy-table", "dunce", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-etherscan 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-middleware 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-providers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-solc 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-core 2.0.8", + "ethers-etherscan 2.0.8", + "ethers-middleware 2.0.8", + "ethers-providers 2.0.8", + "ethers-solc 2.0.8", "eyre", "foundry-config", "foundry-macros", @@ -2840,9 +4090,9 @@ version = "0.2.0" dependencies = [ "Inflector", "dirs-next", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-etherscan 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-solc 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-core 2.0.8", + "ethers-etherscan 2.0.8", + "ethers-solc 2.0.8", "eyre", "figment", "globset", @@ -2860,7 +4110,7 @@ dependencies = [ "tempfile", "thiserror", "toml 0.7.6", - "toml_edit", + "toml_edit 0.19.14", "tracing", "walkdir", ] @@ -2870,24 +4120,26 @@ name = "foundry-evm" version = "0.2.0" dependencies = [ "auto_impl", - "bytes", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "bytes 1.4.0", + "era_test_node", + "ethers 2.0.8", "eyre", "foundry-abi", "foundry-common", "foundry-config", "foundry-macros", "foundry-utils", - "futures", + "futures 0.3.28", "hashbrown 0.13.2", "hex", "itertools", "jsonpath_lib", "once_cell", "ordered-float", - "parking_lot", + "parking_lot 0.12.1", "proptest", "revm", + "revm_era", "semver 1.0.18", "serde", "serde_json", @@ -2904,7 +4156,7 @@ dependencies = [ name = "foundry-macros" version = "0.2.0" dependencies = [ - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-core 2.0.8", "foundry-macros-impl", "serde", "serde_json", @@ -2914,8 +4166,8 @@ dependencies = [ name = "foundry-macros-impl" version = "0.0.0" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] @@ -2924,16 +4176,16 @@ name = "foundry-utils" version = "0.2.0" dependencies = [ "dunce", - "ethers-addressbook 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-contract 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-etherscan 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-providers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", - "ethers-solc 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-addressbook 2.0.8", + "ethers-contract 2.0.8", + "ethers-core 2.0.8", + "ethers-etherscan 2.0.8", + "ethers-providers 2.0.8", + "ethers-solc 2.0.8", "eyre", "forge-fmt", "foundry-common", - "futures", + "futures 0.3.28", "glob", "hex", "once_cell", @@ -2948,6 +4200,36 @@ dependencies = [ "tracing", ] +[[package]] +name = "franklin-crypto" +version = "0.0.5" +source = "git+https://github.com/matter-labs/franklin-crypto?branch=dev#5922873d25ecec827cd60420ca8cd84a188bb965" +dependencies = [ + "arr_macro", + "bellman_ce", + "bit-vec", + "blake2 0.9.2", + "blake2-rfc_bellman_edition", + "blake2s_simd", + "byteorder", + "digest 0.9.0", + "hex", + "indexmap 1.9.3", + "itertools", + "lazy_static", + "num-bigint 0.4.3", + "num-derive 0.2.5", + "num-integer", + "num-traits", + "rand 0.4.6", + "serde", + "sha2 0.9.9", + "sha3 0.9.1", + "smallvec 1.11.0", + "splitmut", + "tiny-keccak 1.5.0", +] + [[package]] name = "fs2" version = "0.4.3" @@ -2955,7 +4237,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2974,24 +4256,58 @@ dependencies = [ ] [[package]] -name = "funty" -version = "2.0.0" +name = "fuchsia-cprng" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] -name = "futf" -version = "0.1.5" +name = "fuchsia-zircon" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" dependencies = [ - "mac", - "new_debug_unreachable", + "bitflags 1.3.2", + "fuchsia-zircon-sys", ] [[package]] -name = "futures" -version = "0.3.28" +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" + +[[package]] +name = "funty" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" +dependencies = [ + "mac", + "new_debug_unreachable", +] + +[[package]] +name = "futures" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" + +[[package]] +name = "futures" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ @@ -3029,6 +4345,18 @@ dependencies = [ "futures-core", "futures-task", "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-intrusive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot 0.11.2", ] [[package]] @@ -3053,8 +4381,8 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] @@ -3086,6 +4414,7 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ + "futures 0.1.31", "futures-channel", "futures-core", "futures-io", @@ -3107,6 +4436,15 @@ dependencies = [ "byteorder", ] +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -3124,7 +4462,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] @@ -3135,7 +4473,7 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -3170,7 +4508,7 @@ dependencies = [ "bstr", "btoi", "gix-date", - "itoa", + "itoa 1.0.9", "nom", "thiserror", ] @@ -3217,7 +4555,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc164145670e9130a60a21670d9b6f0f4f8de04e5dd256c51fa5a0340c625902" dependencies = [ "bstr", - "itoa", + "itoa 1.0.9", "thiserror", "time 0.3.25", ] @@ -3289,7 +4627,7 @@ dependencies = [ "gix-hash", "gix-validate", "hex", - "itoa", + "itoa 1.0.9", "nom", "smallvec 1.11.0", "thiserror", @@ -3349,7 +4687,7 @@ dependencies = [ "gix-fs", "libc", "once_cell", - "parking_lot", + "parking_lot 0.12.1", "tempfile", ] @@ -3365,7 +4703,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b85d89dc728613e26e0ed952a19583744e7f5240fcd4aa30d6c824ffd8b52f0f" dependencies = [ - "fastrand", + "fastrand 2.0.0", ] [[package]] @@ -3397,6 +4735,26 @@ dependencies = [ "regex", ] +[[package]] +name = "gloo-net" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9902a044653b26b99f7e3693a42f171312d9be8b26b5697bd1e43ad1f8a35e10" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "gloo-timers" version = "0.2.6" @@ -3409,13 +4767,126 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gloo-utils" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "google-cloud-auth" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "644f40175857d0b8d7b6cad6cd9594284da5041387fa2ddff30ab6d8faef65eb" +dependencies = [ + "async-trait", + "base64 0.21.2", + "google-cloud-metadata", + "google-cloud-token", + "home", + "jsonwebtoken", + "reqwest", + "serde", + "serde_json", + "thiserror", + "time 0.3.25", + "tokio", + "tracing", + "urlencoding", +] + +[[package]] +name = "google-cloud-metadata" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96e4ad0802d3f416f62e7ce01ac1460898ee0efc98f8b45cd4aab7611607012f" +dependencies = [ + "reqwest", + "thiserror", + "tokio", +] + +[[package]] +name = "google-cloud-storage" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "215abab97e07d144428425509c1dad07e57ea72b84b21bcdb6a8a5f12a5c4932" +dependencies = [ + "async-stream", + "base64 0.21.2", + "bytes 1.4.0", + "futures-util", + "google-cloud-auth", + "google-cloud-metadata", + "google-cloud-token", + "hex", + "once_cell", + "percent-encoding", + "regex", + "reqwest", + "ring", + "rsa", + "serde", + "serde_json", + "sha2 0.10.6", + "thiserror", + "time 0.3.25", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "google-cloud-token" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fcd62eb34e3de2f085bcc33a09c3e17c4f65650f36d53eb328b00d63bcb536a" +dependencies = [ + "async-trait", +] + +[[package]] +name = "governor" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19775995ee20209163239355bc3ad2f33f83da35d9ef72dea26e5af753552c87" +dependencies = [ + "dashmap", + "futures 0.3.28", + "futures-timer", + "no-std-compat", + "nonzero_ext", + "parking_lot 0.12.1", + "quanta 0.9.3", + "rand 0.8.5", + "smallvec 1.11.0", +] + +[[package]] +name = "group" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +dependencies = [ + "ff 0.12.1", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "group" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff", + "ff 0.13.0", "rand_core 0.6.4", "subtle", ] @@ -3426,7 +4897,7 @@ version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ - "bytes", + "bytes 1.4.0", "fnv", "futures-core", "futures-sink", @@ -3435,7 +4906,7 @@ dependencies = [ "indexmap 1.9.3", "slab", "tokio", - "tokio-util", + "tokio-util 0.7.8", "tracing", ] @@ -3474,6 +4945,15 @@ dependencies = [ "crunchy", ] +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.6", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -3508,6 +4988,25 @@ dependencies = [ "fxhash", ] +[[package]] +name = "hashlink" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf" +dependencies = [ + "hashbrown 0.11.2", +] + +[[package]] +name = "hdrhistogram" +version = "7.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f19b9f54f7c7f55e31401bb647626ce0cf0f67b0004982ce815b3ee72a02aa8" +dependencies = [ + "byteorder", + "num-traits", +] + [[package]] name = "headers" version = "0.3.8" @@ -3516,7 +5015,7 @@ checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ "base64 0.13.1", "bitflags 1.3.2", - "bytes", + "bytes 1.4.0", "headers-core", "http", "httpdate", @@ -3533,6 +5032,15 @@ dependencies = [ "http", ] +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "heck" version = "0.4.1" @@ -3581,13 +5089,23 @@ dependencies = [ "rusb", ] +[[package]] +name = "hmac" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" +dependencies = [ + "crypto-mac 0.10.1", + "digest 0.9.0", +] + [[package]] name = "hmac" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ - "crypto-mac", + "crypto-mac 0.11.1", "digest 0.9.0", ] @@ -3609,6 +5127,17 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "hostname" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +dependencies = [ + "libc", + "match_cfg", + "winapi 0.3.9", +] + [[package]] name = "html5ever" version = "0.26.0" @@ -3618,8 +5147,8 @@ dependencies = [ "log", "mac", "markup5ever", - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 1.0.109", ] @@ -3629,9 +5158,9 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ - "bytes", + "bytes 1.4.0", "fnv", - "itoa", + "itoa 1.0.9", ] [[package]] @@ -3640,7 +5169,7 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes", + "bytes 1.4.0", "http", "pin-project-lite", ] @@ -3675,7 +5204,7 @@ version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ - "bytes", + "bytes 1.4.0", "futures-channel", "futures-core", "futures-util", @@ -3684,9 +5213,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", + "itoa 1.0.9", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -3717,18 +5246,32 @@ dependencies = [ "futures-util", "http", "hyper", + "log", "rustls 0.21.6", + "rustls-native-certs", "tokio", "tokio-rustls 0.24.1", ] +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + [[package]] name = "hyper-tls" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes", + "bytes 1.4.0", "hyper", "native-tls", "tokio", @@ -3758,6 +5301,23 @@ dependencies = [ "cc", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "idna" version = "0.4.0" @@ -3792,7 +5352,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a4d73056a8d335492938cabeef794f38968ef43e6db9bc946638cfd6281003b" dependencies = [ "dunce", - "futures", + "futures 0.3.28", "gix-config", "ignore", "miette", @@ -3803,13 +5363,22 @@ dependencies = [ "tracing", ] +[[package]] +name = "impl-codec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" +dependencies = [ + "parity-scale-codec 2.3.1", +] + [[package]] name = "impl-codec" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.6.4", ] [[package]] @@ -3821,6 +5390,15 @@ dependencies = [ "rlp", ] +[[package]] +name = "impl-serde" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" +dependencies = [ + "serde", +] + [[package]] name = "impl-serde" version = "0.4.0" @@ -3836,8 +5414,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.66", + "quote 1.0.32", "syn 1.0.109", ] @@ -3853,7 +5431,7 @@ version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "autocfg", + "autocfg 1.1.0", "hashbrown 0.12.3", ] @@ -3876,7 +5454,7 @@ dependencies = [ "console", "instant", "number_prefix", - "portable-atomic", + "portable-atomic 1.4.2", "unicode-width", ] @@ -3912,7 +5490,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "generic-array", + "generic-array 0.14.7", ] [[package]] @@ -3921,7 +5499,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -3935,12 +5513,37 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", +] + [[package]] name = "ipnet" version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +[[package]] +name = "ipnetwork" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02c3eaab3ac0ede60ffa41add21970a7df7d91772c03383aac6c2c3d53cc716b" + +[[package]] +name = "iri-string" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21859b667d66a4c1dacd9df0863b3efb65785474255face87f5bca39dd8407c0" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "is-terminal" version = "0.4.9" @@ -3948,7 +5551,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.2", - "rustix 0.38.7", + "rustix 0.38.8", "windows-sys 0.48.0", ] @@ -3961,6 +5564,12 @@ dependencies = [ "either", ] +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + [[package]] name = "itoa" version = "1.0.9" @@ -3996,6 +5605,285 @@ dependencies = [ "serde_json", ] +[[package]] +name = "jsonrpc-client-transports" +version = "18.0.0" +source = "git+https://github.com/matter-labs/jsonrpc.git?branch=master#12c53e3e20c09c2fb9966a4ef1b0ea63de172540" +dependencies = [ + "derive_more", + "futures 0.3.28", + "jsonrpc-core 18.0.0 (git+https://github.com/matter-labs/jsonrpc.git?branch=master)", + "jsonrpc-pubsub", + "log", + "serde", + "serde_json", +] + +[[package]] +name = "jsonrpc-core" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +dependencies = [ + "futures 0.3.28", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "jsonrpc-core" +version = "18.0.0" +source = "git+https://github.com/matter-labs/jsonrpc.git?branch=master#12c53e3e20c09c2fb9966a4ef1b0ea63de172540" +dependencies = [ + "futures 0.3.28", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "jsonrpc-core-client" +version = "18.0.0" +source = "git+https://github.com/matter-labs/jsonrpc.git?branch=master#12c53e3e20c09c2fb9966a4ef1b0ea63de172540" +dependencies = [ + "futures 0.3.28", + "jsonrpc-client-transports", +] + +[[package]] +name = "jsonrpc-derive" +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.66", + "quote 1.0.32", + "syn 1.0.109", +] + +[[package]] +name = "jsonrpc-http-server" +version = "18.0.0" +source = "git+https://github.com/matter-labs/jsonrpc.git?branch=master#12c53e3e20c09c2fb9966a4ef1b0ea63de172540" +dependencies = [ + "futures 0.3.28", + "hyper", + "jsonrpc-core 18.0.0 (git+https://github.com/matter-labs/jsonrpc.git?branch=master)", + "jsonrpc-server-utils", + "log", + "net2", + "parking_lot 0.11.2", + "unicase", +] + +[[package]] +name = "jsonrpc-pubsub" +version = "18.0.0" +source = "git+https://github.com/matter-labs/jsonrpc.git?branch=master#12c53e3e20c09c2fb9966a4ef1b0ea63de172540" +dependencies = [ + "futures 0.3.28", + "jsonrpc-core 18.0.0 (git+https://github.com/matter-labs/jsonrpc.git?branch=master)", + "lazy_static", + "log", + "parking_lot 0.11.2", + "rand 0.7.3", + "serde", +] + +[[package]] +name = "jsonrpc-server-utils" +version = "18.0.0" +source = "git+https://github.com/matter-labs/jsonrpc.git?branch=master#12c53e3e20c09c2fb9966a4ef1b0ea63de172540" +dependencies = [ + "bytes 1.4.0", + "futures 0.3.28", + "globset", + "jsonrpc-core 18.0.0 (git+https://github.com/matter-labs/jsonrpc.git?branch=master)", + "lazy_static", + "log", + "tokio", + "tokio-stream", + "tokio-util 0.6.10", + "unicase", +] + +[[package]] +name = "jsonrpc-ws-server" +version = "18.0.0" +source = "git+https://github.com/matter-labs/jsonrpc.git?branch=master#12c53e3e20c09c2fb9966a4ef1b0ea63de172540" +dependencies = [ + "futures 0.3.28", + "jsonrpc-core 18.0.0 (git+https://github.com/matter-labs/jsonrpc.git?branch=master)", + "jsonrpc-server-utils", + "log", + "parity-ws", + "parking_lot 0.11.2", + "slab", +] + +[[package]] +name = "jsonrpsee" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1822d18e4384a5e79d94dc9e4d1239cfa9fad24e55b44d2efeff5b394c9fece4" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-http-client", + "jsonrpsee-proc-macros", + "jsonrpsee-server", + "jsonrpsee-types", + "jsonrpsee-wasm-client", + "jsonrpsee-ws-client", + "tracing", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11aa5766d5c430b89cb26a99b88f3245eb91534be8126102cea9e45ee3891b22" +dependencies = [ + "futures-channel", + "futures-util", + "gloo-net", + "http", + "jsonrpsee-core", + "pin-project", + "rustls-native-certs", + "soketto", + "thiserror", + "tokio", + "tokio-rustls 0.24.1", + "tokio-util 0.7.8", + "tracing", + "webpki-roots 0.23.1", +] + +[[package]] +name = "jsonrpsee-core" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64c6832a55f662b5a6ecc844db24b8b9c387453f923de863062c60ce33d62b81" +dependencies = [ + "anyhow", + "async-lock", + "async-trait", + "beef", + "futures-timer", + "futures-util", + "globset", + "hyper", + "jsonrpsee-types", + "parking_lot 0.12.1", + "rand 0.8.5", + "rustc-hash", + "serde", + "serde_json", + "soketto", + "thiserror", + "tokio", + "tokio-stream", + "tracing", + "wasm-bindgen-futures", +] + +[[package]] +name = "jsonrpsee-http-client" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1705c65069729e3dccff6fd91ee431d5d31cabcf00ce68a62a2c6435ac713af9" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls 0.24.1", + "jsonrpsee-core", + "jsonrpsee-types", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "tracing", +] + +[[package]] +name = "jsonrpsee-proc-macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6027ac0b197ce9543097d02a290f550ce1d9432bf301524b013053c0b75cc94" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 1.0.109", +] + +[[package]] +name = "jsonrpsee-server" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f06661d1a6b6e5b85469dc9c29acfbb9b3bb613797a6fd10a3ebb8a70754057" +dependencies = [ + "futures-util", + "hyper", + "jsonrpsee-core", + "jsonrpsee-types", + "serde", + "serde_json", + "soketto", + "tokio", + "tokio-stream", + "tokio-util 0.7.8", + "tower", + "tracing", +] + +[[package]] +name = "jsonrpsee-types" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e5bf6c75ce2a4217421154adfc65a24d2b46e77286e59bba5d9fa6544ccc8f4" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "jsonrpsee-wasm-client" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34e6ea7c6d862e60f8baebd946c037b70c6808a4e4e31e792a4029184e3ce13a" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", +] + +[[package]] +name = "jsonrpsee-ws-client" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64b2589680ba1ad7863f279cd2d5083c1dc0a7c0ea959d22924553050f8ab9f" +dependencies = [ + "http", + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", +] + [[package]] name = "jsonwebtoken" version = "8.3.0" @@ -4010,18 +5898,30 @@ dependencies = [ "simple_asn1", ] +[[package]] +name = "k256" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +dependencies = [ + "cfg-if 1.0.0", + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", + "sha2 0.10.6", +] + [[package]] name = "k256" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", + "cfg-if 1.0.0", + "ecdsa 0.16.8", + "elliptic-curve 0.13.5", "once_cell", - "sha2 0.10.7", - "signature", + "sha2 0.10.6", + "signature 2.1.0", ] [[package]] @@ -4041,7 +5941,17 @@ checksum = "711adba9940a039f4374fc5724c0a5eaca84a2d558cce62256bfe26f0dbef05e" dependencies = [ "hash-db", "hash256-std-hasher", - "tiny-keccak", + "tiny-keccak 2.0.2", +] + +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", ] [[package]] @@ -4082,8 +5992,8 @@ dependencies = [ "regex-syntax 0.7.4", "string_cache", "term", - "tiny-keccak", - "unicode-xid", + "tiny-keccak 2.0.2", + "unicode-xid 0.2.4", ] [[package]] @@ -4092,6 +6002,12 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d" +[[package]] +name = "language-tags" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" + [[package]] name = "lazy_static" version = "1.4.0" @@ -4101,6 +6017,18 @@ dependencies = [ "spin", ] +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "leb128" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" + [[package]] name = "libc" version = "0.2.147" @@ -4119,6 +6047,16 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if 1.0.0", + "winapi 0.3.9", +] + [[package]] name = "libm" version = "0.2.7" @@ -4135,6 +6073,20 @@ dependencies = [ "libc", ] +[[package]] +name = "librocksdb-sys" +version = "0.6.3+6.28.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "184ce2a189a817be2731070775ad053b6804a340fee05c6686d711db27455917" +dependencies = [ + "bindgen", + "bzip2-sys", + "cc", + "glob", + "libc", + "libz-sys", +] + [[package]] name = "libusb1-sys" version = "0.6.4" @@ -4171,13 +6123,31 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +[[package]] +name = "local-channel" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f303ec0e94c6c54447f84f3b0ef7af769858a9c4ef56ef2a986d3dcd4c3fc9c" +dependencies = [ + "futures-core", + "futures-sink", + "futures-util", + "local-waker", +] + +[[package]] +name = "local-waker" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e34f76eb3611940e0e7d53a9aaa4e6a3151f69541a282fd0dad5571420c53ff1" + [[package]] name = "lock_api" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ - "autocfg", + "autocfg 1.1.0", "scopeguard", ] @@ -4193,6 +6163,15 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", +] + [[package]] name = "maplit" version = "1.0.2" @@ -4213,6 +6192,12 @@ dependencies = [ "tendril", ] +[[package]] +name = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + [[package]] name = "matchers" version = "0.1.0" @@ -4248,7 +6233,7 @@ checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" dependencies = [ "block-buffer 0.9.0", "digest 0.9.0", - "opaque-debug", + "opaque-debug 0.3.0", ] [[package]] @@ -4272,7 +6257,7 @@ dependencies = [ "clap 4.3.21", "clap_complete", "elasticlunr-rs", - "env_logger", + "env_logger 0.10.0", "handlebars", "log", "memchr", @@ -4303,13 +6288,22 @@ dependencies = [ "libc", ] +[[package]] +name = "memoffset" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" +dependencies = [ + "autocfg 1.1.0", +] + [[package]] name = "memoffset" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ - "autocfg", + "autocfg 1.1.0", ] [[package]] @@ -4318,7 +6312,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ - "autocfg", + "autocfg 1.1.0", ] [[package]] @@ -4333,27 +6327,85 @@ dependencies = [ ] [[package]] -name = "miette" -version = "5.10.0" +name = "metrics" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" +checksum = "7b9b8653cec6897f73b519a43fba5ee3d50f62fe9af80b428accdcc093b4a849" dependencies = [ - "miette-derive", - "once_cell", - "thiserror", - "unicode-width", + "ahash 0.7.6", + "metrics-macros", + "portable-atomic 0.3.20", ] [[package]] -name = "miette-derive" -version = "5.10.0" +name = "metrics-exporter-prometheus" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" +checksum = "8603921e1f54ef386189335f288441af761e0fc61bcb552168d9cedfe63ebc70" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.28", -] + "hyper", + "indexmap 1.9.3", + "ipnet", + "metrics", + "metrics-util", + "parking_lot 0.12.1", + "portable-atomic 0.3.20", + "quanta 0.10.1", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "metrics-macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "731f8ecebd9f3a4aa847dfe75455e4757a45da40a7793d2f0b1f9b6ed18b23f3" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 1.0.109", +] + +[[package]] +name = "metrics-util" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d24dc2dbae22bff6f1f9326ffce828c9f07ef9cc1e8002e5279f845432a30a" +dependencies = [ + "crossbeam-epoch 0.9.15", + "crossbeam-utils 0.8.16", + "hashbrown 0.12.3", + "metrics", + "num_cpus", + "parking_lot 0.12.1", + "portable-atomic 0.3.20", + "quanta 0.10.1", + "sketches-ddsketch", +] + +[[package]] +name = "miette" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" +dependencies = [ + "miette-derive", + "once_cell", + "thiserror", + "unicode-width", +] + +[[package]] +name = "miette-derive" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 2.0.28", +] [[package]] name = "mime" @@ -4371,6 +6423,21 @@ dependencies = [ "unicase", ] +[[package]] +name = "mini-moka" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "452ebc1428a585e31e637b928b76355ef2fd72d765b2530d72fe475e514cd1eb" +dependencies = [ + "crossbeam-channel 0.5.8", + "crossbeam-utils 0.8.16", + "dashmap", + "skeptic", + "smallvec 1.11.0", + "tagptr", + "triomphe", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -4386,6 +6453,25 @@ dependencies = [ "adler", ] +[[package]] +name = "mio" +version = "0.6.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +dependencies = [ + "cfg-if 0.1.10", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow", + "net2", + "slab", + "winapi 0.2.8", +] + [[package]] name = "mio" version = "0.8.8" @@ -4398,6 +6484,36 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mio-extras" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" +dependencies = [ + "lazycell", + "log", + "mio 0.6.23", + "slab", +] + +[[package]] +name = "miow" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + [[package]] name = "native-tls" version = "0.2.11" @@ -4416,6 +6532,17 @@ dependencies = [ "tempfile", ] +[[package]] +name = "net2" +version = "0.2.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b13b648036a2339d06de780866fbdfda0dde886de7b3af2ddeba8b14f4ee34ac" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "winapi 0.3.9", +] + [[package]] name = "new_debug_unreachable" version = "1.0.4" @@ -4438,13 +6565,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" dependencies = [ "bitflags 1.3.2", - "cfg-if", + "cfg-if 1.0.0", "libc", "memoffset 0.7.1", "pin-utils", "static_assertions", ] +[[package]] +name = "no-std-compat" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" + [[package]] name = "nodrop" version = "0.1.14" @@ -4461,6 +6594,12 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nonzero_ext" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" + [[package]] name = "normalize-path" version = "0.2.1" @@ -4483,13 +6622,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "729f63e1ca555a43fe3efa4f3efdf4801c479da85b432242a7b726f353c88486" dependencies = [ "bitflags 1.3.2", - "crossbeam-channel", + "crossbeam-channel 0.5.8", "filetime", "fsevent-sys", "inotify", "kqueue", "libc", - "mio", + "mio 0.8.8", "walkdir", "windows-sys 0.45.0", ] @@ -4501,7 +6640,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" dependencies = [ "overload", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "num" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b7a8e9be5e039e2ff869df49155f1c06bd01ade2117ec783e56ab0932b67a8f" +dependencies = [ + "num-bigint 0.3.3", + "num-complex 0.3.1", + "num-integer", + "num-iter", + "num-rational 0.3.2", + "num-traits", ] [[package]] @@ -4510,12 +6663,24 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" dependencies = [ - "num-bigint", - "num-complex", + "num-bigint 0.4.3", + "num-complex 0.4.3", "num-integer", "num-iter", - "num-rational", + "num-rational 0.4.1", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" +dependencies = [ + "autocfg 1.1.0", + "num-integer", "num-traits", + "serde", ] [[package]] @@ -4524,9 +6689,37 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" dependencies = [ - "autocfg", + "autocfg 1.1.0", + "num-integer", + "num-traits", + "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 1.11.0", + "zeroize", +] + +[[package]] +name = "num-complex" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" +dependencies = [ "num-traits", + "serde", ] [[package]] @@ -4538,13 +6731,35 @@ dependencies = [ "num-traits", ] +[[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-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 1.0.109", +] + [[package]] name = "num-integer" version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ - "autocfg", + "autocfg 1.1.0", "num-traits", ] @@ -4554,9 +6769,22 @@ version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" dependencies = [ - "autocfg", + "autocfg 1.1.0", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" +dependencies = [ + "autocfg 1.1.0", + "num-bigint 0.3.3", "num-integer", "num-traits", + "serde", ] [[package]] @@ -4565,8 +6793,8 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ - "autocfg", - "num-bigint", + "autocfg 1.1.0", + "num-bigint 0.4.3", "num-integer", "num-traits", ] @@ -4577,7 +6805,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ - "autocfg", + "autocfg 1.1.0", "libm", ] @@ -4606,9 +6834,9 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] @@ -4648,6 +6876,12 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + [[package]] name = "opaque-debug" version = "0.3.0" @@ -4660,10 +6894,10 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "auto_impl", - "bytes", - "ethereum-types", + "bytes 1.4.0", + "ethereum-types 0.14.1", "open-fastrlp-derive", ] @@ -4673,9 +6907,9 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" dependencies = [ - "bytes", - "proc-macro2", - "quote", + "bytes 1.4.0", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 1.0.109", ] @@ -4687,7 +6921,7 @@ checksum = "6c62dcb6174f9cb326eac248f07e955d5d559c272730b6c03e396b443b562788" dependencies = [ "bstr", "normpath", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -4697,7 +6931,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" dependencies = [ "bitflags 1.3.2", - "cfg-if", + "cfg-if 1.0.0", "foreign-types", "libc", "once_cell", @@ -4711,8 +6945,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.66", + "quote 1.0.32", "syn 2.0.28", ] @@ -4734,6 +6968,68 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "opentelemetry" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8" +dependencies = [ + "async-trait", + "crossbeam-channel 0.5.8", + "futures-channel", + "futures-executor", + "futures-util", + "js-sys", + "lazy_static", + "percent-encoding", + "pin-project", + "rand 0.8.5", + "thiserror", +] + +[[package]] +name = "opentelemetry-http" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "449048140ee61e28f57abe6e9975eedc1f3a29855c7407bd6c12b18578863379" +dependencies = [ + "async-trait", + "bytes 1.4.0", + "http", + "opentelemetry", + "reqwest", +] + +[[package]] +name = "opentelemetry-otlp" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1a6ca9de4c8b00aa7f1a153bd76cb263287155cec642680d79d98706f3d28a" +dependencies = [ + "async-trait", + "futures 0.3.28", + "futures-util", + "http", + "opentelemetry", + "opentelemetry-http", + "prost", + "prost-build", + "reqwest", + "thiserror", + "tokio", + "tonic", + "tonic-build", +] + +[[package]] +name = "opentelemetry-semantic-conventions" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985cc35d832d412224b2cffe2f9194b1b89b6aa5d0bef76d080dce09d90e62bd" +dependencies = [ + "opentelemetry", +] + [[package]] name = "option-ext" version = "0.2.0" @@ -4749,6 +7045,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "os_info" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" +dependencies = [ + "log", + "serde", + "winapi 0.3.9", +] + [[package]] name = "os_str_bytes" version = "6.5.1" @@ -4767,29 +7074,92 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +[[package]] +name = "pairing_ce" +version = "0.28.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db007b21259660d025918e653508f03050bf23fb96a88601f9936329faadc597" +dependencies = [ + "byteorder", + "cfg-if 1.0.0", + "ff_ce", + "rand 0.4.6", + "serde", +] + +[[package]] +name = "parity-crypto" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b92ea9ddac0d6e1db7c49991e7d397d34a9fd814b4c93cda53788e8eef94e35" +dependencies = [ + "aes 0.6.0", + "aes-ctr", + "block-modes", + "digest 0.9.0", + "ethereum-types 0.12.1", + "hmac 0.10.1", + "lazy_static", + "pbkdf2 0.7.5", + "ripemd160", + "rustc-hex", + "scrypt 0.5.0", + "secp256k1 0.20.3", + "sha2 0.9.9", + "subtle", + "tiny-keccak 2.0.2", + "zeroize", +] + +[[package]] +name = "parity-scale-codec" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" +dependencies = [ + "arrayvec 0.7.4", + "bitvec 0.20.4", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive 2.3.1", + "serde", +] + [[package]] name = "parity-scale-codec" version = "3.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" dependencies = [ - "arrayvec", + "arrayvec 0.7.4", "bitvec 1.0.1", "byte-slice-cast", "impl-trait-for-tuples", - "parity-scale-codec-derive", + "parity-scale-codec-derive 3.6.4", "serde", ] +[[package]] +name = "parity-scale-codec-derive" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 1.0.109", +] + [[package]] name = "parity-scale-codec-derive" version = "3.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 1.0.109", ] @@ -4799,12 +7169,12 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9981e32fb75e004cc148f5fb70342f393830e0a4aa62e3cc93b50976218d42b6" dependencies = [ - "futures", + "futures 0.3.28", "libc", "log", "rand 0.7.3", "tokio", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -4813,12 +7183,12 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "hashbrown 0.12.3", "impl-trait-for-tuples", "parity-util-mem-derive", - "parking_lot", - "winapi", + "parking_lot 0.12.1", + "winapi 0.3.9", ] [[package]] @@ -4827,19 +7197,62 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.66", "syn 1.0.109", "synstructure", ] [[package]] -name = "parking_lot" -version = "0.12.1" +name = "parity-ws" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "5983d3929ad50f12c3eb9a6743f19d691866ecd44da74c0a3308c3f8a56df0c6" +dependencies = [ + "byteorder", + "bytes 0.4.12", + "httparse", + "log", + "mio 0.6.23", + "mio-extras", + "rand 0.7.3", + "sha-1 0.8.2", + "slab", + "url", +] + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core", + "parking_lot_core 0.9.8", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec 1.11.0", + "winapi 0.3.9", ] [[package]] @@ -4848,13 +7261,23 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall 0.3.5", "smallvec 1.11.0", "windows-targets 0.48.1", ] +[[package]] +name = "password-hash" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54986aa4bfc9b98c6a5f40184223658d187159d7b3c6af33f2b2aa25ae1db0fa" +dependencies = [ + "base64ct", + "rand_core 0.6.4", +] + [[package]] name = "password-hash" version = "0.4.2" @@ -4878,6 +7301,28 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" +[[package]] +name = "pbkdf2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3b8c0d71734018084da0c0354193a5edfb81b20d2d57a92c5b154aefc554a4a" +dependencies = [ + "crypto-mac 0.10.1", +] + +[[package]] +name = "pbkdf2" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf916dd32dd26297907890d99dc2740e33f6bd9073965af4ccff2967962f5508" +dependencies = [ + "base64ct", + "crypto-mac 0.10.1", + "hmac 0.10.1", + "password-hash 0.1.4", + "sha2 0.9.9", +] + [[package]] name = "pbkdf2" version = "0.11.0" @@ -4886,8 +7331,8 @@ checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ "digest 0.10.7", "hmac 0.12.1", - "password-hash", - "sha2 0.10.7", + "password-hash 0.4.2", + "sha2 0.10.6", ] [[package]] @@ -4917,12 +7362,18 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da9f0f13dac8069c139e8300a6510e3f4143ecf5259c60b116a9b271b4ca0d54" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.66", "proc-macro2-diagnostics", - "quote", + "quote 1.0.32", "syn 2.0.28", ] +[[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" @@ -4932,6 +7383,15 @@ dependencies = [ "base64 0.13.1", ] +[[package]] +name = "pem-rfc7468" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01de5d978f34aa4b2296576379fcc416034702fd94117c56ffd8a1a767cefb30" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.3.0" @@ -4966,8 +7426,8 @@ checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929" dependencies = [ "pest", "pest_meta", - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] @@ -4979,7 +7439,7 @@ checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48" dependencies = [ "once_cell", "pest", - "sha2 0.10.7", + "sha2 0.10.6", ] [[package]] @@ -4998,7 +7458,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" dependencies = [ - "futures", + "futures 0.3.28", "rustc_version 0.4.0", ] @@ -5069,8 +7529,8 @@ checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ "phf_generator 0.11.2", "phf_shared 0.11.2", - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] @@ -5107,16 +7567,16 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] [[package]] name = "pin-project-lite" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c516611246607d0c04186886dbb3a754368ef82c79e9827a802c6d836dd111c" +checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" [[package]] name = "pin-utils" @@ -5124,14 +7584,46 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs1" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a78f66c04ccc83dd4486fd46c33896f4e17b24a7a3a6400dedc48ed0ddd72320" +dependencies = [ + "der 0.5.1", + "pkcs8 0.8.0", + "zeroize", +] + +[[package]] +name = "pkcs8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +dependencies = [ + "der 0.5.1", + "spki 0.5.4", + "zeroize", +] + +[[package]] +name = "pkcs8" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +dependencies = [ + "der 0.6.1", + "spki 0.6.0", +] + [[package]] name = "pkcs8" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der", - "spki", + "der 0.7.8", + "spki 0.7.2", ] [[package]] @@ -5168,6 +7660,15 @@ dependencies = [ "plotters-backend", ] +[[package]] +name = "portable-atomic" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e30165d31df606f5726b090ec7592c308a0eaf61721ff64c9a3018e344a8753e" +dependencies = [ + "portable-atomic 1.4.2", +] + [[package]] name = "portable-atomic" version = "1.4.2" @@ -5202,24 +7703,46 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.66", "syn 2.0.28", ] +[[package]] +name = "primitive-types" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" +dependencies = [ + "fixed-hash 0.7.0", + "impl-codec 0.5.1", + "impl-rlp", + "impl-serde 0.3.2", + "uint", +] + [[package]] name = "primitive-types" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" dependencies = [ - "fixed-hash", - "impl-codec", + "fixed-hash 0.8.0", + "impl-codec 0.6.0", "impl-rlp", - "impl-serde", + "impl-serde 0.4.0", "scale-info", "uint", ] +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml 0.5.11", +] + [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -5227,7 +7750,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.14", ] [[package]] @@ -5237,8 +7760,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.66", + "quote 1.0.32", "syn 1.0.109", "version_check", ] @@ -5249,11 +7772,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.66", + "quote 1.0.32", "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.66" @@ -5269,8 +7807,8 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", "version_check", "yansi 1.0.0-rc", @@ -5282,11 +7820,22 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "629e0d57f265ca8238345cb616eea8847b8ecb86b5d97d155be2c8963a314379" dependencies = [ - "futures", + "futures 0.3.28", "tokio", "tokio-stream", ] +[[package]] +name = "prometheus_exporter" +version = "1.0.0" +dependencies = [ + "metrics", + "metrics-exporter-prometheus", + "tokio", + "vlog", + "zksync_config", +] + [[package]] name = "proptest" version = "1.2.0" @@ -5300,13 +7849,66 @@ dependencies = [ "num-traits", "rand 0.8.5", "rand_chacha 0.3.1", - "rand_xorshift", + "rand_xorshift 0.3.0", "regex-syntax 0.6.29", "rusty-fork", "tempfile", "unarray", ] +[[package]] +name = "prost" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001" +dependencies = [ + "bytes 1.4.0", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5" +dependencies = [ + "bytes 1.4.0", + "heck 0.3.3", + "itertools", + "lazy_static", + "log", + "multimap", + "petgraph", + "prost", + "prost-types", + "regex", + "tempfile", + "which", +] + +[[package]] +name = "prost-derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 1.0.109", +] + +[[package]] +name = "prost-types" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a" +dependencies = [ + "bytes 1.4.0", + "prost", +] + [[package]] name = "protobuf" version = "3.2.0" @@ -5338,19 +7940,60 @@ dependencies = [ "unicase", ] +[[package]] +name = "quanta" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20afe714292d5e879d8b12740aa223c6a88f118af41870e8b6196e39a02238a8" +dependencies = [ + "crossbeam-utils 0.8.16", + "libc", + "mach", + "once_cell", + "raw-cpuid", + "wasi 0.10.2+wasi-snapshot-preview1", + "web-sys", + "winapi 0.3.9", +] + +[[package]] +name = "quanta" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7e31331286705f455e56cca62e0e717158474ff02b7936c1fa596d983f4ae27" +dependencies = [ + "crossbeam-utils 0.8.16", + "libc", + "mach", + "once_cell", + "raw-cpuid", + "wasi 0.10.2+wasi-snapshot-preview1", + "web-sys", + "winapi 0.3.9", +] + [[package]] name = "quick-error" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[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.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.66", ] [[package]] @@ -5359,6 +8002,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" +[[package]] +name = "radium" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" + [[package]] name = "radium" version = "0.7.0" @@ -5375,6 +8024,38 @@ dependencies = [ "nibble_vec", ] +[[package]] +name = "rand" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" +dependencies = [ + "fuchsia-cprng", + "libc", + "rand_core 0.3.1", + "rdrand", + "winapi 0.3.9", +] + +[[package]] +name = "rand" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +dependencies = [ + "autocfg 0.1.8", + "libc", + "rand_chacha 0.1.1", + "rand_core 0.4.2", + "rand_hc 0.1.0", + "rand_isaac", + "rand_jitter", + "rand_os", + "rand_pcg", + "rand_xorshift 0.1.1", + "winapi 0.3.9", +] + [[package]] name = "rand" version = "0.7.3" @@ -5385,7 +8066,7 @@ dependencies = [ "libc", "rand_chacha 0.2.2", "rand_core 0.5.1", - "rand_hc", + "rand_hc 0.2.0", ] [[package]] @@ -5399,6 +8080,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_chacha" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +dependencies = [ + "autocfg 0.1.8", + "rand_core 0.3.1", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -5419,6 +8110,21 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +dependencies = [ + "rand_core 0.4.2", +] + +[[package]] +name = "rand_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" + [[package]] name = "rand_core" version = "0.5.1" @@ -5437,6 +8143,15 @@ dependencies = [ "getrandom 0.2.10", ] +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +dependencies = [ + "rand_core 0.3.1", +] + [[package]] name = "rand_hc" version = "0.2.0" @@ -5447,39 +8162,110 @@ dependencies = [ ] [[package]] -name = "rand_xorshift" -version = "0.3.0" +name = "rand_isaac" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" dependencies = [ - "rand_core 0.6.4", + "rand_core 0.3.1", ] [[package]] -name = "rayon" -version = "1.7.0" +name = "rand_jitter" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" dependencies = [ - "either", - "rayon-core", + "libc", + "rand_core 0.4.2", + "winapi 0.3.9", ] [[package]] -name = "rayon-core" -version = "1.11.0" +name = "rand_os" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "num_cpus", + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.4.2", + "rdrand", + "winapi 0.3.9", ] [[package]] -name = "redox_syscall" -version = "0.2.16" +name = "rand_pcg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +dependencies = [ + "autocfg 0.1.8", + "rand_core 0.4.2", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "raw-cpuid" +version = "10.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "rayon" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +dependencies = [ + "crossbeam-channel 0.5.8", + "crossbeam-deque 0.8.3", + "crossbeam-utils 0.8.16", + "num_cpus", +] + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ @@ -5515,7 +8301,7 @@ dependencies = [ "hash-db", "hash256-std-hasher", "keccak-hasher", - "parity-scale-codec", + "parity-scale-codec 3.6.4", "trie-db", "trie-root", ] @@ -5571,7 +8357,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ "base64 0.21.2", - "bytes", + "bytes 1.4.0", "encoding_rs", "futures-core", "futures-util", @@ -5585,6 +8371,7 @@ dependencies = [ "js-sys", "log", "mime", + "mime_guess", "native-tls", "once_cell", "percent-encoding", @@ -5598,19 +8385,40 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-rustls 0.24.1", + "tokio-util 0.7.8", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "webpki-roots 0.22.6", "winreg", ] +[[package]] +name = "rescue_poseidon" +version = "0.4.1" +source = "git+https://github.com/matter-labs/rescue-poseidon#f611a3353e48cf42153e44d89ed90da9bc5934e8" +dependencies = [ + "addchain", + "arrayvec 0.7.4", + "blake2 0.10.6", + "byteorder", + "franklin-crypto", + "num-bigint 0.3.3", + "num-integer", + "num-iter", + "num-traits", + "rand 0.4.6", + "serde", + "sha3 0.9.1", + "smallvec 1.11.0", +] + [[package]] name = "revm" version = "3.3.0" -source = "git+https://github.com/bluealloy/revm/?branch=release/v25#88337924f4d16ed1f5e4cde12a03d0cb755cd658" dependencies = [ "auto_impl", "revm-interpreter", @@ -5622,50 +8430,70 @@ dependencies = [ [[package]] name = "revm-interpreter" version = "1.1.2" -source = "git+https://github.com/bluealloy/revm/?branch=release/v25#88337924f4d16ed1f5e4cde12a03d0cb755cd658" dependencies = [ "derive_more", "enumn", "revm-primitives", "serde", - "sha3", + "sha3 0.10.6", ] [[package]] name = "revm-precompile" version = "2.0.3" -source = "git+https://github.com/bluealloy/revm/?branch=release/v25#88337924f4d16ed1f5e4cde12a03d0cb755cd658" dependencies = [ - "k256", - "num", + "k256 0.13.1", + "num 0.4.1", "once_cell", "revm-primitives", "ripemd", - "secp256k1", - "sha2 0.10.7", - "sha3", + "secp256k1 0.27.0", + "sha2 0.10.6", + "sha3 0.10.6", "substrate-bn", ] [[package]] name = "revm-primitives" version = "1.1.2" -source = "git+https://github.com/bluealloy/revm/?branch=release/v25#88337924f4d16ed1f5e4cde12a03d0cb755cd658" dependencies = [ "auto_impl", "bitvec 1.0.1", - "bytes", + "bytes 1.4.0", "derive_more", "enumn", - "fixed-hash", + "fixed-hash 0.8.0", "hashbrown 0.13.2", "hex", "hex-literal", - "primitive-types", + "primitive-types 0.12.1", "rlp", "ruint", "serde", - "sha3", + "sha3 0.10.6", +] + +[[package]] +name = "revm_era" +version = "0.1.0" +dependencies = [ + "era_test_node", + "ethabi 18.0.0", + "revm", + "zk_evm", + "zksync_basic_types", + "zksync_types", +] + +[[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 0.12.1", + "zeroize", ] [[package]] @@ -5690,7 +8518,7 @@ dependencies = [ "spin", "untrusted", "web-sys", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -5702,13 +8530,24 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "ripemd160" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + [[package]] name = "rlp" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ - "bytes", + "bytes 1.4.0", "rlp-derive", "rustc-hex", ] @@ -5719,11 +8558,21 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 1.0.109", ] +[[package]] +name = "rocksdb" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "620f4129485ff1a7128d184bc687470c21c7951b64779ebc9cfdad3dcd920290" +dependencies = [ + "libc", + "librocksdb-sys", +] + [[package]] name = "rpassword" version = "7.2.0" @@ -5732,7 +8581,27 @@ checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" dependencies = [ "libc", "rtoolbox", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "rsa" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cf22754c49613d2b3b119f0e5d46e34a2c628a937e3024b8762de4e7d8c710b" +dependencies = [ + "byteorder", + "digest 0.10.7", + "num-bigint-dig", + "num-integer", + "num-iter", + "num-traits", + "pkcs1", + "pkcs8 0.8.0", + "rand_core 0.6.4", + "smallvec 1.11.0", + "subtle", + "zeroize", ] [[package]] @@ -5742,7 +8611,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -5754,11 +8623,11 @@ dependencies = [ "alloy-rlp", "ark-ff 0.3.0", "ark-ff 0.4.2", - "bytes", + "bytes 1.4.0", "fastrlp", - "num-bigint", - "parity-scale-codec", - "primitive-types", + "num-bigint 0.4.3", + "parity-scale-codec 3.6.4", + "primitive-types 0.12.1", "proptest", "rand 0.8.5", "rlp", @@ -5792,9 +8661,9 @@ checksum = "1db30db44ea73551326269adcf7a2169428a054f14faf9e1768f2163494f2fa2" dependencies = [ "async-trait", "base64 0.13.1", - "bytes", + "bytes 1.4.0", "crc32fast", - "futures", + "futures 0.3.28", "http", "hyper", "hyper-rustls 0.23.2", @@ -5818,7 +8687,7 @@ dependencies = [ "async-trait", "chrono", "dirs-next", - "futures", + "futures 0.3.28", "hyper", "serde", "serde_json", @@ -5834,8 +8703,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e1fc19cfcfd9f6b2f96e36d5b0dddda9004d2cbfc2d17543e3b9f10cc38fce8" dependencies = [ "async-trait", - "bytes", - "futures", + "bytes 1.4.0", + "futures 0.3.28", "rusoto_core", "serde", "serde_json", @@ -5848,10 +8717,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5ae95491c8b4847931e291b151127eccd6ff8ca13f33603eb3d0035ecb05272" dependencies = [ "base64 0.13.1", - "bytes", + "bytes 1.4.0", "chrono", "digest 0.9.0", - "futures", + "futures 0.3.28", "hex", "hmac 0.11.0", "http", @@ -5873,12 +8742,24 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc-hex" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +[[package]] +name = "rustc-serialize" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" + [[package]] name = "rustc_version" version = "0.3.3" @@ -5913,9 +8794,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.7" +version = "0.38.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "172891ebdceb05aa0005f533a6cbfca599ddd7d966f6f5d4d9b2e70478e70399" +checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" dependencies = [ "bitflags 2.3.3", "errno", @@ -6014,7 +8895,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfc8644681285d1fb67a467fb3021bfea306b99b4146b166a1fe3ada965eece" dependencies = [ "bitflags 1.3.2", - "cfg-if", + "cfg-if 1.0.0", "clipboard-win", "dirs-next", "fd-lock", @@ -6027,7 +8908,7 @@ dependencies = [ "unicode-segmentation", "unicode-width", "utf8parse", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -6036,13 +8917,22 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +[[package]] +name = "salsa20" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "399f290ffc409596022fce5ea5d4138184be4784f2b28c62c59f0d8389059a15" +dependencies = [ + "cipher 0.2.5", +] + [[package]] name = "salsa20" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] @@ -6060,9 +8950,9 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "derive_more", - "parity-scale-codec", + "parity-scale-codec 3.6.4", "scale-info-derive", ] @@ -6072,9 +8962,9 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 1.0.109", ] @@ -6099,6 +8989,22 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "scrypt" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da492dab03f925d977776a0b7233d7b934d6dc2b94faead48928e2e9bacedb9" +dependencies = [ + "base64 0.13.1", + "hmac 0.10.1", + "pbkdf2 0.6.0", + "rand 0.7.3", + "rand_core 0.5.1", + "salsa20 0.7.2", + "sha2 0.9.9", + "subtle", +] + [[package]] name = "scrypt" version = "0.10.0" @@ -6107,8 +9013,8 @@ checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" dependencies = [ "hmac 0.12.1", "pbkdf2 0.11.0", - "salsa20", - "sha2 0.10.7", + "salsa20 0.10.2", + "sha2 0.10.6", ] [[package]] @@ -6121,27 +9027,69 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sec1" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +dependencies = [ + "base16ct 0.1.1", + "der 0.6.1", + "generic-array 0.14.7", + "pkcs8 0.9.0", + "subtle", + "zeroize", +] + [[package]] name = "sec1" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", + "base16ct 0.2.0", + "der 0.7.8", + "generic-array 0.14.7", + "pkcs8 0.10.2", "subtle", "zeroize", ] +[[package]] +name = "secp256k1" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d03ceae636d0fed5bae6a7f4f664354c5f4fcedf6eef053fef17e49f837d0a" +dependencies = [ + "rand 0.6.5", + "secp256k1-sys 0.4.2", +] + +[[package]] +name = "secp256k1" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c42e6f1735c5f00f51e43e28d6634141f2bcad10931b2609ddd74a86d751260" +dependencies = [ + "secp256k1-sys 0.4.2", +] + [[package]] name = "secp256k1" version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" dependencies = [ - "secp256k1-sys", + "secp256k1-sys 0.8.1", +] + +[[package]] +name = "secp256k1-sys" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "957da2573cde917463ece3570eab4a0b3f19de6f1646cde62e6fd3868f566036" +dependencies = [ + "cc", ] [[package]] @@ -6215,6 +9163,114 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" +[[package]] +name = "sentry" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01b0ad16faa5d12372f914ed40d00bda21a6d1bdcc99264c5e5e1c9495cf3654" +dependencies = [ + "httpdate", + "native-tls", + "reqwest", + "sentry-backtrace", + "sentry-contexts", + "sentry-core", + "sentry-debug-images", + "sentry-panic", + "sentry-tracing", + "tokio", + "ureq", +] + +[[package]] +name = "sentry-backtrace" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11f2ee8f147bb5f22ac59b5c35754a759b9a6f6722402e2a14750b2a63fc59bd" +dependencies = [ + "backtrace", + "once_cell", + "regex", + "sentry-core", +] + +[[package]] +name = "sentry-contexts" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcd133362c745151eeba0ac61e3ba8350f034e9fe7509877d08059fe1d7720c6" +dependencies = [ + "hostname", + "libc", + "os_info", + "rustc_version 0.4.0", + "sentry-core", + "uname", +] + +[[package]] +name = "sentry-core" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7163491708804a74446642ff2c80b3acd668d4b9e9f497f85621f3d250fd012b" +dependencies = [ + "once_cell", + "rand 0.8.5", + "sentry-types", + "serde", + "serde_json", +] + +[[package]] +name = "sentry-debug-images" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a5003d7ff08aa3b2b76994080b183e8cfa06c083e280737c9cee02ca1c70f5e" +dependencies = [ + "findshlibs", + "once_cell", + "sentry-core", +] + +[[package]] +name = "sentry-panic" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4dfe8371c9b2e126a8b64f6fefa54cef716ff2a50e63b5558a48b899265bccd" +dependencies = [ + "sentry-backtrace", + "sentry-core", +] + +[[package]] +name = "sentry-tracing" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aca8b88978677a27ee1a91beafe4052306c474c06f582321fde72d2e2cc2f7f" +dependencies = [ + "sentry-backtrace", + "sentry-core", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sentry-types" +version = "0.31.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e7a88e0c1922d19b3efee12a8215f6a8a806e442e665ada71cc222cab72985f" +dependencies = [ + "debugid", + "getrandom 0.2.10", + "hex", + "serde", + "serde_json", + "thiserror", + "time 0.3.25", + "url", + "uuid 1.4.1", +] + [[package]] name = "serde" version = "1.0.183" @@ -6241,8 +9297,8 @@ version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] @@ -6253,7 +9309,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" dependencies = [ "indexmap 2.0.0", - "itoa", + "itoa 1.0.9", "ryu", "serde", ] @@ -6284,11 +9340,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.9", "ryu", "serde", ] +[[package]] +name = "serde_with" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" +dependencies = [ + "serde", + "serde_with_macros", +] + +[[package]] +name = "serde_with_macros" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" +dependencies = [ + "darling", + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 1.0.109", +] + [[package]] name = "serial_test" version = "2.0.0" @@ -6296,10 +9374,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" dependencies = [ "dashmap", - "futures", + "futures 0.3.28", "lazy_static", "log", - "parking_lot", + "parking_lot 0.12.1", "serial_test_derive", ] @@ -6309,36 +9387,61 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] [[package]] name = "sha-1" -version = "0.10.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", + "block-buffer 0.7.3", + "digest 0.8.1", + "fake-simd", + "opaque-debug 0.2.3", ] [[package]] -name = "sha1" -version = "0.10.5" +name = "sha-1" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ - "cfg-if", + "block-buffer 0.9.0", + "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.7", + "digest 0.9.0", + "opaque-debug 0.3.0", ] [[package]] -name = "sha1_smol" -version = "1.0.0" +name = "sha-1" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha1" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha1_smol" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" @@ -6349,28 +9452,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.9.0", - "opaque-debug", + "opaque-debug 0.3.0", ] [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.10.7", ] [[package]] name = "sha3" -version = "0.10.8" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "keccak", + "opaque-debug 0.3.0", +] + +[[package]] +name = "sha3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" dependencies = [ "digest 0.10.7", "keccak", @@ -6414,7 +9529,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" dependencies = [ "libc", - "mio", + "mio 0.8.8", "signal-hook", ] @@ -6427,6 +9542,16 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + [[package]] name = "signature" version = "2.1.0" @@ -6449,7 +9574,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ - "num-bigint", + "num-bigint 0.4.3", "num-traits", "thiserror", "time 0.3.25", @@ -6461,13 +9586,34 @@ version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +[[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 = "sketches-ddsketch" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68a406c1882ed7f29cd5e248c9848a80e7cb6ae0fea82346d2746f2f941c07e1" + [[package]] name = "slab" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ - "autocfg", + "autocfg 1.1.0", ] [[package]] @@ -6501,7 +9647,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "socket2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "soketto" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" +dependencies = [ + "base64 0.13.1", + "bytes 1.4.0", + "futures 0.3.28", + "http", + "httparse", + "log", + "rand 0.8.5", + "sha-1 0.9.8", ] [[package]] @@ -6515,7 +9687,7 @@ dependencies = [ "lalrpop-util", "phf 0.11.2", "thiserror", - "unicode-xid", + "unicode-xid 0.2.4", ] [[package]] @@ -6524,6 +9696,26 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spki" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +dependencies = [ + "base64ct", + "der 0.5.1", +] + +[[package]] +name = "spki" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +dependencies = [ + "base64ct", + "der 0.6.1", +] + [[package]] name = "spki" version = "0.7.2" @@ -6531,7 +9723,121 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der", + "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.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4b7922be017ee70900be125523f38bdd644f4f06a1b16e8fa5a8ee8c34bffd4" +dependencies = [ + "itertools", + "nom", + "unicode_categories", +] + +[[package]] +name = "sqlx" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7911b0031a0247af40095838002999c7a52fba29d9739e93326e71a5a1bc9d43" +dependencies = [ + "sqlx-core", + "sqlx-macros", +] + +[[package]] +name = "sqlx-core" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aec89bfaca8f7737439bad16d52b07f1ccd0730520d3bf6ae9d069fe4b641fb1" +dependencies = [ + "ahash 0.7.6", + "atoi", + "base64 0.13.1", + "bigdecimal", + "bitflags 1.3.2", + "byteorder", + "bytes 1.4.0", + "chrono", + "crc 2.1.0", + "crossbeam-channel 0.5.8", + "crossbeam-queue 0.3.8", + "crossbeam-utils 0.8.16", + "dirs 3.0.2", + "either", + "futures-channel", + "futures-core", + "futures-intrusive", + "futures-util", + "hashlink", + "hex", + "hmac 0.11.0", + "indexmap 1.9.3", + "ipnetwork", + "itoa 0.4.8", + "libc", + "log", + "md-5 0.9.1", + "memchr", + "num-bigint 0.3.3", + "once_cell", + "parking_lot 0.11.2", + "percent-encoding", + "rand 0.8.5", + "serde", + "serde_json", + "sha-1 0.9.8", + "sha2 0.9.9", + "smallvec 1.11.0", + "sqlformat", + "sqlx-rt", + "stringprep", + "thiserror", + "tokio-stream", + "url", + "whoami", +] + +[[package]] +name = "sqlx-macros" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "584866c833511b1a152e87a7ee20dee2739746f60c858b3c5209150bc4b466f5" +dependencies = [ + "dotenv", + "either", + "heck 0.3.3", + "hex", + "once_cell", + "proc-macro2 1.0.66", + "quote 1.0.32", + "serde", + "serde_json", + "sha2 0.9.9", + "sqlx-core", + "sqlx-rt", + "syn 1.0.109", + "url", +] + +[[package]] +name = "sqlx-rt" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4db708cd3e459078f85f39f96a00960bd841f66ee2a669e90bf36907f5a79aae" +dependencies = [ + "native-tls", + "once_cell", + "tokio", + "tokio-native-tls", ] [[package]] @@ -6554,7 +9860,7 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot", + "parking_lot 0.12.1", "phf_shared 0.10.0", "precomputed-hash", "serde", @@ -6568,21 +9874,64 @@ checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" dependencies = [ "phf_generator 0.10.0", "phf_shared 0.10.0", - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", +] + +[[package]] +name = "stringprep" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3737bde7edce97102e0e2b15365bf7a20bfdb5f60f4f9e8d7004258a51a8da" +dependencies = [ + "unicode-bidi", + "unicode-normalization", ] +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + [[package]] name = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "structopt" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" +dependencies = [ + "clap 2.34.0", + "lazy_static", + "structopt-derive", +] + +[[package]] +name = "structopt-derive" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" +dependencies = [ + "heck 0.3.3", + "proc-macro-error", + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 1.0.109", +] + [[package]] name = "strum" version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros 0.24.3", +] [[package]] name = "strum" @@ -6599,9 +9948,9 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "heck", - "proc-macro2", - "quote", + "heck 0.4.1", + "proc-macro2 1.0.66", + "quote 1.0.32", "rustversion", "syn 1.0.109", ] @@ -6612,9 +9961,9 @@ version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" dependencies = [ - "heck", - "proc-macro2", - "quote", + "heck 0.4.1", + "proc-macro2 1.0.66", + "quote 1.0.32", "rustversion", "syn 2.0.28", ] @@ -6652,7 +10001,7 @@ dependencies = [ "semver 1.0.18", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.10.6", "thiserror", "url", "zip", @@ -6672,7 +10021,7 @@ dependencies = [ "semver 1.0.18", "serde", "serde_json", - "sha2 0.10.7", + "sha2 0.10.6", "thiserror", "url", "zip", @@ -6691,14 +10040,25 @@ dependencies = [ "svm-rs 0.3.0", ] +[[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.66", + "quote 1.0.32", "unicode-ident", ] @@ -6708,11 +10068,37 @@ version = "2.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "unicode-ident", ] +[[package]] +name = "sync_vm" +version = "1.3.3" +source = "git+https://github.com/matter-labs/era-sync_vm.git?branch=v1.3.3#22d9d3a2018df8d4ac4bc0b0ada61c191d0cee30" +dependencies = [ + "arrayvec 0.7.4", + "cs_derive", + "derivative", + "franklin-crypto", + "hex", + "itertools", + "num-bigint 0.4.3", + "num-derive 0.3.3", + "num-integer", + "num-traits", + "once_cell", + "rand 0.4.6", + "rescue_poseidon", + "serde", + "sha2 0.10.6", + "sha3 0.10.6", + "smallvec 1.11.0", + "zk_evm", + "zkevm_opcode_defs", +] + [[package]] name = "sync_wrapper" version = "0.1.2" @@ -6725,12 +10111,18 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 1.0.109", - "unicode-xid", + "unicode-xid 0.2.4", ] +[[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" @@ -6743,10 +10135,10 @@ version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" dependencies = [ - "cfg-if", - "fastrand", + "cfg-if 1.0.0", + "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix 0.38.7", + "rustix 0.38.8", "windows-sys 0.48.0", ] @@ -6769,7 +10161,7 @@ checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" dependencies = [ "dirs-next", "rustversion", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -6804,6 +10196,26 @@ dependencies = [ "phf_codegen 0.11.2", ] +[[package]] +name = "test-log" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9601d162c1d77e62c1ea0bc8116cd1caf143ce3af947536c3c9052a1677fe0c" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 1.0.109", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + [[package]] name = "textwrap" version = "0.16.0" @@ -6825,8 +10237,8 @@ version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] @@ -6836,19 +10248,18 @@ version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "once_cell", ] [[package]] name = "time" -version = "0.1.45" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -6858,7 +10269,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" dependencies = [ "deranged", - "itoa", + "itoa 1.0.9", "libc", "num_threads", "serde", @@ -6881,6 +10292,15 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-keccak" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" +dependencies = [ + "crunchy", +] + [[package]] name = "tiny-keccak" version = "2.0.2" @@ -6917,32 +10337,41 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "2d3ce25f50619af8b0aec2eb23deebe84249e19e2ddd393a6e16e3300a6dadfd" dependencies = [ - "autocfg", "backtrace", - "bytes", + "bytes 1.4.0", "libc", - "mio", + "mio 0.8.8", "num_cpus", - "parking_lot", + "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.3", "tokio-macros", "windows-sys 0.48.0", ] +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-macros" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] @@ -7029,14 +10458,29 @@ dependencies = [ "webpki-roots 0.23.1", ] +[[package]] +name = "tokio-util" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" +dependencies = [ + "bytes 1.4.0", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-util" version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ - "bytes", + "bytes 1.4.0", "futures-core", + "futures-io", "futures-sink", "pin-project-lite", "tokio", @@ -7062,7 +10506,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.19.14", ] [[package]] @@ -7076,7 +10520,18 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5376256e44f2443f8896ac012507c19a012df0fe8758b55246ae51a2279db51f" +dependencies = [ + "combine", + "indexmap 1.9.3", + "itertools", +] + +[[package]] +name = "toml_edit" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ @@ -7087,6 +10542,49 @@ dependencies = [ "winnow", ] +[[package]] +name = "tonic" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff08f4649d10a70ffa3522ca559031285d8e421d727ac85c60825761818f5d0a" +dependencies = [ + "async-stream", + "async-trait", + "base64 0.13.1", + "bytes 1.4.0", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost", + "prost-derive", + "tokio", + "tokio-stream", + "tokio-util 0.6.10", + "tower", + "tower-layer", + "tower-service", + "tracing", + "tracing-futures", +] + +[[package]] +name = "tonic-build" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9403f1bafde247186684b230dc6f38b5cd514584e8bec1dd32514be4745fa757" +dependencies = [ + "proc-macro2 1.0.66", + "prost-build", + "quote 1.0.32", + "syn 1.0.109", +] + [[package]] name = "topological-sort" version = "0.2.2" @@ -7101,9 +10599,14 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", + "hdrhistogram", + "indexmap 1.9.3", "pin-project", "pin-project-lite", + "rand 0.8.5", + "slab", "tokio", + "tokio-util 0.7.8", "tower-layer", "tower-service", "tracing", @@ -7116,7 +10619,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" dependencies = [ "bitflags 1.3.2", - "bytes", + "bytes 1.4.0", "futures-core", "futures-util", "http", @@ -7134,17 +10637,28 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" dependencies = [ + "async-compression", + "base64 0.21.2", "bitflags 2.3.3", - "bytes", + "bytes 1.4.0", "futures-core", "futures-util", "http", "http-body", "http-range-header", + "httpdate", + "iri-string", + "mime", + "mime_guess", + "percent-encoding", "pin-project-lite", + "tokio", + "tokio-util 0.7.8", + "tower", "tower-layer", "tower-service", "tracing", + "uuid 1.4.1", ] [[package]] @@ -7165,7 +10679,7 @@ version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "log", "pin-project-lite", "tracing-attributes", @@ -7178,8 +10692,8 @@ version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", ] @@ -7224,6 +10738,30 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-opentelemetry" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbbe89715c1dbbb790059e2565353978564924ee85017b5fff365c872ff6721f" +dependencies = [ + "once_cell", + "opentelemetry", + "tracing", + "tracing-core", + "tracing-log", + "tracing-subscriber", +] + +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + [[package]] name = "tracing-subscriber" version = "0.3.17" @@ -7234,12 +10772,16 @@ dependencies = [ "nu-ansi-term", "once_cell", "regex", + "serde", + "serde_json", "sharded-slab", "smallvec 1.11.0", "thread_local", + "time 0.3.25", "tracing", "tracing-core", "tracing-log", + "tracing-serde", ] [[package]] @@ -7250,7 +10792,7 @@ checksum = "2cddb76a030b141d9639470eca2a236f3057a651bba78227cfa77830037a8286" dependencies = [ "byteorder", "hex", - "primitive-types", + "primitive-types 0.12.1", "protobuf", "rusb", "thiserror", @@ -7289,6 +10831,12 @@ dependencies = [ "rlp", ] +[[package]] +name = "triomphe" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee8098afad3fb0c54a9007aab6804558410503ad676d4633f9c2559a00ac0f" + [[package]] name = "try-lock" version = "0.2.4" @@ -7316,12 +10864,12 @@ checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" dependencies = [ "base64 0.13.1", "byteorder", - "bytes", + "bytes 1.4.0", "http", "httparse", "log", "rand 0.8.5", - "sha-1", + "sha-1 0.10.1", "thiserror", "url", "utf-8", @@ -7335,7 +10883,7 @@ checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" dependencies = [ "base64 0.13.1", "byteorder", - "bytes", + "bytes 1.4.0", "http", "httparse", "log", @@ -7353,7 +10901,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15fba1a6d6bb030745759a9a2a588bfe8490fc8b4751a277db3a0be1c9ebbf67" dependencies = [ "byteorder", - "bytes", + "bytes 1.4.0", "data-encoding", "http", "httparse", @@ -7385,7 +10933,7 @@ name = "ui" version = "0.2.0" dependencies = [ "crossterm 0.26.1", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers 2.0.8", "eyre", "forge", "foundry-common", @@ -7406,6 +10954,15 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "uname" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b72f89f0ca32e4db1c04e2a72f5345d59796d4866a1ee0609084569f73683dc8" +dependencies = [ + "libc", +] + [[package]] name = "unarray" version = "0.1.4" @@ -7469,18 +11026,43 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +[[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 = "untrusted" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "ureq" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b11c96ac7ee530603dcdf68ed1557050f374ce55a5a07193ebf8cbc9f8927e9" +dependencies = [ + "base64 0.21.2", + "log", + "native-tls", + "once_cell", + "url", +] + [[package]] name = "url" version = "2.4.0" @@ -7488,10 +11070,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", - "idna", + "idna 0.4.0", "percent-encoding", + "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" @@ -7514,6 +11103,16 @@ dependencies = [ "serde", ] +[[package]] +name = "uuid" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" +dependencies = [ + "getrandom 0.2.10", + "serde", +] + [[package]] name = "valuable" version = "0.1.0" @@ -7526,6 +11125,12 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + [[package]] name = "vergen" version = "8.2.4" @@ -7544,6 +11149,43 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "vlog" +version = "1.0.0" +dependencies = [ + "chrono", + "opentelemetry", + "opentelemetry-otlp", + "opentelemetry-semantic-conventions", + "sentry", + "serde_json", + "tracing", + "tracing-opentelemetry", + "tracing-subscriber", +] + +[[package]] +name = "vm" +version = "0.1.0" +dependencies = [ + "anyhow", + "ethabi 16.0.0", + "hex", + "itertools", + "metrics", + "once_cell", + "thiserror", + "vlog", + "zk_evm", + "zkevm-assembly", + "zksync_config", + "zksync_contracts", + "zksync_eth_signer", + "zksync_state", + "zksync_types", + "zksync_utils", +] + [[package]] name = "wait-timeout" version = "0.2.0" @@ -7578,7 +11220,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba431ef570df1287f7f8b07e376491ad54f84d26ac473489427231e1718e1f69" dependencies = [ - "bytes", + "bytes 1.4.0", "futures-channel", "futures-util", "headers", @@ -7597,7 +11239,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-tungstenite 0.18.0", - "tokio-util", + "tokio-util 0.7.8", "tower-service", "tracing", ] @@ -7610,9 +11252,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasi" @@ -7626,7 +11268,7 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "wasm-bindgen-macro", ] @@ -7639,8 +11281,8 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", "wasm-bindgen-shared", ] @@ -7651,7 +11293,7 @@ version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "wasm-bindgen", "web-sys", @@ -7663,7 +11305,7 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ - "quote", + "quote 1.0.32", "wasm-bindgen-macro-support", ] @@ -7673,8 +11315,8 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.66", + "quote 1.0.32", "syn 2.0.28", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -7686,6 +11328,19 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +[[package]] +name = "wasm-streams" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "watchexec" version = "2.3.0" @@ -7697,7 +11352,7 @@ dependencies = [ "atomic-take", "clearscreen", "command-group", - "futures", + "futures 0.3.28", "ignore-files", "miette", "nix", @@ -7744,6 +11399,37 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web3" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f258e254752d210b84fe117b31f1e3cc9cbf04c0d747eb7f8cf7cf5e370f6d" +dependencies = [ + "arrayvec 0.7.4", + "base64 0.13.1", + "bytes 1.4.0", + "derive_more", + "ethabi 16.0.0", + "ethereum-types 0.12.1", + "futures 0.3.28", + "futures-timer", + "headers", + "hex", + "idna 0.2.3", + "jsonrpc-core 18.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log", + "once_cell", + "parking_lot 0.12.1", + "pin-project", + "reqwest", + "rlp", + "secp256k1 0.21.3", + "serde", + "serde_json", + "tiny-keccak 2.0.2", + "url", +] + [[package]] name = "webpki" version = "0.22.0" @@ -7783,6 +11469,22 @@ dependencies = [ "once_cell", ] +[[package]] +name = "whoami" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + [[package]] name = "winapi" version = "0.3.9" @@ -7793,6 +11495,12 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -7805,7 +11513,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -7957,9 +11665,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.5.4" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acaaa1190073b2b101e15083c38ee8ec891b5e05cbee516521e94ec008f61e64" +checksum = "19f495880723d0999eb3500a9064d8dbcf836460b24c17df80ea7b5794053aac" dependencies = [ "memchr", ] @@ -7970,7 +11678,17 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +dependencies = [ + "winapi 0.2.8", + "winapi-build", ] [[package]] @@ -7980,7 +11698,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" dependencies = [ "async_io_stream", - "futures", + "futures 0.3.28", "js-sys", "log", "pharos", @@ -7992,6 +11710,12 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wyz" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" + [[package]] name = "wyz" version = "0.5.1" @@ -8034,8 +11758,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.66", + "quote 1.0.32", "syn 2.0.28", ] @@ -8045,18 +11769,104 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ - "aes", + "aes 0.8.3", "byteorder", "bzip2", "constant_time_eq", "crc32fast", - "crossbeam-utils", + "crossbeam-utils 0.8.16", "flate2", "hmac 0.12.1", "pbkdf2 0.11.0", "sha1", "time 0.3.25", - "zstd", + "zstd 0.11.2+zstd.1.5.2", +] + +[[package]] +name = "zk_evm" +version = "1.3.3" +source = "git+https://github.com/matter-labs/era-zk_evm.git?branch=v1.3.3#c08a8581421d2a0cf1fc8cbbdcd06c00da01fe0e" +dependencies = [ + "anyhow", + "lazy_static", + "num 0.4.1", + "serde", + "serde_json", + "static_assertions", + "zk_evm_abstractions", + "zkevm_opcode_defs", +] + +[[package]] +name = "zk_evm_abstractions" +version = "0.1.0" +source = "git+https://github.com/matter-labs/era-zk_evm_abstractions.git#973a1f661c045e0e8b9a287505f353659279b3b3" +dependencies = [ + "anyhow", + "serde", + "static_assertions", + "zkevm_opcode_defs", +] + +[[package]] +name = "zkevm-assembly" +version = "1.3.2" +source = "git+https://github.com/matter-labs/era-zkEVM-assembly.git?branch=v1.3.2#edc364e59a2eea9c4b1d4ce79f15d0b7c6b55b98" +dependencies = [ + "env_logger 0.9.3", + "hex", + "lazy_static", + "log", + "nom", + "num-bigint 0.4.3", + "num-traits", + "sha3 0.10.6", + "smallvec 1.11.0", + "structopt", + "thiserror", + "zkevm_opcode_defs", +] + +[[package]] +name = "zkevm_opcode_defs" +version = "1.3.2" +source = "git+https://github.com/matter-labs/era-zkevm_opcode_defs.git?branch=v1.3.2#2f69c6975a272e8c31d2d82c136a4ea81df25115" +dependencies = [ + "bitflags 2.3.3", + "blake2 0.10.6", + "ethereum-types 0.12.1", + "k256 0.11.6", + "lazy_static", + "sha2 0.10.6", + "sha3 0.10.6", +] + +[[package]] +name = "zkevm_test_harness" +version = "1.3.3" +source = "git+https://github.com/matter-labs/era-zkevm_test_harness.git?branch=v1.3.3#6453eab3c9c8915f588ff4eceb48d7be9a695ecb" +dependencies = [ + "bincode", + "circuit_testing", + "codegen 0.2.0", + "crossbeam 0.8.2", + "derivative", + "env_logger 0.10.0", + "hex", + "num-bigint 0.4.3", + "num-integer", + "num-traits", + "rayon", + "serde", + "serde_json", + "smallvec 1.11.0", + "structopt", + "sync_vm", + "test-log", + "tracing", + "zk_evm", + "zkevm-assembly", ] [[package]] @@ -8066,7 +11876,7 @@ source = "git+https://github.com/lambdaclass/zksync-web3-rs.git?rev=70327ae5413c dependencies = [ "async-trait", "clap 4.3.21", - "env_logger", + "env_logger 0.10.0", "ethers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "ethers-contract 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "hex", @@ -8078,13 +11888,404 @@ dependencies = [ "tokio", ] +[[package]] +name = "zksync_basic_types" +version = "1.0.0" +dependencies = [ + "serde", + "web3", +] + +[[package]] +name = "zksync_circuit_breaker" +version = "1.0.0" +dependencies = [ + "assert_matches", + "async-trait", + "backon", + "convert_case 0.6.0", + "futures 0.3.28", + "hex", + "serde", + "serde_json", + "thiserror", + "tokio", + "zksync_config", + "zksync_contracts", + "zksync_dal", + "zksync_eth_client", + "zksync_types", + "zksync_utils", + "zksync_verification_key_generator_and_server", +] + +[[package]] +name = "zksync_config" +version = "1.0.0" +dependencies = [ + "bigdecimal", + "envy", + "num 0.3.1", + "once_cell", + "serde", + "serde_json", + "url", + "zksync_basic_types", + "zksync_contracts", + "zksync_utils", +] + +[[package]] +name = "zksync_contracts" +version = "1.0.0" +dependencies = [ + "ethabi 16.0.0", + "hex", + "once_cell", + "serde", + "serde_json", + "zksync_utils", +] + +[[package]] +name = "zksync_core" +version = "1.0.0" +dependencies = [ + "actix-cors", + "actix-rt", + "actix-web", + "anyhow", + "async-trait", + "bigdecimal", + "bitflags 1.3.2", + "chrono", + "clap 4.3.21", + "ctrlc", + "futures 0.3.28", + "governor", + "hex", + "hyper", + "itertools", + "jsonrpc-core 18.0.0 (git+https://github.com/matter-labs/jsonrpc.git?branch=master)", + "jsonrpc-core-client", + "jsonrpc-derive", + "jsonrpc-http-server", + "jsonrpc-pubsub", + "jsonrpc-ws-server", + "metrics", + "num 0.3.1", + "prometheus_exporter", + "rand 0.8.5", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "tower-http 0.4.3", + "tracing", + "vlog", + "vm", + "zksync_circuit_breaker", + "zksync_config", + "zksync_contracts", + "zksync_dal", + "zksync_eth_client", + "zksync_eth_signer", + "zksync_health_check", + "zksync_mempool", + "zksync_merkle_tree", + "zksync_mini_merkle_tree", + "zksync_object_store", + "zksync_prover_utils", + "zksync_queued_job_processor", + "zksync_state", + "zksync_storage", + "zksync_types", + "zksync_utils", + "zksync_verification_key_generator_and_server", + "zksync_web3_decl", +] + +[[package]] +name = "zksync_crypto" +version = "1.0.0" +dependencies = [ + "base64 0.13.1", + "blake2 0.10.6", + "hex", + "once_cell", + "rand 0.4.6", + "serde", + "sha2 0.9.9", + "thiserror", + "zksync_basic_types", +] + +[[package]] +name = "zksync_dal" +version = "1.0.0" +dependencies = [ + "anyhow", + "bigdecimal", + "bincode", + "hex", + "itertools", + "metrics", + "num 0.3.1", + "once_cell", + "serde_json", + "sqlx", + "strum 0.24.1", + "thiserror", + "tokio", + "vlog", + "zksync_config", + "zksync_contracts", + "zksync_health_check", + "zksync_types", + "zksync_utils", +] + +[[package]] +name = "zksync_eth_client" +version = "1.0.0" +dependencies = [ + "anyhow", + "async-trait", + "hex", + "jsonrpc-core 18.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "metrics", + "parity-crypto", + "serde", + "thiserror", + "tokio", + "vlog", + "zksync_config", + "zksync_contracts", + "zksync_eth_signer", + "zksync_types", +] + +[[package]] +name = "zksync_eth_signer" +version = "1.0.0" +dependencies = [ + "async-trait", + "hex", + "jsonrpc-core 18.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-crypto", + "reqwest", + "rlp", + "secp256k1 0.21.3", + "serde", + "serde_derive", + "serde_json", + "thiserror", + "zksync_types", +] + +[[package]] +name = "zksync_health_check" +version = "0.1.0" +dependencies = [ + "async-trait", +] + +[[package]] +name = "zksync_mempool" +version = "1.0.0" +dependencies = [ + "metrics", + "vlog", + "zksync_types", +] + +[[package]] +name = "zksync_merkle_tree" +version = "1.0.0" +dependencies = [ + "leb128", + "metrics", + "once_cell", + "rayon", + "thiserror", + "vlog", + "zksync_crypto", + "zksync_storage", + "zksync_types", +] + +[[package]] +name = "zksync_mini_merkle_tree" +version = "1.0.0" +dependencies = [ + "once_cell", + "zksync_basic_types", + "zksync_crypto", +] + +[[package]] +name = "zksync_object_store" +version = "1.0.0" +dependencies = [ + "async-trait", + "bincode", + "google-cloud-auth", + "google-cloud-storage", + "http", + "metrics", + "tokio", + "vlog", + "zksync_config", + "zksync_types", +] + +[[package]] +name = "zksync_prover_utils" +version = "1.0.0" +dependencies = [ + "ctrlc", + "futures 0.3.28", + "metrics", + "regex", + "reqwest", + "tokio", + "vlog", + "zksync_config", + "zksync_utils", +] + +[[package]] +name = "zksync_queued_job_processor" +version = "1.0.0" +dependencies = [ + "async-trait", + "tokio", + "vlog", + "zksync_dal", + "zksync_utils", +] + +[[package]] +name = "zksync_state" +version = "1.0.0" +dependencies = [ + "metrics", + "mini-moka", + "tokio", + "vlog", + "zksync_dal", + "zksync_storage", + "zksync_types", +] + +[[package]] +name = "zksync_storage" +version = "1.0.0" +dependencies = [ + "metrics", + "num_cpus", + "rocksdb", + "vlog", +] + +[[package]] +name = "zksync_types" +version = "1.0.0" +dependencies = [ + "bigdecimal", + "blake2 0.10.6", + "chrono", + "codegen 0.1.0", + "metrics", + "num 0.3.1", + "once_cell", + "parity-crypto", + "rlp", + "serde", + "serde_json", + "serde_with", + "strum 0.24.1", + "thiserror", + "zk_evm", + "zkevm-assembly", + "zkevm_test_harness", + "zksync_basic_types", + "zksync_config", + "zksync_contracts", + "zksync_mini_merkle_tree", + "zksync_utils", +] + +[[package]] +name = "zksync_utils" +version = "1.0.0" +dependencies = [ + "anyhow", + "bigdecimal", + "envy", + "futures 0.3.28", + "hex", + "itertools", + "metrics", + "num 0.3.1", + "reqwest", + "serde", + "thiserror", + "tokio", + "vlog", + "zk_evm", + "zksync_basic_types", +] + +[[package]] +name = "zksync_verification_key_generator_and_server" +version = "1.0.0" +dependencies = [ + "bincode", + "circuit_testing", + "ff_ce", + "hex", + "itertools", + "serde_json", + "structopt", + "toml_edit 0.14.4", + "vlog", + "zksync_types", +] + +[[package]] +name = "zksync_web3_decl" +version = "1.0.0" +dependencies = [ + "bigdecimal", + "chrono", + "itertools", + "jsonrpsee", + "rlp", + "serde", + "serde_json", + "thiserror", + "zksync_types", +] + [[package]] name = "zstd" version = "0.11.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" dependencies = [ - "zstd-safe", + "zstd-safe 5.0.2+zstd.1.5.2", +] + +[[package]] +name = "zstd" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" +dependencies = [ + "zstd-safe 6.0.6", ] [[package]] @@ -8097,6 +12298,16 @@ dependencies = [ "zstd-sys", ] +[[package]] +name = "zstd-safe" +version = "6.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" +dependencies = [ + "libc", + "zstd-sys", +] + [[package]] name = "zstd-sys" version = "2.0.8+zstd.1.5.5" diff --git a/Cargo.toml b/Cargo.toml index 519fa4ca3..68b29323d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ resolver = "2" [profile.dev] # Disabling debug info speeds up builds a bunch, # and we don't rely on it for debugging that much -debug = 0 +#debug = 1 # These speed up local tests [profile.dev.package.ethers-solc] @@ -74,17 +74,25 @@ ethers-solc = { git = "https://github.com/gakonst/ethers-rs", default-features = solang-parser = "=0.3.1" -#[patch."https://github.com/gakonst/ethers-rs"] -#ethers = { path = "../ethers-rs/ethers" } -#ethers-addressbook = { path = "../ethers-rs/ethers-addressbook" } -#ethers-contract = { path = "../ethers-rs/ethers-contract" } -#ethers-contract-abigen = { path = "../ethers-rs/ethers-contract/ethers-contract-abigen" } -#ethers-core = { path = "../ethers-rs/ethers-core" } -#ethers-etherscan = { path = "../ethers-rs/ethers-etherscan" } -#ethers-middleware = { path = "../ethers-rs/ethers-middleware" } -#ethers-providers = { path = "../ethers-rs/ethers-providers" } -#ethers-signers = { path = "../ethers-rs/ethers-signers" } -#ethers-solc = { path = "../ethers-rs/ethers-solc" } +[patch."https://github.com/gakonst/ethers-rs"] +ethers = { path = "../ethers-rs/ethers" } +ethers-addressbook = { path = "../ethers-rs/ethers-addressbook" } +ethers-contract = { path = "../ethers-rs/ethers-contract" } +ethers-contract-abigen = { path = "../ethers-rs/ethers-contract/ethers-contract-abigen" } +ethers-core = { path = "../ethers-rs/ethers-core" } +ethers-etherscan = { path = "../ethers-rs/ethers-etherscan" } +ethers-middleware = { path = "../ethers-rs/ethers-middleware" } +ethers-providers = { path = "../ethers-rs/ethers-providers" } +ethers-signers = { path = "../ethers-rs/ethers-signers" } +ethers-solc = { path = "../ethers-rs/ethers-solc" } [patch.crates-io] -revm = { git = "https://github.com/bluealloy/revm/", branch = "release/v25" } +# revm = { git = "https://github.com/bluealloy/revm/", branch = "release/v25" } +revm = { path = "../../matter-public/revm/crates/revm", version = "3", default-features = false, features = [ + "std", + "serde", + "memory_limit", + "optional_eip3607", + "optional_block_gas_limit", + "optional_no_base_fee" +] } diff --git a/anvil/core/Cargo.toml b/anvil/core/Cargo.toml index f49a3a79f..644c2bc2f 100644 --- a/anvil/core/Cargo.toml +++ b/anvil/core/Cargo.toml @@ -7,7 +7,12 @@ license = "MIT OR Apache-2.0" [dependencies] # foundry internal foundry-evm = { path = "../../evm" } -revm = { version = "3", default-features = false, features = ["std", "serde", "memory_limit"] } +# revm = { version = "3", default-features = false, features = ["std", "serde", "memory_limit"] } +revm = { path = "../../../../matter-public/revm/crates/revm", version = "3", default-features = false, features = [ + "std", + "serde", + "memory_limit", +] } ethers-core = { workspace = true } serde = { version = "1", features = ["derive"], optional = true } diff --git a/chisel/Cargo.toml b/chisel/Cargo.toml index ecdbe0d30..f817bec20 100644 --- a/chisel/Cargo.toml +++ b/chisel/Cargo.toml @@ -55,7 +55,8 @@ serde = "1" serde_json = { version = "1", features = ["raw_value"] } semver = "1" bytes = "1" -revm = "3" +# revm = "3" +revm = { path = "../../../matter-public/revm/crates/revm", version = "3" } eyre = "0.6" dirs = "5" time = { version = "0.3", features = ["formatting"] } diff --git a/cli/src/cmd/forge/test/filter.rs b/cli/src/cmd/forge/test/filter.rs index 455be5a11..5050bb3b6 100644 --- a/cli/src/cmd/forge/test/filter.rs +++ b/cli/src/cmd/forge/test/filter.rs @@ -9,7 +9,7 @@ use std::{fmt, path::Path}; /// The filter to use during testing. /// /// See also `FileFilter`. -#[derive(Clone, Parser)] +#[derive(Clone, Parser, Default)] #[clap(next_help_heading = "Test filtering")] pub struct FilterArgs { /// Only run test functions matching the specified regex pattern. @@ -90,10 +90,10 @@ impl FileFilter for FilterArgs { fn is_match(&self, file: &Path) -> bool { if let Some(file) = file.as_os_str().to_str() { if let Some(ref glob) = self.path_pattern { - return glob.is_match(file) + return glob.is_match(file); } if let Some(ref glob) = self.path_pattern_inverse { - return !glob.is_match(file) + return !glob.is_match(file); } } file.is_sol_test() diff --git a/cli/src/cmd/forge/test/mod.rs b/cli/src/cmd/forge/test/mod.rs index 4f7648180..4e88647b2 100644 --- a/cli/src/cmd/forge/test/mod.rs +++ b/cli/src/cmd/forge/test/mod.rs @@ -1,7 +1,15 @@ //! Test command use crate::{ cmd::{ - forge::{build::CoreBuildArgs, debug::DebugArgs, install, watch::WatchArgs}, + forge::{ + build::CoreBuildArgs, + debug::DebugArgs, + install, + watch::WatchArgs, + zk_build::ZkBuildArgs, + zksolc::{ZkSolc, ZkSolcOpts}, + zksolc_manager::{ZkSolcManagerBuilder, ZkSolcManagerOpts, DEFAULT_ZKSOLC_VERSION}, + }, LoadConfig, }, suggestions, utils, @@ -48,7 +56,7 @@ use ethers::types::Bytes; foundry_config::merge_impl_figment_convert!(TestArgs, opts, evm_opts); /// CLI arguments for `forge test`. -#[derive(Debug, Clone, Parser)] +#[derive(Debug, Clone, Parser, Default)] #[clap(next_help_heading = "Test options")] pub struct TestArgs { /// Run a test in the debugger. @@ -112,6 +120,15 @@ pub struct TestArgs { #[clap(flatten)] pub watch: WatchArgs, } +mod test { + use super::TestArgs; + + #[tokio::test] + async fn test_era() { + let foo: TestArgs = Default::default(); + foo.execute_tests().await.unwrap(); + } +} impl TestArgs { /// Returns the flattened [`CoreBuildArgs`]. @@ -143,8 +160,8 @@ impl TestArgs { let mut project = config.project()?; // install missing dependencies - if install::install_missing_dependencies(&mut config, self.build_args().silent) && - config.auto_detect_remappings + if install::install_missing_dependencies(&mut config, self.build_args().silent) + && config.auto_detect_remappings { // need to re-configure here to also catch additional remappings config = self.load_config(); @@ -152,26 +169,63 @@ impl TestArgs { } let compiler = ProjectCompiler::default(); - let output = if config.sparse_mode { + /*let output_old = if config.sparse_mode { compiler.compile_sparse(&project, filter.clone()) } else if self.opts.silent { compile::suppress_compile(&project) } else { compiler.compile(&project) - }?; + }?;*/ + let project_root = project.paths.root.clone(); + + let zksolc_manager = + ZkSolcManagerBuilder::new(ZkSolcManagerOpts::new(DEFAULT_ZKSOLC_VERSION.to_owned())) + .build() + .unwrap(); + + let zksolc_opts = ZkSolcOpts { + compiler_path: zksolc_manager.get_full_compiler_path(), + is_system: false, + force_evmla: false, + }; + + let zksolc = ZkSolc::new(zksolc_opts, project); + let output = zksolc.compile().unwrap(); + /*println!("!!! OLD:"); + for (k, v) in output_old.cached_artifacts().0.iter() { + println!("Key is: {:?}", k); + for (entry_k, entry_vec) in v.iter() { + println!(" entry: {:?}", entry_k); + for f in entry_vec { + println!(" file: {:?}", f.file); + } + } + }*/ + + println!("!!! NEW:"); + for (k, v) in output.compiled_artifacts.iter() { + println!("Key is: {:?}", k); + for (entry_k, entry_vec) in v.iter() { + println!(" entry: {:?}", entry_k); + for f in entry_vec { + println!(" file: {:?}", f.file); + } + } + } // Create test options from general project settings // and compiler output - let project_root = &project.paths.root; + let toml = config.get_config_path(); let profiles = get_available_profiles(toml)?; + let test_options: TestOptions = Default::default(); - let test_options: TestOptions = TestOptionsBuilder::default() - .fuzz(config.fuzz) - .invariant(config.invariant) - .compile_output(&output) - .profiles(profiles) - .build(project_root)?; + /*let test_options: TestOptions = TestOptionsBuilder::default() + .fuzz(config.fuzz) + .invariant(config.invariant) + .compile_output(&output) + .profiles(profiles) + .build(&project_root)?;*/ // Determine print verbosity and executor verbosity let verbosity = evm_opts.verbosity; @@ -190,8 +244,8 @@ impl TestArgs { .sender(evm_opts.sender) .with_fork(evm_opts.get_fork(&config, env.clone())) .with_cheats_config(CheatsConfig::new(&config, &evm_opts)) - .with_test_options(test_options.clone()) - .build(project_root, output, env, evm_opts)?; + //.with_test_options(test_options.clone()) + .build(&project_root, output, env, evm_opts)?; println!("{:#?}, <-------> runner fork", runner.fork); // let (_contract, _bytes, _bytes_v) = @@ -386,7 +440,7 @@ impl TestOutcome { pub fn ensure_ok(&self) -> eyre::Result<()> { let failures = self.failures().count(); if self.allow_failure || failures == 0 { - return Ok(()) + return Ok(()); } if !shell::verbosity().is_normal() { @@ -399,7 +453,7 @@ impl TestOutcome { for (suite_name, suite) in self.results.iter() { let failures = suite.failures().count(); if failures == 0 { - continue + continue; } let term = if failures > 1 { "tests" } else { "test" }; @@ -526,6 +580,7 @@ async fn test( ) -> eyre::Result { let project = config.project().unwrap(); + /* //get bytecode let contract_path = "src/Greeter.sol:Greeter"; let output_path: &str = @@ -547,7 +602,7 @@ async fn test( // ); runner.known_contracts.0.insert(art, (abi.clone(), bytecode_v.clone())); } - } + }*/ trace!(target: "forge::test", "running all tests"); if runner.count_filtered_tests(&filter) == 0 { @@ -585,6 +640,10 @@ async fn test( // Set up test reporter channel let (tx, rx) = channel::<(String, SuiteResult)>(); + //let (tx2, rx2) = channel::<(String, SuiteResult)>(); + + // Run the test. + //runner.test(filter.clone(), Some(tx2), test_options.clone()).await; // Run tests let handle = @@ -619,7 +678,7 @@ async fn test( // If the test failed, we want to stop processing the rest of the tests if fail_fast && result.status == TestStatus::Failure { - break 'outer + break 'outer; } // We only display logs at level 2 and above @@ -660,12 +719,12 @@ async fn test( // tests At verbosity level 5, we display // all traces for all tests TraceKind::Setup => { - (verbosity >= 5) || - (verbosity == 4 && result.status == TestStatus::Failure) + (verbosity >= 5) + || (verbosity == 4 && result.status == TestStatus::Failure) } TraceKind::Execution => { - verbosity > 3 || - (verbosity == 3 && result.status == TestStatus::Failure) + verbosity > 3 + || (verbosity == 3 && result.status == TestStatus::Failure) } _ => false, }; diff --git a/cli/src/cmd/forge/zksolc.rs b/cli/src/cmd/forge/zksolc.rs index 8732b9f6b..75f3fbc98 100644 --- a/cli/src/cmd/forge/zksolc.rs +++ b/cli/src/cmd/forge/zksolc.rs @@ -34,9 +34,14 @@ use anyhow::{Error, Result}; use ethers::{ prelude::{artifacts::Source, Solc}, solc::{ - artifacts::{output_selection::FileOutputSelection, StandardJsonCompilerInput}, - Graph, Project, + artifacts::{ + output_selection::FileOutputSelection, CompactBytecode, CompactDeployedBytecode, + LosslessAbi, SourceFile, StandardJsonCompilerInput, + }, + ArtifactFile, Artifacts, CompilerOutput, ConfigurableArtifacts, + ConfigurableContractArtifact, Graph, Project, ProjectCompileOutput, }, + types::Bytes, }; use semver::Version; use serde_json::Value; @@ -44,9 +49,10 @@ use std::{ collections::{BTreeMap, HashSet}, fmt, fs, fs::File, - io::Write, + io::{Read, Write}, path::PathBuf, process::{exit, Command, Stdio}, + str::FromStr, }; #[derive(Debug, Clone)] @@ -215,11 +221,13 @@ impl ZkSolc { /// The `compile` function modifies the `ZkSolc` instance to store the parsed JSON input and the /// versioned sources. These modified values can be accessed after the compilation process /// for further processing or analysis. - pub fn compile(mut self) -> Result<()> { + pub fn compile(mut self) -> Result { + let mut result = ProjectCompileOutput::default(); + let mut displayed_warnings = HashSet::new(); + let mut data = BTreeMap::new(); // Step 1: Collect Source Files - self.configure_solc(); + /*self.configure_solc(); let sources = self.sources.clone().unwrap(); - let mut displayed_warnings = HashSet::new(); // Step 2: Compile Contracts for Each Source for (solc, version) in sources { @@ -234,46 +242,51 @@ impl ZkSolc { // Skip this file if it's not in the 'sources' directory or its subdirectories if !is_in_sources_dir { - continue + continue; } - // Step 3: Parse JSON Input for each Source - if let Err(err) = self.parse_json_input(contract_path.clone()) { - eprintln!("Failed to parse json input for zksolc compiler: {}", err); - } + let output = if false { + // Step 3: Parse JSON Input for each Source + if let Err(err) = self.parse_json_input(contract_path.clone()) { + eprintln!("Failed to parse json input for zksolc compiler: {}", err); + } - // Step 4: Build Compiler Arguments - let comp_args = self.build_compiler_args(source.clone(), solc.clone()); - - // Step 5: Run Compiler and Handle Output - let mut cmd = Command::new(&self.compiler_path); - let mut child = cmd - .arg(contract_path.clone()) - .args(&comp_args) - .stdin(Stdio::piped()) - .stderr(Stdio::piped()) - .stdout(Stdio::piped()) - .spawn(); - let stdin = child.as_mut().unwrap().stdin.take().expect("Stdin exists."); - - serde_json::to_writer(stdin, &self.standard_json.clone().unwrap()).map_err( - |e| Error::msg(format!("Could not assign standard_json to writer: {}", e)), - )?; - - let output = child - .unwrap() - .wait_with_output() - .map_err(|e| Error::msg(format!("Could not run compiler cmd: {}", e)))?; - - if !output.status.success() { - return Err(Error::msg(format!( + // Step 4: Build Compiler Arguments + let comp_args = self.build_compiler_args(source.clone(), solc.clone()); + + // Step 5: Run Compiler and Handle Output + let mut cmd = Command::new(&self.compiler_path); + let mut child = cmd + .arg(contract_path.clone()) + .args(&comp_args) + .stdin(Stdio::piped()) + .stderr(Stdio::piped()) + .stdout(Stdio::piped()) + .spawn(); + let stdin = child.as_mut().unwrap().stdin.take().expect("Stdin exists."); + + serde_json::to_writer(stdin, &self.standard_json.clone().unwrap()).map_err( + |e| Error::msg(format!("Could not assign standard_json to writer: {}", e)), + )?; + + let output = child + .unwrap() + .wait_with_output() + .map_err(|e| Error::msg(format!("Could not run compiler cmd: {}", e)))?; + + if !output.status.success() { + return Err(Error::msg(format!( "Compilation failed with {:?}. Using compiler: {:?}, with args {:?} {:?}", String::from_utf8(output.stderr).unwrap_or_default(), self.compiler_path, contract_path, &comp_args - ))) - } + ))); + } + Some(output) + } else { + None + }; let filename = contract_path .to_str() @@ -292,12 +305,20 @@ impl ZkSolc { .expect("Failed to get Contract filename."); // Step 6: Handle Output (Errors and Warnings) - self.handle_output(output, filename.to_string(), &mut displayed_warnings); + let foo = self.handle_output(output, filename.to_string(), &mut displayed_warnings); + data.insert(filename.to_string(), foo); } } + */ + + let filename = "Counter.sol"; + let foo = self.handle_output(None, filename.to_string(), &mut displayed_warnings); + data.insert(filename.to_string(), foo); + + result.compiled_artifacts = Artifacts { 0: data }; // Step 7: Return Ok if the compilation process completes without errors - Ok(()) + Ok(result) } /// Builds the compiler arguments for the Solidity compiler based on the provided versioned @@ -388,21 +409,31 @@ impl ZkSolc { /// errors and warnings, and saves the artifacts. fn handle_output( &self, - output: std::process::Output, + output: Option, source: String, displayed_warnings: &mut HashSet, - ) { + ) -> BTreeMap>> { // Deserialize the compiler output into a serde_json::Value object - let output_json: Value = serde_json::from_slice(&output.clone().stdout) - .unwrap_or_else(|e| panic!("Could not parse zksolc compiler output: {}", e)); + let output_json: Value = if let Some(output) = output { + serde_json::from_slice(&output.clone().stdout) + .unwrap_or_else(|e| panic!("Could not parse zksolc compiler output: {}", e)) + } else { + let mut file = File::open("/media/cyfra/ssd_storage/matter-public/example-foundry/hello_foundry/zkout/Counter.sol/artifacts.json").expect("Failed to open file"); + let mut json_data = String::new(); + file.read_to_string(&mut json_data).expect("Failed to read from file"); + + serde_json::from_str(json_data.as_str()).unwrap() + }; // Handle errors and warnings in the output - self.handle_output_errors(&output_json, displayed_warnings); + //self.handle_output_errors(&output_json, displayed_warnings); // Create the artifacts file for saving the compiler output - let mut artifacts_file = self - .build_artifacts_file(source.clone()) - .unwrap_or_else(|e| panic!("Error configuring solc compiler: {}", e)); + /*let mut artifacts_file = self + .build_artifacts_file(source.clone()) + .unwrap_or_else(|e| panic!("Error configuring solc compiler: {}", e));*/ + + let mut result = BTreeMap::new(); // Get the bytecode hashes for each contract in the output let output_obj = output_json["contracts"].as_object().unwrap(); @@ -415,18 +446,65 @@ impl ZkSolc { if let Some(bcode_hash) = b_code_obj[hash]["hash"].as_str() { println!("{} -> Bytecode Hash: {} ", hash, bcode_hash); } + let mut art = ConfigurableContractArtifact::default(); + art.bytecode = Some(CompactBytecode { + object: ethers::solc::artifacts::BytecodeObject::Bytecode( + Bytes::from_str( + b_code_obj[hash]["evm"]["bytecode"]["object"].as_str().unwrap(), + ) + .unwrap(), + ), + source_map: None, + link_references: Default::default(), + }); + + // FIXME: incorrect + art.deployed_bytecode = Some(CompactDeployedBytecode { + bytecode: Some(CompactBytecode { + object: ethers::solc::artifacts::BytecodeObject::Bytecode( + Bytes::from_str( + b_code_obj[hash]["evm"]["bytecode"]["object"].as_str().unwrap(), + ) + .unwrap(), + ), + source_map: None, + link_references: Default::default(), + }), + immutable_references: Default::default(), + }); + + art.abi = Some( + serde_json::from_value::(b_code_obj[hash]["abi"].clone()) + .unwrap(), + ); + + let foo = ArtifactFile { + artifact: art, + file: format!("{}.sol", hash).into(), + version: Version::parse("0.8.20").unwrap(), + }; + result.insert(hash.clone(), vec![foo]); + //art.additional_files. } } } // Beautify the output JSON - let output_json_pretty = serde_json::to_string_pretty(&output_json) + /*let output_json_pretty = serde_json::to_string_pretty(&output_json) .unwrap_or_else(|e| panic!("Could not beautify zksolc compiler output: {}", e)); // Write the beautified output JSON to the artifacts file artifacts_file .write_all(output_json_pretty.as_bytes()) - .unwrap_or_else(|e| panic!("Could not write artifacts file: {}", e)); + .unwrap_or_else(|e| panic!("Could not write artifacts file: {}", e));*/ + + /* let result = CompilerOutput { + errors: vec![], + // TODO: fixme: sourceFile id. + sources: BTreeMap::from([(source, SourceFile { id: 0, ast: None })]), + contracts: BTreeMap::from([(source, BTreeMap::from[()])]), + };*/ + result } /// Handles the errors and warnings present in the output JSON from the compiler. diff --git a/cli/src/cmd/utils.rs b/cli/src/cmd/utils.rs index 6ab7890ee..f5c55b08a 100644 --- a/cli/src/cmd/utils.rs +++ b/cli/src/cmd/utils.rs @@ -94,7 +94,7 @@ pub fn get_cached_entry_by_name( } if let Some(entry) = cached_entry { - return Ok(entry) + return Ok(entry); } let mut err = format!("could not find artifact: `{name}`"); @@ -166,7 +166,7 @@ macro_rules! update_progress { /// True if the network calculates gas costs differently. pub fn has_different_gas_calc(chain: u64) -> bool { if let ConfigChain::Named(chain) = ConfigChain::from(chain) { - return matches!(chain, Chain::Arbitrum | Chain::ArbitrumTestnet | Chain::ArbitrumGoerli) + return matches!(chain, Chain::Arbitrum | Chain::ArbitrumTestnet | Chain::ArbitrumGoerli); } false } @@ -174,7 +174,7 @@ pub fn has_different_gas_calc(chain: u64) -> bool { /// True if it supports broadcasting in batches. pub fn has_batch_support(chain: u64) -> bool { if let ConfigChain::Named(chain) = ConfigChain::from(chain) { - return !matches!(chain, Chain::Arbitrum | Chain::ArbitrumTestnet | Chain::ArbitrumGoerli) + return !matches!(chain, Chain::Arbitrum | Chain::ArbitrumTestnet | Chain::ArbitrumGoerli); } true } diff --git a/evm/Cargo.toml b/evm/Cargo.toml index ca9ce3f73..de4c8e817 100644 --- a/evm/Cargo.toml +++ b/evm/Cargo.toml @@ -38,7 +38,7 @@ once_cell = "1" # EVM bytes = "1" hashbrown = { version = "0.13", features = ["serde"] } -revm = { version = "3", default-features = false, features = [ +revm = { path = "../../../matter-public/revm/crates/revm", version = "3", default-features = false, features = [ "std", "serde", "memory_limit", @@ -47,6 +47,9 @@ revm = { version = "3", default-features = false, features = [ "optional_no_base_fee" ] } +era_test_node = { path = "../../../matter-public/era-test-node"} +revm_era = { path = "../../../matter-public/revm_era"} + # Fuzzer proptest = "1" diff --git a/evm/src/executor/backend/mod.rs b/evm/src/executor/backend/mod.rs index bb5f730cf..f96559437 100644 --- a/evm/src/executor/backend/mod.rs +++ b/evm/src/executor/backend/mod.rs @@ -9,6 +9,7 @@ use crate::{ utils::{b160_to_h160, h160_to_b160, h256_to_b256, ru256_to_u256, u256_to_ru256}, CALLER, TEST_CONTRACT_ADDRESS, }; +use era_test_node::node::InMemoryNode; use ethers::{ prelude::{Block, H160, H256, U256}, types::{Address, BlockNumber, Transaction, U64}, @@ -20,8 +21,8 @@ use revm::{ db::{CacheDB, DatabaseRef}, precompile::{Precompiles, SpecId}, primitives::{ - Account, AccountInfo, Bytecode, CreateScheme, Env, Log, ResultAndState, TransactTo, B160, - B256, KECCAK_EMPTY, U256 as rU256, + Account, AccountInfo, Bytecode, CreateScheme, EVMResult, Env, Log, ResultAndState, + TransactTo, TxEnv, B160, B256, KECCAK_EMPTY, U256 as rU256, }, Database, DatabaseCommit, Inspector, JournaledState, EVM, }; @@ -290,7 +291,7 @@ pub trait DatabaseExt: Database { /// Returns an error if [`Self::has_cheatcode_access`] returns `false` fn ensure_cheatcode_access(&self, account: Address) -> Result<(), NoCheatcodeAccessError> { if !self.has_cheatcode_access(account) { - return Err(NoCheatcodeAccessError(account)) + return Err(NoCheatcodeAccessError(account)); } Ok(()) } @@ -302,7 +303,7 @@ pub trait DatabaseExt: Database { account: Address, ) -> Result<(), NoCheatcodeAccessError> { if self.is_forked_mode() { - return self.ensure_cheatcode_access(account) + return self.ensure_cheatcode_access(account); } Ok(()) } @@ -555,8 +556,9 @@ impl Backend { /// Checks if the test contract associated with this backend failed, See /// [Self::is_failed_test_contract] pub fn is_failed(&self) -> bool { - self.has_snapshot_failure() || - self.test_contract_address() + self.has_snapshot_failure() + || self + .test_contract_address() .map(|addr| self.is_failed_test_contract(addr)) .unwrap_or_default() } @@ -597,7 +599,7 @@ impl Backend { .cloned() .unwrap_or_default() .present_value(); - return value.as_le_bytes()[1] != 0 + return value.as_le_bytes()[1] != 0; } false @@ -611,7 +613,7 @@ impl Backend { U256::from_str_radix(GLOBAL_FAILURE_SLOT, 16).expect("This is a bug.").into(); if let Some(account) = current_state.state.get(&h160_to_b160(CHEATCODE_ADDRESS)) { let value = account.storage.get(&index).cloned().unwrap_or_default().present_value(); - return value == revm::primitives::U256::from(1) + return value == revm::primitives::U256::from(1); } false @@ -713,7 +715,7 @@ impl Backend { all_logs.extend(f.journaled_state.logs.clone()) } }); - return all_logs + return all_logs; } logs @@ -750,10 +752,19 @@ impl Backend { { self.initialize(env); - match revm::evm_inner::(env, self, &mut inspector).transact() { + let result: EVMResult = revm_era::run_era_transaction(env, self, inspector); + + Ok(result.unwrap()) + + /* let node = InMemoryNode::new(None, era_test_node::ShowCalls::None, false, false); + + node.apply_txs(txs) + */ + + /*match revm::evm_inner::(env, self, &mut inspector).transact() { Ok(res) => Ok(res), Err(e) => eyre::bail!("backend: failed while inspecting: {:?}", e), - } + }*/ } /// Returns true if the address is a precompile @@ -848,7 +859,7 @@ impl Backend { for tx in full_block.transactions.into_iter() { if tx.hash().eq(&tx_hash) { // found the target transaction - return Ok(Some(tx)) + return Ok(Some(tx)); } trace!(tx=?tx.hash, "committing transaction"); @@ -973,7 +984,7 @@ impl DatabaseExt for Backend { trace!(?id, "select fork"); if self.is_active_fork(id) { // nothing to do - return Ok(()) + return Ok(()); } let fork_id = self.ensure_fork_id(id).cloned()?; @@ -1190,7 +1201,7 @@ impl DatabaseExt for Backend { fn ensure_fork(&self, id: Option) -> eyre::Result { if let Some(id) = id { if self.inner.issued_local_fork_ids.contains_key(&id) { - return Ok(id) + return Ok(id); } eyre::bail!("Requested fork `{}` does not exit", id) } @@ -1216,7 +1227,7 @@ impl DatabaseExt for Backend { if self.inner.forks.len() == 1 { // we only want to provide additional diagnostics here when in multifork mode with > 1 // forks - return None + return None; } if !active_fork.is_contract(callee) && !is_contract_in_state(journaled_state, callee) { @@ -1243,7 +1254,7 @@ impl DatabaseExt for Backend { active: active_id, available_on, }) - } + }; } None } @@ -1416,7 +1427,7 @@ impl Fork { pub fn is_contract(&self, acc: Address) -> bool { if let Ok(Some(acc)) = self.db.basic(h160_to_b160(acc)) { if acc.code_hash != KECCAK_EMPTY { - return true + return true; } } is_contract_in_state(&self.journaled_state, acc) @@ -1736,7 +1747,7 @@ fn merge_db_account_data( acc } else { // Account does not exist - return + return; }; if let Some(code) = active.contracts.get(&acc.info.code_hash).cloned() { diff --git a/evm/src/executor/mod.rs b/evm/src/executor/mod.rs index c8b4591c7..7a7f0157c 100644 --- a/evm/src/executor/mod.rs +++ b/evm/src/executor/mod.rs @@ -143,8 +143,11 @@ impl Executor { } /// Creates the default CREATE2 Contract Deployer for local tests and scripts. + /// XXXX pub fn deploy_create2_deployer(&mut self) -> eyre::Result<()> { trace!("deploying local create2 deployer"); + return Ok(()); + /* let create2_deployer_account = self .backend_mut() .basic(h160_to_b160(DEFAULT_CREATE2_DEPLOYER))? @@ -164,10 +167,11 @@ impl Executor { self.set_balance(creator, initial_balance)?; } - Ok(()) + Ok(())*/ } /// Set the balance of an account. + /// XXX pub fn set_balance(&mut self, address: Address, amount: U256) -> DatabaseResult<&mut Self> { trace!(?address, ?amount, "setting account balance"); let mut account = self.backend_mut().basic(h160_to_b160(address))?.unwrap_or_default(); @@ -187,6 +191,7 @@ impl Executor { } /// Set the nonce of an account. + /// XXX pub fn set_nonce(&mut self, address: Address, nonce: u64) -> DatabaseResult<&mut Self> { let mut account = self.backend_mut().basic(h160_to_b160(address))?.unwrap_or_default(); account.nonce = nonce; @@ -475,7 +480,7 @@ impl Executor { state_changeset: None, transactions: None, script_wallets, - }))) + }))); } }; @@ -500,6 +505,7 @@ impl Executor { /// /// Executes a CREATE transaction with the contract `code` and persistent database state /// modifications + /// XXX pub fn deploy( &mut self, from: Address, @@ -545,7 +551,7 @@ impl Executor { ) -> Result { if self.backend().has_snapshot_failure() { // a failure occurred in a reverted snapshot, which is considered a failed test - return Ok(should_fail) + return Ok(should_fail); } // Construct a new VM with the state changeset @@ -906,7 +912,7 @@ fn convert_call_result( let reason = decode::decode_revert(result.as_ref(), abi, Some(status)) .unwrap_or_else(|_| format!("{status:?}")); if reason == "SKIPPED" { - return Err(EvmError::SkipError) + return Err(EvmError::SkipError); } Err(EvmError::Execution(Box::new(ExecutionErr { reverted, diff --git a/forge/src/multi_runner.rs b/forge/src/multi_runner.rs index 72094ac69..b73af7bf9 100644 --- a/forge/src/multi_runner.rs +++ b/forge/src/multi_runner.rs @@ -15,7 +15,7 @@ use foundry_evm::{ revm, }; use foundry_utils::{PostLinkInput, ResolvedDependency}; -use rayon::prelude::*; +use rayon::{prelude::*, ThreadPoolBuilder}; use revm::primitives::SpecId; use std::{ collections::{BTreeMap, HashSet}, @@ -61,8 +61,8 @@ impl MultiContractRunner { self.contracts .iter() .filter(|(id, _)| { - filter.matches_path(id.source.to_string_lossy()) && - filter.matches_contract(&id.name) + filter.matches_path(id.source.to_string_lossy()) + && filter.matches_contract(&id.name) }) .flat_map(|(_, (abi, _, _))| { abi.functions().filter(|func| filter.matches_test(func.signature())) @@ -75,8 +75,8 @@ impl MultiContractRunner { self.contracts .iter() .filter(|(id, _)| { - filter.matches_path(id.source.to_string_lossy()) && - filter.matches_contract(&id.name) + filter.matches_path(id.source.to_string_lossy()) + && filter.matches_contract(&id.name) }) .flat_map(|(_, (abi, _, _))| abi.functions().map(|func| func.name.clone())) .filter(|sig| sig.is_test()) @@ -91,8 +91,8 @@ impl MultiContractRunner { self.contracts .iter() .filter(|(id, _)| { - filter.matches_path(id.source.to_string_lossy()) && - filter.matches_contract(&id.name) + filter.matches_path(id.source.to_string_lossy()) + && filter.matches_contract(&id.name) }) .filter(|(_, (abi, _, _))| abi.functions().any(|func| filter.matches_test(&func.name))) .map(|(id, (abi, _, _))| { @@ -126,48 +126,56 @@ impl MultiContractRunner { test_options: TestOptions, ) -> BTreeMap { trace!("running all tests"); - - // the db backend that serves all the data, each contract gets its own instance + let pool = ThreadPoolBuilder::new() + .num_threads(1) // For this example, we use 4 threads. + .build() + .unwrap(); let db = Backend::spawn(self.fork.take()).await; - let filter = &filter; - self.contracts - .par_iter() - .filter(|(id, _)| { - filter.matches_path(id.source.to_string_lossy()) && - filter.matches_contract(&id.name) - }) - .filter(|(_, (abi, _, _))| abi.functions().any(|func| filter.matches_test(&func.name))) - .map_with(stream_result, |stream_result, (id, (abi, deploy_code, libs))| { - let executor = ExecutorBuilder::default() - .with_cheatcodes(self.cheats_config.clone()) - .with_config(self.env.clone()) - .with_spec(self.evm_spec) - .with_gas_limit(self.evm_opts.gas_limit()) - .set_tracing(self.evm_opts.verbosity >= 3) - .set_coverage(self.coverage) - .build(db.clone()); - let identifier = id.identifier(); - trace!(contract=%identifier, "start executing all tests in contract"); + pool.install(|| { + // the db backend that serves all the data, each contract gets its own instance + let filter = &filter; - let result = self.run_tests( - &identifier, - abi, - executor, - deploy_code.clone(), - libs, - filter, - test_options.clone(), - ); - trace!(contract= ?identifier, "executed all tests in contract"); + self.contracts + .par_iter() + .filter(|(id, _)| { + filter.matches_path(id.source.to_string_lossy()) + && filter.matches_contract(&id.name) + }) + .filter(|(_, (abi, _, _))| { + abi.functions().any(|func| filter.matches_test(&func.name)) + }) + .map_with(stream_result, |stream_result, (id, (abi, deploy_code, libs))| { + let executor = ExecutorBuilder::default() + .with_cheatcodes(self.cheats_config.clone()) + .with_config(self.env.clone()) + .with_spec(self.evm_spec) + .with_gas_limit(self.evm_opts.gas_limit()) + .set_tracing(self.evm_opts.verbosity >= 3) + .set_coverage(self.coverage) + .build(db.clone()); + let identifier = id.identifier(); + trace!(contract=%identifier, "start executing all tests in contract"); - if let Some(stream_result) = stream_result { - let _ = stream_result.send((identifier.clone(), result.clone())); - } + let result = self.run_tests( + &identifier, + abi, + executor, + deploy_code.clone(), + libs, + filter, + test_options.clone(), + ); + trace!(contract= ?identifier, "executed all tests in contract"); - (identifier, result) - }) - .collect() + if let Some(stream_result) = stream_result { + let _ = stream_result.send((identifier.clone(), result.clone())); + } + + (identifier, result) + }) + .collect() + }) } #[instrument(skip_all, fields(name = %name))] @@ -222,7 +230,7 @@ impl MultiContractRunnerBuilder { pub fn build( self, root: impl AsRef, - output: ProjectCompileOutput, + output: ProjectCompileOutput, // FIXME: THIS. env: revm::primitives::Env, evm_opts: EvmOpts, ) -> Result @@ -250,7 +258,7 @@ impl MultiContractRunnerBuilder { let mut seen = HashSet::new(); for dep in deps { if !seen.insert(dep.id.clone()) { - continue + continue; } filtered.push(dep); } @@ -280,13 +288,14 @@ impl MultiContractRunnerBuilder { if let Some(b) = contract.bytecode.expect("No bytecode").object.into_bytes() { b } else { - return Ok(()) + return Ok(()); }; let abi = contract.abi.expect("We should have an abi by now"); // if it's a test, add it to deployable contracts - if abi.constructor.as_ref().map(|c| c.inputs.is_empty()).unwrap_or(true) && - abi.functions() + if abi.constructor.as_ref().map(|c| c.inputs.is_empty()).unwrap_or(true) + && abi + .functions() .any(|func| func.name.is_test() || func.name.is_invariant_test()) { deployable_contracts.insert( diff --git a/forge/src/runner.rs b/forge/src/runner.rs index f489811c1..15468bd98 100644 --- a/forge/src/runner.rs +++ b/forge/src/runner.rs @@ -204,7 +204,7 @@ impl<'a> ContractRunner<'a> { )] .into(), warnings, - ) + ); } let has_invariants = self.contract.functions().any(|func| func.is_invariant_test()); @@ -239,7 +239,7 @@ impl<'a> ContractRunner<'a> { )] .into(), warnings, - ) + ); } let mut test_results = self @@ -435,7 +435,7 @@ impl<'a> ContractRunner<'a> { labeled_addresses, kind: TestKind::Standard(0), ..Default::default() - }] + }]; }; let mut evm = InvariantExecutor::new( @@ -556,7 +556,7 @@ impl<'a> ContractRunner<'a> { labeled_addresses, kind: TestKind::Standard(0), ..Default::default() - } + }; } let kind = TestKind::Fuzz { diff --git a/ui/Cargo.toml b/ui/Cargo.toml index 3d0c3a024..e1cab46cc 100644 --- a/ui/Cargo.toml +++ b/ui/Cargo.toml @@ -16,5 +16,13 @@ ethers = { workspace = true } crossterm = "0.26" eyre = "0.6" hex = "0.4" -revm = { version = "3", features = ["std", "serde"] } +# revm = { version = "3", features = ["std", "serde"] } +revm = { path = "../../../matter-public/revm/crates/revm", version = "3", default-features = false, features = [ + "std", + "serde", + "memory_limit", + "optional_eip3607", + "optional_block_gas_limit", + "optional_no_base_fee" +] } tui = { version = "0.19", default-features = false, features = ["crossterm"] } From 8e7ae2562296352238baa3c71116f4bb48611194 Mon Sep 17 00:00:00 2001 From: mm-zk Date: Sun, 20 Aug 2023 09:27:23 +0200 Subject: [PATCH 02/13] hacked up version works --- Cargo.lock | 3 + cli/src/cmd/forge/test/mod.rs | 14 +++- cli/src/cmd/forge/zksolc.rs | 125 ++++++++++++++++++++++---------- evm/src/executor/backend/mod.rs | 4 + forge/src/multi_runner.rs | 1 + 5 files changed, 105 insertions(+), 42 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 123bfe00b..ebe16db45 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8479,7 +8479,10 @@ version = "0.1.0" dependencies = [ "era_test_node", "ethabi 18.0.0", + "hex", "revm", + "serde", + "serde_json", "zk_evm", "zksync_basic_types", "zksync_types", diff --git a/cli/src/cmd/forge/test/mod.rs b/cli/src/cmd/forge/test/mod.rs index 4e88647b2..2b06a2e99 100644 --- a/cli/src/cmd/forge/test/mod.rs +++ b/cli/src/cmd/forge/test/mod.rs @@ -167,15 +167,21 @@ impl TestArgs { config = self.load_config(); project = config.project()?; } - + /* let compiler = ProjectCompiler::default(); - /*let output_old = if config.sparse_mode { + let output_old = if config.sparse_mode { compiler.compile_sparse(&project, filter.clone()) } else if self.opts.silent { compile::suppress_compile(&project) } else { compiler.compile(&project) - }?;*/ + }?; + + println!("original artifacts"); + + for (k, v) in output_old.artifacts() { + println!("Key: {:?} v: {:?}", k, v.deployed_bytecode.is_some()); + }*/ let project_root = project.paths.root.clone(); let zksolc_manager = @@ -190,7 +196,7 @@ impl TestArgs { }; let zksolc = ZkSolc::new(zksolc_opts, project); - let output = zksolc.compile().unwrap(); + let output = zksolc.take_compiled().unwrap(); /*println!("!!! OLD:"); for (k, v) in output_old.cached_artifacts().0.iter() { println!("Key is: {:?}", k); diff --git a/cli/src/cmd/forge/zksolc.rs b/cli/src/cmd/forge/zksolc.rs index 75f3fbc98..388027779 100644 --- a/cli/src/cmd/forge/zksolc.rs +++ b/cli/src/cmd/forge/zksolc.rs @@ -46,7 +46,7 @@ use ethers::{ use semver::Version; use serde_json::Value; use std::{ - collections::{BTreeMap, HashSet}, + collections::{BTreeMap, HashMap, HashSet}, fmt, fs, fs::File, io::{Read, Write}, @@ -65,6 +65,13 @@ pub struct ZkSolcOpts { /// Files that should be compiled with a given solidity version. type SolidityVersionSources = (Version, BTreeMap); +#[derive(serde::Serialize, serde::Deserialize, Debug)] +pub struct PackedEraBytecode { + pub hash: String, + pub bytecode: String, + pub factory_deps: Vec, +} + /// This struct represents the ZkSolc compiler for compiling Solidity contracts. /// /// Key Components: @@ -226,7 +233,7 @@ impl ZkSolc { let mut displayed_warnings = HashSet::new(); let mut data = BTreeMap::new(); // Step 1: Collect Source Files - /*self.configure_solc(); + self.configure_solc(); let sources = self.sources.clone().unwrap(); // Step 2: Compile Contracts for Each Source @@ -245,7 +252,7 @@ impl ZkSolc { continue; } - let output = if false { + let output = if true { // Step 3: Parse JSON Input for each Source if let Err(err) = self.parse_json_input(contract_path.clone()) { eprintln!("Failed to parse json input for zksolc compiler: {}", err); @@ -305,14 +312,30 @@ impl ZkSolc { .expect("Failed to get Contract filename."); // Step 6: Handle Output (Errors and Warnings) - let foo = self.handle_output(output, filename.to_string(), &mut displayed_warnings); + let foo = + self.handle_output(output, filename.to_string(), &mut displayed_warnings, true); data.insert(filename.to_string(), foo); } } - */ + + //let filename = "Counter.sol"; + //let foo = self.handle_output(None, filename.to_string(), &mut displayed_warnings); + //data.insert(filename.to_string(), foo); + + result.compiled_artifacts = Artifacts { 0: data }; + + // Step 7: Return Ok if the compilation process completes without errors + Ok(result) + } + + pub fn take_compiled(&self) -> Result { + let mut result = ProjectCompileOutput::default(); + let mut displayed_warnings = HashSet::new(); + let mut data = BTreeMap::new(); + // Step 1: Collect Source Files let filename = "Counter.sol"; - let foo = self.handle_output(None, filename.to_string(), &mut displayed_warnings); + let foo = self.handle_output(None, filename.to_string(), &mut displayed_warnings, false); data.insert(filename.to_string(), foo); result.compiled_artifacts = Artifacts { 0: data }; @@ -412,13 +435,14 @@ impl ZkSolc { output: Option, source: String, displayed_warnings: &mut HashSet, + write_artifacts: bool, ) -> BTreeMap>> { // Deserialize the compiler output into a serde_json::Value object let output_json: Value = if let Some(output) = output { serde_json::from_slice(&output.clone().stdout) .unwrap_or_else(|e| panic!("Could not parse zksolc compiler output: {}", e)) } else { - let mut file = File::open("/media/cyfra/ssd_storage/matter-public/example-foundry/hello_foundry/zkout/Counter.sol/artifacts.json").expect("Failed to open file"); + let mut file = File::open("/ssd_storage/matter-public/example-foundry/hello_foundry/zkout/Counter.sol/artifacts.json").expect("Failed to open file"); let mut json_data = String::new(); file.read_to_string(&mut json_data).expect("Failed to read from file"); @@ -426,17 +450,26 @@ impl ZkSolc { }; // Handle errors and warnings in the output - //self.handle_output_errors(&output_json, displayed_warnings); + self.handle_output_errors(&output_json, displayed_warnings); - // Create the artifacts file for saving the compiler output - /*let mut artifacts_file = self - .build_artifacts_file(source.clone()) - .unwrap_or_else(|e| panic!("Error configuring solc compiler: {}", e));*/ + let output_obj = output_json["contracts"].as_object().unwrap(); + + // First - let's get all the bytecodes. + let mut all_bytecodes: HashMap = Default::default(); + for (_source_file_name, source_file_results) in output_obj { + for (_contract_name, contract_results) in source_file_results.as_object().unwrap() { + if (!contract_results["hash"].is_null()) { + all_bytecodes.insert( + contract_results["hash"].as_str().unwrap().to_owned(), + contract_results["evm"]["bytecode"]["object"].as_str().unwrap().to_owned(), + ); + } + } + } let mut result = BTreeMap::new(); // Get the bytecode hashes for each contract in the output - let output_obj = output_json["contracts"].as_object().unwrap(); for key in output_obj.keys() { if key.contains(&source) { let b_code = output_obj[key].clone(); @@ -446,13 +479,33 @@ impl ZkSolc { if let Some(bcode_hash) = b_code_obj[hash]["hash"].as_str() { println!("{} -> Bytecode Hash: {} ", hash, bcode_hash); } + let bcode_hash = b_code_obj[hash]["hash"].as_str().unwrap(); + let contract_bytecode = + b_code_obj[hash]["evm"]["bytecode"]["object"].as_str().unwrap().to_owned(); + + let factory_deps: Vec = b_code_obj[hash]["factoryDependencies"] + .as_object() + .unwrap() + .keys() + .map(|factory_hash| all_bytecodes.get(factory_hash).unwrap()) + .cloned() + .collect(); + + let packed_bytecode = PackedEraBytecode { + hash: bcode_hash.to_owned(), + bytecode: contract_bytecode, + factory_deps, + }; + + let serde_bytecode = serde_json::to_vec(&packed_bytecode).unwrap(); + /*let serde_bytecode: String = + serde_bytecode.as_bytes().iter().map(|b| format!("{:02x}", b)).collect();*/ + let mut art = ConfigurableContractArtifact::default(); art.bytecode = Some(CompactBytecode { object: ethers::solc::artifacts::BytecodeObject::Bytecode( - Bytes::from_str( - b_code_obj[hash]["evm"]["bytecode"]["object"].as_str().unwrap(), - ) - .unwrap(), + // Bytes::from_str(serde_bytecode.as_str()).unwrap(), + Bytes::from(serde_bytecode.clone()), ), source_map: None, link_references: Default::default(), @@ -461,12 +514,9 @@ impl ZkSolc { // FIXME: incorrect art.deployed_bytecode = Some(CompactDeployedBytecode { bytecode: Some(CompactBytecode { - object: ethers::solc::artifacts::BytecodeObject::Bytecode( - Bytes::from_str( - b_code_obj[hash]["evm"]["bytecode"]["object"].as_str().unwrap(), - ) - .unwrap(), - ), + object: ethers::solc::artifacts::BytecodeObject::Bytecode(Bytes::from( + serde_bytecode, + )), source_map: None, link_references: Default::default(), }), @@ -488,22 +538,21 @@ impl ZkSolc { } } } + if write_artifacts { + // Beautify the output JSON + let output_json_pretty = serde_json::to_string_pretty(&output_json) + .unwrap_or_else(|e| panic!("Could not beautify zksolc compiler output: {}", e)); + + // Create the artifacts file for saving the compiler output + let mut artifacts_file = self + .build_artifacts_file(source.clone()) + .unwrap_or_else(|e| panic!("Error configuring solc compiler: {}", e)); + // Write the beautified output JSON to the artifacts file + artifacts_file + .write_all(output_json_pretty.as_bytes()) + .unwrap_or_else(|e| panic!("Could not write artifacts file: {}", e)); + } - // Beautify the output JSON - /*let output_json_pretty = serde_json::to_string_pretty(&output_json) - .unwrap_or_else(|e| panic!("Could not beautify zksolc compiler output: {}", e)); - - // Write the beautified output JSON to the artifacts file - artifacts_file - .write_all(output_json_pretty.as_bytes()) - .unwrap_or_else(|e| panic!("Could not write artifacts file: {}", e));*/ - - /* let result = CompilerOutput { - errors: vec![], - // TODO: fixme: sourceFile id. - sources: BTreeMap::from([(source, SourceFile { id: 0, ast: None })]), - contracts: BTreeMap::from([(source, BTreeMap::from[()])]), - };*/ result } diff --git a/evm/src/executor/backend/mod.rs b/evm/src/executor/backend/mod.rs index f96559437..06646df43 100644 --- a/evm/src/executor/backend/mod.rs +++ b/evm/src/executor/backend/mod.rs @@ -28,6 +28,7 @@ use revm::{ }; use std::{ collections::{HashMap, HashSet}, + ops::AddAssign, sync::{ atomic::{AtomicBool, Ordering}, Arc, @@ -753,6 +754,9 @@ impl Backend { self.initialize(env); let result: EVMResult = revm_era::run_era_transaction(env, self, inspector); + // FIXME: we should read it from the database (and before execution). + env.block.number.add_assign(rU256::from(1)); + env.block.timestamp.add_assign(rU256::from(1)); Ok(result.unwrap()) diff --git a/forge/src/multi_runner.rs b/forge/src/multi_runner.rs index b73af7bf9..66fae2f04 100644 --- a/forge/src/multi_runner.rs +++ b/forge/src/multi_runner.rs @@ -303,6 +303,7 @@ impl MultiContractRunnerBuilder { ( abi.clone(), bytecode, + // FIXME: add the dependencies from the artifact (somehow)... dependencies.into_iter().map(|dep| dep.bytecode).collect::>(), ), ); From 3e1164b85ea392de9ab16baf77305521be8f101d Mon Sep 17 00:00:00 2001 From: mm-zk Date: Mon, 4 Sep 2023 14:20:53 +0200 Subject: [PATCH 03/13] getting ready for REVM --- Cargo.lock | 1028 +++++++++++++++++++------------ Cargo.toml | 4 +- anvil/core/Cargo.toml | 2 +- chisel/Cargo.toml | 3 +- cli/src/cast.rs | 2 +- cli/src/cmd/forge/install.rs | 22 +- cli/src/cmd/forge/zksolc.rs | 7 +- common/src/term.rs | 4 +- evm/Cargo.toml | 6 +- evm/src/executor/backend/mod.rs | 3 +- evm/src/executor/mod.rs | 2 +- ui/Cargo.toml | 2 +- 12 files changed, 663 insertions(+), 422 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ebe16db45..20a1162ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -68,7 +68,7 @@ dependencies = [ "http", "httparse", "httpdate", - "itoa 1.0.9", + "itoa", "language-tags", "local-channel", "mime", @@ -89,8 +89,8 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -181,7 +181,7 @@ dependencies = [ "futures-core", "futures-util", "http", - "itoa 1.0.9", + "itoa", "language-tags", "log", "mime", @@ -193,7 +193,7 @@ dependencies = [ "serde_urlencoded", "smallvec 1.11.0", "socket2 0.4.9", - "time 0.3.25", + "time 0.3.26", "url", ] @@ -205,7 +205,7 @@ checksum = "2262160a7ae29e3415554a3f1fc04c764b1540c116aa524683208078b7a75bc9" dependencies = [ "actix-router", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -314,9 +314,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8f9420f797f2d9e935edf629310eb938a0d839f984e25327f3c7eed22300c" +checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" dependencies = [ "memchr", ] @@ -448,10 +448,10 @@ dependencies = [ "anvil-server", "async-trait", "auto_impl", - "axum", + "axum 0.5.17", "bytes 1.4.0", "chrono", - "clap 4.3.21", + "clap 4.3.23", "clap_complete", "clap_complete_fig", "crc 3.0.1", @@ -519,9 +519,9 @@ version = "0.1.0" dependencies = [ "anvil-rpc", "async-trait", - "axum", + "axum 0.5.17", "bytes 1.4.0", - "clap 4.3.21", + "clap 4.3.23", "futures 0.3.28", "hyper", "parity-tokio-ipc", @@ -537,9 +537,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.72" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "ariadne" @@ -595,7 +595,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" dependencies = [ - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -605,7 +605,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -617,7 +617,7 @@ checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" dependencies = [ "num-bigint 0.4.3", "num-traits", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -630,7 +630,7 @@ dependencies = [ "num-bigint 0.4.3", "num-traits", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -692,7 +692,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0609c78bd572f4edc74310dfb63a01f5609d53fa8b4dd7c4d98aef3b3e8d72d1" dependencies = [ "proc-macro-hack", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -741,12 +741,6 @@ dependencies = [ "term", ] -[[package]] -name = "assert_matches" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" - [[package]] name = "async-compression" version = "0.4.1" @@ -788,8 +782,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -810,19 +804,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] name = "async-trait" -version = "0.1.72" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -876,7 +870,7 @@ checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" dependencies = [ "proc-macro-error", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -902,7 +896,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acee9fd5073ab6b045a275b3e709c163dd36c90685219cb21804a147b58dba43" dependencies = [ "async-trait", - "axum-core", + "axum-core 0.2.9", "base64 0.13.1", "bitflags 1.3.2", "bytes 1.4.0", @@ -910,8 +904,8 @@ dependencies = [ "http", "http-body", "hyper", - "itoa 1.0.9", - "matchit", + "itoa", + "matchit 0.5.0", "memchr", "mime", "percent-encoding", @@ -929,6 +923,37 @@ dependencies = [ "tower-service", ] +[[package]] +name = "axum" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core 0.3.4", + "bitflags 1.3.2", + "bytes 1.4.0", + "futures-util", + "http", + "http-body", + "hyper", + "itoa", + "matchit 0.7.2", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "sync_wrapper", + "tokio", + "tower", + "tower-layer", + "tower-service", +] + [[package]] name = "axum-core" version = "0.2.9" @@ -945,6 +970,23 @@ dependencies = [ "tower-service", ] +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes 1.4.0", + "futures-util", + "http", + "http-body", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + [[package]] name = "backon" version = "0.4.1" @@ -1042,9 +1084,9 @@ dependencies = [ [[package]] name = "bigdecimal" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc403c26e6b03005522e6e8053384c4e881dfe5b2bf041c0c2c49be33d64a539" +checksum = "d1e50562e37200edf7c6c43e54a08e64a5553bfb59d9c297d5572512aa517256" dependencies = [ "num-bigint 0.3.3", "num-integer", @@ -1075,11 +1117,11 @@ dependencies = [ "peeking_take_while", "prettyplease", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "regex", "rustc-hash", "shlex", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -1108,9 +1150,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "bitvec" @@ -1493,9 +1535,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", "libc", @@ -1527,7 +1569,7 @@ name = "chisel" version = "0.1.0" dependencies = [ "bytes 1.4.0", - "clap 4.3.21", + "clap 4.3.23", "criterion", "dirs 5.0.1", "ethers 2.0.8", @@ -1550,7 +1592,7 @@ dependencies = [ "serial_test", "solang-parser", "strum 0.25.0", - "time 0.3.25", + "time 0.3.26", "tokio", "vergen", "yansi 0.5.1", @@ -1667,9 +1709,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.21" +version = "4.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd" +checksum = "03aef18ddf7d879c15ce20f04826ef8418101c7e528014c3eeea13321047dca3" dependencies = [ "clap_builder", "clap_derive", @@ -1678,9 +1720,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.21" +version = "4.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa" +checksum = "f8ce6fffb678c9b80a70b6b6de0aad31df727623a70fd9a842c30cd573e2fa98" dependencies = [ "anstream", "anstyle", @@ -1698,7 +1740,7 @@ version = "4.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fc443334c81a804575546c5a8a79b4913b50e28d69232903604cada1de817ce" dependencies = [ - "clap 4.3.21", + "clap 4.3.23", ] [[package]] @@ -1707,7 +1749,7 @@ version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99fee1d30a51305a6c2ed3fc5709be3c8af626c9c958e04dd9ae94e27bcbce9f" dependencies = [ - "clap 4.3.21", + "clap 4.3.23", "clap_complete", ] @@ -1719,8 +1761,8 @@ checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ "heck 0.4.1", "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -1969,6 +2011,18 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "const-hex" +version = "1.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca268df6cd88e646b564e6aff1a016834e5f42077c736ef6b6789c31ef9ec5dc" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "hex", + "serde", +] + [[package]] name = "const-oid" version = "0.7.1" @@ -2009,7 +2063,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "percent-encoding", - "time 0.3.25", + "time 0.3.26", "version_check", ] @@ -2391,7 +2445,7 @@ source = "git+https://github.com/matter-labs/era-sync_vm.git?branch=v1.3.3#22d9d dependencies = [ "proc-macro-error", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "serde", "syn 1.0.109", ] @@ -2471,7 +2525,7 @@ dependencies = [ "fnv", "ident_case", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "strsim 0.10.0", "syn 1.0.109", ] @@ -2483,15 +2537,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] [[package]] name = "dashmap" -version = "5.5.0" +version = "5.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" +checksum = "edd72493923899c6f10c641bdbdeddc7183d6396641d99c1a0d1597f37f92e28" dependencies = [ "cfg-if 1.0.0", "hashbrown 0.14.0", @@ -2549,9 +2603,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" dependencies = [ "serde", ] @@ -2563,7 +2617,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -2575,7 +2629,7 @@ checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case 0.4.0", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "rustc_version 0.4.0", "syn 1.0.109", ] @@ -2626,15 +2680,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "dirs" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" -dependencies = [ - "dirs-sys 0.3.7", -] - [[package]] name = "dirs" version = "4.0.0" @@ -2875,8 +2920,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b893c4eb2dc092c811165f84dc7447fae16fb66521717968c34c509b39b1a5c5" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -2922,11 +2967,11 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "era_test_node" -version = "1.0.3" +version = "0.1.0" dependencies = [ "anyhow", "bigdecimal", - "clap 4.3.21", + "clap 4.3.23", "colored", "ethabi 16.0.0", "eyre", @@ -3177,13 +3222,12 @@ dependencies = [ name = "ethers-contract" version = "2.0.8" dependencies = [ + "const-hex", "ethers-contract-abigen 2.0.8", "ethers-contract-derive 2.0.8", "ethers-core 2.0.8", "ethers-providers 2.0.8", - "ethers-signers 2.0.8", "futures-util", - "hex", "once_cell", "pin-project", "serde", @@ -3216,19 +3260,19 @@ name = "ethers-contract-abigen" version = "2.0.8" dependencies = [ "Inflector", + "const-hex", "dunce", "ethers-core 2.0.8", "ethers-etherscan 2.0.8", "eyre", - "hex", "prettyplease", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "regex", "reqwest", "serde", "serde_json", - "syn 2.0.28", + "syn 2.0.29", "toml 0.7.6", "walkdir", ] @@ -3247,12 +3291,12 @@ dependencies = [ "hex", "prettyplease", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "regex", "reqwest", "serde", "serde_json", - "syn 2.0.28", + "syn 2.0.29", "toml 0.7.6", "walkdir", ] @@ -3262,13 +3306,13 @@ name = "ethers-contract-derive" version = "2.0.8" dependencies = [ "Inflector", + "const-hex", "ethers-contract-abigen 2.0.8", "ethers-core 2.0.8", - "hex", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "serde_json", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -3282,9 +3326,9 @@ dependencies = [ "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "hex", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "serde_json", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -3295,12 +3339,12 @@ dependencies = [ "bytes 1.4.0", "cargo_metadata 0.17.0", "chrono", + "const-hex", "elliptic-curve 0.13.5", "ethabi 18.0.0", "generic-array 0.14.7", - "hex", "k256 0.13.1", - "num_enum", + "num_enum 0.7.0", "once_cell", "open-fastrlp", "rand 0.8.5", @@ -3308,7 +3352,7 @@ dependencies = [ "serde", "serde_json", "strum 0.25.0", - "syn 2.0.28", + "syn 2.0.29", "tempfile", "thiserror", "tiny-keccak 2.0.2", @@ -3330,7 +3374,7 @@ dependencies = [ "generic-array 0.14.7", "hex", "k256 0.13.1", - "num_enum", + "num_enum 0.6.1", "once_cell", "open-fastrlp", "rand 0.8.5", @@ -3338,7 +3382,7 @@ dependencies = [ "serde", "serde_json", "strum 0.25.0", - "syn 2.0.28", + "syn 2.0.29", "tempfile", "thiserror", "tiny-keccak 2.0.2", @@ -3434,6 +3478,7 @@ dependencies = [ "auto_impl", "base64 0.21.2", "bytes 1.4.0", + "const-hex", "enr 0.9.0", "ethers-core 2.0.8", "futures-channel", @@ -3441,7 +3486,6 @@ dependencies = [ "futures-timer", "futures-util", "hashers", - "hex", "http", "instant", "jsonwebtoken", @@ -3507,12 +3551,12 @@ dependencies = [ "coins-bip32", "coins-bip39", "coins-ledger", + "const-hex", "elliptic-curve 0.13.5", "eth-keystore", "ethers-core 2.0.8", "futures-executor", "futures-util", - "hex", "home", "rand 0.8.5", "rusoto_core", @@ -3549,13 +3593,13 @@ name = "ethers-solc" version = "2.0.8" dependencies = [ "cfg-if 1.0.0", + "const-hex", "dirs 5.0.1", "dunce", "ethers-core 2.0.8", "fs_extra", "futures-util", "glob", - "hex", "home", "md-5 0.10.5", "num_cpus", @@ -3678,8 +3722,8 @@ checksum = "b4caf31122bfc780557fdcd80897e95f12cc4d7217f8ac6b9d150df828a38ee8" dependencies = [ "bytes 1.4.0", "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -3745,7 +3789,7 @@ dependencies = [ "num-integer", "num-traits", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "serde", "syn 1.0.109", ] @@ -3822,9 +3866,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "miniz_oxide", @@ -3884,7 +3928,7 @@ name = "forge-doc" version = "0.1.0" dependencies = [ "auto_impl", - "clap 4.3.21", + "clap 4.3.23", "derive_more", "ethers-core 2.0.8", "ethers-solc 2.0.8", @@ -3944,7 +3988,7 @@ dependencies = [ "ethers-providers 2.0.8", "eyre", "foundry-macros", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -3972,7 +4016,7 @@ dependencies = [ "async-trait", "bytes 1.4.0", "cast 0.2.0", - "clap 4.3.21", + "clap 4.3.23", "clap_complete", "clap_complete_fig", "color-eyre", @@ -4058,7 +4102,7 @@ name = "foundry-common" version = "0.1.0" dependencies = [ "auto_impl", - "clap 4.3.21", + "clap 4.3.23", "comfy-table", "dunce", "ethers-core 2.0.8", @@ -4167,8 +4211,8 @@ name = "foundry-macros-impl" version = "0.0.0" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -4382,8 +4426,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -4508,7 +4552,7 @@ dependencies = [ "bstr", "btoi", "gix-date", - "itoa 1.0.9", + "itoa", "nom", "thiserror", ] @@ -4541,7 +4585,7 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e874f41437441c02991dcea76990b9058fadfc54b02ab4dd06ab2218af43897" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "bstr", "gix-path", "libc", @@ -4555,9 +4599,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc164145670e9130a60a21670d9b6f0f4f8de04e5dd256c51fa5a0340c625902" dependencies = [ "bstr", - "itoa 1.0.9", + "itoa", "thiserror", - "time 0.3.25", + "time 0.3.26", ] [[package]] @@ -4587,7 +4631,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c07c98204529ac3f24b34754540a852593d2a4c7349008df389240266627a72a" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "bstr", "gix-features", "gix-path", @@ -4627,7 +4671,7 @@ dependencies = [ "gix-hash", "gix-validate", "hex", - "itoa 1.0.9", + "itoa", "nom", "smallvec 1.11.0", "thiserror", @@ -4672,7 +4716,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9615cbd6b456898aeb942cd75e5810c382fbfc48dbbff2fa23ebd2d33dcbe9c7" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "gix-path", "libc", "windows", @@ -4737,14 +4781,15 @@ dependencies = [ [[package]] name = "gloo-net" -version = "0.2.6" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9902a044653b26b99f7e3693a42f171312d9be8b26b5697bd1e43ad1f8a35e10" +checksum = "a66b4e3c7d9ed8d315fd6b97c8b1f74a7c6ecbbc2320e65ae7ed38b7068cc620" dependencies = [ "futures-channel", "futures-core", "futures-sink", "gloo-utils", + "http", "js-sys", "pin-project", "serde", @@ -4796,7 +4841,7 @@ dependencies = [ "serde", "serde_json", "thiserror", - "time 0.3.25", + "time 0.3.26", "tokio", "tracing", "urlencoding", @@ -4837,7 +4882,7 @@ dependencies = [ "serde_json", "sha2 0.10.6", "thiserror", - "time 0.3.25", + "time 0.3.26", "tokio", "tracing", "url", @@ -4893,9 +4938,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes 1.4.0", "fnv", @@ -5046,6 +5091,9 @@ name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +dependencies = [ + "unicode-segmentation", +] [[package]] name = "hermit-abi" @@ -5089,6 +5137,15 @@ dependencies = [ "rusb", ] +[[package]] +name = "hkdf" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +dependencies = [ + "hmac 0.12.1", +] + [[package]] name = "hmac" version = "0.10.1" @@ -5148,7 +5205,7 @@ dependencies = [ "mac", "markup5ever", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -5160,7 +5217,7 @@ checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes 1.4.0", "fnv", - "itoa 1.0.9", + "itoa", ] [[package]] @@ -5188,9 +5245,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -5213,7 +5270,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.9", + "itoa", "pin-project-lite", "socket2 0.4.9", "tokio", @@ -5307,17 +5364,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.4.0" @@ -5415,7 +5461,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -5564,12 +5610,6 @@ dependencies = [ "either", ] -[[package]] -name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - [[package]] name = "itoa" version = "1.0.9" @@ -5664,7 +5704,7 @@ source = "git+https://github.com/matter-labs/jsonrpc.git?branch=master#12c53e3e2 dependencies = [ "proc-macro-crate 0.1.5", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -5730,9 +5770,9 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.18.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1822d18e4384a5e79d94dc9e4d1239cfa9fad24e55b44d2efeff5b394c9fece4" +checksum = "e5f3783308bddc49d0218307f66a09330c106fbd792c58bac5c8dc294fdd0f98" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", @@ -5747,9 +5787,9 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.18.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11aa5766d5c430b89cb26a99b88f3245eb91534be8126102cea9e45ee3891b22" +checksum = "abc5630e4fa0096f00ec7b44d520701fda4504170cb85e22dca603ae5d7ad0d7" dependencies = [ "futures-channel", "futures-util", @@ -5764,14 +5804,14 @@ dependencies = [ "tokio-rustls 0.24.1", "tokio-util 0.7.8", "tracing", - "webpki-roots 0.23.1", + "webpki-roots 0.24.0", ] [[package]] name = "jsonrpsee-core" -version = "0.18.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c6832a55f662b5a6ecc844db24b8b9c387453f923de863062c60ce33d62b81" +checksum = "5aaa4c4d5fb801dcc316d81f76422db259809037a86b3194ae538dd026b05ed7" dependencies = [ "anyhow", "async-lock", @@ -5797,9 +5837,9 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.18.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1705c65069729e3dccff6fd91ee431d5d31cabcf00ce68a62a2c6435ac713af9" +checksum = "aa7165efcbfbc951d180162ff28fe91b657ed81925e37a35e4a396ce12109f96" dependencies = [ "async-trait", "hyper", @@ -5816,22 +5856,22 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.18.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6027ac0b197ce9543097d02a290f550ce1d9432bf301524b013053c0b75cc94" +checksum = "21dc12b1d4f16a86e8c522823c4fab219c88c03eb7c924ec0501a64bf12e058b" dependencies = [ "heck 0.4.1", "proc-macro-crate 1.3.1", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] [[package]] name = "jsonrpsee-server" -version = "0.18.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f06661d1a6b6e5b85469dc9c29acfbb9b3bb613797a6fd10a3ebb8a70754057" +checksum = "6e79d78cfd5abd8394da10753723093c3ff64391602941c9c4b1d80a3414fd53" dependencies = [ "futures-util", "hyper", @@ -5849,9 +5889,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.18.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5bf6c75ce2a4217421154adfc65a24d2b46e77286e59bba5d9fa6544ccc8f4" +checksum = "00aa7cc87bc42e04e26c8ac3e7186142f7fd2949c763d9b6a7e64a69672d8fb2" dependencies = [ "anyhow", "beef", @@ -5863,9 +5903,9 @@ dependencies = [ [[package]] name = "jsonrpsee-wasm-client" -version = "0.18.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34e6ea7c6d862e60f8baebd946c037b70c6808a4e4e31e792a4029184e3ce13a" +checksum = "0fe953c2801356f214d3f4051f786b3d11134512a46763ee8c39a9e3fa2cc1c0" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", @@ -5874,9 +5914,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.18.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64b2589680ba1ad7863f279cd2d5083c1dc0a7c0ea959d22924553050f8ab9f" +checksum = "5c71b2597ec1c958c6d5bc94bb61b44d74eb28e69dc421731ab0035706f13882" dependencies = [ "http", "jsonrpsee-client-transport", @@ -6075,9 +6115,9 @@ dependencies = [ [[package]] name = "librocksdb-sys" -version = "0.6.3+6.28.2" +version = "0.11.0+8.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "184ce2a189a817be2731070775ad053b6804a340fee05c6686d711db27455917" +checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" dependencies = [ "bindgen", "bzip2-sys", @@ -6153,9 +6193,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "mac" @@ -6219,6 +6259,12 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb" +[[package]] +name = "matchit" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed1202b2a6f884ae56f04cff409ab315c5ce26b5e58d7412e484f01fd52f52ef" + [[package]] name = "maybe-uninit" version = "2.0.0" @@ -6254,7 +6300,7 @@ dependencies = [ "ammonia", "anyhow", "chrono", - "clap 4.3.21", + "clap 4.3.23", "clap_complete", "elasticlunr-rs", "env_logger 0.10.0", @@ -6363,7 +6409,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "731f8ecebd9f3a4aa847dfe75455e4757a45da40a7793d2f0b1f9b6ed18b23f3" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -6403,8 +6449,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -6425,9 +6471,9 @@ dependencies = [ [[package]] name = "mini-moka" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "452ebc1428a585e31e637b928b76355ef2fd72d765b2530d72fe475e514cd1eb" +checksum = "23e0b72e7c9042467008b10279fc732326bd605459ae03bda88825909dd19b56" dependencies = [ "crossbeam-channel 0.5.8", "crossbeam-utils 0.8.16", @@ -6514,6 +6560,21 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" +[[package]] +name = "multivm" +version = "0.1.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" +dependencies = [ + "vlog", + "vm", + "vm_m5", + "vm_m6", + "zksync_contracts", + "zksync_state", + "zksync_types", + "zksync_utils", +] + [[package]] name = "native-tls" version = "0.2.11" @@ -6664,7 +6725,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" dependencies = [ "num-bigint 0.4.3", - "num-complex 0.4.3", + "num-complex 0.4.4", "num-integer", "num-iter", "num-rational 0.4.1", @@ -6724,9 +6785,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" dependencies = [ "num-traits", ] @@ -6749,7 +6810,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -6825,7 +6886,16 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.6.1", +] + +[[package]] +name = "num_enum" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70bf6736f74634d299d00086f02986875b3c2d924781a6a2cb6c201e73da0ceb" +dependencies = [ + "num_enum_derive 0.7.0", ] [[package]] @@ -6836,8 +6906,20 @@ checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ea360eafe1022f7cc56cd7b869ed57330fb2453d0c7831d99b74c65d2f5597" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -6909,7 +6991,7 @@ checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" dependencies = [ "bytes 1.4.0", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -6946,8 +7028,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -7038,9 +7120,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ordered-float" -version = "3.7.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc2dbde8f8a79f2102cc474ceb0ad68e3b80b85289ea62389b60e66777e4213" +checksum = "126d3e6f3926bfb0fb24495b4f4da50626f547e54956594748e3d8882a0320b4" dependencies = [ "num-traits", ] @@ -7147,7 +7229,7 @@ checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -7159,7 +7241,7 @@ checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -7265,7 +7347,7 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec 1.11.0", - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -7353,7 +7435,7 @@ checksum = "61a386cd715229d399604b50d1361683fe687066f42d56f54be995bc6868f71c" dependencies = [ "inlinable_string", "pear_codegen", - "yansi 1.0.0-rc", + "yansi 1.0.0-rc.1", ] [[package]] @@ -7364,8 +7446,8 @@ checksum = "da9f0f13dac8069c139e8300a6510e3f4143ecf5259c60b116a9b271b4ca0d54" dependencies = [ "proc-macro2 1.0.66", "proc-macro2-diagnostics", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -7427,8 +7509,8 @@ dependencies = [ "pest", "pest_meta", "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -7444,12 +7526,12 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 1.9.3", + "indexmap 2.0.0", ] [[package]] @@ -7530,8 +7612,8 @@ dependencies = [ "phf_generator 0.11.2", "phf_shared 0.11.2", "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -7568,8 +7650,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -7704,7 +7786,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" dependencies = [ "proc-macro2 1.0.66", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -7761,7 +7843,7 @@ checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", "version_check", ] @@ -7773,7 +7855,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "version_check", ] @@ -7808,10 +7890,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", "version_check", - "yansi 1.0.0-rc", + "yansi 1.0.0-rc.1", ] [[package]] @@ -7828,12 +7910,12 @@ dependencies = [ [[package]] name = "prometheus_exporter" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "metrics", "metrics-exporter-prometheus", "tokio", "vlog", - "zksync_config", ] [[package]] @@ -7895,7 +7977,7 @@ dependencies = [ "anyhow", "itertools", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -7989,9 +8071,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.32" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2 1.0.66", ] @@ -8352,9 +8434,9 @@ checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "20b9b67e2ca7dd9e9f9285b759de30ff538aab981abaaf7bc9bd90b84a0126c3" dependencies = [ "base64 0.21.2", "bytes 1.4.0", @@ -8392,7 +8474,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 0.22.6", + "webpki-roots 0.25.2", "winreg", ] @@ -8419,6 +8501,7 @@ dependencies = [ [[package]] name = "revm" version = "3.3.0" +source = "git+https://github.com/mm-zk/revm.git?branch=release_v25_with_old_sha#a80ff1e182e03a0f86e4427fbe6bc1582dbb411f" dependencies = [ "auto_impl", "revm-interpreter", @@ -8430,6 +8513,7 @@ dependencies = [ [[package]] name = "revm-interpreter" version = "1.1.2" +source = "git+https://github.com/mm-zk/revm.git?branch=release_v25_with_old_sha#a80ff1e182e03a0f86e4427fbe6bc1582dbb411f" dependencies = [ "derive_more", "enumn", @@ -8441,6 +8525,7 @@ dependencies = [ [[package]] name = "revm-precompile" version = "2.0.3" +source = "git+https://github.com/mm-zk/revm.git?branch=release_v25_with_old_sha#a80ff1e182e03a0f86e4427fbe6bc1582dbb411f" dependencies = [ "k256 0.13.1", "num 0.4.1", @@ -8456,6 +8541,7 @@ dependencies = [ [[package]] name = "revm-primitives" version = "1.1.2" +source = "git+https://github.com/mm-zk/revm.git?branch=release_v25_with_old_sha#a80ff1e182e03a0f86e4427fbe6bc1582dbb411f" dependencies = [ "auto_impl", "bitvec 1.0.1", @@ -8479,13 +8565,16 @@ version = "0.1.0" dependencies = [ "era_test_node", "ethabi 18.0.0", + "eyre", "hex", "revm", "serde", "serde_json", - "zk_evm", + "vm", + "zk_evm 1.3.3", "zksync_basic_types", "zksync_types", + "zksync_utils", ] [[package]] @@ -8562,15 +8651,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] [[package]] name = "rocksdb" -version = "0.18.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "620f4129485ff1a7128d184bc687470c21c7951b64779ebc9cfdad3dcd920290" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" dependencies = [ "libc", "librocksdb-sys", @@ -8801,7 +8890,7 @@ version = "0.38.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "errno", "libc", "linux-raw-sys 0.4.5", @@ -8828,7 +8917,7 @@ checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb" dependencies = [ "log", "ring", - "rustls-webpki 0.101.3", + "rustls-webpki 0.101.4", "sct", ] @@ -8855,9 +8944,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.100.1" +version = "0.100.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" dependencies = [ "ring", "untrusted", @@ -8865,9 +8954,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.101.3" +version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261e9e0888cba427c3316e6322805653c9425240b6fd96cee7cb671ab70ab8d0" +checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" dependencies = [ "ring", "untrusted", @@ -8967,7 +9056,7 @@ checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -9068,15 +9157,6 @@ dependencies = [ "secp256k1-sys 0.4.2", ] -[[package]] -name = "secp256k1" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c42e6f1735c5f00f51e43e28d6634141f2bcad10931b2609ddd74a86d751260" -dependencies = [ - "secp256k1-sys 0.4.2", -] - [[package]] name = "secp256k1" version = "0.27.0" @@ -9269,16 +9349,16 @@ dependencies = [ "serde", "serde_json", "thiserror", - "time 0.3.25", + "time 0.3.26", "url", "uuid 1.4.1", ] [[package]] name = "serde" -version = "1.0.183" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" +checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" dependencies = [ "serde_derive", ] @@ -9296,27 +9376,37 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.183" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" +checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] name = "serde_json" -version = "1.0.104" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "indexmap 2.0.0", - "itoa 1.0.9", + "itoa", "ryu", "serde", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" +dependencies = [ + "itoa", + "serde", +] + [[package]] name = "serde_regex" version = "1.1.0" @@ -9343,7 +9433,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.9", + "itoa", "ryu", "serde", ] @@ -9354,6 +9444,7 @@ version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" dependencies = [ + "base64 0.13.1", "serde", "serde_with_macros", ] @@ -9366,7 +9457,7 @@ checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" dependencies = [ "darling", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -9391,8 +9482,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -9580,7 +9671,7 @@ dependencies = [ "num-bigint 0.4.3", "num-traits", "thiserror", - "time 0.3.25", + "time 0.3.26", ] [[package]] @@ -9612,9 +9703,9 @@ checksum = "68a406c1882ed7f29cd5e248c9848a80e7cb6ae0fea82346d2746f2f941c07e1" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg 1.1.0", ] @@ -9748,9 +9839,9 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.5.9" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7911b0031a0247af40095838002999c7a52fba29d9739e93326e71a5a1bc9d43" +checksum = "551873805652ba0d912fec5bbb0f8b4cdd96baf8e2ebf5970e5671092966019b" dependencies = [ "sqlx-core", "sqlx-macros", @@ -9758,9 +9849,9 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.5.9" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aec89bfaca8f7737439bad16d52b07f1ccd0730520d3bf6ae9d069fe4b641fb1" +checksum = "e48c61941ccf5ddcada342cd59e3e5173b007c509e1e8e990dafc830294d9dc5" dependencies = [ "ahash 0.7.6", "atoi", @@ -9771,34 +9862,34 @@ dependencies = [ "bytes 1.4.0", "chrono", "crc 2.1.0", - "crossbeam-channel 0.5.8", "crossbeam-queue 0.3.8", - "crossbeam-utils 0.8.16", - "dirs 3.0.2", + "dirs 4.0.0", "either", + "event-listener", "futures-channel", "futures-core", "futures-intrusive", "futures-util", "hashlink", "hex", - "hmac 0.11.0", + "hkdf", + "hmac 0.12.1", "indexmap 1.9.3", "ipnetwork", - "itoa 0.4.8", + "itoa", "libc", "log", - "md-5 0.9.1", + "md-5 0.10.5", "memchr", "num-bigint 0.3.3", "once_cell", - "parking_lot 0.11.2", + "paste", "percent-encoding", "rand 0.8.5", "serde", "serde_json", - "sha-1 0.9.8", - "sha2 0.9.9", + "sha-1 0.10.1", + "sha2 0.10.6", "smallvec 1.11.0", "sqlformat", "sqlx-rt", @@ -9811,20 +9902,20 @@ dependencies = [ [[package]] name = "sqlx-macros" -version = "0.5.9" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "584866c833511b1a152e87a7ee20dee2739746f60c858b3c5209150bc4b466f5" +checksum = "bc0fba2b0cae21fc00fe6046f8baa4c7fcb49e379f0f592b04696607f69ed2e1" dependencies = [ "dotenv", "either", - "heck 0.3.3", + "heck 0.4.1", "hex", "once_cell", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "serde", "serde_json", - "sha2 0.9.9", + "sha2 0.10.6", "sqlx-core", "sqlx-rt", "syn 1.0.109", @@ -9878,7 +9969,7 @@ dependencies = [ "phf_generator 0.10.0", "phf_shared 0.10.0", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", ] [[package]] @@ -9923,7 +10014,7 @@ dependencies = [ "heck 0.3.3", "proc-macro-error", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -9953,7 +10044,7 @@ checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ "heck 0.4.1", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "rustversion", "syn 1.0.109", ] @@ -9966,9 +10057,9 @@ checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" dependencies = [ "heck 0.4.1", "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "rustversion", - "syn 2.0.28", + "syn 2.0.29", ] [[package]] @@ -10061,18 +10152,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.28" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "unicode-ident", ] @@ -10098,8 +10189,8 @@ dependencies = [ "sha2 0.10.6", "sha3 0.10.6", "smallvec 1.11.0", - "zk_evm", - "zkevm_opcode_defs", + "zk_evm 1.3.3", + "zkevm_opcode_defs 1.3.2", ] [[package]] @@ -10115,7 +10206,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", "unicode-xid 0.2.4", ] @@ -10134,9 +10225,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.7.1" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if 1.0.0", "fastrand 2.0.0", @@ -10206,7 +10297,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9601d162c1d77e62c1ea0bc8116cd1caf143ce3af947536c3c9052a1677fe0c" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -10227,22 +10318,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.44" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.44" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -10255,6 +10346,26 @@ dependencies = [ "once_cell", ] +[[package]] +name = "tikv-jemalloc-sys" +version = "0.5.4+5.3.0-patched" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "tikv-jemallocator" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965fe0c26be5c56c94e38ba547249074803efd52adfb66de62107d95aab3eaca" +dependencies = [ + "libc", + "tikv-jemalloc-sys", +] + [[package]] name = "time" version = "0.1.43" @@ -10267,12 +10378,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" +checksum = "a79d09ac6b08c1ab3906a2f7cc2e81a0e27c7ae89c63812df75e52bef0751e07" dependencies = [ "deranged", - "itoa 1.0.9", + "itoa", "libc", "num_threads", "serde", @@ -10288,9 +10399,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +checksum = "75c65469ed6b3a4809d987a41eb1dc918e9bc1d92211cbad7ae82931846f7451" dependencies = [ "time-core", ] @@ -10340,9 +10451,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.30.0" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3ce25f50619af8b0aec2eb23deebe84249e19e2ddd393a6e16e3300a6dadfd" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ "backtrace", "bytes 1.4.0", @@ -10374,8 +10485,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -10584,7 +10695,7 @@ checksum = "9403f1bafde247186684b230dc6f38b5cd514584e8bec1dd32514be4745fa757" dependencies = [ "proc-macro2 1.0.66", "prost-build", - "quote 1.0.32", + "quote 1.0.33", "syn 1.0.109", ] @@ -10642,7 +10753,7 @@ checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" dependencies = [ "async-compression", "base64 0.21.2", - "bitflags 2.3.3", + "bitflags 2.4.0", "bytes 1.4.0", "futures-core", "futures-util", @@ -10696,8 +10807,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -10780,7 +10891,7 @@ dependencies = [ "sharded-slab", "smallvec 1.11.0", "thread_local", - "time 0.3.25", + "time 0.3.26", "tracing", "tracing-core", "tracing-log", @@ -10983,9 +11094,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", ] @@ -11073,7 +11184,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna", "percent-encoding", "serde", ] @@ -11143,7 +11254,7 @@ dependencies = [ "anyhow", "git2", "rustversion", - "time 0.3.25", + "time 0.3.26", ] [[package]] @@ -11155,6 +11266,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vlog" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "chrono", "opentelemetry", @@ -11170,25 +11282,70 @@ dependencies = [ [[package]] name = "vm" version = "0.1.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "anyhow", - "ethabi 16.0.0", + "ethabi 18.0.0", "hex", "itertools", "metrics", "once_cell", "thiserror", "vlog", - "zk_evm", - "zkevm-assembly", + "zk_evm 1.3.3", + "zkevm-assembly 1.3.2", "zksync_config", "zksync_contracts", - "zksync_eth_signer", "zksync_state", "zksync_types", "zksync_utils", ] +[[package]] +name = "vm_m5" +version = "0.1.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" +dependencies = [ + "hex", + "itertools", + "metrics", + "once_cell", + "thiserror", + "tracing", + "vlog", + "zk_evm 1.3.1", + "zksync_config", + "zksync_contracts", + "zksync_crypto", + "zksync_state", + "zksync_storage", + "zksync_types", + "zksync_utils", +] + +[[package]] +name = "vm_m6" +version = "0.1.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" +dependencies = [ + "hex", + "itertools", + "metrics", + "once_cell", + "thiserror", + "tracing", + "vlog", + "zk_evm 1.3.1", + "zkevm-assembly 1.3.1", + "zksync_config", + "zksync_contracts", + "zksync_crypto", + "zksync_state", + "zksync_storage", + "zksync_types", + "zksync_utils", +] + [[package]] name = "wait-timeout" version = "0.2.0" @@ -11285,8 +11442,8 @@ dependencies = [ "log", "once_cell", "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", "wasm-bindgen-shared", ] @@ -11308,7 +11465,7 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ - "quote 1.0.32", + "quote 1.0.33", "wasm-bindgen-macro-support", ] @@ -11319,8 +11476,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -11333,9 +11490,9 @@ checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasm-streams" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" dependencies = [ "futures-util", "js-sys", @@ -11404,21 +11561,21 @@ dependencies = [ [[package]] name = "web3" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f258e254752d210b84fe117b31f1e3cc9cbf04c0d747eb7f8cf7cf5e370f6d" +checksum = "5388522c899d1e1c96a4c307e3797e0f697ba7c77dd8e0e625ecba9dd0342937" dependencies = [ "arrayvec 0.7.4", - "base64 0.13.1", + "base64 0.21.2", "bytes 1.4.0", "derive_more", - "ethabi 16.0.0", - "ethereum-types 0.12.1", + "ethabi 18.0.0", + "ethereum-types 0.14.1", "futures 0.3.28", "futures-timer", "headers", "hex", - "idna 0.2.3", + "idna", "jsonrpc-core 18.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log", "once_cell", @@ -11426,7 +11583,7 @@ dependencies = [ "pin-project", "reqwest", "rlp", - "secp256k1 0.21.3", + "secp256k1 0.27.0", "serde", "serde_json", "tiny-keccak 2.0.2", @@ -11445,22 +11602,28 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.6" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" dependencies = [ - "webpki", + "rustls-webpki 0.100.2", ] [[package]] name = "webpki-roots" -version = "0.23.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" +checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888" dependencies = [ - "rustls-webpki 0.100.1", + "rustls-webpki 0.101.4", ] +[[package]] +name = "webpki-roots" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" + [[package]] name = "which" version = "4.4.0" @@ -11531,7 +11694,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -11549,7 +11712,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -11569,17 +11732,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -11590,9 +11753,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -11602,9 +11765,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -11614,9 +11777,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -11626,9 +11789,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -11638,9 +11801,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -11650,9 +11813,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -11662,26 +11825,27 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.7" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19f495880723d0999eb3500a9064d8dbcf836460b24c17df80ea7b5794053aac" +checksum = "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi 0.3.9", + "cfg-if 1.0.0", + "windows-sys 0.48.0", ] [[package]] @@ -11742,9 +11906,9 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "yansi" -version = "1.0.0-rc" +version = "1.0.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee746ad3851dd3bc40e4a028ab3b00b99278d929e48957bcb2d111874a7e43e" +checksum = "1367295b8f788d371ce2dbc842c7b709c73ee1364d30351dd300ec2203b12377" [[package]] name = "zeroize" @@ -11762,8 +11926,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 2.0.28", + "quote 1.0.33", + "syn 2.0.29", ] [[package]] @@ -11782,10 +11946,27 @@ dependencies = [ "hmac 0.12.1", "pbkdf2 0.11.0", "sha1", - "time 0.3.25", + "time 0.3.26", "zstd 0.11.2+zstd.1.5.2", ] +[[package]] +name = "zk_evm" +version = "1.3.1" +source = "git+https://github.com/matter-labs/era-zk_evm.git?branch=v1.3.1#877ba31cc1d82316fd924e8d83a9f5f1a77b1b9a" +dependencies = [ + "blake2 0.10.6", + "k256 0.11.6", + "lazy_static", + "num 0.4.1", + "serde", + "serde_json", + "sha2 0.10.6", + "sha3 0.10.6", + "static_assertions", + "zkevm_opcode_defs 1.3.1", +] + [[package]] name = "zk_evm" version = "1.3.3" @@ -11798,7 +11979,7 @@ dependencies = [ "serde_json", "static_assertions", "zk_evm_abstractions", - "zkevm_opcode_defs", + "zkevm_opcode_defs 1.3.2", ] [[package]] @@ -11809,7 +11990,26 @@ dependencies = [ "anyhow", "serde", "static_assertions", - "zkevm_opcode_defs", + "zkevm_opcode_defs 1.3.2", +] + +[[package]] +name = "zkevm-assembly" +version = "1.3.1" +source = "git+https://github.com/matter-labs/era-zkEVM-assembly.git?branch=v1.3.1#dabbb07e84dd886ee90dde2b5dde0acbf9b0123a" +dependencies = [ + "env_logger 0.9.3", + "hex", + "lazy_static", + "log", + "nom", + "num-bigint 0.4.3", + "num-traits", + "sha3 0.10.6", + "smallvec 1.11.0", + "structopt", + "thiserror", + "zkevm_opcode_defs 1.3.1", ] [[package]] @@ -11828,17 +12028,28 @@ dependencies = [ "smallvec 1.11.0", "structopt", "thiserror", - "zkevm_opcode_defs", + "zkevm_opcode_defs 1.3.2", +] + +[[package]] +name = "zkevm_opcode_defs" +version = "1.3.1" +source = "git+https://github.com/matter-labs/era-zkevm_opcode_defs.git?branch=v1.3.1#e33a7cc625bf40c42e41a730005dbc6fe8025279" +dependencies = [ + "bitflags 1.3.2", + "ethereum-types 0.14.1", + "lazy_static", + "sha2 0.10.6", ] [[package]] name = "zkevm_opcode_defs" version = "1.3.2" -source = "git+https://github.com/matter-labs/era-zkevm_opcode_defs.git?branch=v1.3.2#2f69c6975a272e8c31d2d82c136a4ea81df25115" +source = "git+https://github.com/matter-labs/era-zkevm_opcode_defs.git?branch=v1.3.2#2147cca9dce12749149739f6c750f66c2c43a055" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "blake2 0.10.6", - "ethereum-types 0.12.1", + "ethereum-types 0.14.1", "k256 0.11.6", "lazy_static", "sha2 0.10.6", @@ -11868,8 +12079,8 @@ dependencies = [ "sync_vm", "test-log", "tracing", - "zk_evm", - "zkevm-assembly", + "zk_evm 1.3.3", + "zkevm-assembly 1.3.2", ] [[package]] @@ -11878,7 +12089,7 @@ version = "0.1.0" source = "git+https://github.com/lambdaclass/zksync-web3-rs.git?rev=70327ae5413c517bd4d27502507cdd96ee40cd22#70327ae5413c517bd4d27502507cdd96ee40cd22" dependencies = [ "async-trait", - "clap 4.3.21", + "clap 4.3.23", "env_logger 0.10.0", "ethers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "ethers-contract 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -11894,6 +12105,7 @@ dependencies = [ [[package]] name = "zksync_basic_types" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "serde", "web3", @@ -11902,14 +12114,13 @@ dependencies = [ [[package]] name = "zksync_circuit_breaker" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ - "assert_matches", "async-trait", "backon", "convert_case 0.6.0", "futures 0.3.28", "hex", - "serde", "serde_json", "thiserror", "tokio", @@ -11918,13 +12129,12 @@ dependencies = [ "zksync_dal", "zksync_eth_client", "zksync_types", - "zksync_utils", - "zksync_verification_key_generator_and_server", ] [[package]] name = "zksync_config" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "bigdecimal", "envy", @@ -11941,8 +12151,9 @@ dependencies = [ [[package]] name = "zksync_contracts" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ - "ethabi 16.0.0", + "ethabi 18.0.0", "hex", "once_cell", "serde", @@ -11953,21 +12164,22 @@ dependencies = [ [[package]] name = "zksync_core" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "actix-cors", "actix-rt", "actix-web", "anyhow", "async-trait", + "axum 0.6.20", "bigdecimal", "bitflags 1.3.2", "chrono", - "clap 4.3.21", + "clap 4.3.23", "ctrlc", "futures 0.3.28", "governor", "hex", - "hyper", "itertools", "jsonrpc-core 18.0.0 (git+https://github.com/matter-labs/jsonrpc.git?branch=master)", "jsonrpc-core-client", @@ -11976,6 +12188,7 @@ dependencies = [ "jsonrpc-pubsub", "jsonrpc-ws-server", "metrics", + "multivm", "num 0.3.1", "prometheus_exporter", "rand 0.8.5", @@ -11983,6 +12196,7 @@ dependencies = [ "serde", "serde_json", "thiserror", + "tikv-jemallocator", "tokio", "tower", "tower-http 0.4.3", @@ -12013,12 +12227,12 @@ dependencies = [ [[package]] name = "zksync_crypto" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "base64 0.13.1", "blake2 0.10.6", "hex", "once_cell", - "rand 0.4.6", "serde", "sha2 0.9.9", "thiserror", @@ -12028,6 +12242,7 @@ dependencies = [ [[package]] name = "zksync_dal" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "anyhow", "bigdecimal", @@ -12037,6 +12252,7 @@ dependencies = [ "metrics", "num 0.3.1", "once_cell", + "serde", "serde_json", "sqlx", "strum 0.24.1", @@ -12053,13 +12269,13 @@ dependencies = [ [[package]] name = "zksync_eth_client" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "anyhow", "async-trait", "hex", "jsonrpc-core 18.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "metrics", - "parity-crypto", "serde", "thiserror", "tokio", @@ -12073,6 +12289,7 @@ dependencies = [ [[package]] name = "zksync_eth_signer" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "async-trait", "hex", @@ -12080,7 +12297,7 @@ dependencies = [ "parity-crypto", "reqwest", "rlp", - "secp256k1 0.21.3", + "secp256k1 0.27.0", "serde", "serde_derive", "serde_json", @@ -12091,13 +12308,19 @@ dependencies = [ [[package]] name = "zksync_health_check" version = "0.1.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "async-trait", + "futures 0.3.28", + "serde", + "serde_json", + "tokio", ] [[package]] name = "zksync_mempool" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "metrics", "vlog", @@ -12107,6 +12330,7 @@ dependencies = [ [[package]] name = "zksync_merkle_tree" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "leb128", "metrics", @@ -12122,6 +12346,7 @@ dependencies = [ [[package]] name = "zksync_mini_merkle_tree" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "once_cell", "zksync_basic_types", @@ -12131,6 +12356,7 @@ dependencies = [ [[package]] name = "zksync_object_store" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "async-trait", "bincode", @@ -12147,13 +12373,16 @@ dependencies = [ [[package]] name = "zksync_prover_utils" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ + "async-trait", "ctrlc", "futures 0.3.28", "metrics", "regex", "reqwest", "tokio", + "toml_edit 0.14.4", "vlog", "zksync_config", "zksync_utils", @@ -12162,17 +12391,18 @@ dependencies = [ [[package]] name = "zksync_queued_job_processor" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "async-trait", "tokio", "vlog", - "zksync_dal", "zksync_utils", ] [[package]] name = "zksync_state" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "metrics", "mini-moka", @@ -12186,6 +12416,7 @@ dependencies = [ [[package]] name = "zksync_storage" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "metrics", "num_cpus", @@ -12196,13 +12427,15 @@ dependencies = [ [[package]] name = "zksync_types" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ - "bigdecimal", "blake2 0.10.6", "chrono", "codegen 0.1.0", + "ethereum-types 0.12.1", "metrics", "num 0.3.1", + "num_enum 0.6.1", "once_cell", "parity-crypto", "rlp", @@ -12211,8 +12444,7 @@ dependencies = [ "serde_with", "strum 0.24.1", "thiserror", - "zk_evm", - "zkevm-assembly", + "zk_evm 1.3.3", "zkevm_test_harness", "zksync_basic_types", "zksync_config", @@ -12224,6 +12456,7 @@ dependencies = [ [[package]] name = "zksync_utils" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "anyhow", "bigdecimal", @@ -12238,29 +12471,32 @@ dependencies = [ "thiserror", "tokio", "vlog", - "zk_evm", + "zk_evm 1.3.3", "zksync_basic_types", ] [[package]] name = "zksync_verification_key_generator_and_server" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "bincode", "circuit_testing", "ff_ce", "hex", "itertools", + "once_cell", "serde_json", "structopt", - "toml_edit 0.14.4", "vlog", + "zksync_prover_utils", "zksync_types", ] [[package]] name = "zksync_web3_decl" version = "1.0.0" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=a98e454221da7d6ecad9b317cf44b0786e819659#a98e454221da7d6ecad9b317cf44b0786e819659" dependencies = [ "bigdecimal", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 68b29323d..9ce494d28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -88,7 +88,9 @@ ethers-solc = { path = "../ethers-rs/ethers-solc" } [patch.crates-io] # revm = { git = "https://github.com/bluealloy/revm/", branch = "release/v25" } -revm = { path = "../../matter-public/revm/crates/revm", version = "3", default-features = false, features = [ +# revm = { git = "https://github.com/mm-zk/revm.git", branch = "release_v25_with_old_sha" } + +revm = { git = "https://github.com/mm-zk/revm.git", branch = "release_v25_with_old_sha", version = "3", default-features = false, features = [ "std", "serde", "memory_limit", diff --git a/anvil/core/Cargo.toml b/anvil/core/Cargo.toml index 644c2bc2f..4f4d50e9c 100644 --- a/anvil/core/Cargo.toml +++ b/anvil/core/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" # foundry internal foundry-evm = { path = "../../evm" } # revm = { version = "3", default-features = false, features = ["std", "serde", "memory_limit"] } -revm = { path = "../../../../matter-public/revm/crates/revm", version = "3", default-features = false, features = [ +revm = { git = "https://github.com/mm-zk/revm.git", branch = "release_v25_with_old_sha", version = "3", default-features = false, features = [ "std", "serde", "memory_limit", diff --git a/chisel/Cargo.toml b/chisel/Cargo.toml index f817bec20..b492e01ac 100644 --- a/chisel/Cargo.toml +++ b/chisel/Cargo.toml @@ -56,7 +56,8 @@ serde_json = { version = "1", features = ["raw_value"] } semver = "1" bytes = "1" # revm = "3" -revm = { path = "../../../matter-public/revm/crates/revm", version = "3" } + +revm = { git = "https://github.com/mm-zk/revm.git", branch = "release_v25_with_old_sha", version = "3" } eyre = "0.6" dirs = "5" time = { version = "0.3", features = ["formatting"] } diff --git a/cli/src/cast.rs b/cli/src/cast.rs index bd64f98d7..5722ad5ea 100644 --- a/cli/src/cast.rs +++ b/cli/src/cast.rs @@ -350,7 +350,7 @@ async fn main() -> eyre::Result<()> { let provider = utils::get_provider(&config)?; // Can use either --raw or specify raw as a field - let raw = raw || field.as_ref().is_some_and(|f| f == "raw"); + let raw = raw; //|| field.as_ref().is_some_and(|f| f == "raw"); println!("{}", Cast::new(&provider).transaction(tx_hash, field, raw, json).await?) } diff --git a/cli/src/cmd/forge/install.rs b/cli/src/cmd/forge/install.rs index 29b25fbe2..337f2a3ea 100644 --- a/cli/src/cmd/forge/install.rs +++ b/cli/src/cmd/forge/install.rs @@ -276,7 +276,7 @@ impl Installer<'_> { for &prefix in common_prefixes { if let Some(rem) = tag.strip_prefix(prefix) { maybe_semver = rem; - break + break; } } match Version::parse(maybe_semver) { @@ -335,7 +335,7 @@ impl Installer<'_> { if e.to_string().contains("did not match any file(s) known to git") { e = eyre::eyre!("Tag: \"{tag}\" not found for repo \"{url}\"!") } - return Err(e) + return Err(e); } if is_branch { @@ -349,7 +349,7 @@ impl Installer<'_> { fn match_tag(self, tag: &str, path: &Path) -> Result { // only try to match if it looks like a version tag if !DEPENDENCY_VERSION_TAG_REGEX.is_match(tag) { - return Ok(tag.into()) + return Ok(tag.into()); } // generate candidate list by filtering `git tag` output, valid ones are those "starting @@ -367,13 +367,13 @@ impl Installer<'_> { // no match found, fall back to the user-provided tag if candidates.is_empty() { - return Ok(tag.into()) + return Ok(tag.into()); } // have exact match for candidate in candidates.iter() { if candidate == tag { - return Ok(tag.into()) + return Ok(tag.into()); } } @@ -383,7 +383,7 @@ impl Installer<'_> { let input = prompt!( "Found a similar version tag: {matched_tag}, do you want to use this instead? [Y/n] " )?; - return if match_yn(input) { Ok(matched_tag.clone()) } else { Ok(tag.into()) } + return if match_yn(input) { Ok(matched_tag.clone()) } else { Ok(tag.into()) }; } // multiple candidates, ask the user to choose one or skip @@ -406,7 +406,7 @@ impl Installer<'_> { Ok(i) if (1..=n_candidates).contains(&i) => { let c = &candidates[i]; println!("[{i}] {c} selected"); - return Ok(c.clone()) + return Ok(c.clone()); } _ => continue, } @@ -429,13 +429,13 @@ impl Installer<'_> { // no match found, fall back to the user-provided tag if candidates.is_empty() { - return Ok(None) + return Ok(None); } // have exact match for candidate in candidates.iter() { if candidate == tag { - return Ok(Some(tag.to_string())) + return Ok(Some(tag.to_string())); } } @@ -445,7 +445,7 @@ impl Installer<'_> { let input = prompt!( "Found a similar branch: {matched_tag}, do you want to use this instead? [Y/n] " )?; - return if match_yn(input) { Ok(Some(matched_tag.clone())) } else { Ok(None) } + return if match_yn(input) { Ok(Some(matched_tag.clone())) } else { Ok(None) }; } // multiple candidates, ask the user to choose one or skip @@ -465,7 +465,7 @@ impl Installer<'_> { // default selection, return None if input.is_empty() { println!("Canceled branch matching"); - return Ok(None) + return Ok(None); } // match user input, 0 indicates skipping and use original tag diff --git a/cli/src/cmd/forge/zksolc.rs b/cli/src/cmd/forge/zksolc.rs index 388027779..09da2c23b 100644 --- a/cli/src/cmd/forge/zksolc.rs +++ b/cli/src/cmd/forge/zksolc.rs @@ -442,7 +442,10 @@ impl ZkSolc { serde_json::from_slice(&output.clone().stdout) .unwrap_or_else(|e| panic!("Could not parse zksolc compiler output: {}", e)) } else { - let mut file = File::open("/ssd_storage/matter-public/example-foundry/hello_foundry/zkout/Counter.sol/artifacts.json").expect("Failed to open file"); + let mut file = File::open( + "/Users/michalski/public_matter/hello_foundry/zkout/Counter.sol/artifacts.json", + ) + .expect("Failed to open file"); let mut json_data = String::new(); file.read_to_string(&mut json_data).expect("Failed to read from file"); @@ -458,7 +461,7 @@ impl ZkSolc { let mut all_bytecodes: HashMap = Default::default(); for (_source_file_name, source_file_results) in output_obj { for (_contract_name, contract_results) in source_file_results.as_object().unwrap() { - if (!contract_results["hash"].is_null()) { + if !contract_results["hash"].is_null() { all_bytecodes.insert( contract_results["hash"].as_str().unwrap().to_owned(), contract_results["evm"]["bytecode"]["object"].as_str().unwrap().to_owned(), diff --git a/common/src/term.rs b/common/src/term.rs index 8b20006ad..a3230da31 100644 --- a/common/src/term.rs +++ b/common/src/term.rs @@ -68,7 +68,7 @@ impl Spinner { pub fn tick(&mut self) { if self.no_progress { - return + return; } print!( @@ -124,7 +124,7 @@ impl SpinnerReporter { // end with a newline println!(); let _ = ack.send(()); - break + break; } } } diff --git a/evm/Cargo.toml b/evm/Cargo.toml index de4c8e817..ba98d8de4 100644 --- a/evm/Cargo.toml +++ b/evm/Cargo.toml @@ -38,7 +38,7 @@ once_cell = "1" # EVM bytes = "1" hashbrown = { version = "0.13", features = ["serde"] } -revm = { path = "../../../matter-public/revm/crates/revm", version = "3", default-features = false, features = [ +revm = { git = "https://github.com/mm-zk/revm.git", branch = "release_v25_with_old_sha", default-features = false, features = [ "std", "serde", "memory_limit", @@ -47,8 +47,8 @@ revm = { path = "../../../matter-public/revm/crates/revm", version = "3", defaul "optional_no_base_fee" ] } -era_test_node = { path = "../../../matter-public/era-test-node"} -revm_era = { path = "../../../matter-public/revm_era"} +era_test_node = { path = "../../../public_matter/era-test-node"} +revm_era = { path = "../../../public_matter/revm_era"} # Fuzzer proptest = "1" diff --git a/evm/src/executor/backend/mod.rs b/evm/src/executor/backend/mod.rs index 06646df43..9d5d37f10 100644 --- a/evm/src/executor/backend/mod.rs +++ b/evm/src/executor/backend/mod.rs @@ -9,7 +9,6 @@ use crate::{ utils::{b160_to_h160, h160_to_b160, h256_to_b256, ru256_to_u256, u256_to_ru256}, CALLER, TEST_CONTRACT_ADDRESS, }; -use era_test_node::node::InMemoryNode; use ethers::{ prelude::{Block, H160, H256, U256}, types::{Address, BlockNumber, Transaction, U64}, @@ -22,7 +21,7 @@ use revm::{ precompile::{Precompiles, SpecId}, primitives::{ Account, AccountInfo, Bytecode, CreateScheme, EVMResult, Env, Log, ResultAndState, - TransactTo, TxEnv, B160, B256, KECCAK_EMPTY, U256 as rU256, + TransactTo, B160, B256, KECCAK_EMPTY, U256 as rU256, }, Database, DatabaseCommit, Inspector, JournaledState, EVM, }; diff --git a/evm/src/executor/mod.rs b/evm/src/executor/mod.rs index 7a7f0157c..3816c8c9f 100644 --- a/evm/src/executor/mod.rs +++ b/evm/src/executor/mod.rs @@ -57,7 +57,7 @@ use crate::{ error::{DatabaseError, DatabaseResult}, DatabaseExt, }, - inspector::{InspectorStack, DEFAULT_CREATE2_DEPLOYER}, + inspector::InspectorStack, }, }; pub use builder::ExecutorBuilder; diff --git a/ui/Cargo.toml b/ui/Cargo.toml index e1cab46cc..913edacb5 100644 --- a/ui/Cargo.toml +++ b/ui/Cargo.toml @@ -17,7 +17,7 @@ crossterm = "0.26" eyre = "0.6" hex = "0.4" # revm = { version = "3", features = ["std", "serde"] } -revm = { path = "../../../matter-public/revm/crates/revm", version = "3", default-features = false, features = [ +revm = { git = "https://github.com/mm-zk/revm.git", branch = "release_v25_with_old_sha", version = "3", default-features = false, features = [ "std", "serde", "memory_limit", From 2e4a51d745b84c3ee174a150b21d345402a1820c Mon Sep 17 00:00:00 2001 From: mm-zk Date: Tue, 5 Sep 2023 10:11:57 +0200 Subject: [PATCH 04/13] cleanup --- cli/src/cmd/forge/install.rs | 22 +++---- cli/src/cmd/forge/test/filter.rs | 6 +- cli/src/cmd/utils.rs | 6 +- common/src/term.rs | 4 +- evm/src/executor/backend/mod.rs | 11 ++-- forge/src/multi_runner.rs | 108 ++++++++++++++----------------- 6 files changed, 73 insertions(+), 84 deletions(-) diff --git a/cli/src/cmd/forge/install.rs b/cli/src/cmd/forge/install.rs index 337f2a3ea..29b25fbe2 100644 --- a/cli/src/cmd/forge/install.rs +++ b/cli/src/cmd/forge/install.rs @@ -276,7 +276,7 @@ impl Installer<'_> { for &prefix in common_prefixes { if let Some(rem) = tag.strip_prefix(prefix) { maybe_semver = rem; - break; + break } } match Version::parse(maybe_semver) { @@ -335,7 +335,7 @@ impl Installer<'_> { if e.to_string().contains("did not match any file(s) known to git") { e = eyre::eyre!("Tag: \"{tag}\" not found for repo \"{url}\"!") } - return Err(e); + return Err(e) } if is_branch { @@ -349,7 +349,7 @@ impl Installer<'_> { fn match_tag(self, tag: &str, path: &Path) -> Result { // only try to match if it looks like a version tag if !DEPENDENCY_VERSION_TAG_REGEX.is_match(tag) { - return Ok(tag.into()); + return Ok(tag.into()) } // generate candidate list by filtering `git tag` output, valid ones are those "starting @@ -367,13 +367,13 @@ impl Installer<'_> { // no match found, fall back to the user-provided tag if candidates.is_empty() { - return Ok(tag.into()); + return Ok(tag.into()) } // have exact match for candidate in candidates.iter() { if candidate == tag { - return Ok(tag.into()); + return Ok(tag.into()) } } @@ -383,7 +383,7 @@ impl Installer<'_> { let input = prompt!( "Found a similar version tag: {matched_tag}, do you want to use this instead? [Y/n] " )?; - return if match_yn(input) { Ok(matched_tag.clone()) } else { Ok(tag.into()) }; + return if match_yn(input) { Ok(matched_tag.clone()) } else { Ok(tag.into()) } } // multiple candidates, ask the user to choose one or skip @@ -406,7 +406,7 @@ impl Installer<'_> { Ok(i) if (1..=n_candidates).contains(&i) => { let c = &candidates[i]; println!("[{i}] {c} selected"); - return Ok(c.clone()); + return Ok(c.clone()) } _ => continue, } @@ -429,13 +429,13 @@ impl Installer<'_> { // no match found, fall back to the user-provided tag if candidates.is_empty() { - return Ok(None); + return Ok(None) } // have exact match for candidate in candidates.iter() { if candidate == tag { - return Ok(Some(tag.to_string())); + return Ok(Some(tag.to_string())) } } @@ -445,7 +445,7 @@ impl Installer<'_> { let input = prompt!( "Found a similar branch: {matched_tag}, do you want to use this instead? [Y/n] " )?; - return if match_yn(input) { Ok(Some(matched_tag.clone())) } else { Ok(None) }; + return if match_yn(input) { Ok(Some(matched_tag.clone())) } else { Ok(None) } } // multiple candidates, ask the user to choose one or skip @@ -465,7 +465,7 @@ impl Installer<'_> { // default selection, return None if input.is_empty() { println!("Canceled branch matching"); - return Ok(None); + return Ok(None) } // match user input, 0 indicates skipping and use original tag diff --git a/cli/src/cmd/forge/test/filter.rs b/cli/src/cmd/forge/test/filter.rs index 5050bb3b6..455be5a11 100644 --- a/cli/src/cmd/forge/test/filter.rs +++ b/cli/src/cmd/forge/test/filter.rs @@ -9,7 +9,7 @@ use std::{fmt, path::Path}; /// The filter to use during testing. /// /// See also `FileFilter`. -#[derive(Clone, Parser, Default)] +#[derive(Clone, Parser)] #[clap(next_help_heading = "Test filtering")] pub struct FilterArgs { /// Only run test functions matching the specified regex pattern. @@ -90,10 +90,10 @@ impl FileFilter for FilterArgs { fn is_match(&self, file: &Path) -> bool { if let Some(file) = file.as_os_str().to_str() { if let Some(ref glob) = self.path_pattern { - return glob.is_match(file); + return glob.is_match(file) } if let Some(ref glob) = self.path_pattern_inverse { - return !glob.is_match(file); + return !glob.is_match(file) } } file.is_sol_test() diff --git a/cli/src/cmd/utils.rs b/cli/src/cmd/utils.rs index f5c55b08a..6ab7890ee 100644 --- a/cli/src/cmd/utils.rs +++ b/cli/src/cmd/utils.rs @@ -94,7 +94,7 @@ pub fn get_cached_entry_by_name( } if let Some(entry) = cached_entry { - return Ok(entry); + return Ok(entry) } let mut err = format!("could not find artifact: `{name}`"); @@ -166,7 +166,7 @@ macro_rules! update_progress { /// True if the network calculates gas costs differently. pub fn has_different_gas_calc(chain: u64) -> bool { if let ConfigChain::Named(chain) = ConfigChain::from(chain) { - return matches!(chain, Chain::Arbitrum | Chain::ArbitrumTestnet | Chain::ArbitrumGoerli); + return matches!(chain, Chain::Arbitrum | Chain::ArbitrumTestnet | Chain::ArbitrumGoerli) } false } @@ -174,7 +174,7 @@ pub fn has_different_gas_calc(chain: u64) -> bool { /// True if it supports broadcasting in batches. pub fn has_batch_support(chain: u64) -> bool { if let ConfigChain::Named(chain) = ConfigChain::from(chain) { - return !matches!(chain, Chain::Arbitrum | Chain::ArbitrumTestnet | Chain::ArbitrumGoerli); + return !matches!(chain, Chain::Arbitrum | Chain::ArbitrumTestnet | Chain::ArbitrumGoerli) } true } diff --git a/common/src/term.rs b/common/src/term.rs index a3230da31..8b20006ad 100644 --- a/common/src/term.rs +++ b/common/src/term.rs @@ -68,7 +68,7 @@ impl Spinner { pub fn tick(&mut self) { if self.no_progress { - return; + return } print!( @@ -124,7 +124,7 @@ impl SpinnerReporter { // end with a newline println!(); let _ = ack.send(()); - break; + break } } } diff --git a/evm/src/executor/backend/mod.rs b/evm/src/executor/backend/mod.rs index 9d5d37f10..a35d19843 100644 --- a/evm/src/executor/backend/mod.rs +++ b/evm/src/executor/backend/mod.rs @@ -556,9 +556,8 @@ impl Backend { /// Checks if the test contract associated with this backend failed, See /// [Self::is_failed_test_contract] pub fn is_failed(&self) -> bool { - self.has_snapshot_failure() - || self - .test_contract_address() + self.has_snapshot_failure() || + self.test_contract_address() .map(|addr| self.is_failed_test_contract(addr)) .unwrap_or_default() } @@ -599,7 +598,7 @@ impl Backend { .cloned() .unwrap_or_default() .present_value(); - return value.as_le_bytes()[1] != 0; + return value.as_le_bytes()[1] != 0 } false @@ -613,7 +612,7 @@ impl Backend { U256::from_str_radix(GLOBAL_FAILURE_SLOT, 16).expect("This is a bug.").into(); if let Some(account) = current_state.state.get(&h160_to_b160(CHEATCODE_ADDRESS)) { let value = account.storage.get(&index).cloned().unwrap_or_default().present_value(); - return value == revm::primitives::U256::from(1); + return value == revm::primitives::U256::from(1) } false @@ -715,7 +714,7 @@ impl Backend { all_logs.extend(f.journaled_state.logs.clone()) } }); - return all_logs; + return all_logs } logs diff --git a/forge/src/multi_runner.rs b/forge/src/multi_runner.rs index 66fae2f04..72094ac69 100644 --- a/forge/src/multi_runner.rs +++ b/forge/src/multi_runner.rs @@ -15,7 +15,7 @@ use foundry_evm::{ revm, }; use foundry_utils::{PostLinkInput, ResolvedDependency}; -use rayon::{prelude::*, ThreadPoolBuilder}; +use rayon::prelude::*; use revm::primitives::SpecId; use std::{ collections::{BTreeMap, HashSet}, @@ -61,8 +61,8 @@ impl MultiContractRunner { self.contracts .iter() .filter(|(id, _)| { - filter.matches_path(id.source.to_string_lossy()) - && filter.matches_contract(&id.name) + filter.matches_path(id.source.to_string_lossy()) && + filter.matches_contract(&id.name) }) .flat_map(|(_, (abi, _, _))| { abi.functions().filter(|func| filter.matches_test(func.signature())) @@ -75,8 +75,8 @@ impl MultiContractRunner { self.contracts .iter() .filter(|(id, _)| { - filter.matches_path(id.source.to_string_lossy()) - && filter.matches_contract(&id.name) + filter.matches_path(id.source.to_string_lossy()) && + filter.matches_contract(&id.name) }) .flat_map(|(_, (abi, _, _))| abi.functions().map(|func| func.name.clone())) .filter(|sig| sig.is_test()) @@ -91,8 +91,8 @@ impl MultiContractRunner { self.contracts .iter() .filter(|(id, _)| { - filter.matches_path(id.source.to_string_lossy()) - && filter.matches_contract(&id.name) + filter.matches_path(id.source.to_string_lossy()) && + filter.matches_contract(&id.name) }) .filter(|(_, (abi, _, _))| abi.functions().any(|func| filter.matches_test(&func.name))) .map(|(id, (abi, _, _))| { @@ -126,56 +126,48 @@ impl MultiContractRunner { test_options: TestOptions, ) -> BTreeMap { trace!("running all tests"); - let pool = ThreadPoolBuilder::new() - .num_threads(1) // For this example, we use 4 threads. - .build() - .unwrap(); + + // the db backend that serves all the data, each contract gets its own instance let db = Backend::spawn(self.fork.take()).await; + let filter = &filter; - pool.install(|| { - // the db backend that serves all the data, each contract gets its own instance - let filter = &filter; + self.contracts + .par_iter() + .filter(|(id, _)| { + filter.matches_path(id.source.to_string_lossy()) && + filter.matches_contract(&id.name) + }) + .filter(|(_, (abi, _, _))| abi.functions().any(|func| filter.matches_test(&func.name))) + .map_with(stream_result, |stream_result, (id, (abi, deploy_code, libs))| { + let executor = ExecutorBuilder::default() + .with_cheatcodes(self.cheats_config.clone()) + .with_config(self.env.clone()) + .with_spec(self.evm_spec) + .with_gas_limit(self.evm_opts.gas_limit()) + .set_tracing(self.evm_opts.verbosity >= 3) + .set_coverage(self.coverage) + .build(db.clone()); + let identifier = id.identifier(); + trace!(contract=%identifier, "start executing all tests in contract"); - self.contracts - .par_iter() - .filter(|(id, _)| { - filter.matches_path(id.source.to_string_lossy()) - && filter.matches_contract(&id.name) - }) - .filter(|(_, (abi, _, _))| { - abi.functions().any(|func| filter.matches_test(&func.name)) - }) - .map_with(stream_result, |stream_result, (id, (abi, deploy_code, libs))| { - let executor = ExecutorBuilder::default() - .with_cheatcodes(self.cheats_config.clone()) - .with_config(self.env.clone()) - .with_spec(self.evm_spec) - .with_gas_limit(self.evm_opts.gas_limit()) - .set_tracing(self.evm_opts.verbosity >= 3) - .set_coverage(self.coverage) - .build(db.clone()); - let identifier = id.identifier(); - trace!(contract=%identifier, "start executing all tests in contract"); + let result = self.run_tests( + &identifier, + abi, + executor, + deploy_code.clone(), + libs, + filter, + test_options.clone(), + ); + trace!(contract= ?identifier, "executed all tests in contract"); - let result = self.run_tests( - &identifier, - abi, - executor, - deploy_code.clone(), - libs, - filter, - test_options.clone(), - ); - trace!(contract= ?identifier, "executed all tests in contract"); - - if let Some(stream_result) = stream_result { - let _ = stream_result.send((identifier.clone(), result.clone())); - } + if let Some(stream_result) = stream_result { + let _ = stream_result.send((identifier.clone(), result.clone())); + } - (identifier, result) - }) - .collect() - }) + (identifier, result) + }) + .collect() } #[instrument(skip_all, fields(name = %name))] @@ -230,7 +222,7 @@ impl MultiContractRunnerBuilder { pub fn build( self, root: impl AsRef, - output: ProjectCompileOutput, // FIXME: THIS. + output: ProjectCompileOutput, env: revm::primitives::Env, evm_opts: EvmOpts, ) -> Result @@ -258,7 +250,7 @@ impl MultiContractRunnerBuilder { let mut seen = HashSet::new(); for dep in deps { if !seen.insert(dep.id.clone()) { - continue; + continue } filtered.push(dep); } @@ -288,14 +280,13 @@ impl MultiContractRunnerBuilder { if let Some(b) = contract.bytecode.expect("No bytecode").object.into_bytes() { b } else { - return Ok(()); + return Ok(()) }; let abi = contract.abi.expect("We should have an abi by now"); // if it's a test, add it to deployable contracts - if abi.constructor.as_ref().map(|c| c.inputs.is_empty()).unwrap_or(true) - && abi - .functions() + if abi.constructor.as_ref().map(|c| c.inputs.is_empty()).unwrap_or(true) && + abi.functions() .any(|func| func.name.is_test() || func.name.is_invariant_test()) { deployable_contracts.insert( @@ -303,7 +294,6 @@ impl MultiContractRunnerBuilder { ( abi.clone(), bytecode, - // FIXME: add the dependencies from the artifact (somehow)... dependencies.into_iter().map(|dep| dep.bytecode).collect::>(), ), ); From 1f40735cacc4f6dc5f68945081b462c802a49a94 Mon Sep 17 00:00:00 2001 From: mm-zk Date: Wed, 6 Sep 2023 13:12:12 +0200 Subject: [PATCH 05/13] cleanup and added tests --- Cargo.lock | 1 + cli/Cargo.toml | 2 + cli/src/cast.rs | 2 +- cli/src/cmd/forge/test/filter.rs | 6 +- cli/src/cmd/forge/test/mod.rs | 66 +-- cli/src/cmd/forge/testdata/artifacts.json | 478 ++++++++++++++++++++++ cli/src/cmd/forge/zksolc.rs | 224 ++++------ 7 files changed, 575 insertions(+), 204 deletions(-) create mode 100644 cli/src/cmd/forge/testdata/artifacts.json diff --git a/Cargo.lock b/Cargo.lock index 20a1162ab..13cc352f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4051,6 +4051,7 @@ dependencies = [ "rayon", "regex", "reqwest", + "revm_era", "rpassword", "rustc-hex", "semver 1.0.18", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index d72e1f96e..1f5c93fc7 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -85,6 +85,8 @@ pkg-config = "0.3.26" #zksync zksync-web3-rs = {git = "https://github.com/lambdaclass/zksync-web3-rs.git", rev = "70327ae5413c517bd4d27502507cdd96ee40cd22"} +revm_era = { path = "../../revm_era"} + ansi_term = "0.12.1" anyhow = {version = "1.0.70"} diff --git a/cli/src/cast.rs b/cli/src/cast.rs index 5722ad5ea..bd64f98d7 100644 --- a/cli/src/cast.rs +++ b/cli/src/cast.rs @@ -350,7 +350,7 @@ async fn main() -> eyre::Result<()> { let provider = utils::get_provider(&config)?; // Can use either --raw or specify raw as a field - let raw = raw; //|| field.as_ref().is_some_and(|f| f == "raw"); + let raw = raw || field.as_ref().is_some_and(|f| f == "raw"); println!("{}", Cast::new(&provider).transaction(tx_hash, field, raw, json).await?) } diff --git a/cli/src/cmd/forge/test/filter.rs b/cli/src/cmd/forge/test/filter.rs index 455be5a11..5050bb3b6 100644 --- a/cli/src/cmd/forge/test/filter.rs +++ b/cli/src/cmd/forge/test/filter.rs @@ -9,7 +9,7 @@ use std::{fmt, path::Path}; /// The filter to use during testing. /// /// See also `FileFilter`. -#[derive(Clone, Parser)] +#[derive(Clone, Parser, Default)] #[clap(next_help_heading = "Test filtering")] pub struct FilterArgs { /// Only run test functions matching the specified regex pattern. @@ -90,10 +90,10 @@ impl FileFilter for FilterArgs { fn is_match(&self, file: &Path) -> bool { if let Some(file) = file.as_os_str().to_str() { if let Some(ref glob) = self.path_pattern { - return glob.is_match(file) + return glob.is_match(file); } if let Some(ref glob) = self.path_pattern_inverse { - return !glob.is_match(file) + return !glob.is_match(file); } } file.is_sol_test() diff --git a/cli/src/cmd/forge/test/mod.rs b/cli/src/cmd/forge/test/mod.rs index 2b06a2e99..36a48a4ec 100644 --- a/cli/src/cmd/forge/test/mod.rs +++ b/cli/src/cmd/forge/test/mod.rs @@ -6,7 +6,6 @@ use crate::{ debug::DebugArgs, install, watch::WatchArgs, - zk_build::ZkBuildArgs, zksolc::{ZkSolc, ZkSolcOpts}, zksolc_manager::{ZkSolcManagerBuilder, ZkSolcManagerOpts, DEFAULT_ZKSOLC_VERSION}, }, @@ -17,6 +16,7 @@ use crate::{ use cast::fuzz::CounterExample; use clap::Parser; use ethers::{abi::Abi, types::U256}; +use eyre::WrapErr; use forge::{ decode::decode_console_logs, executor::inspector::CheatsConfig, @@ -167,21 +167,7 @@ impl TestArgs { config = self.load_config(); project = config.project()?; } - /* - let compiler = ProjectCompiler::default(); - let output_old = if config.sparse_mode { - compiler.compile_sparse(&project, filter.clone()) - } else if self.opts.silent { - compile::suppress_compile(&project) - } else { - compiler.compile(&project) - }?; - - println!("original artifacts"); - for (k, v) in output_old.artifacts() { - println!("Key: {:?} v: {:?}", k, v.deployed_bytecode.is_some()); - }*/ let project_root = project.paths.root.clone(); let zksolc_manager = @@ -196,42 +182,8 @@ impl TestArgs { }; let zksolc = ZkSolc::new(zksolc_opts, project); - let output = zksolc.take_compiled().unwrap(); - /*println!("!!! OLD:"); - for (k, v) in output_old.cached_artifacts().0.iter() { - println!("Key is: {:?}", k); - for (entry_k, entry_vec) in v.iter() { - println!(" entry: {:?}", entry_k); - for f in entry_vec { - println!(" file: {:?}", f.file); - } - } - }*/ - - println!("!!! NEW:"); - for (k, v) in output.compiled_artifacts.iter() { - println!("Key is: {:?}", k); - for (entry_k, entry_vec) in v.iter() { - println!(" entry: {:?}", entry_k); - for f in entry_vec { - println!(" file: {:?}", f.file); - } - } - } - - // Create test options from general project settings - // and compiler output - - let toml = config.get_config_path(); - let profiles = get_available_profiles(toml)?; - let test_options: TestOptions = Default::default(); - - /*let test_options: TestOptions = TestOptionsBuilder::default() - .fuzz(config.fuzz) - .invariant(config.invariant) - .compile_output(&output) - .profiles(profiles) - .build(&project_root)?;*/ + let output = zksolc.compile().unwrap(); + let test_options = TestOptions::default(); // Determine print verbosity and executor verbosity let verbosity = evm_opts.verbosity; @@ -250,16 +202,8 @@ impl TestArgs { .sender(evm_opts.sender) .with_fork(evm_opts.get_fork(&config, env.clone())) .with_cheats_config(CheatsConfig::new(&config, &evm_opts)) - //.with_test_options(test_options.clone()) .build(&project_root, output, env, evm_opts)?; - println!("{:#?}, <-------> runner fork", runner.fork); - // let (_contract, _bytes, _bytes_v) = - // runner.contracts.clone().into_iter().nth(0).unwrap().1; println!("{:#?}, - // <-------> _contract", _contract); println!("{:#?}, <-------> _bytes", _bytes); - - // zk_evm:: - if self.debug.is_some() { filter.args_mut().test_pattern = self.debug; @@ -646,10 +590,6 @@ async fn test( // Set up test reporter channel let (tx, rx) = channel::<(String, SuiteResult)>(); - //let (tx2, rx2) = channel::<(String, SuiteResult)>(); - - // Run the test. - //runner.test(filter.clone(), Some(tx2), test_options.clone()).await; // Run tests let handle = diff --git a/cli/src/cmd/forge/testdata/artifacts.json b/cli/src/cmd/forge/testdata/artifacts.json new file mode 100644 index 000000000..432613ae1 --- /dev/null +++ b/cli/src/cmd/forge/testdata/artifacts.json @@ -0,0 +1,478 @@ +{ + "contracts": { + "src/Counter.sol": { + "Counter": { + "abi": [ + { + "inputs": [], + "name": "increment", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "number", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "number2", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newNumber", + "type": "uint256" + } + ], + "name": "setNumber", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "newNumber", + "type": "uint16" + } + ], + "name": "setNumber2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": { + "optimizer_settings": "M3B3", + "solc_metadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"increment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"number\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"number2\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newNumber\",\"type\":\"uint256\"}],\"name\":\"setNumber\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"newNumber\",\"type\":\"uint16\"}],\"name\":\"setNumber2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/Counter.sol\":\"Counter\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"src/Counter.sol\":{\"keccak256\":\"0x65cf6ea1544d4b1b06b728a2f18540e47799c27d9cb5afe9cf285a3a862497bf\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://26cc5247e7ac0bf55f9e911a7a9e948796048edf0d8f0e4ae1c38b665bcc93a9\",\"dweb:/ipfs/QmPGCoPjeZsWUTKFJgLkQCTUD7i9TWtNtNhLF7ijC3wadN\"]}},\"version\":1}", + "zk_version": "1.3.11" + }, + "evm": { + "legacyAssembly": null, + "assembly": "\t.text\n\t.file\t\"Counter.sol:Counter\"\n\t.globl\t__entry\n__entry:\n.func_begin0:\n\tptr.add\tr1, r0, stack[@ptr_calldata]\n\tshr.s\t96, r1, r1\n\tand\t@CPI0_0[0], r1, stack[@calldatasize]\n\tadd\t128, r0, r1\n\tst.1\t64, r1\n\tand!\t1, r2, r1\n\tjump.ne\t@.BB0_1\n\tadd\tstack[@calldatasize], r0, r1\n\tsub.s!\t4, r1, r1\n\tjump.lt\t@.BB0_2\n\tptr.add\tstack[@ptr_calldata], r0, r1\n\tld\tr1, r1\n\tshr.s\t224, r1, r1\n\tsub.s!\t@CPI0_2[0], r1, r2\n\tjump.le\t@.BB0_6\n\tsub.s!\t@CPI0_3[0], r1, r2\n\tjump.eq\t@.BB0_18\n\tsub.s!\t@CPI0_4[0], r1, r2\n\tjump.eq\t@.BB0_21\n\tsub.s!\t@CPI0_5[0], r1, r1\n\tjump.ne\t@.BB0_2\n\tcontext.get_context_u128\tr1\n\tsub.s!\t0, r1, r1\n\tjump.ne\t@.BB0_2\n\tsub.s\t4, r0, r1\n\tadd\tstack[@calldatasize], r1, r1\n\tadd\t@CPI0_8[0], r0, r2\n\tsub.s!\t0, r1, r3\n\tadd\t0, r0, r3\n\tadd.lt\tr2, r0, r3\n\tand\t@CPI0_8[0], r1, r1\n\tsub.s!\t0, r1, r4\n\tadd.le\t0, r0, r2\n\tsub.s!\t@CPI0_8[0], r1, r1\n\tadd\tr3, r0, r1\n\tadd.eq\tr2, r0, r1\n\tsub.s!\t0, r1, r1\n\tjump.ne\t@.BB0_2\n\tsload\tr0, r1\n\tsub.s\t1, r0, r2\n\tsub!\tr1, r2, r2\n\tjump.ne\t@.BB0_28\n\tadd\t@CPI0_9[0], r0, r1\n\tst.1\t0, r1\n\tadd\t17, r0, r1\n\tst.1\t4, r1\n\tadd\t@CPI0_10[0], r0, r1\n\tret.revert.to_label\tr1, @DEFAULT_FAR_REVERT\n.BB0_1:\n\tcontext.get_context_u128\tr1\n\tsub.s!\t0, r1, r1\n\tjump.ne\t@.BB0_2\n\tadd\t32, r0, r1\n\tst.2\t256, r1\n\tst.2\t288, r0\n\tadd\t@CPI0_1[0], r0, r1\n\tret.ok.to_label\tr1, @DEFAULT_FAR_RETURN\n.BB0_6:\n\tsub.s!\t@CPI0_6[0], r1, r2\n\tjump.eq\t@.BB0_11\n\tsub.s!\t@CPI0_7[0], r1, r1\n\tjump.ne\t@.BB0_2\n\tcontext.get_context_u128\tr1\n\tsub.s!\t0, r1, r1\n\tjump.ne\t@.BB0_2\n\tsub.s\t4, r0, r1\n\tadd\tstack[@calldatasize], r1, r1\n\tadd\t@CPI0_8[0], r0, r2\n\tsub.s!\t32, r1, r3\n\tadd\t0, r0, r3\n\tadd.lt\tr2, r0, r3\n\tand\t@CPI0_8[0], r1, r1\n\tsub.s!\t0, r1, r4\n\tadd.le\t0, r0, r2\n\tsub.s!\t@CPI0_8[0], r1, r1\n\tadd\tr3, r0, r1\n\tadd.eq\tr2, r0, r1\n\tsub.s!\t0, r1, r1\n\tjump.ne\t@.BB0_2\n\tadd\t4, r0, r1\n\tptr.add\tstack[@ptr_calldata], r1, r1\n\tld\tr1, r1\n\tsstore\tr0, r1\n\tadd\tr0, r0, r1\n\tret.ok.to_label\tr1, @DEFAULT_FAR_RETURN\n.BB0_18:\n\tcontext.get_context_u128\tr1\n\tsub.s!\t0, r1, r1\n\tjump.ne\t@.BB0_2\n\tsub.s\t4, r0, r1\n\tadd\tstack[@calldatasize], r1, r1\n\tadd\t@CPI0_8[0], r0, r2\n\tsub.s!\t0, r1, r3\n\tadd\t0, r0, r3\n\tadd.lt\tr2, r0, r3\n\tand\t@CPI0_8[0], r1, r1\n\tsub.s!\t0, r1, r4\n\tadd.le\t0, r0, r2\n\tsub.s!\t@CPI0_8[0], r1, r1\n\tadd\tr3, r0, r1\n\tadd.eq\tr2, r0, r1\n\tsub.s!\t0, r1, r1\n\tjump.ne\t@.BB0_2\n\tsload\tr0, r1\n\tst.1\t128, r1\n\tadd\t@CPI0_12[0], r0, r1\n\tret.ok.to_label\tr1, @DEFAULT_FAR_RETURN\n.BB0_21:\n\tcontext.get_context_u128\tr1\n\tsub.s!\t0, r1, r1\n\tjump.ne\t@.BB0_2\n\tsub.s\t4, r0, r1\n\tadd\tstack[@calldatasize], r1, r1\n\tadd\t@CPI0_8[0], r0, r2\n\tsub.s!\t0, r1, r3\n\tadd\t0, r0, r3\n\tadd.lt\tr2, r0, r3\n\tand\t@CPI0_8[0], r1, r1\n\tsub.s!\t0, r1, r4\n\tadd.le\t0, r0, r2\n\tsub.s!\t@CPI0_8[0], r1, r1\n\tadd\tr3, r0, r1\n\tadd.eq\tr2, r0, r1\n\tsub.s!\t0, r1, r1\n\tjump.ne\t@.BB0_2\n\tadd\t1, r0, r1\n\tsload\tr1, r1\n\tand\t65535, r1, r1\n\tld.1\t64, r2\n\tst.1\tr2, r1\n\tadd\t@CPI0_0[0], r0, r1\n\tsub.s!\t@CPI0_0[0], r2, r3\n\tadd.lt\tr2, r0, r1\n\tshl.s\t64, r1, r1\n\tor\t@CPI0_11[0], r1, r1\n\tret.ok.to_label\tr1, @DEFAULT_FAR_RETURN\n.BB0_11:\n\tcontext.get_context_u128\tr1\n\tsub.s!\t0, r1, r1\n\tjump.ne\t@.BB0_2\n\tsub.s\t4, r0, r1\n\tadd\tstack[@calldatasize], r1, r1\n\tadd\t@CPI0_8[0], r0, r2\n\tsub.s!\t32, r1, r3\n\tadd\t0, r0, r3\n\tadd.lt\tr2, r0, r3\n\tand\t@CPI0_8[0], r1, r1\n\tsub.s!\t0, r1, r4\n\tadd.le\t0, r0, r2\n\tsub.s!\t@CPI0_8[0], r1, r1\n\tadd\tr3, r0, r1\n\tadd.eq\tr2, r0, r1\n\tsub.s!\t0, r1, r1\n\tjump.ne\t@.BB0_2\n\tadd\t4, r0, r1\n\tptr.add\tstack[@ptr_calldata], r1, r1\n\tld\tr1, r1\n\tsub.s!\t65535, r1, r2\n\tjump.le\t@.BB0_14\n.BB0_2:\n\tadd\tr0, r0, r1\n\tret.revert.to_label\tr1, @DEFAULT_FAR_REVERT\n.BB0_28:\n\tadd\t1, r1, r1\n\tsstore\tr0, r1\n\tadd\tr0, r0, r1\n\tret.ok.to_label\tr1, @DEFAULT_FAR_RETURN\n.BB0_14:\n\tadd\t1, r0, r2\n\tsload\tr2, r3\n\tand\t@CPI0_13[0], r3, r3\n\tor\tr3, r1, r1\n\tsstore\tr2, r1\n\tadd\tr0, r0, r1\n\tret.ok.to_label\tr1, @DEFAULT_FAR_RETURN\n.func_end0:\n\n\t.data\n\t.p2align\t5\ncalldatasize:\n\t.cell 0\n\n\t.p2align\t5\nptr_calldata:\n.cell\t0\n\n\t.note.GNU-stack\n\t.rodata\nCPI0_0:\n\t.cell 4294967295\nCPI0_1:\n\t.cell 53919893334301279589334030174039261352344891250716429051063678533632\nCPI0_2:\n\t.cell 2206332297\nCPI0_3:\n\t.cell 2206332298\nCPI0_4:\n\t.cell 2428838979\nCPI0_5:\n\t.cell 3500007562\nCPI0_6:\n\t.cell 868990922\nCPI0_7:\n\t.cell 1068876235\nCPI0_8:\n\t.cell -57896044618658097711785492504343953926634992332820282019728792003956564819968\nCPI0_9:\n\t.cell 35408467139433450592217433187231851964531694900788300625387963629091585785856\nCPI0_10:\n\t.cell 2852213850513516153367582212096\nCPI0_11:\n\t.cell 2535301200456458802993406410752\nCPI0_12:\n\t.cell 2535301202817642044428229017600\nCPI0_13:\n\t.cell -65536\n", + "bytecode": { + "object": "0002000000000002000100000001035500000060011002700000002b0010019d0000008001000039000000400010043f0000000101200190000000310000c13d0000000001000031000000040110008c0000009b0000413d0000000101000367000000000101043b000000e0011002700000002d0210009c000000390000a13d0000002e0210009c000000540000613d0000002f0210009c000000690000613d000000300110009c0000009b0000c13d0000000001000416000000000110004c0000009b0000c13d000000040100008a00000000011000310000003302000041000000000310004c000000000300001900000000030240190000003301100197000000000410004c000000000200a019000000330110009c00000000010300190000000001026019000000000110004c0000009b0000c13d000000000100041a000000010200008a000000000221004b0000009d0000c13d000000340100004100000000001004350000001101000039000000040010043f0000003501000041000000aa000104300000000001000416000000000110004c0000009b0000c13d0000002001000039000001000010044300000120000004430000002c01000041000000a90001042e000000310210009c000000850000613d000000320110009c0000009b0000c13d0000000001000416000000000110004c0000009b0000c13d000000040100008a00000000011000310000003302000041000000200310008c000000000300001900000000030240190000003301100197000000000410004c000000000200a019000000330110009c00000000010300190000000001026019000000000110004c0000009b0000c13d00000004010000390000000101100367000000000101043b000000000010041b0000000001000019000000a90001042e0000000001000416000000000110004c0000009b0000c13d000000040100008a00000000011000310000003302000041000000000310004c000000000300001900000000030240190000003301100197000000000410004c000000000200a019000000330110009c00000000010300190000000001026019000000000110004c0000009b0000c13d000000000100041a000000800010043f0000003701000041000000a90001042e0000000001000416000000000110004c0000009b0000c13d000000040100008a00000000011000310000003302000041000000000310004c000000000300001900000000030240190000003301100197000000000410004c000000000200a019000000330110009c00000000010300190000000001026019000000000110004c0000009b0000c13d0000000101000039000000000101041a0000ffff0110018f000000400200043d00000000001204350000002b010000410000002b0320009c0000000001024019000000400110021000000036011001c7000000a90001042e0000000001000416000000000110004c0000009b0000c13d000000040100008a00000000011000310000003302000041000000200310008c000000000300001900000000030240190000003301100197000000000410004c000000000200a019000000330110009c00000000010300190000000001026019000000000110004c0000009b0000c13d00000004010000390000000101100367000000000101043b0000ffff0210008c000000a10000a13d0000000001000019000000aa000104300000000101100039000000000010041b0000000001000019000000a90001042e0000000102000039000000000302041a0000003803300197000000000113019f000000000012041b0000000001000019000000a90001042e000000a800000432000000a90001042e000000aa00010430000000000000000000000000000000000000000000000000000000000000000000000000ffffffff0000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000008381f589000000000000000000000000000000000000000000000000000000008381f58a0000000000000000000000000000000000000000000000000000000090c5244300000000000000000000000000000000000000000000000000000000d09de08a0000000000000000000000000000000000000000000000000000000033cbbfca000000000000000000000000000000000000000000000000000000003fb5c1cb80000000000000000000000000000000000000000000000000000000000000004e487b7100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000800000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000005aeb0e246c153c89cd032ff3215aeee190b85f142a3cc3f0cb2dc21046bdd6a7" + }, + "methodIdentifiers": { + "increment()": "d09de08a", + "number()": "8381f58a", + "number2()": "90c52443", + "setNumber(uint256)": "3fb5c1cb", + "setNumber2(uint16)": "33cbbfca" + } + }, + "irOptimized": "/// @use-src 0:\"src/Counter.sol\"\nobject \"Counter_33\" {\n code {\n {\n /// @src 0:140:447 \"contract Counter {...\"\n let _1 := memoryguard(0x80)\n mstore(64, _1)\n if callvalue() { revert(0, 0) }\n let _2 := datasize(\"Counter_33_deployed\")\n codecopy(_1, dataoffset(\"Counter_33_deployed\"), _2)\n return(_1, _2)\n }\n }\n /// @use-src 0:\"src/Counter.sol\"\n object \"Counter_33_deployed\" {\n code {\n {\n /// @src 0:140:447 \"contract Counter {...\"\n let _1 := memoryguard(0x80)\n mstore(64, _1)\n if iszero(lt(calldatasize(), 4))\n {\n let _2 := 0\n switch shr(224, calldataload(_2))\n case 0x33cbbfca {\n if callvalue() { revert(_2, _2) }\n if slt(add(calldatasize(), not(3)), 32) { revert(_2, _2) }\n let value := calldataload(4)\n let _3 := and(value, 0xffff)\n if iszero(eq(value, _3)) { revert(_2, _2) }\n sstore(/** @src 0:360:379 \"number2 = newNumber\" */ 0x01, /** @src 0:140:447 \"contract Counter {...\" */ or(and(sload(/** @src 0:360:379 \"number2 = newNumber\" */ 0x01), /** @src 0:140:447 \"contract Counter {...\" */ not(65535)), _3))\n return(_2, _2)\n }\n case 0x3fb5c1cb {\n if callvalue() { revert(_2, _2) }\n if slt(add(calldatasize(), not(3)), 32) { revert(_2, _2) }\n sstore(_2, calldataload(4))\n return(_2, _2)\n }\n case 0x8381f58a {\n if callvalue() { revert(_2, _2) }\n if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }\n mstore(_1, sload(_2))\n return(_1, 32)\n }\n case 0x90c52443 {\n if callvalue() { revert(_2, _2) }\n if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }\n let value_1 := and(sload(/** @src 0:191:212 \"uint16 public number2\" */ 1), /** @src 0:140:447 \"contract Counter {...\" */ 0xffff)\n let memPos := mload(64)\n mstore(memPos, value_1)\n return(memPos, 32)\n }\n case 0xd09de08a {\n if callvalue() { revert(_2, _2) }\n if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }\n let _4 := sload(_2)\n if eq(_4, not(0))\n {\n mstore(_2, shl(224, 0x4e487b71))\n mstore(4, 0x11)\n revert(_2, 0x24)\n }\n sstore(_2, add(_4, 1))\n return(_2, _2)\n }\n }\n revert(0, 0)\n }\n }\n data \".metadata\" hex\"a2646970667358221220089d6b053d935e4455a74b14962b1f25e8e7071f625c730150bdb68bd671ebf964736f6c63430008140033\"\n }\n}\n", + "hash": "0100003bc44686be52940f3f2bd8a0feef17700663cba9edb978886c08123811", + "factoryDependencies": {} + } + } + }, + "sources": { + "src/Counter.sol": { + "id": 0, + "ast": { + "absolutePath": "src/Counter.sol", + "exportedSymbols": { + "Counter": [ + 33 + ] + }, + "id": 34, + "license": "UNLICENSED", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "39:23:0" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Counter", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 33, + "linearizedBaseContracts": [ + 33 + ], + "name": "Counter", + "nameLocation": "149:7:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "8381f58a", + "id": 3, + "mutability": "mutable", + "name": "number", + "nameLocation": "178:6:0", + "nodeType": "VariableDeclaration", + "scope": 33, + "src": "163:21:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "163:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "90c52443", + "id": 5, + "mutability": "mutable", + "name": "number2", + "nameLocation": "205:7:0", + "nodeType": "VariableDeclaration", + "scope": 33, + "src": "191:21:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 4, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "191:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "visibility": "public" + }, + { + "body": { + "id": 14, + "nodeType": "Block", + "src": "264:35:0", + "statements": [ + { + "expression": { + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 10, + "name": "number", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "274:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 11, + "name": "newNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "283:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "274:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 13, + "nodeType": "ExpressionStatement", + "src": "274:18:0" + } + ] + }, + "functionSelector": "3fb5c1cb", + "id": 15, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setNumber", + "nameLocation": "228:9:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7, + "mutability": "mutable", + "name": "newNumber", + "nameLocation": "246:9:0", + "nodeType": "VariableDeclaration", + "scope": 15, + "src": "238:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "238:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "237:19:0" + }, + "returnParameters": { + "id": 9, + "nodeType": "ParameterList", + "parameters": [], + "src": "264:0:0" + }, + "scope": 33, + "src": "219:80:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 24, + "nodeType": "Block", + "src": "350:36:0", + "statements": [ + { + "expression": { + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 20, + "name": "number2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "360:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 21, + "name": "newNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "370:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "360:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 23, + "nodeType": "ExpressionStatement", + "src": "360:19:0" + } + ] + }, + "functionSelector": "33cbbfca", + "id": 25, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setNumber2", + "nameLocation": "314:10:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 18, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17, + "mutability": "mutable", + "name": "newNumber", + "nameLocation": "332:9:0", + "nodeType": "VariableDeclaration", + "scope": 25, + "src": "325:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 16, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "325:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "visibility": "internal" + } + ], + "src": "324:18:0" + }, + "returnParameters": { + "id": 19, + "nodeType": "ParameterList", + "parameters": [], + "src": "350:0:0" + }, + "scope": 33, + "src": "305:81:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 31, + "nodeType": "Block", + "src": "420:25:0", + "statements": [ + { + "expression": { + "id": 29, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "430:8:0", + "subExpression": { + "id": 28, + "name": "number", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "430:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 30, + "nodeType": "ExpressionStatement", + "src": "430:8:0" + } + ] + }, + "functionSelector": "d09de08a", + "id": 32, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "increment", + "nameLocation": "401:9:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 26, + "nodeType": "ParameterList", + "parameters": [], + "src": "410:2:0" + }, + "returnParameters": { + "id": 27, + "nodeType": "ParameterList", + "parameters": [], + "src": "420:0:0" + }, + "scope": 33, + "src": "392:53:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 34, + "src": "140:307:0", + "usedErrors": [], + "usedEvents": [] + } + ], + "src": "39:409:0" + } + } + }, + "errors": [], + "version": "0.8.20", + "long_version": "0.8.20+commit.a1b79de6.Darwin.appleclang", + "zk_version": "1.3.11" +} \ No newline at end of file diff --git a/cli/src/cmd/forge/zksolc.rs b/cli/src/cmd/forge/zksolc.rs index 09da2c23b..f6c004ccc 100644 --- a/cli/src/cmd/forge/zksolc.rs +++ b/cli/src/cmd/forge/zksolc.rs @@ -50,7 +50,7 @@ use std::{ fmt, fs, fs::File, io::{Read, Write}, - path::PathBuf, + path::{Path, PathBuf}, process::{exit, Command, Stdio}, str::FromStr, }; @@ -65,13 +65,6 @@ pub struct ZkSolcOpts { /// Files that should be compiled with a given solidity version. type SolidityVersionSources = (Version, BTreeMap); -#[derive(serde::Serialize, serde::Deserialize, Debug)] -pub struct PackedEraBytecode { - pub hash: String, - pub bytecode: String, - pub factory_deps: Vec, -} - /// This struct represents the ZkSolc compiler for compiling Solidity contracts. /// /// Key Components: @@ -252,48 +245,43 @@ impl ZkSolc { continue; } - let output = if true { - // Step 3: Parse JSON Input for each Source - if let Err(err) = self.parse_json_input(contract_path.clone()) { - eprintln!("Failed to parse json input for zksolc compiler: {}", err); - } - - // Step 4: Build Compiler Arguments - let comp_args = self.build_compiler_args(source.clone(), solc.clone()); - - // Step 5: Run Compiler and Handle Output - let mut cmd = Command::new(&self.compiler_path); - let mut child = cmd - .arg(contract_path.clone()) - .args(&comp_args) - .stdin(Stdio::piped()) - .stderr(Stdio::piped()) - .stdout(Stdio::piped()) - .spawn(); - let stdin = child.as_mut().unwrap().stdin.take().expect("Stdin exists."); - - serde_json::to_writer(stdin, &self.standard_json.clone().unwrap()).map_err( - |e| Error::msg(format!("Could not assign standard_json to writer: {}", e)), - )?; - - let output = child - .unwrap() - .wait_with_output() - .map_err(|e| Error::msg(format!("Could not run compiler cmd: {}", e)))?; + // Step 3: Parse JSON Input for each Source + if let Err(err) = self.parse_json_input(contract_path.clone()) { + eprintln!("Failed to parse json input for zksolc compiler: {}", err); + } - if !output.status.success() { - return Err(Error::msg(format!( + // Step 4: Build Compiler Arguments + let comp_args = self.build_compiler_args(source.clone(), solc.clone()); + + // Step 5: Run Compiler and Handle Output + let mut cmd = Command::new(&self.compiler_path); + let mut child = cmd + .arg(contract_path.clone()) + .args(&comp_args) + .stdin(Stdio::piped()) + .stderr(Stdio::piped()) + .stdout(Stdio::piped()) + .spawn(); + let stdin = child.as_mut().unwrap().stdin.take().expect("Stdin exists."); + + serde_json::to_writer(stdin, &self.standard_json.clone().unwrap()).map_err( + |e| Error::msg(format!("Could not assign standard_json to writer: {}", e)), + )?; + + let output = child + .unwrap() + .wait_with_output() + .map_err(|e| Error::msg(format!("Could not run compiler cmd: {}", e)))?; + + if !output.status.success() { + return Err(Error::msg(format!( "Compilation failed with {:?}. Using compiler: {:?}, with args {:?} {:?}", String::from_utf8(output.stderr).unwrap_or_default(), self.compiler_path, contract_path, &comp_args ))); - } - Some(output) - } else { - None - }; + } let filename = contract_path .to_str() @@ -312,32 +300,18 @@ impl ZkSolc { .expect("Failed to get Contract filename."); // Step 6: Handle Output (Errors and Warnings) - let foo = - self.handle_output(output, filename.to_string(), &mut displayed_warnings, true); - data.insert(filename.to_string(), foo); + data.insert( + filename.to_string(), + ZkSolc::handle_output( + output.stdout, + filename.to_string(), + &mut displayed_warnings, + Some(self.project.paths.artifacts.join(filename).join("artifacts.json")), + ), + ); } } - //let filename = "Counter.sol"; - //let foo = self.handle_output(None, filename.to_string(), &mut displayed_warnings); - //data.insert(filename.to_string(), foo); - - result.compiled_artifacts = Artifacts { 0: data }; - - // Step 7: Return Ok if the compilation process completes without errors - Ok(result) - } - - pub fn take_compiled(&self) -> Result { - let mut result = ProjectCompileOutput::default(); - let mut displayed_warnings = HashSet::new(); - let mut data = BTreeMap::new(); - // Step 1: Collect Source Files - - let filename = "Counter.sol"; - let foo = self.handle_output(None, filename.to_string(), &mut displayed_warnings, false); - data.insert(filename.to_string(), foo); - result.compiled_artifacts = Artifacts { 0: data }; // Step 7: Return Ok if the compilation process completes without errors @@ -424,36 +398,24 @@ impl ZkSolc { /// let output = std::process::Output { ... }; /// let source = "/path/to/contract.sol".to_string(); /// let mut displayed_warnings = HashSet::new(); - /// self.handle_output(output, source, &mut displayed_warnings); + /// ZkSolc::handle_output(output, source, &mut displayed_warnings); /// ``` /// /// In this example, the `handle_output` function is called with the compiler output, contract /// source, and a mutable set for displayed warnings. It processes the output, handles /// errors and warnings, and saves the artifacts. - fn handle_output( - &self, - output: Option, + pub fn handle_output( + output: Vec, source: String, displayed_warnings: &mut HashSet, - write_artifacts: bool, + write_artifacts: Option, ) -> BTreeMap>> { // Deserialize the compiler output into a serde_json::Value object - let output_json: Value = if let Some(output) = output { - serde_json::from_slice(&output.clone().stdout) - .unwrap_or_else(|e| panic!("Could not parse zksolc compiler output: {}", e)) - } else { - let mut file = File::open( - "/Users/michalski/public_matter/hello_foundry/zkout/Counter.sol/artifacts.json", - ) - .expect("Failed to open file"); - let mut json_data = String::new(); - file.read_to_string(&mut json_data).expect("Failed to read from file"); - - serde_json::from_str(json_data.as_str()).unwrap() - }; + let output_json: Value = serde_json::from_slice(&output) + .unwrap_or_else(|e| panic!("Could not parse zksolc compiler output: {}", e)); // Handle errors and warnings in the output - self.handle_output_errors(&output_json, displayed_warnings); + ZkSolc::handle_output_errors(&output_json, displayed_warnings); let output_obj = output_json["contracts"].as_object().unwrap(); @@ -494,21 +456,19 @@ impl ZkSolc { .cloned() .collect(); - let packed_bytecode = PackedEraBytecode { - hash: bcode_hash.to_owned(), - bytecode: contract_bytecode, - factory_deps, - }; - - let serde_bytecode = serde_json::to_vec(&packed_bytecode).unwrap(); - /*let serde_bytecode: String = - serde_bytecode.as_bytes().iter().map(|b| format!("{:02x}", b)).collect();*/ + let packed_bytecode = Bytes::from( + revm_era::factory_deps::PackedEraBytecode::new( + bcode_hash.to_owned(), + contract_bytecode, + factory_deps, + ) + .to_vec(), + ); let mut art = ConfigurableContractArtifact::default(); art.bytecode = Some(CompactBytecode { object: ethers::solc::artifacts::BytecodeObject::Bytecode( - // Bytes::from_str(serde_bytecode.as_str()).unwrap(), - Bytes::from(serde_bytecode.clone()), + packed_bytecode.clone(), ), source_map: None, link_references: Default::default(), @@ -517,9 +477,9 @@ impl ZkSolc { // FIXME: incorrect art.deployed_bytecode = Some(CompactDeployedBytecode { bytecode: Some(CompactBytecode { - object: ethers::solc::artifacts::BytecodeObject::Bytecode(Bytes::from( - serde_bytecode, - )), + object: ethers::solc::artifacts::BytecodeObject::Bytecode( + packed_bytecode, + ), source_map: None, link_references: Default::default(), }), @@ -541,15 +501,16 @@ impl ZkSolc { } } } - if write_artifacts { + if let Some(write_artifacts) = write_artifacts { // Beautify the output JSON let output_json_pretty = serde_json::to_string_pretty(&output_json) .unwrap_or_else(|e| panic!("Could not beautify zksolc compiler output: {}", e)); // Create the artifacts file for saving the compiler output - let mut artifacts_file = self - .build_artifacts_file(source.clone()) - .unwrap_or_else(|e| panic!("Error configuring solc compiler: {}", e)); + let mut artifacts_file = File::create(write_artifacts) + .map_err(|e| Error::msg(format!("Could not create artifacts file: {}", e))) + .unwrap(); + // Write the beautified output JSON to the artifacts file artifacts_file .write_all(output_json_pretty.as_bytes()) @@ -582,7 +543,7 @@ impl ZkSolc { /// If any errors are encountered, the function calls `exit(1)` to terminate the program. If /// only warnings are encountered, it prints a message indicating that the compiler run /// completed with warnings. - fn handle_output_errors(&self, output_json: &Value, displayed_warnings: &mut HashSet) { + pub fn handle_output_errors(output_json: &Value, displayed_warnings: &mut HashSet) { let errors = output_json .get("errors") .and_then(|v| v.as_array()) @@ -870,39 +831,28 @@ impl ZkSolc { .map_err(|e| Error::msg(format!("Could not create artifacts directory: {}", e)))?; Ok(path) } +} - /// Builds the file path for the artifacts (compiler output) of a contract based on the - /// contract's source file and the project's artifacts directory. The function performs the - /// following steps to construct the artifacts file path: - /// - /// # Workflow: - /// 1. Build Artifacts File Path: - /// - The function constructs the file path for the artifacts file by joining the project's - /// artifacts directory path, the contract's source file path, and the "artifacts.json" - /// filename. - /// - The `join` method is used on the artifacts directory path, passing the contract's - /// source file path joined with the "artifacts.json" filename. - /// - /// 2. Create Artifacts File: - /// - The function creates the artifacts file at the constructed file path using the `create` - /// method from the `File` struct. - /// - If the creation of the artifacts file fails, an error is returned. - /// - /// # Arguments - /// - /// * `self` - A reference to the `ZkSolc` instance. - /// * `source` - The contract source file represented as a `String`. - /// - /// # Returns - /// - /// A `Result` containing the created `File` object on success, or an `anyhow::Error` on - /// failure. - /// - /// # Errors - /// - /// This function can return an error if the creation of the artifacts file fails. - fn build_artifacts_file(&self, source: String) -> Result { - File::create(self.project.paths.artifacts.join(source).join("artifacts.json")) - .map_err(|e| Error::msg(format!("Could not create artifacts file: {}", e))) +#[cfg(test)] +mod tests { + use std::collections::HashSet; + + use super::ZkSolc; + + /// Basic test to analyze the single Counter.sol artifact. + #[test] + pub fn test_artifacts_json_parse() { + let data = include_str!("testdata/artifacts.json").as_bytes().to_vec(); + let mut displayed_warnings = HashSet::new(); + let source = "src/Counter.sol".to_owned(); + let result = ZkSolc::handle_output(data, source, &mut displayed_warnings, None); + + let artifacts = result.get("Counter").unwrap(); + assert_eq!(artifacts.len(), 1); + let first = &artifacts[0]; + assert_eq!(first.file.to_str(), Some("Counter.sol")); + assert_eq!(first.version.to_string(), "0.8.20"); + assert!(first.artifact.abi.is_some()); + assert_eq!(first.artifact.bytecode.as_ref().unwrap().object.bytes_len(), 3883); } } From f78b9a4dc04b7b7bc9f6a6f26453887a18a0edd7 Mon Sep 17 00:00:00 2001 From: mm-zk Date: Wed, 6 Sep 2023 13:58:34 +0200 Subject: [PATCH 06/13] parse json using a struct --- cli/src/cmd/forge/zksolc.rs | 115 +++++++++++++++++++++++------------- 1 file changed, 74 insertions(+), 41 deletions(-) diff --git a/cli/src/cmd/forge/zksolc.rs b/cli/src/cmd/forge/zksolc.rs index f6c004ccc..1f7529019 100644 --- a/cli/src/cmd/forge/zksolc.rs +++ b/cli/src/cmd/forge/zksolc.rs @@ -32,6 +32,7 @@ use ansi_term::Colour::{Red, Yellow}; use anyhow::{Error, Result}; use ethers::{ + etherscan::contract, prelude::{artifacts::Source, Solc}, solc::{ artifacts::{ @@ -44,6 +45,7 @@ use ethers::{ types::Bytes, }; use semver::Version; +use serde::Deserialize; use serde_json::Value; use std::{ collections::{BTreeMap, HashMap, HashSet}, @@ -411,22 +413,20 @@ impl ZkSolc { write_artifacts: Option, ) -> BTreeMap>> { // Deserialize the compiler output into a serde_json::Value object - let output_json: Value = serde_json::from_slice(&output) + let compiler_output: ZkSolcCompilerOutput = serde_json::from_slice(&output) .unwrap_or_else(|e| panic!("Could not parse zksolc compiler output: {}", e)); // Handle errors and warnings in the output - ZkSolc::handle_output_errors(&output_json, displayed_warnings); - - let output_obj = output_json["contracts"].as_object().unwrap(); + ZkSolc::handle_output_errors(&compiler_output, displayed_warnings); // First - let's get all the bytecodes. let mut all_bytecodes: HashMap = Default::default(); - for (_source_file_name, source_file_results) in output_obj { - for (_contract_name, contract_results) in source_file_results.as_object().unwrap() { - if !contract_results["hash"].is_null() { + for (_source_file_name, source_file_results) in &compiler_output.contracts { + for (_contract_name, contract_results) in source_file_results { + if !contract_results.hash.is_empty() { all_bytecodes.insert( - contract_results["hash"].as_str().unwrap().to_owned(), - contract_results["evm"]["bytecode"]["object"].as_str().unwrap().to_owned(), + contract_results.hash.clone(), + contract_results.evm.bytecode.object.clone(), ); } } @@ -435,22 +435,14 @@ impl ZkSolc { let mut result = BTreeMap::new(); // Get the bytecode hashes for each contract in the output - for key in output_obj.keys() { + for key in compiler_output.contracts.keys() { if key.contains(&source) { - let b_code = output_obj[key].clone(); - let b_code_obj = b_code.as_object().unwrap(); - let b_code_keys = b_code_obj.keys(); - for hash in b_code_keys { - if let Some(bcode_hash) = b_code_obj[hash]["hash"].as_str() { - println!("{} -> Bytecode Hash: {} ", hash, bcode_hash); - } - let bcode_hash = b_code_obj[hash]["hash"].as_str().unwrap(); - let contract_bytecode = - b_code_obj[hash]["evm"]["bytecode"]["object"].as_str().unwrap().to_owned(); - - let factory_deps: Vec = b_code_obj[hash]["factoryDependencies"] - .as_object() - .unwrap() + let contracts_in_file = compiler_output.contracts.get(key).unwrap(); + for (contract_name, contract) in contracts_in_file { + println!("{} -> Bytecode Hash: {} ", contract_name, contract.hash); + + let factory_deps: Vec = contract + .factory_dependencies .keys() .map(|factory_hash| all_bytecodes.get(factory_hash).unwrap()) .cloned() @@ -458,8 +450,8 @@ impl ZkSolc { let packed_bytecode = Bytes::from( revm_era::factory_deps::PackedEraBytecode::new( - bcode_hash.to_owned(), - contract_bytecode, + contract.hash.clone(), + contract.evm.bytecode.object.clone(), factory_deps, ) .to_vec(), @@ -486,22 +478,21 @@ impl ZkSolc { immutable_references: Default::default(), }); - art.abi = Some( - serde_json::from_value::(b_code_obj[hash]["abi"].clone()) - .unwrap(), - ); + art.abi = contract.abi.clone(); - let foo = ArtifactFile { + let artifact = ArtifactFile { artifact: art, - file: format!("{}.sol", hash).into(), - version: Version::parse("0.8.20").unwrap(), + file: format!("{}.sol", contract_name).into(), + version: Version::parse(&compiler_output.version).unwrap(), }; - result.insert(hash.clone(), vec![foo]); - //art.additional_files. + result.insert(contract_name.clone(), vec![artifact]); } } } if let Some(write_artifacts) = write_artifacts { + let output_json: Value = serde_json::from_slice(&output) + .unwrap_or_else(|e| panic!("Could not parse zksolc compiler output: {}", e)); + // Beautify the output JSON let output_json_pretty = serde_json::to_string_pretty(&output_json) .unwrap_or_else(|e| panic!("Could not beautify zksolc compiler output: {}", e)); @@ -543,11 +534,11 @@ impl ZkSolc { /// If any errors are encountered, the function calls `exit(1)` to terminate the program. If /// only warnings are encountered, it prints a message indicating that the compiler run /// completed with warnings. - pub fn handle_output_errors(output_json: &Value, displayed_warnings: &mut HashSet) { - let errors = output_json - .get("errors") - .and_then(|v| v.as_array()) - .unwrap_or_else(|| panic!("Could not find 'errors' array in the output JSON")); + pub fn handle_output_errors( + output_json: &ZkSolcCompilerOutput, + displayed_warnings: &mut HashSet, + ) { + let errors = &output_json.errors; let mut has_error = false; let mut has_warning = false; @@ -833,11 +824,47 @@ impl ZkSolc { } } +#[derive(Debug, Deserialize)] +pub struct ZkSolcCompilerOutput { + // Map from file name -> (Contract name -> Contract) + pub contracts: HashMap>, + pub sources: HashMap, + pub version: String, + pub long_version: String, + pub zk_version: String, + pub errors: Vec, +} + +#[derive(Debug, Deserialize)] +pub struct ZkContract { + pub hash: String, + // Hashmap from hash to filename:contract_name string. + #[serde(rename = "factoryDependencies")] + pub factory_dependencies: HashMap, + pub evm: Evm, + pub abi: Option, +} +#[derive(Debug, Deserialize)] + +pub struct Evm { + pub bytecode: ZkSolcBytecode, +} +#[derive(Debug, Deserialize)] + +pub struct ZkSolcBytecode { + object: String, +} + +#[derive(Debug, Deserialize)] +pub struct ZkSourceFile { + pub id: u64, +} + #[cfg(test)] mod tests { use std::collections::HashSet; - use super::ZkSolc; + use super::{ZkSolc, ZkSolcCompilerOutput}; /// Basic test to analyze the single Counter.sol artifact. #[test] @@ -855,4 +882,10 @@ mod tests { assert!(first.artifact.abi.is_some()); assert_eq!(first.artifact.bytecode.as_ref().unwrap().object.bytes_len(), 3883); } + #[test] + pub fn test_other_parse() { + let data = include_str!("testdata/artifacts.json").as_bytes().to_vec(); + let parsed: ZkSolcCompilerOutput = serde_json::from_slice(&data).unwrap(); + println!("Parsed: {:?}", parsed); + } } From e224fac545fd971a647d7c4b10c3d070e5aed7f7 Mon Sep 17 00:00:00 2001 From: mm-zk Date: Wed, 6 Sep 2023 14:14:43 +0200 Subject: [PATCH 07/13] tests passing --- cli/src/cmd/forge/testdata/empty.json | 22 +++++++++++++++++ cli/src/cmd/forge/zksolc.rs | 34 +++++++++++++++++---------- 2 files changed, 43 insertions(+), 13 deletions(-) create mode 100644 cli/src/cmd/forge/testdata/empty.json diff --git a/cli/src/cmd/forge/testdata/empty.json b/cli/src/cmd/forge/testdata/empty.json new file mode 100644 index 000000000..a7b1462f0 --- /dev/null +++ b/cli/src/cmd/forge/testdata/empty.json @@ -0,0 +1,22 @@ +{ + "contracts": { + "lib/forge-std/src/Base.sol": { + "CommonBase": { + "abi": [], + "metadata": "{\"compiler\":{\"version\":\"0.8.20+commit.a1b79de6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/forge-std/src/Base.sol\":\"CommonBase\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"lib/forge-std/src/Base.sol\":{\"keccak256\":\"0x4ff1a785311017d1eedb1b4737956fa383067ad34eb439abfec1d989754dde1c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f553622969b9fdb930246704a4c10dfaee6b1a4468c142fa7eb9dc292a438224\",\"dweb:/ipfs/QmcxqHnqdQsMVtgsfH9VNLmZ3g7GhgNagfq7yvNCDcCHFK\"]},\"lib/forge-std/src/StdStorage.sol\":{\"keccak256\":\"0x391a28a2e54aea51a6fb03a3a48035304ca4d24bc669ddf3d4c152c7162e514d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://475fd0d87ccb0fdc4418dea2babffb4adb4aafb817e61f7ef31c2303f10c6c26\",\"dweb:/ipfs/QmQgcgtZxpkW6DRmbJszN1F8mU6zhaTZGdWWsj77yCuWN9\"]},\"lib/forge-std/src/Vm.sol\":{\"keccak256\":\"0xb569d0b4398fad95f508fb854e832143edf69a897af4250f5f60fe195a2066c5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://84b722ada97ea7bb841cdc0fa556aa36a02ff2d380fa24f6dc0717a71c6d9c7c\",\"dweb:/ipfs/QmfCH9Q4tvJhPM286GFsE4UCP4YncLpRu4Nwa2ZkHdRfbw\"]}},\"version\":1}", + "evm": { + "legacyAssembly": null, + "assembly": null, + "bytecode": null, + "methodIdentifiers": {} + }, + "irOptimized": "" + } + } + }, + "sources": {}, + "errors": [], + "version": "0.8.20", + "long_version": "0.8.20+commit.a1b79de6.Darwin.appleclang", + "zk_version": "1.3.11" +} \ No newline at end of file diff --git a/cli/src/cmd/forge/zksolc.rs b/cli/src/cmd/forge/zksolc.rs index 1f7529019..76e755632 100644 --- a/cli/src/cmd/forge/zksolc.rs +++ b/cli/src/cmd/forge/zksolc.rs @@ -423,10 +423,10 @@ impl ZkSolc { let mut all_bytecodes: HashMap = Default::default(); for (_source_file_name, source_file_results) in &compiler_output.contracts { for (_contract_name, contract_results) in source_file_results { - if !contract_results.hash.is_empty() { + if let Some(hash) = &contract_results.hash { all_bytecodes.insert( - contract_results.hash.clone(), - contract_results.evm.bytecode.object.clone(), + hash.clone(), + contract_results.evm.bytecode.as_ref().unwrap().object.clone(), ); } } @@ -439,7 +439,11 @@ impl ZkSolc { if key.contains(&source) { let contracts_in_file = compiler_output.contracts.get(key).unwrap(); for (contract_name, contract) in contracts_in_file { - println!("{} -> Bytecode Hash: {} ", contract_name, contract.hash); + println!( + "{} -> Bytecode Hash: {} ", + contract_name, + contract.hash.as_ref().unwrap() + ); let factory_deps: Vec = contract .factory_dependencies @@ -450,8 +454,8 @@ impl ZkSolc { let packed_bytecode = Bytes::from( revm_era::factory_deps::PackedEraBytecode::new( - contract.hash.clone(), - contract.evm.bytecode.object.clone(), + contract.hash.as_ref().unwrap().clone(), + contract.evm.bytecode.as_ref().unwrap().object.clone(), factory_deps, ) .to_vec(), @@ -837,9 +841,9 @@ pub struct ZkSolcCompilerOutput { #[derive(Debug, Deserialize)] pub struct ZkContract { - pub hash: String, + pub hash: Option, // Hashmap from hash to filename:contract_name string. - #[serde(rename = "factoryDependencies")] + #[serde(rename = "factoryDependencies", default)] pub factory_dependencies: HashMap, pub evm: Evm, pub abi: Option, @@ -847,7 +851,7 @@ pub struct ZkContract { #[derive(Debug, Deserialize)] pub struct Evm { - pub bytecode: ZkSolcBytecode, + pub bytecode: Option, } #[derive(Debug, Deserialize)] @@ -868,7 +872,7 @@ mod tests { /// Basic test to analyze the single Counter.sol artifact. #[test] - pub fn test_artifacts_json_parse() { + pub fn test_artifacts_extraction() { let data = include_str!("testdata/artifacts.json").as_bytes().to_vec(); let mut displayed_warnings = HashSet::new(); let source = "src/Counter.sol".to_owned(); @@ -883,9 +887,13 @@ mod tests { assert_eq!(first.artifact.bytecode.as_ref().unwrap().object.bytes_len(), 3883); } #[test] - pub fn test_other_parse() { + pub fn test_json_parsing() { let data = include_str!("testdata/artifacts.json").as_bytes().to_vec(); - let parsed: ZkSolcCompilerOutput = serde_json::from_slice(&data).unwrap(); - println!("Parsed: {:?}", parsed); + let _parsed: ZkSolcCompilerOutput = serde_json::from_slice(&data).unwrap(); + + // Contract that has almost no data (and many fields missing). + let almost_empty_data = include_str!("testdata/empty.json").as_bytes().to_vec(); + let _parsed_empty: ZkSolcCompilerOutput = + serde_json::from_slice(&almost_empty_data).unwrap(); } } From 76437966fc12d265b4052fd4bd06fd3a4f6b8e12 Mon Sep 17 00:00:00 2001 From: mm-zk Date: Wed, 6 Sep 2023 14:36:30 +0200 Subject: [PATCH 08/13] migrated errors to eyre --- cli/src/cmd/forge/test/mod.rs | 2 +- cli/src/cmd/forge/zk_build.rs | 2 +- cli/src/cmd/forge/zksolc.rs | 61 ++++++++++++++--------------------- 3 files changed, 26 insertions(+), 39 deletions(-) diff --git a/cli/src/cmd/forge/test/mod.rs b/cli/src/cmd/forge/test/mod.rs index 36a48a4ec..a57a0c5e3 100644 --- a/cli/src/cmd/forge/test/mod.rs +++ b/cli/src/cmd/forge/test/mod.rs @@ -181,7 +181,7 @@ impl TestArgs { force_evmla: false, }; - let zksolc = ZkSolc::new(zksolc_opts, project); + let mut zksolc = ZkSolc::new(zksolc_opts, project); let output = zksolc.compile().unwrap(); let test_options = TestOptions::default(); diff --git a/cli/src/cmd/forge/zk_build.rs b/cli/src/cmd/forge/zk_build.rs index 7949c7d3e..0c9b59a30 100644 --- a/cli/src/cmd/forge/zk_build.rs +++ b/cli/src/cmd/forge/zk_build.rs @@ -216,7 +216,7 @@ impl ZkBuildArgs { force_evmla: self.force_evmla, }; - let zksolc = ZkSolc::new(zksolc_opts, project); + let mut zksolc = ZkSolc::new(zksolc_opts, project); match zksolc.compile() { Ok(_) => { diff --git a/cli/src/cmd/forge/zksolc.rs b/cli/src/cmd/forge/zksolc.rs index 76e755632..d2f6adc26 100644 --- a/cli/src/cmd/forge/zksolc.rs +++ b/cli/src/cmd/forge/zksolc.rs @@ -30,7 +30,6 @@ /// - Artifact Path Generation: The `build_artifacts_path` and `build_artifacts_file` methods /// construct the path and file for saving the compiler output artifacts. use ansi_term::Colour::{Red, Yellow}; -use anyhow::{Error, Result}; use ethers::{ etherscan::contract, prelude::{artifacts::Source, Solc}, @@ -44,6 +43,7 @@ use ethers::{ }, types::Bytes, }; +use eyre::{Context, Result}; use semver::Version; use serde::Deserialize; use serde_json::Value; @@ -121,7 +121,6 @@ pub struct ZkSolc { is_system: bool, force_evmla: bool, standard_json: Option, - sources: Option>, } impl fmt::Display for ZkSolc { @@ -146,7 +145,6 @@ impl ZkSolc { is_system: opts.is_system, force_evmla: opts.force_evmla, standard_json: None, - sources: None, } } @@ -223,13 +221,13 @@ impl ZkSolc { /// The `compile` function modifies the `ZkSolc` instance to store the parsed JSON input and the /// versioned sources. These modified values can be accessed after the compilation process /// for further processing or analysis. - pub fn compile(mut self) -> Result { + pub fn compile(&mut self) -> Result { let mut result = ProjectCompileOutput::default(); let mut displayed_warnings = HashSet::new(); let mut data = BTreeMap::new(); // Step 1: Collect Source Files - self.configure_solc(); - let sources = self.sources.clone().unwrap(); + + let sources = self.get_versioned_sources().wrap_err("Cannot get source files")?; // Step 2: Compile Contracts for Each Source for (solc, version) in sources { @@ -266,23 +264,20 @@ impl ZkSolc { .spawn(); let stdin = child.as_mut().unwrap().stdin.take().expect("Stdin exists."); - serde_json::to_writer(stdin, &self.standard_json.clone().unwrap()).map_err( - |e| Error::msg(format!("Could not assign standard_json to writer: {}", e)), - )?; + serde_json::to_writer(stdin, &self.standard_json.clone().unwrap()) + .wrap_err("Could not assign standard_json to writer")?; - let output = child - .unwrap() - .wait_with_output() - .map_err(|e| Error::msg(format!("Could not run compiler cmd: {}", e)))?; + let output = + child.unwrap().wait_with_output().wrap_err("Could not run compiler cmd")?; if !output.status.success() { - return Err(Error::msg(format!( + eyre::bail!( "Compilation failed with {:?}. Using compiler: {:?}, with args {:?} {:?}", String::from_utf8(output.stderr).unwrap_or_default(), self.compiler_path, contract_path, &comp_args - ))); + ); } let filename = contract_path @@ -502,9 +497,8 @@ impl ZkSolc { .unwrap_or_else(|e| panic!("Could not beautify zksolc compiler output: {}", e)); // Create the artifacts file for saving the compiler output - let mut artifacts_file = File::create(write_artifacts) - .map_err(|e| Error::msg(format!("Could not create artifacts file: {}", e))) - .unwrap(); + let mut artifacts_file = + File::create(write_artifacts).wrap_err("Could not create artifacts file").unwrap(); // Write the beautified output JSON to the artifacts file artifacts_file @@ -666,7 +660,7 @@ impl ZkSolc { let standard_json = self .project .standard_json_input(&contract_path) - .map_err(|e| Error::msg(format!("Could not get standard json input: {}", e))) + .wrap_err("Could not get standard json input") .unwrap(); // Store the generated standard JSON input in the ZkSolc instance @@ -675,23 +669,20 @@ impl ZkSolc { // Step 5: Build Artifacts Path let artifact_path = &self .build_artifacts_path(contract_path) - .map_err(|e| Error::msg(format!("Could not build_artifacts_path: {}", e))) + .wrap_err("Could not build artifacts path") .unwrap(); // Step 6: Save JSON Input let json_input_path = artifact_path.join("json_input.json"); - let stdjson = serde_json::to_value(&standard_json) - .map_err(|e| Error::msg(format!("Could not serialize standard JSON input: {}", e)))?; + let stdjson = + serde_json::to_value(&standard_json).wrap_err("Could not serialize JSON input")?; + std::fs::write(json_input_path, serde_json::to_string_pretty(&stdjson).unwrap()) - .map_err(|e| Error::msg(format!("Could not write JSON input file: {}", e)))?; + .wrap_err("Could not write JSON input file")?; Ok(()) } - fn configure_solc(&mut self) { - self.sources = Some(self.get_versioned_sources().unwrap()); - } - /// Retrieves the versioned sources for the Solidity contracts in the project. The versioned /// sources represent the contracts grouped by their corresponding Solidity compiler /// versions. The function performs the following steps to obtain the versioned sources: @@ -765,22 +756,19 @@ impl ZkSolc { /// The versioned sources can then be used for further processing or analysis. fn get_versioned_sources(&mut self) -> Result> { // Step 1: Retrieve Project Sources - let sources = self - .project - .sources() - .map_err(|e| Error::msg(format!("Could not get project sources: {}", e)))?; + let sources = self.project.sources().wrap_err("Could not get project sources")?; // Step 2: Resolve Graph of Sources and Versions let graph = Graph::resolve_sources(&self.project.paths, sources) - .map_err(|e| Error::msg(format!("Could not create graph: {}", e)))?; + .wrap_err("Could not resolve sources")?; // Step 3: Extract Versions and Edges let (versions, _edges) = graph .into_sources_by_version(self.project.offline) - .map_err(|e| Error::msg(format!("Could not get versions & edges: {}", e)))?; + .wrap_err("Could not match solc versions to files")?; // Step 4: Retrieve Solc Version - versions.get(&self.project).map_err(|e| Error::msg(format!("Could not get solc: {}", e))) + versions.get(&self.project).wrap_err("Could not get solc") } /// Builds the path for saving the artifacts (compiler output) of a contract based on the @@ -819,11 +807,10 @@ impl ZkSolc { /// This function can return an error if any of the following occurs: /// - The extraction of the filename from the contract source path fails. /// - The creation of the artifacts directory fails. - fn build_artifacts_path(&self, source: PathBuf) -> Result { + fn build_artifacts_path(&self, source: PathBuf) -> Result { let filename = source.file_name().expect("Failed to get Contract filename."); let path = self.project.paths.artifacts.join(filename); - fs::create_dir_all(&path) - .map_err(|e| Error::msg(format!("Could not create artifacts directory: {}", e)))?; + fs::create_dir_all(&path).wrap_err("Could not create artifacts directory")?; Ok(path) } } From 2431f1eb1c38f8e58cc0abea238fe9159001093e Mon Sep 17 00:00:00 2001 From: mm-zk Date: Wed, 6 Sep 2023 15:17:09 +0200 Subject: [PATCH 09/13] cleaned up warnings --- cli/src/cmd/forge/test/mod.rs | 52 ++-------------- cli/src/cmd/forge/zksolc.rs | 104 ++++++++++++++------------------ evm/src/executor/backend/mod.rs | 27 +++------ 3 files changed, 56 insertions(+), 127 deletions(-) diff --git a/cli/src/cmd/forge/test/mod.rs b/cli/src/cmd/forge/test/mod.rs index a57a0c5e3..ec2d51ded 100644 --- a/cli/src/cmd/forge/test/mod.rs +++ b/cli/src/cmd/forge/test/mod.rs @@ -15,8 +15,7 @@ use crate::{ }; use cast::fuzz::CounterExample; use clap::Parser; -use ethers::{abi::Abi, types::U256}; -use eyre::WrapErr; +use ethers::types::U256; use forge::{ decode::decode_console_logs, executor::inspector::CheatsConfig, @@ -26,16 +25,12 @@ use forge::{ identifier::{EtherscanIdentifier, LocalTraceIdentifier, SignaturesIdentifier}, CallTraceDecoderBuilder, TraceKind, }, - MultiContractRunner, MultiContractRunnerBuilder, TestOptions, TestOptionsBuilder, + MultiContractRunner, MultiContractRunnerBuilder, TestOptions, }; -use foundry_common::{ - compile::{self, ProjectCompiler}, - evm::EvmArgs, - get_contract_name, get_file_name, -}; -use foundry_config::{figment, get_available_profiles, Config}; +use foundry_common::{evm::EvmArgs, get_contract_name, get_file_name}; +use foundry_config::{figment, Config}; use regex::Regex; -use std::{collections::BTreeMap, fs, path::PathBuf, sync::mpsc::channel, time::Duration}; +use std::{collections::BTreeMap, path::PathBuf, sync::mpsc::channel, time::Duration}; use tracing::trace; use watchexec::config::{InitConfig, RuntimeConfig}; use yansi::Paint; @@ -50,8 +45,6 @@ use foundry_config::figment::{ }; use foundry_evm::utils::evm_spec; -use ethers::types::Bytes; - // Loads project's figment and merges the build cli arguments into it foundry_config::merge_impl_figment_convert!(TestArgs, opts, evm_opts); @@ -120,15 +113,6 @@ pub struct TestArgs { #[clap(flatten)] pub watch: WatchArgs, } -mod test { - use super::TestArgs; - - #[tokio::test] - async fn test_era() { - let foo: TestArgs = Default::default(); - foo.execute_tests().await.unwrap(); - } -} impl TestArgs { /// Returns the flattened [`CoreBuildArgs`]. @@ -528,32 +512,6 @@ async fn test( gas_reporting: bool, fail_fast: bool, ) -> eyre::Result { - let project = config.project().unwrap(); - - /* - //get bytecode - let contract_path = "src/Greeter.sol:Greeter"; - let output_path: &str = - &format!("{}/zksolc/{}/combined.json", project.paths.artifacts.display(), "Greeter.sol"); - let data = fs::read_to_string(output_path).expect("Unable to read file"); - //convert to json Value - let res: serde_json::Value = serde_json::from_str(&data).expect("Unable to parse"); - let bytecode: Bytes = - serde_json::from_value(res["contracts"][&contract_path]["bin"].clone()).unwrap(); - let bytecode_v = bytecode.to_vec(); - //get abi - let abi: Abi = serde_json::from_value(res["contracts"][&contract_path]["abi"].clone()).unwrap(); - let a = runner.known_contracts.clone().0.into_iter(); - for (art, _ctx) in a { - if &art.name == "Greeter" { - // println!( - // "{:#?}, before contracts", - // runner.known_contracts.0.get_key_value(&art).unwrap().1 - // ); - runner.known_contracts.0.insert(art, (abi.clone(), bytecode_v.clone())); - } - }*/ - trace!(target: "forge::test", "running all tests"); if runner.count_filtered_tests(&filter) == 0 { let filter_str = filter.to_string(); diff --git a/cli/src/cmd/forge/zksolc.rs b/cli/src/cmd/forge/zksolc.rs index d2f6adc26..9928396a1 100644 --- a/cli/src/cmd/forge/zksolc.rs +++ b/cli/src/cmd/forge/zksolc.rs @@ -31,19 +31,18 @@ /// construct the path and file for saving the compiler output artifacts. use ansi_term::Colour::{Red, Yellow}; use ethers::{ - etherscan::contract, prelude::{artifacts::Source, Solc}, solc::{ artifacts::{ output_selection::FileOutputSelection, CompactBytecode, CompactDeployedBytecode, - LosslessAbi, SourceFile, StandardJsonCompilerInput, + LosslessAbi, StandardJsonCompilerInput, }, - ArtifactFile, Artifacts, CompilerOutput, ConfigurableArtifacts, - ConfigurableContractArtifact, Graph, Project, ProjectCompileOutput, + ArtifactFile, Artifacts, ConfigurableContractArtifact, Graph, Project, + ProjectCompileOutput, }, types::Bytes, }; -use eyre::{Context, Result}; +use eyre::{Context, ContextCompat, Result}; use semver::Version; use serde::Deserialize; use serde_json::Value; @@ -51,10 +50,9 @@ use std::{ collections::{BTreeMap, HashMap, HashSet}, fmt, fs, fs::File, - io::{Read, Write}, - path::{Path, PathBuf}, + io::Write, + path::PathBuf, process::{exit, Command, Stdio}, - str::FromStr, }; #[derive(Debug, Clone)] @@ -222,17 +220,16 @@ impl ZkSolc { /// versioned sources. These modified values can be accessed after the compilation process /// for further processing or analysis. pub fn compile(&mut self) -> Result { - let mut result = ProjectCompileOutput::default(); let mut displayed_warnings = HashSet::new(); let mut data = BTreeMap::new(); // Step 1: Collect Source Files - let sources = self.get_versioned_sources().wrap_err("Cannot get source files")?; // Step 2: Compile Contracts for Each Source for (solc, version) in sources { //configure project solc for each solc version for source in version.1 { + // Contract path is an absolute path of the file. let contract_path = source.0.clone(); // Check if the contract_path is in 'sources' directory or its subdirectories @@ -246,12 +243,13 @@ impl ZkSolc { } // Step 3: Parse JSON Input for each Source - if let Err(err) = self.parse_json_input(contract_path.clone()) { - eprintln!("Failed to parse json input for zksolc compiler: {}", err); - } + self.prepare_compiler_input(&contract_path).wrap_err(format!( + "Failed to prepare inputs when compiling {:?}", + contract_path + ))?; // Step 4: Build Compiler Arguments - let comp_args = self.build_compiler_args(source.clone(), solc.clone()); + let comp_args = self.build_compiler_args(&source, &solc); // Step 5: Run Compiler and Handle Output let mut cmd = Command::new(&self.compiler_path); @@ -261,14 +259,15 @@ impl ZkSolc { .stdin(Stdio::piped()) .stderr(Stdio::piped()) .stdout(Stdio::piped()) - .spawn(); - let stdin = child.as_mut().unwrap().stdin.take().expect("Stdin exists."); + .spawn() + .wrap_err("Failed to start the compiler")?; + + let stdin = child.stdin.take().expect("Stdin exists."); serde_json::to_writer(stdin, &self.standard_json.clone().unwrap()) .wrap_err("Could not assign standard_json to writer")?; - let output = - child.unwrap().wait_with_output().wrap_err("Could not run compiler cmd")?; + let output = child.wait_with_output().wrap_err("Could not run compiler cmd")?; if !output.status.success() { eyre::bail!( @@ -281,37 +280,32 @@ impl ZkSolc { } let filename = contract_path + .file_name() + .wrap_err(format!("Could not get filename from {:?}", contract_path))? .to_str() - .expect("Unable to convert source to string") - .split( - self.project - .paths - .root - .to_str() - .expect("Unable to convert source to string"), - ) - .nth(1) - .expect("Failed to get Contract relative path") - .split('/') - .last() - .expect("Failed to get Contract filename."); + .unwrap() + .to_string(); // Step 6: Handle Output (Errors and Warnings) data.insert( - filename.to_string(), + filename.clone(), ZkSolc::handle_output( output.stdout, - filename.to_string(), + &filename, &mut displayed_warnings, - Some(self.project.paths.artifacts.join(filename).join("artifacts.json")), + Some( + self.project + .paths + .artifacts + .join(filename.clone()) + .join("artifacts.json"), + ), ), ); } } - + let mut result = ProjectCompileOutput::default(); result.compiled_artifacts = Artifacts { 0: data }; - - // Step 7: Return Ok if the compilation process completes without errors Ok(result) } @@ -329,22 +323,15 @@ impl ZkSolc { /// /// A vector of strings representing the compiler arguments. fn build_compiler_args( - &mut self, - versioned_source: (PathBuf, Source), - solc: Solc, + &self, + versioned_source: &(PathBuf, Source), + solc: &Solc, ) -> Vec { // Get the solc compiler path as a string - let solc_path = solc - .solc - .to_str() - .unwrap_or_else(|| panic!("Error configuring solc compiler.")) - .to_string(); + let solc_path = solc.solc.to_str().expect("Error configuring solc compiler.").to_string(); // Build compiler arguments - let mut comp_args = Vec::::new(); - comp_args.push("--standard-json".to_string()); - comp_args.push("--solc".to_string()); - comp_args.push(solc_path.to_owned()); + let mut comp_args = vec!["--standard-json".to_string(), "--solc".to_string(), solc_path]; // Check if system mode is enabled or if the source path contains "is-system" if self.is_system || versioned_source.0.to_str().unwrap().contains("is-system") { @@ -403,7 +390,7 @@ impl ZkSolc { /// errors and warnings, and saves the artifacts. pub fn handle_output( output: Vec, - source: String, + source: &String, displayed_warnings: &mut HashSet, write_artifacts: Option, ) -> BTreeMap>> { @@ -431,7 +418,7 @@ impl ZkSolc { // Get the bytecode hashes for each contract in the output for key in compiler_output.contracts.keys() { - if key.contains(&source) { + if key.contains(source) { let contracts_in_file = compiler_output.contracts.get(key).unwrap(); for (contract_name, contract) in contracts_in_file { println!( @@ -615,13 +602,13 @@ impl ZkSolc { /// /// ```ignore /// let contract_path = PathBuf::from("/path/to/contract.sol"); - /// self.parse_json_input(contract_path)?; + /// self.prepare_compiler_input(contract_path)?; /// ``` /// - /// In this example, the `parse_json_input` function is called with the contract source path. It + /// In this example, the `prepare_compiler_input` function is called with the contract source path. It /// generates the JSON input for the contract, configures the Solidity compiler, and saves /// the input to the artifacts directory. - fn parse_json_input(&mut self, contract_path: PathBuf) -> Result<()> { + fn prepare_compiler_input(&mut self, contract_path: &PathBuf) -> Result<()> { // Step 1: Configure File Output Selection let mut file_output_selection: FileOutputSelection = BTreeMap::default(); file_output_selection.insert( @@ -659,7 +646,7 @@ impl ZkSolc { // Step 4: Generate Standard JSON Input let standard_json = self .project - .standard_json_input(&contract_path) + .standard_json_input(contract_path) .wrap_err("Could not get standard json input") .unwrap(); @@ -667,10 +654,7 @@ impl ZkSolc { self.standard_json = Some(standard_json.to_owned()); // Step 5: Build Artifacts Path - let artifact_path = &self - .build_artifacts_path(contract_path) - .wrap_err("Could not build artifacts path") - .unwrap(); + let artifact_path = &self.build_artifacts_path(contract_path)?; // Step 6: Save JSON Input let json_input_path = artifact_path.join("json_input.json"); @@ -807,7 +791,7 @@ impl ZkSolc { /// This function can return an error if any of the following occurs: /// - The extraction of the filename from the contract source path fails. /// - The creation of the artifacts directory fails. - fn build_artifacts_path(&self, source: PathBuf) -> Result { + fn build_artifacts_path(&self, source: &PathBuf) -> Result { let filename = source.file_name().expect("Failed to get Contract filename."); let path = self.project.paths.artifacts.join(filename); fs::create_dir_all(&path).wrap_err("Could not create artifacts directory")?; diff --git a/evm/src/executor/backend/mod.rs b/evm/src/executor/backend/mod.rs index a35d19843..548b0f7a8 100644 --- a/evm/src/executor/backend/mod.rs +++ b/evm/src/executor/backend/mod.rs @@ -27,7 +27,6 @@ use revm::{ }; use std::{ collections::{HashMap, HashSet}, - ops::AddAssign, sync::{ atomic::{AtomicBool, Ordering}, Arc, @@ -556,8 +555,9 @@ impl Backend { /// Checks if the test contract associated with this backend failed, See /// [Self::is_failed_test_contract] pub fn is_failed(&self) -> bool { - self.has_snapshot_failure() || - self.test_contract_address() + self.has_snapshot_failure() + || self + .test_contract_address() .map(|addr| self.is_failed_test_contract(addr)) .unwrap_or_default() } @@ -598,7 +598,7 @@ impl Backend { .cloned() .unwrap_or_default() .present_value(); - return value.as_le_bytes()[1] != 0 + return value.as_le_bytes()[1] != 0; } false @@ -612,7 +612,7 @@ impl Backend { U256::from_str_radix(GLOBAL_FAILURE_SLOT, 16).expect("This is a bug.").into(); if let Some(account) = current_state.state.get(&h160_to_b160(CHEATCODE_ADDRESS)) { let value = account.storage.get(&index).cloned().unwrap_or_default().present_value(); - return value == revm::primitives::U256::from(1) + return value == revm::primitives::U256::from(1); } false @@ -714,7 +714,7 @@ impl Backend { all_logs.extend(f.journaled_state.logs.clone()) } }); - return all_logs + return all_logs; } logs @@ -744,7 +744,7 @@ impl Backend { pub fn inspect_ref( &mut self, env: &mut Env, - mut inspector: INSP, + inspector: INSP, ) -> eyre::Result where INSP: Inspector, @@ -752,21 +752,8 @@ impl Backend { self.initialize(env); let result: EVMResult = revm_era::run_era_transaction(env, self, inspector); - // FIXME: we should read it from the database (and before execution). - env.block.number.add_assign(rU256::from(1)); - env.block.timestamp.add_assign(rU256::from(1)); Ok(result.unwrap()) - - /* let node = InMemoryNode::new(None, era_test_node::ShowCalls::None, false, false); - - node.apply_txs(txs) - */ - - /*match revm::evm_inner::(env, self, &mut inspector).transact() { - Ok(res) => Ok(res), - Err(e) => eyre::bail!("backend: failed while inspecting: {:?}", e), - }*/ } /// Returns true if the address is a precompile From cc71e4f5eb6b8c0f62072c5fefcf304b2a00491a Mon Sep 17 00:00:00 2001 From: mm-zk Date: Thu, 7 Sep 2023 17:44:02 +0200 Subject: [PATCH 10/13] changed dependencies to git --- Cargo.lock | 54 ++++++++++++++++++++------------- cli/Cargo.toml | 3 +- cli/src/cmd/forge/zksolc.rs | 2 +- evm/Cargo.toml | 4 +-- evm/src/executor/backend/mod.rs | 2 +- 5 files changed, 39 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 13cc352f6..968c93ab7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2965,9 +2965,29 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "era_revm" +version = "0.1.0" +source = "git+https://github.com/matter-labs/era-revm.git?rev=792cb820587eccdc35bbecb45f343cf1b891b6d2#792cb820587eccdc35bbecb45f343cf1b891b6d2" +dependencies = [ + "era_test_node", + "ethabi 18.0.0", + "eyre", + "hex", + "revm", + "serde", + "serde_json", + "vm", + "zk_evm 1.3.3", + "zksync_basic_types", + "zksync_types", + "zksync_utils", +] + [[package]] name = "era_test_node" version = "0.1.0" +source = "git+https://github.com/matter-labs/era-test-node.git?rev=8013425569340833d4177526850fb517c604bc49#8013425569340833d4177526850fb517c604bc49" dependencies = [ "anyhow", "bigdecimal", @@ -2984,6 +3004,7 @@ dependencies = [ "jsonrpc-http-server", "lazy_static", "once_cell", + "openssl-sys", "reqwest", "serde", "serde_json", @@ -4026,6 +4047,7 @@ dependencies = [ "dirs 5.0.1", "dotenvy", "dunce", + "era_revm", "ethabi 18.0.0", "ethers 2.0.8", "eyre", @@ -4051,7 +4073,6 @@ dependencies = [ "rayon", "regex", "reqwest", - "revm_era", "rpassword", "rustc-hex", "semver 1.0.18", @@ -4166,7 +4187,7 @@ version = "0.2.0" dependencies = [ "auto_impl", "bytes 1.4.0", - "era_test_node", + "era_revm", "ethers 2.0.8", "eyre", "foundry-abi", @@ -4184,7 +4205,6 @@ dependencies = [ "parking_lot 0.12.1", "proptest", "revm", - "revm_era", "semver 1.0.18", "serde", "serde_json", @@ -7039,6 +7059,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "111.27.0+1.1.1v" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06e8f197c82d7511c5b014030c9b1efeda40d7d5f99d23b4ceed3524a5e63f02" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.91" @@ -7047,6 +7076,7 @@ checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] @@ -8560,24 +8590,6 @@ dependencies = [ "sha3 0.10.6", ] -[[package]] -name = "revm_era" -version = "0.1.0" -dependencies = [ - "era_test_node", - "ethabi 18.0.0", - "eyre", - "hex", - "revm", - "serde", - "serde_json", - "vm", - "zk_evm 1.3.3", - "zksync_basic_types", - "zksync_types", - "zksync_utils", -] - [[package]] name = "rfc6979" version = "0.3.1" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 1f5c93fc7..f5583009c 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -85,7 +85,8 @@ pkg-config = "0.3.26" #zksync zksync-web3-rs = {git = "https://github.com/lambdaclass/zksync-web3-rs.git", rev = "70327ae5413c517bd4d27502507cdd96ee40cd22"} -revm_era = { path = "../../revm_era"} +era_revm = { git = "https://github.com/matter-labs/era-revm.git", rev = "792cb820587eccdc35bbecb45f343cf1b891b6d2"} +#era_revm = { path = "../../revm_era"} ansi_term = "0.12.1" diff --git a/cli/src/cmd/forge/zksolc.rs b/cli/src/cmd/forge/zksolc.rs index 9928396a1..0377bbddc 100644 --- a/cli/src/cmd/forge/zksolc.rs +++ b/cli/src/cmd/forge/zksolc.rs @@ -435,7 +435,7 @@ impl ZkSolc { .collect(); let packed_bytecode = Bytes::from( - revm_era::factory_deps::PackedEraBytecode::new( + era_revm::factory_deps::PackedEraBytecode::new( contract.hash.as_ref().unwrap().clone(), contract.evm.bytecode.as_ref().unwrap().object.clone(), factory_deps, diff --git a/evm/Cargo.toml b/evm/Cargo.toml index ba98d8de4..20c7e9422 100644 --- a/evm/Cargo.toml +++ b/evm/Cargo.toml @@ -47,8 +47,8 @@ revm = { git = "https://github.com/mm-zk/revm.git", branch = "release_v25_with_ "optional_no_base_fee" ] } -era_test_node = { path = "../../../public_matter/era-test-node"} -revm_era = { path = "../../../public_matter/revm_era"} +era_revm = { git = "https://github.com/matter-labs/era-revm.git", rev = "792cb820587eccdc35bbecb45f343cf1b891b6d2"} +# era_revm = { path = "../../revm_era"} # Fuzzer proptest = "1" diff --git a/evm/src/executor/backend/mod.rs b/evm/src/executor/backend/mod.rs index 548b0f7a8..1b179e289 100644 --- a/evm/src/executor/backend/mod.rs +++ b/evm/src/executor/backend/mod.rs @@ -751,7 +751,7 @@ impl Backend { { self.initialize(env); - let result: EVMResult = revm_era::run_era_transaction(env, self, inspector); + let result: EVMResult = era_revm::transactions::run_era_transaction(env, self, inspector); Ok(result.unwrap()) } From fce17c6a2eb9a44cdcbd8a65edcef28f4e2676d0 Mon Sep 17 00:00:00 2001 From: mm-zk Date: Thu, 7 Sep 2023 17:49:07 +0200 Subject: [PATCH 11/13] revert fmt changes --- cli/src/cmd/forge/test/filter.rs | 4 ++-- cli/src/cmd/forge/test/mod.rs | 18 +++++++++--------- cli/src/cmd/forge/zksolc.rs | 10 +++++----- evm/src/executor/backend/mod.rs | 32 ++++++++++++++++---------------- evm/src/executor/mod.rs | 8 ++++---- forge/src/runner.rs | 8 ++++---- 6 files changed, 40 insertions(+), 40 deletions(-) diff --git a/cli/src/cmd/forge/test/filter.rs b/cli/src/cmd/forge/test/filter.rs index 5050bb3b6..58877b05d 100644 --- a/cli/src/cmd/forge/test/filter.rs +++ b/cli/src/cmd/forge/test/filter.rs @@ -90,10 +90,10 @@ impl FileFilter for FilterArgs { fn is_match(&self, file: &Path) -> bool { if let Some(file) = file.as_os_str().to_str() { if let Some(ref glob) = self.path_pattern { - return glob.is_match(file); + return glob.is_match(file) } if let Some(ref glob) = self.path_pattern_inverse { - return !glob.is_match(file); + return !glob.is_match(file) } } file.is_sol_test() diff --git a/cli/src/cmd/forge/test/mod.rs b/cli/src/cmd/forge/test/mod.rs index ec2d51ded..8e6c7c4c1 100644 --- a/cli/src/cmd/forge/test/mod.rs +++ b/cli/src/cmd/forge/test/mod.rs @@ -144,8 +144,8 @@ impl TestArgs { let mut project = config.project()?; // install missing dependencies - if install::install_missing_dependencies(&mut config, self.build_args().silent) - && config.auto_detect_remappings + if install::install_missing_dependencies(&mut config, self.build_args().silent) && + config.auto_detect_remappings { // need to re-configure here to also catch additional remappings config = self.load_config(); @@ -374,7 +374,7 @@ impl TestOutcome { pub fn ensure_ok(&self) -> eyre::Result<()> { let failures = self.failures().count(); if self.allow_failure || failures == 0 { - return Ok(()); + return Ok(()) } if !shell::verbosity().is_normal() { @@ -387,7 +387,7 @@ impl TestOutcome { for (suite_name, suite) in self.results.iter() { let failures = suite.failures().count(); if failures == 0 { - continue; + continue } let term = if failures > 1 { "tests" } else { "test" }; @@ -582,7 +582,7 @@ async fn test( // If the test failed, we want to stop processing the rest of the tests if fail_fast && result.status == TestStatus::Failure { - break 'outer; + break 'outer } // We only display logs at level 2 and above @@ -623,12 +623,12 @@ async fn test( // tests At verbosity level 5, we display // all traces for all tests TraceKind::Setup => { - (verbosity >= 5) - || (verbosity == 4 && result.status == TestStatus::Failure) + (verbosity >= 5) || + (verbosity == 4 && result.status == TestStatus::Failure) } TraceKind::Execution => { - verbosity > 3 - || (verbosity == 3 && result.status == TestStatus::Failure) + verbosity > 3 || + (verbosity == 3 && result.status == TestStatus::Failure) } _ => false, }; diff --git a/cli/src/cmd/forge/zksolc.rs b/cli/src/cmd/forge/zksolc.rs index 0377bbddc..df416374c 100644 --- a/cli/src/cmd/forge/zksolc.rs +++ b/cli/src/cmd/forge/zksolc.rs @@ -239,7 +239,7 @@ impl ZkSolc { // Skip this file if it's not in the 'sources' directory or its subdirectories if !is_in_sources_dir { - continue; + continue } // Step 3: Parse JSON Input for each Source @@ -605,9 +605,9 @@ impl ZkSolc { /// self.prepare_compiler_input(contract_path)?; /// ``` /// - /// In this example, the `prepare_compiler_input` function is called with the contract source path. It - /// generates the JSON input for the contract, configures the Solidity compiler, and saves - /// the input to the artifacts directory. + /// In this example, the `prepare_compiler_input` function is called with the contract source + /// path. It generates the JSON input for the contract, configures the Solidity compiler, + /// and saves the input to the artifacts directory. fn prepare_compiler_input(&mut self, contract_path: &PathBuf) -> Result<()> { // Step 1: Configure File Output Selection let mut file_output_selection: FileOutputSelection = BTreeMap::default(); @@ -847,7 +847,7 @@ mod tests { let data = include_str!("testdata/artifacts.json").as_bytes().to_vec(); let mut displayed_warnings = HashSet::new(); let source = "src/Counter.sol".to_owned(); - let result = ZkSolc::handle_output(data, source, &mut displayed_warnings, None); + let result = ZkSolc::handle_output(data, &source, &mut displayed_warnings, None); let artifacts = result.get("Counter").unwrap(); assert_eq!(artifacts.len(), 1); diff --git a/evm/src/executor/backend/mod.rs b/evm/src/executor/backend/mod.rs index 1b179e289..c81fdff02 100644 --- a/evm/src/executor/backend/mod.rs +++ b/evm/src/executor/backend/mod.rs @@ -290,7 +290,7 @@ pub trait DatabaseExt: Database { /// Returns an error if [`Self::has_cheatcode_access`] returns `false` fn ensure_cheatcode_access(&self, account: Address) -> Result<(), NoCheatcodeAccessError> { if !self.has_cheatcode_access(account) { - return Err(NoCheatcodeAccessError(account)); + return Err(NoCheatcodeAccessError(account)) } Ok(()) } @@ -302,7 +302,7 @@ pub trait DatabaseExt: Database { account: Address, ) -> Result<(), NoCheatcodeAccessError> { if self.is_forked_mode() { - return self.ensure_cheatcode_access(account); + return self.ensure_cheatcode_access(account) } Ok(()) } @@ -555,9 +555,8 @@ impl Backend { /// Checks if the test contract associated with this backend failed, See /// [Self::is_failed_test_contract] pub fn is_failed(&self) -> bool { - self.has_snapshot_failure() - || self - .test_contract_address() + self.has_snapshot_failure() || + self.test_contract_address() .map(|addr| self.is_failed_test_contract(addr)) .unwrap_or_default() } @@ -598,7 +597,7 @@ impl Backend { .cloned() .unwrap_or_default() .present_value(); - return value.as_le_bytes()[1] != 0; + return value.as_le_bytes()[1] != 0 } false @@ -612,7 +611,7 @@ impl Backend { U256::from_str_radix(GLOBAL_FAILURE_SLOT, 16).expect("This is a bug.").into(); if let Some(account) = current_state.state.get(&h160_to_b160(CHEATCODE_ADDRESS)) { let value = account.storage.get(&index).cloned().unwrap_or_default().present_value(); - return value == revm::primitives::U256::from(1); + return value == revm::primitives::U256::from(1) } false @@ -714,7 +713,7 @@ impl Backend { all_logs.extend(f.journaled_state.logs.clone()) } }); - return all_logs; + return all_logs } logs @@ -751,7 +750,8 @@ impl Backend { { self.initialize(env); - let result: EVMResult = era_revm::transactions::run_era_transaction(env, self, inspector); + let result: EVMResult = + era_revm::transactions::run_era_transaction(env, self, inspector); Ok(result.unwrap()) } @@ -848,7 +848,7 @@ impl Backend { for tx in full_block.transactions.into_iter() { if tx.hash().eq(&tx_hash) { // found the target transaction - return Ok(Some(tx)); + return Ok(Some(tx)) } trace!(tx=?tx.hash, "committing transaction"); @@ -973,7 +973,7 @@ impl DatabaseExt for Backend { trace!(?id, "select fork"); if self.is_active_fork(id) { // nothing to do - return Ok(()); + return Ok(()) } let fork_id = self.ensure_fork_id(id).cloned()?; @@ -1190,7 +1190,7 @@ impl DatabaseExt for Backend { fn ensure_fork(&self, id: Option) -> eyre::Result { if let Some(id) = id { if self.inner.issued_local_fork_ids.contains_key(&id) { - return Ok(id); + return Ok(id) } eyre::bail!("Requested fork `{}` does not exit", id) } @@ -1216,7 +1216,7 @@ impl DatabaseExt for Backend { if self.inner.forks.len() == 1 { // we only want to provide additional diagnostics here when in multifork mode with > 1 // forks - return None; + return None } if !active_fork.is_contract(callee) && !is_contract_in_state(journaled_state, callee) { @@ -1243,7 +1243,7 @@ impl DatabaseExt for Backend { active: active_id, available_on, }) - }; + } } None } @@ -1416,7 +1416,7 @@ impl Fork { pub fn is_contract(&self, acc: Address) -> bool { if let Ok(Some(acc)) = self.db.basic(h160_to_b160(acc)) { if acc.code_hash != KECCAK_EMPTY { - return true; + return true } } is_contract_in_state(&self.journaled_state, acc) @@ -1736,7 +1736,7 @@ fn merge_db_account_data( acc } else { // Account does not exist - return; + return }; if let Some(code) = active.contracts.get(&acc.info.code_hash).cloned() { diff --git a/evm/src/executor/mod.rs b/evm/src/executor/mod.rs index 3816c8c9f..5809ece85 100644 --- a/evm/src/executor/mod.rs +++ b/evm/src/executor/mod.rs @@ -146,7 +146,7 @@ impl Executor { /// XXXX pub fn deploy_create2_deployer(&mut self) -> eyre::Result<()> { trace!("deploying local create2 deployer"); - return Ok(()); + return Ok(()) /* let create2_deployer_account = self .backend_mut() @@ -480,7 +480,7 @@ impl Executor { state_changeset: None, transactions: None, script_wallets, - }))); + }))) } }; @@ -551,7 +551,7 @@ impl Executor { ) -> Result { if self.backend().has_snapshot_failure() { // a failure occurred in a reverted snapshot, which is considered a failed test - return Ok(should_fail); + return Ok(should_fail) } // Construct a new VM with the state changeset @@ -912,7 +912,7 @@ fn convert_call_result( let reason = decode::decode_revert(result.as_ref(), abi, Some(status)) .unwrap_or_else(|_| format!("{status:?}")); if reason == "SKIPPED" { - return Err(EvmError::SkipError); + return Err(EvmError::SkipError) } Err(EvmError::Execution(Box::new(ExecutionErr { reverted, diff --git a/forge/src/runner.rs b/forge/src/runner.rs index 15468bd98..f489811c1 100644 --- a/forge/src/runner.rs +++ b/forge/src/runner.rs @@ -204,7 +204,7 @@ impl<'a> ContractRunner<'a> { )] .into(), warnings, - ); + ) } let has_invariants = self.contract.functions().any(|func| func.is_invariant_test()); @@ -239,7 +239,7 @@ impl<'a> ContractRunner<'a> { )] .into(), warnings, - ); + ) } let mut test_results = self @@ -435,7 +435,7 @@ impl<'a> ContractRunner<'a> { labeled_addresses, kind: TestKind::Standard(0), ..Default::default() - }]; + }] }; let mut evm = InvariantExecutor::new( @@ -556,7 +556,7 @@ impl<'a> ContractRunner<'a> { labeled_addresses, kind: TestKind::Standard(0), ..Default::default() - }; + } } let kind = TestKind::Fuzz { From 946974d7fe117d685d5459116c36376ee386b5ef Mon Sep 17 00:00:00 2001 From: mm-zk Date: Wed, 13 Sep 2023 14:23:13 +0200 Subject: [PATCH 12/13] final touches --- Cargo.lock | 311 +++++++++++++++++++----------------- Cargo.toml | 43 +++-- cli/src/cmd/forge/zksolc.rs | 1 - evm/src/executor/mod.rs | 26 +-- 4 files changed, 183 insertions(+), 198 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 968c93ab7..ef2aa56db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -457,8 +457,8 @@ dependencies = [ "crc 3.0.1", "ctrlc", "ethereum-forkid", - "ethers 2.0.8", - "ethers-solc 2.0.8", + "ethers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-solc 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "fdlimit", "flate2", "forge", @@ -491,7 +491,7 @@ name = "anvil-core" version = "0.1.0" dependencies = [ "bytes 1.4.0", - "ethers-core 2.0.8", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "foundry-evm", "hash-db", "hash256-std-hasher", @@ -1503,11 +1503,11 @@ version = "0.2.0" dependencies = [ "async-trait", "chrono", - "ethers-contract 2.0.8", - "ethers-core 2.0.8", - "ethers-etherscan 2.0.8", - "ethers-providers 2.0.8", - "ethers-signers 2.0.8", + "ethers-contract 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-etherscan 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-providers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-signers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "evm-disassembler", "eyre", "foundry-common", @@ -1572,8 +1572,8 @@ dependencies = [ "clap 4.3.23", "criterion", "dirs 5.0.1", - "ethers 2.0.8", - "ethers-solc 2.0.8", + "ethers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-solc 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "eyre", "forge", "forge-fmt", @@ -3187,20 +3187,6 @@ dependencies = [ "uint", ] -[[package]] -name = "ethers" -version = "2.0.8" -dependencies = [ - "ethers-addressbook 2.0.8", - "ethers-contract 2.0.8", - "ethers-core 2.0.8", - "ethers-etherscan 2.0.8", - "ethers-middleware 2.0.8", - "ethers-providers 2.0.8", - "ethers-signers 2.0.8", - "ethers-solc 2.0.8", -] - [[package]] name = "ethers" version = "2.0.8" @@ -3218,13 +3204,18 @@ dependencies = [ ] [[package]] -name = "ethers-addressbook" +name = "ethers" version = "2.0.8" +source = "git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts#a797eba57905406a18f9c1686f67fdf81594377c" dependencies = [ - "ethers-core 2.0.8", - "once_cell", - "serde", - "serde_json", + "ethers-addressbook 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-contract 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-etherscan 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-middleware 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-providers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-signers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-solc 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", ] [[package]] @@ -3240,20 +3231,14 @@ dependencies = [ ] [[package]] -name = "ethers-contract" +name = "ethers-addressbook" version = "2.0.8" +source = "git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts#a797eba57905406a18f9c1686f67fdf81594377c" dependencies = [ - "const-hex", - "ethers-contract-abigen 2.0.8", - "ethers-contract-derive 2.0.8", - "ethers-core 2.0.8", - "ethers-providers 2.0.8", - "futures-util", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "once_cell", - "pin-project", "serde", "serde_json", - "thiserror", ] [[package]] @@ -3276,16 +3261,36 @@ dependencies = [ "thiserror", ] +[[package]] +name = "ethers-contract" +version = "2.0.8" +source = "git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts#a797eba57905406a18f9c1686f67fdf81594377c" +dependencies = [ + "const-hex", + "ethers-contract-abigen 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-contract-derive 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-providers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "futures-util", + "once_cell", + "pin-project", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "ethers-contract-abigen" version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "155ea1b84d169d231317ed86e307af6f2bed6b40dd17e5e94bc84da21cadb21c" dependencies = [ "Inflector", - "const-hex", "dunce", - "ethers-core 2.0.8", - "ethers-etherscan 2.0.8", + "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-etherscan 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "eyre", + "hex", "prettyplease", "proc-macro2 1.0.66", "quote 1.0.33", @@ -3301,15 +3306,14 @@ dependencies = [ [[package]] name = "ethers-contract-abigen" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155ea1b84d169d231317ed86e307af6f2bed6b40dd17e5e94bc84da21cadb21c" +source = "git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts#a797eba57905406a18f9c1686f67fdf81594377c" dependencies = [ "Inflector", + "const-hex", "dunce", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-etherscan 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-etherscan 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "eyre", - "hex", "prettyplease", "proc-macro2 1.0.66", "quote 1.0.33", @@ -3325,11 +3329,13 @@ dependencies = [ [[package]] name = "ethers-contract-derive" version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8567ff196c4a37c1a8c90ec73bda0ad2062e191e4f0a6dc4d943e2ec4830fc88" dependencies = [ "Inflector", - "const-hex", - "ethers-contract-abigen 2.0.8", - "ethers-core 2.0.8", + "ethers-contract-abigen 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "hex", "proc-macro2 1.0.66", "quote 1.0.33", "serde_json", @@ -3339,13 +3345,12 @@ dependencies = [ [[package]] name = "ethers-contract-derive" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8567ff196c4a37c1a8c90ec73bda0ad2062e191e4f0a6dc4d943e2ec4830fc88" +source = "git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts#a797eba57905406a18f9c1686f67fdf81594377c" dependencies = [ "Inflector", - "ethers-contract-abigen 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "hex", + "const-hex", + "ethers-contract-abigen 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "proc-macro2 1.0.66", "quote 1.0.33", "serde_json", @@ -3355,17 +3360,19 @@ dependencies = [ [[package]] name = "ethers-core" version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60ca2514feb98918a0a31de7e1983c29f2267ebf61b2dc5d4294f91e5b866623" dependencies = [ "arrayvec 0.7.4", "bytes 1.4.0", - "cargo_metadata 0.17.0", + "cargo_metadata 0.15.4", "chrono", - "const-hex", "elliptic-curve 0.13.5", "ethabi 18.0.0", "generic-array 0.14.7", + "hex", "k256 0.13.1", - "num_enum 0.7.0", + "num_enum 0.6.1", "once_cell", "open-fastrlp", "rand 0.8.5", @@ -3383,19 +3390,18 @@ dependencies = [ [[package]] name = "ethers-core" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60ca2514feb98918a0a31de7e1983c29f2267ebf61b2dc5d4294f91e5b866623" +source = "git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts#a797eba57905406a18f9c1686f67fdf81594377c" dependencies = [ "arrayvec 0.7.4", "bytes 1.4.0", - "cargo_metadata 0.15.4", + "cargo_metadata 0.17.0", "chrono", + "const-hex", "elliptic-curve 0.13.5", "ethabi 18.0.0", "generic-array 0.14.7", - "hex", "k256 0.13.1", - "num_enum 0.6.1", + "num_enum 0.7.0", "once_cell", "open-fastrlp", "rand 0.8.5", @@ -3413,9 +3419,10 @@ dependencies = [ [[package]] name = "ethers-etherscan" version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22b3a8269d3df0ed6364bc05b4735b95f4bf830ce3aef87d5e760fb0e93e5b91" dependencies = [ - "ethers-core 2.0.8", - "ethers-solc 2.0.8", + "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest", "semver 1.0.18", "serde", @@ -3427,10 +3434,10 @@ dependencies = [ [[package]] name = "ethers-etherscan" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22b3a8269d3df0ed6364bc05b4735b95f4bf830ce3aef87d5e760fb0e93e5b91" +source = "git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts#a797eba57905406a18f9c1686f67fdf81594377c" dependencies = [ - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-solc 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "reqwest", "semver 1.0.18", "serde", @@ -3442,14 +3449,16 @@ dependencies = [ [[package]] name = "ethers-middleware" version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c339aad74ae5c451d27e0e49c7a3c7d22620b119b4f9291d7aa21f72d7f366" dependencies = [ "async-trait", "auto_impl", - "ethers-contract 2.0.8", - "ethers-core 2.0.8", - "ethers-etherscan 2.0.8", - "ethers-providers 2.0.8", - "ethers-signers 2.0.8", + "ethers-contract 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-etherscan 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-providers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-signers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "futures-channel", "futures-locks", "futures-util", @@ -3467,16 +3476,15 @@ dependencies = [ [[package]] name = "ethers-middleware" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c339aad74ae5c451d27e0e49c7a3c7d22620b119b4f9291d7aa21f72d7f366" +source = "git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts#a797eba57905406a18f9c1686f67fdf81594377c" dependencies = [ "async-trait", "auto_impl", - "ethers-contract 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-etherscan 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-providers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-signers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-contract 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-etherscan 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-providers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-signers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "futures-channel", "futures-locks", "futures-util", @@ -3494,22 +3502,22 @@ dependencies = [ [[package]] name = "ethers-providers" version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b411b119f1cf0efb69e2190883dee731251882bb21270f893ee9513b3a697c48" dependencies = [ "async-trait", "auto_impl", "base64 0.21.2", "bytes 1.4.0", - "const-hex", - "enr 0.9.0", - "ethers-core 2.0.8", - "futures-channel", + "enr 0.8.1", + "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "futures-core", "futures-timer", "futures-util", "hashers", + "hex", "http", "instant", - "jsonwebtoken", "once_cell", "pin-project", "reqwest", @@ -3524,29 +3532,29 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winapi 0.3.9", "ws_stream_wasm", ] [[package]] name = "ethers-providers" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b411b119f1cf0efb69e2190883dee731251882bb21270f893ee9513b3a697c48" +source = "git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts#a797eba57905406a18f9c1686f67fdf81594377c" dependencies = [ "async-trait", "auto_impl", "base64 0.21.2", "bytes 1.4.0", - "enr 0.8.1", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "const-hex", + "enr 0.9.0", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "futures-channel", "futures-core", "futures-timer", "futures-util", "hashers", - "hex", "http", "instant", + "jsonwebtoken", "once_cell", "pin-project", "reqwest", @@ -3561,82 +3569,79 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "winapi 0.3.9", "ws_stream_wasm", ] [[package]] name = "ethers-signers" version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4864d387456a9c09a1157fa10e1528b29d90f1d859443acf06a1b23365fb518c" dependencies = [ "async-trait", "coins-bip32", "coins-bip39", - "coins-ledger", - "const-hex", "elliptic-curve 0.13.5", "eth-keystore", - "ethers-core 2.0.8", - "futures-executor", - "futures-util", - "home", + "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "hex", "rand 0.8.5", - "rusoto_core", - "rusoto_kms", - "semver 1.0.18", "sha2 0.10.6", - "spki 0.7.2", "thiserror", "tracing", - "trezor-client", ] [[package]] name = "ethers-signers" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4864d387456a9c09a1157fa10e1528b29d90f1d859443acf06a1b23365fb518c" +source = "git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts#a797eba57905406a18f9c1686f67fdf81594377c" dependencies = [ "async-trait", "coins-bip32", "coins-bip39", + "coins-ledger", + "const-hex", "elliptic-curve 0.13.5", "eth-keystore", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "hex", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "futures-executor", + "futures-util", + "home", "rand 0.8.5", + "rusoto_core", + "rusoto_kms", + "semver 1.0.18", "sha2 0.10.6", + "spki 0.7.2", "thiserror", "tracing", + "trezor-client", ] [[package]] name = "ethers-solc" version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6c2b9625a2c639d46625f88acc2092a3cb35786c37f7c2128b3ca20f639b3c" dependencies = [ "cfg-if 1.0.0", - "const-hex", - "dirs 5.0.1", "dunce", - "ethers-core 2.0.8", - "fs_extra", - "futures-util", + "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "glob", + "hex", "home", "md-5 0.10.5", "num_cpus", "once_cell", "path-slash", - "rand 0.8.5", "rayon", "regex", "semver 1.0.18", "serde", "serde_json", - "sha2 0.10.6", "solang-parser", - "svm-rs 0.3.0", - "svm-rs-builds", - "tempfile", + "svm-rs 0.2.23", "thiserror", "tiny-keccak 2.0.2", "tokio", @@ -3648,26 +3653,32 @@ dependencies = [ [[package]] name = "ethers-solc" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6c2b9625a2c639d46625f88acc2092a3cb35786c37f7c2128b3ca20f639b3c" +source = "git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts#a797eba57905406a18f9c1686f67fdf81594377c" dependencies = [ "cfg-if 1.0.0", + "const-hex", + "dirs 5.0.1", "dunce", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "fs_extra", + "futures-util", "glob", - "hex", "home", "md-5 0.10.5", "num_cpus", "once_cell", "path-slash", + "rand 0.8.5", "rayon", "regex", "semver 1.0.18", "serde", "serde_json", + "sha2 0.10.6", "solang-parser", - "svm-rs 0.2.23", + "svm-rs 0.3.0", + "svm-rs-builds", + "tempfile", "thiserror", "tiny-keccak 2.0.2", "tokio", @@ -3921,7 +3932,7 @@ name = "forge" version = "0.2.0" dependencies = [ "comfy-table", - "ethers 2.0.8", + "ethers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "eyre", "foundry-common", "foundry-config", @@ -3951,8 +3962,8 @@ dependencies = [ "auto_impl", "clap 4.3.23", "derive_more", - "ethers-core 2.0.8", - "ethers-solc 2.0.8", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-solc 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "eyre", "forge-fmt", "foundry-common", @@ -3978,7 +3989,7 @@ name = "forge-fmt" version = "0.2.0" dependencies = [ "ariadne", - "ethers-core 2.0.8", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "foundry-config", "itertools", "pretty_assertions", @@ -4003,10 +4014,10 @@ dependencies = [ name = "foundry-abi" version = "0.1.0" dependencies = [ - "ethers-contract 2.0.8", - "ethers-contract-abigen 2.0.8", - "ethers-core 2.0.8", - "ethers-providers 2.0.8", + "ethers-contract 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-contract-abigen 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-providers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "eyre", "foundry-macros", "syn 2.0.29", @@ -4017,8 +4028,8 @@ name = "foundry-binder" version = "0.1.0" dependencies = [ "curl", - "ethers-contract 2.0.8", - "ethers-solc 2.0.8", + "ethers-contract 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-solc 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "eyre", "foundry-config", "git2", @@ -4049,7 +4060,7 @@ dependencies = [ "dunce", "era_revm", "ethabi 18.0.0", - "ethers 2.0.8", + "ethers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "eyre", "forge", "forge-doc", @@ -4105,8 +4116,8 @@ dependencies = [ name = "foundry-cli-test-utils" version = "0.1.0" dependencies = [ - "ethers 2.0.8", - "ethers-solc 2.0.8", + "ethers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-solc 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "eyre", "foundry-common", "foundry-config", @@ -4127,11 +4138,11 @@ dependencies = [ "clap 4.3.23", "comfy-table", "dunce", - "ethers-core 2.0.8", - "ethers-etherscan 2.0.8", - "ethers-middleware 2.0.8", - "ethers-providers 2.0.8", - "ethers-solc 2.0.8", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-etherscan 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-middleware 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-providers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-solc 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "eyre", "foundry-config", "foundry-macros", @@ -4156,9 +4167,9 @@ version = "0.2.0" dependencies = [ "Inflector", "dirs-next", - "ethers-core 2.0.8", - "ethers-etherscan 2.0.8", - "ethers-solc 2.0.8", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-etherscan 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-solc 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "eyre", "figment", "globset", @@ -4188,7 +4199,7 @@ dependencies = [ "auto_impl", "bytes 1.4.0", "era_revm", - "ethers 2.0.8", + "ethers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "eyre", "foundry-abi", "foundry-common", @@ -4221,7 +4232,7 @@ dependencies = [ name = "foundry-macros" version = "0.2.0" dependencies = [ - "ethers-core 2.0.8", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "foundry-macros-impl", "serde", "serde_json", @@ -4241,12 +4252,12 @@ name = "foundry-utils" version = "0.2.0" dependencies = [ "dunce", - "ethers-addressbook 2.0.8", - "ethers-contract 2.0.8", - "ethers-core 2.0.8", - "ethers-etherscan 2.0.8", - "ethers-providers 2.0.8", - "ethers-solc 2.0.8", + "ethers-addressbook 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-contract 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-core 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-etherscan 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-providers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", + "ethers-solc 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "eyre", "forge-fmt", "foundry-common", @@ -11060,7 +11071,7 @@ name = "ui" version = "0.2.0" dependencies = [ "crossterm 0.26.1", - "ethers 2.0.8", + "ethers 2.0.8 (git+https://github.com/mm-zk/ethers-rs?branch=main_with_public_artifacts)", "eyre", "forge", "foundry-common", diff --git a/Cargo.toml b/Cargo.toml index 9ce494d28..a990b9d1c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,34 +61,33 @@ panic = "abort" strip = true [workspace.dependencies] -ethers = { git = "https://github.com/gakonst/ethers-rs", default-features = false } -ethers-addressbook = { git = "https://github.com/gakonst/ethers-rs", default-features = false } -ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false } -ethers-contract = { git = "https://github.com/gakonst/ethers-rs", default-features = false } -ethers-contract-abigen = { git = "https://github.com/gakonst/ethers-rs", default-features = false } -ethers-providers = { git = "https://github.com/gakonst/ethers-rs", default-features = false } -ethers-signers = { git = "https://github.com/gakonst/ethers-rs", default-features = false } -ethers-middleware = { git = "https://github.com/gakonst/ethers-rs", default-features = false } -ethers-etherscan = { git = "https://github.com/gakonst/ethers-rs", default-features = false } -ethers-solc = { git = "https://github.com/gakonst/ethers-rs", default-features = false } +ethers = { git = "https://github.com/mm-zk/ethers-rs", branch = "main_with_public_artifacts", default-features = false } +ethers-addressbook = { git = "https://github.com/mm-zk/ethers-rs", branch = "main_with_public_artifacts", default-features = false } +ethers-core = { git = "https://github.com/mm-zk/ethers-rs", branch = "main_with_public_artifacts", default-features = false } +ethers-contract = { git = "https://github.com/mm-zk/ethers-rs", branch = "main_with_public_artifacts", default-features = false } +ethers-contract-abigen = { git = "https://github.com/mm-zk/ethers-rs", branch = "main_with_public_artifacts", default-features = false } +ethers-providers = { git = "https://github.com/mm-zk/ethers-rs", branch = "main_with_public_artifacts", default-features = false } +ethers-signers = { git = "https://github.com/mm-zk/ethers-rs", branch = "main_with_public_artifacts", default-features = false } +ethers-middleware = { git = "https://github.com/mm-zk/ethers-rs", branch = "main_with_public_artifacts", default-features = false } +ethers-etherscan = { git = "https://github.com/mm-zk/ethers-rs", branch = "main_with_public_artifacts", default-features = false } +ethers-solc = { git = "https://github.com/mm-zk/ethers-rs", branch = "main_with_public_artifacts", default-features = false } solang-parser = "=0.3.1" -[patch."https://github.com/gakonst/ethers-rs"] -ethers = { path = "../ethers-rs/ethers" } -ethers-addressbook = { path = "../ethers-rs/ethers-addressbook" } -ethers-contract = { path = "../ethers-rs/ethers-contract" } -ethers-contract-abigen = { path = "../ethers-rs/ethers-contract/ethers-contract-abigen" } -ethers-core = { path = "../ethers-rs/ethers-core" } -ethers-etherscan = { path = "../ethers-rs/ethers-etherscan" } -ethers-middleware = { path = "../ethers-rs/ethers-middleware" } -ethers-providers = { path = "../ethers-rs/ethers-providers" } -ethers-signers = { path = "../ethers-rs/ethers-signers" } -ethers-solc = { path = "../ethers-rs/ethers-solc" } +#[patch."https://github.com/gakonst/ethers-rs"] +#ethers = { path = "../ethers-rs/ethers" } +#ethers-addressbook = { path = "../ethers-rs/ethers-addressbook" } +#ethers-contract = { path = "../ethers-rs/ethers-contract" } +#ethers-contract-abigen = { path = "../ethers-rs/ethers-contract/ethers-contract-abigen" } +#ethers-core = { path = "../ethers-rs/ethers-core" } +#ethers-etherscan = { path = "../ethers-rs/ethers-etherscan" } +#ethers-middleware = { path = "../ethers-rs/ethers-middleware" } +#ethers-providers = { path = "../ethers-rs/ethers-providers" } +#ethers-signers = { path = "../ethers-rs/ethers-signers" } +#ethers-solc = { path = "../ethers-rs/ethers-solc" } [patch.crates-io] # revm = { git = "https://github.com/bluealloy/revm/", branch = "release/v25" } -# revm = { git = "https://github.com/mm-zk/revm.git", branch = "release_v25_with_old_sha" } revm = { git = "https://github.com/mm-zk/revm.git", branch = "release_v25_with_old_sha", version = "3", default-features = false, features = [ "std", diff --git a/cli/src/cmd/forge/zksolc.rs b/cli/src/cmd/forge/zksolc.rs index df416374c..b1fb3e71e 100644 --- a/cli/src/cmd/forge/zksolc.rs +++ b/cli/src/cmd/forge/zksolc.rs @@ -452,7 +452,6 @@ impl ZkSolc { link_references: Default::default(), }); - // FIXME: incorrect art.deployed_bytecode = Some(CompactDeployedBytecode { bytecode: Some(CompactBytecode { object: ethers::solc::artifacts::BytecodeObject::Bytecode( diff --git a/evm/src/executor/mod.rs b/evm/src/executor/mod.rs index 5809ece85..4377dc7ae 100644 --- a/evm/src/executor/mod.rs +++ b/evm/src/executor/mod.rs @@ -143,35 +143,13 @@ impl Executor { } /// Creates the default CREATE2 Contract Deployer for local tests and scripts. - /// XXXX pub fn deploy_create2_deployer(&mut self) -> eyre::Result<()> { trace!("deploying local create2 deployer"); + // Crate2 deployer is not needed for Era. return Ok(()) - /* - let create2_deployer_account = self - .backend_mut() - .basic(h160_to_b160(DEFAULT_CREATE2_DEPLOYER))? - .ok_or(DatabaseError::MissingAccount(DEFAULT_CREATE2_DEPLOYER))?; - - // if the deployer is not currently deployed, deploy the default one - if create2_deployer_account.code.map_or(true, |code| code.is_empty()) { - let creator = "0x3fAB184622Dc19b6109349B94811493BF2a45362".parse().unwrap(); - - // Probably 0, but just in case. - let initial_balance = self.get_balance(creator)?; - - self.set_balance(creator, U256::MAX)?; - let res = - self.deploy(creator, DEFAULT_CREATE2_DEPLOYER_CODE.into(), U256::zero(), None)?; - trace!(create2=?res.address, "deployed local create2 deployer"); - - self.set_balance(creator, initial_balance)?; - } - Ok(())*/ } /// Set the balance of an account. - /// XXX pub fn set_balance(&mut self, address: Address, amount: U256) -> DatabaseResult<&mut Self> { trace!(?address, ?amount, "setting account balance"); let mut account = self.backend_mut().basic(h160_to_b160(address))?.unwrap_or_default(); @@ -191,7 +169,6 @@ impl Executor { } /// Set the nonce of an account. - /// XXX pub fn set_nonce(&mut self, address: Address, nonce: u64) -> DatabaseResult<&mut Self> { let mut account = self.backend_mut().basic(h160_to_b160(address))?.unwrap_or_default(); account.nonce = nonce; @@ -505,7 +482,6 @@ impl Executor { /// /// Executes a CREATE transaction with the contract `code` and persistent database state /// modifications - /// XXX pub fn deploy( &mut self, from: Address, From 3128d0f9794740bf43561937cfd26c358aea99ae Mon Sep 17 00:00:00 2001 From: mm-zk Date: Mon, 16 Oct 2023 10:07:18 +0200 Subject: [PATCH 13/13] review --- Cargo.toml | 2 +- anvil/core/Cargo.toml | 1 + chisel/Cargo.toml | 1 + cli/Cargo.toml | 1 - 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a990b9d1c..5cc0ab53c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,6 @@ resolver = "2" [profile.dev] # Disabling debug info speeds up builds a bunch, # and we don't rely on it for debugging that much -#debug = 1 # These speed up local tests [profile.dev.package.ethers-solc] @@ -87,6 +86,7 @@ solang-parser = "=0.3.1" #ethers-solc = { path = "../ethers-rs/ethers-solc" } [patch.crates-io] +# Original revm - we had to fork it, due to compilation issues with SHA # revm = { git = "https://github.com/bluealloy/revm/", branch = "release/v25" } revm = { git = "https://github.com/mm-zk/revm.git", branch = "release_v25_with_old_sha", version = "3", default-features = false, features = [ diff --git a/anvil/core/Cargo.toml b/anvil/core/Cargo.toml index 4f4d50e9c..6b2dbc9d8 100644 --- a/anvil/core/Cargo.toml +++ b/anvil/core/Cargo.toml @@ -7,6 +7,7 @@ license = "MIT OR Apache-2.0" [dependencies] # foundry internal foundry-evm = { path = "../../evm" } +# Original REVM - we had to fork it, due to compilation issues with SHA # revm = { version = "3", default-features = false, features = ["std", "serde", "memory_limit"] } revm = { git = "https://github.com/mm-zk/revm.git", branch = "release_v25_with_old_sha", version = "3", default-features = false, features = [ "std", diff --git a/chisel/Cargo.toml b/chisel/Cargo.toml index b492e01ac..53aef8e99 100644 --- a/chisel/Cargo.toml +++ b/chisel/Cargo.toml @@ -55,6 +55,7 @@ serde = "1" serde_json = { version = "1", features = ["raw_value"] } semver = "1" bytes = "1" +# Original REVM. We had to fork it, due to conflicts in SHA. # revm = "3" revm = { git = "https://github.com/mm-zk/revm.git", branch = "release_v25_with_old_sha", version = "3" } diff --git a/cli/Cargo.toml b/cli/Cargo.toml index f5583009c..7523f25ed 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -86,7 +86,6 @@ pkg-config = "0.3.26" #zksync zksync-web3-rs = {git = "https://github.com/lambdaclass/zksync-web3-rs.git", rev = "70327ae5413c517bd4d27502507cdd96ee40cd22"} era_revm = { git = "https://github.com/matter-labs/era-revm.git", rev = "792cb820587eccdc35bbecb45f343cf1b891b6d2"} -#era_revm = { path = "../../revm_era"} ansi_term = "0.12.1"