diff --git a/Cargo.lock b/Cargo.lock index 27c138bd4c..d5f5574706 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -105,6 +105,60 @@ dependencies = [ "libc", ] +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + +[[package]] +name = "anstream" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" version = "1.0.75" @@ -291,17 +345,6 @@ dependencies = [ "rustc_version 0.4.0", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "auto_impl" version = "1.1.0" @@ -599,10 +642,11 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.84" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f8e7c90afad890484a21653d08b6e209ae34770fb5ee298f9c699fcc1e5c856" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" dependencies = [ + "jobserver", "libc", ] @@ -629,7 +673,34 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", ] [[package]] @@ -667,53 +738,43 @@ dependencies = [ [[package]] name = "clap" -version = "2.34.0" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651" dependencies = [ - "bitflags 1.3.2", - "textwrap 0.11.0", - "unicode-width", + "clap_builder", + "clap_derive", ] [[package]] -name = "clap" -version = "3.2.25" +name = "clap_builder" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ - "atty", - "bitflags 1.3.2", - "clap_derive", + "anstream", + "anstyle", "clap_lex", - "indexmap 1.9.3", - "once_cell", - "strsim 0.10.0", - "termcolor", - "textwrap 0.16.0", + "strsim 0.11.0", ] [[package]] name = "clap_derive" -version = "3.2.25" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] name = "clap_lex" -version = "0.2.4" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "cli-table" @@ -805,6 +866,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "colored" version = "2.0.4" @@ -813,7 +880,7 @@ checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ "is-terminal", "lazy_static", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -918,24 +985,24 @@ dependencies = [ [[package]] name = "criterion" -version = "0.3.6" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" dependencies = [ - "atty", + "anes", "cast", - "clap 2.34.0", + "ciborium", + "clap", "criterion-plot", - "csv", + "is-terminal", "itertools 0.10.5", - "lazy_static", "num-traits", + "once_cell", "oorandom", "plotters", "rayon", "regex", "serde", - "serde_cbor", "serde_derive", "serde_json", "tinytemplate", @@ -944,9 +1011,9 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.4.5" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" dependencies = [ "cast", "itertools 0.10.5", @@ -1482,7 +1549,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1582,7 +1649,7 @@ dependencies = [ [[package]] name = "ethers" version = "2.0.7" -source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7#e32dfd62e7cdec31160b91c5a646883594a586ba" +source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7-patch-tungstenite#13d46e5b9e3f657110f030ef39d5f0f5189e803b" dependencies = [ "ethers-addressbook", "ethers-contract", @@ -1597,7 +1664,7 @@ dependencies = [ [[package]] name = "ethers-addressbook" version = "2.0.7" -source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7#e32dfd62e7cdec31160b91c5a646883594a586ba" +source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7-patch-tungstenite#13d46e5b9e3f657110f030ef39d5f0f5189e803b" dependencies = [ "ethers-core", "once_cell", @@ -1608,7 +1675,7 @@ dependencies = [ [[package]] name = "ethers-contract" version = "2.0.7" -source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7#e32dfd62e7cdec31160b91c5a646883594a586ba" +source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7-patch-tungstenite#13d46e5b9e3f657110f030ef39d5f0f5189e803b" dependencies = [ "ethers-contract-abigen", "ethers-contract-derive", @@ -1626,7 +1693,7 @@ dependencies = [ [[package]] name = "ethers-contract-abigen" version = "2.0.7" -source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7#e32dfd62e7cdec31160b91c5a646883594a586ba" +source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7-patch-tungstenite#13d46e5b9e3f657110f030ef39d5f0f5189e803b" dependencies = [ "Inflector", "dunce", @@ -1649,7 +1716,7 @@ dependencies = [ [[package]] name = "ethers-contract-derive" version = "2.0.7" -source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7#e32dfd62e7cdec31160b91c5a646883594a586ba" +source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7-patch-tungstenite#13d46e5b9e3f657110f030ef39d5f0f5189e803b" dependencies = [ "Inflector", "ethers-contract-abigen", @@ -1664,7 +1731,7 @@ dependencies = [ [[package]] name = "ethers-core" version = "2.0.7" -source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7#e32dfd62e7cdec31160b91c5a646883594a586ba" +source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7-patch-tungstenite#13d46e5b9e3f657110f030ef39d5f0f5189e803b" dependencies = [ "arrayvec", "bytes", @@ -1693,7 +1760,7 @@ dependencies = [ [[package]] name = "ethers-etherscan" version = "2.0.7" -source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7#e32dfd62e7cdec31160b91c5a646883594a586ba" +source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7-patch-tungstenite#13d46e5b9e3f657110f030ef39d5f0f5189e803b" dependencies = [ "ethers-core", "ethers-solc", @@ -1708,7 +1775,7 @@ dependencies = [ [[package]] name = "ethers-middleware" version = "2.0.7" -source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7#e32dfd62e7cdec31160b91c5a646883594a586ba" +source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7-patch-tungstenite#13d46e5b9e3f657110f030ef39d5f0f5189e803b" dependencies = [ "async-trait", "auto_impl", @@ -1734,7 +1801,7 @@ dependencies = [ [[package]] name = "ethers-providers" version = "2.0.7" -source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7#e32dfd62e7cdec31160b91c5a646883594a586ba" +source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7-patch-tungstenite#13d46e5b9e3f657110f030ef39d5f0f5189e803b" dependencies = [ "async-trait", "auto_impl", @@ -1770,7 +1837,7 @@ dependencies = [ [[package]] name = "ethers-signers" version = "2.0.7" -source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7#e32dfd62e7cdec31160b91c5a646883594a586ba" +source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7-patch-tungstenite#13d46e5b9e3f657110f030ef39d5f0f5189e803b" dependencies = [ "async-trait", "coins-bip32", @@ -1788,7 +1855,7 @@ dependencies = [ [[package]] name = "ethers-solc" version = "2.0.7" -source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7#e32dfd62e7cdec31160b91c5a646883594a586ba" +source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7-patch-tungstenite#13d46e5b9e3f657110f030ef39d5f0f5189e803b" dependencies = [ "cfg-if 1.0.0", "dunce", @@ -2259,9 +2326,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -2269,7 +2336,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap", "slab", "tokio", "tokio-util", @@ -2278,9 +2345,13 @@ dependencies = [ [[package]] name = "half" -version = "1.8.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e" +dependencies = [ + "cfg-if 1.0.0", + "crunchy", +] [[package]] name = "halo2-base" @@ -2436,12 +2507,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.13.2" @@ -2472,15 +2537,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.3" @@ -2514,7 +2570,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -2693,16 +2749,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.1.0" @@ -2768,9 +2814,9 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "rustix", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -2806,6 +2852,15 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +[[package]] +name = "jobserver" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +dependencies = [ + "libc", +] + [[package]] name = "jpeg-decoder" version = "0.3.0" @@ -2923,7 +2978,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" dependencies = [ "cfg-if 1.0.0", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -3050,13 +3105,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.9" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -3196,7 +3251,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "libc", ] @@ -3294,12 +3349,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" - [[package]] name = "parity-scale-codec" version = "3.6.5" @@ -3346,7 +3395,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -3486,7 +3535,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap", ] [[package]] @@ -4019,7 +4068,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.2", + "webpki-roots", "winreg", ] @@ -4113,21 +4162,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - [[package]] name = "ring" version = "0.17.5" @@ -4138,8 +4172,8 @@ dependencies = [ "getrandom", "libc", "spin 0.9.8", - "untrusted 0.9.0", - "windows-sys", + "untrusted", + "windows-sys 0.48.0", ] [[package]] @@ -4249,7 +4283,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -4259,8 +4293,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" dependencies = [ "log", - "ring 0.17.5", - "rustls-webpki 0.101.7", + "ring", + "rustls-webpki", "sct", ] @@ -4273,24 +4307,14 @@ dependencies = [ "base64 0.21.5", ] -[[package]] -name = "rustls-webpki" -version = "0.100.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - [[package]] name = "rustls-webpki" version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.5", - "untrusted 0.9.0", + "ring", + "untrusted", ] [[package]] @@ -4371,8 +4395,8 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.5", - "untrusted 0.9.0", + "ring", + "untrusted", ] [[package]] @@ -4495,16 +4519,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_cbor" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" -dependencies = [ - "half", - "serde", -] - [[package]] name = "serde_derive" version = "1.0.192" @@ -4742,7 +4756,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -4825,6 +4839,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" + [[package]] name = "strum" version = "0.24.1" @@ -4975,7 +4995,7 @@ dependencies = [ "fastrand", "redox_syscall", "rustix", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -5004,7 +5024,7 @@ version = "0.1.0" dependencies = [ "anyhow", "bus-mapping", - "clap 3.2.25", + "clap", "ctor", "env_logger", "eth-types", @@ -5036,21 +5056,6 @@ dependencies = [ "zkevm-circuits", ] -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - [[package]] name = "thiserror" version = "1.0.50" @@ -5147,7 +5152,7 @@ dependencies = [ "pin-project-lite", "socket2 0.5.5", "tokio-macros", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -5173,9 +5178,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.19.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec509ac96e9a0c43427c74f003127d953a265737636129424288d27cb5c4b12c" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", @@ -5183,7 +5188,7 @@ dependencies = [ "tokio", "tokio-rustls", "tungstenite", - "webpki-roots 0.23.1", + "webpki-roots", ] [[package]] @@ -5236,7 +5241,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", + "indexmap", "serde", "serde_spanned", "toml_datetime", @@ -5304,9 +5309,9 @@ checksum = "375812fa44dab6df41c195cd2f7fecb488f6c09fbaafb62807488cefab642bff" [[package]] name = "tungstenite" -version = "0.19.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15fba1a6d6bb030745759a9a2a588bfe8490fc8b4751a277db3a0be1c9ebbf67" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" dependencies = [ "byteorder", "bytes", @@ -5320,7 +5325,6 @@ dependencies = [ "thiserror", "url", "utf-8", - "webpki", ] [[package]] @@ -5386,12 +5390,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "untrusted" version = "0.9.0" @@ -5421,6 +5419,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" version = "0.8.2" @@ -5470,9 +5474,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -5480,9 +5484,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", @@ -5507,9 +5511,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5517,9 +5521,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", @@ -5530,9 +5534,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" @@ -5544,25 +5548,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" -dependencies = [ - "ring 0.17.5", - "untrusted 0.9.0", -] - -[[package]] -name = "webpki-roots" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" -dependencies = [ - "rustls-webpki 0.100.3", -] - [[package]] name = "webpki-roots" version = "0.25.2" @@ -5612,7 +5597,7 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -5621,7 +5606,16 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.4", ] [[package]] @@ -5630,13 +5624,28 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "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]] +name = "windows-targets" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +dependencies = [ + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -5645,42 +5654,84 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" + [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" + [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" + [[package]] name = "winnow" version = "0.5.19" @@ -5697,7 +5748,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ "cfg-if 1.0.0", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -5766,18 +5817,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.25" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.25" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 9cb648ad11..54fb63b8ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ ark-std = "0.3" ctor = "0.1" env_logger = "0.10" ethers = { version = "=2.0.7", features = ["ethers-solc"] } -ethers-core = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7", features = ["scroll"] } +ethers-core = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7-patch-tungstenite", features = ["scroll"] } ethers-providers = "=2.0.7" ethers-signers = "=2.0.7" ff = "0.13" @@ -62,11 +62,11 @@ tokio = { version = "1.13", features = ["macros", "rt-multi-thread"] } url = "2.2" [patch.crates-io] -ethers-core = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7" } -ethers-providers = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7" } -ethers = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7" } -ethers-etherscan = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7" } -ethers-signers = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7" } +ethers-core = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7-patch-tungstenite" } +ethers-providers = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7-patch-tungstenite" } +ethers = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7-patch-tungstenite" } +ethers-etherscan = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7-patch-tungstenite" } +ethers-signers = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7-patch-tungstenite" } gobuild = { git = "https://github.com/scroll-tech/gobuild.git" } [patch."https://github.com/privacy-scaling-explorations/halo2.git"] halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "v1.1" } diff --git a/testool/Cargo.toml b/testool/Cargo.toml index 49d13d0f2c..baecd39e1d 100644 --- a/testool/Cargo.toml +++ b/testool/Cargo.toml @@ -8,7 +8,7 @@ license.workspace = true [dependencies] anyhow.workspace = true bus-mapping = { path = "../bus-mapping" } -clap = { version = "3.1", features = ["derive"] } +clap = { version = "4.5", features = ["derive"] } env_logger.workspace = true eth-types = { path="../eth-types" } ethers-core.workspace = true @@ -52,4 +52,4 @@ chunk-prove = ["prover/test", "parallel_syn", "scroll", "shanghai"] enable-stack = ["zkevm-circuits/enable-stack"] enable-memory = ["zkevm-circuits/enable-memory"] -enable-storage = ["zkevm-circuits/enable-storage"] \ No newline at end of file +enable-storage = ["zkevm-circuits/enable-storage"] diff --git a/testool/src/main.rs b/testool/src/main.rs index f8a374da16..4517e451da 100644 --- a/testool/src/main.rs +++ b/testool/src/main.rs @@ -34,7 +34,7 @@ const TEST_IDS_FILE: &str = "./test_ids.txt"; extern crate prettytable; #[allow(non_camel_case_types)] -#[derive(PartialEq, Parser, EnumString, Debug)] +#[derive(PartialEq, Parser, EnumString, Debug, Clone, Copy)] enum Circuits { basic, sc, diff --git a/zkevm-circuits/Cargo.toml b/zkevm-circuits/Cargo.toml index 72ebf72479..27d10c1c33 100644 --- a/zkevm-circuits/Cargo.toml +++ b/zkevm-circuits/Cargo.toml @@ -47,7 +47,7 @@ rayon.workspace = true [dev-dependencies] bus-mapping = { path = "../bus-mapping", features = ["test"] } -criterion = "0.3" +criterion = "0.5" ctor.workspace = true mock = { path = "../mock" } pretty_assertions.workspace = true diff --git a/zkevm-circuits/src/copy_circuit.rs b/zkevm-circuits/src/copy_circuit.rs index 95bd01bd5a..adf299e58e 100644 --- a/zkevm-circuits/src/copy_circuit.rs +++ b/zkevm-circuits/src/copy_circuit.rs @@ -569,10 +569,10 @@ impl SubCircuitConfig for CopyCircuitConfig { is_access_list_address, is_access_list_storage_key, q_enable, + copy_table, is_src_end, is_word_end, non_pad_non_mask, - copy_table, tx_table, rw_table, bytecode_table, diff --git a/zkevm-circuits/src/evm_circuit/execution/addmod.rs b/zkevm-circuits/src/evm_circuit/execution/addmod.rs index d5c9c55e39..105b37c98f 100644 --- a/zkevm-circuits/src/evm_circuit/execution/addmod.rs +++ b/zkevm-circuits/src/evm_circuit/execution/addmod.rs @@ -120,6 +120,7 @@ impl ExecutionGadget for AddModGadget { let same_context = SameContextGadget::construct(cb, opcode, step_state_transition); Self { + same_context, a, b, r, @@ -127,14 +128,13 @@ impl ExecutionGadget for AddModGadget { k, d, a_reduced, - muladd_d_n_r, muladd_k_n_areduced, - same_context, - cmp_r_n, - cmp_areduced_n, - n_is_zero, sum_areduced_b, sum_areduced_b_overflow, + muladd_d_n_r, + n_is_zero, + cmp_r_n, + cmp_areduced_n, } } diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index 56d0771754..ead0640313 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -790,8 +790,8 @@ impl ExecutionGadget for BeginTxGadget { Self { tx_id, tx_type, - tx_nonce, sender_nonce, + tx_nonce, tx_gas, tx_gas_price, mul_gas_fee_by_gas, @@ -809,6 +809,7 @@ impl ExecutionGadget for BeginTxGadget { tx_call_data_gas_cost, tx_data_gas_cost, reversion_info, + intrinsic_gas_cost, sufficient_gas_left, transfer_with_gas_fee, account_code_hash, @@ -819,14 +820,13 @@ impl ExecutionGadget for BeginTxGadget { call_code_hash, call_code_hash_is_empty, call_code_hash_is_zero, - intrinsic_gas_cost, is_precompile_lt, precompile_gadget, precompile_input_len, precompile_input_bytes_rlc, caller_nonce_hash_bytes, - init_code_rlc, keccak_code_hash, + init_code_rlc, create, is_caller_warm, is_callee_warm, diff --git a/zkevm-circuits/src/evm_circuit/execution/create.rs b/zkevm-circuits/src/evm_circuit/execution/create.rs index 5bc94c6420..0b9aad1e95 100644 --- a/zkevm-circuits/src/evm_circuit/execution/create.rs +++ b/zkevm-circuits/src/evm_circuit/execution/create.rs @@ -534,31 +534,31 @@ impl ExecutionGadget< Self { opcode, - reversion_info, tx_id, + reversion_info, + depth, + is_success, was_warm, value, - depth, + caller_balance, callee_reversion_info, + callee_nonce, + prev_code_hash, + prev_code_hash_is_zero, transfer, + create, init_code, - init_code_rlc, - memory_expansion, - gas_left, init_code_word_size, init_code_size_not_overflow, - create, - caller_balance, + init_code_rlc, + keccak_output, is_depth_in_range, is_insufficient_balance, is_nonce_in_range, - callee_nonce, - keccak_code_hash, - keccak_output, not_address_collision, - is_success, - prev_code_hash, - prev_code_hash_is_zero, + memory_expansion, + gas_left, + keccak_code_hash, #[cfg(feature = "scroll")] prev_keccak_code_hash, copy_rw_increase, diff --git a/zkevm-circuits/src/evm_circuit/execution/error_oog_log.rs b/zkevm-circuits/src/evm_circuit/execution/error_oog_log.rs index 1a673191e8..0f0640d32e 100644 --- a/zkevm-circuits/src/evm_circuit/execution/error_oog_log.rs +++ b/zkevm-circuits/src/evm_circuit/execution/error_oog_log.rs @@ -85,9 +85,9 @@ impl ExecutionGadget for ErrorOOGLogGadget { Self { opcode, + memory_address, is_static_call, is_opcode_logn, - memory_address, memory_expansion, insufficient_gas, common_error_gadget, diff --git a/zkevm-circuits/src/evm_circuit/execution/error_oog_precompile.rs b/zkevm-circuits/src/evm_circuit/execution/error_oog_precompile.rs index 467acf3c4a..4c08fdc1ed 100644 --- a/zkevm-circuits/src/evm_circuit/execution/error_oog_precompile.rs +++ b/zkevm-circuits/src/evm_circuit/execution/error_oog_precompile.rs @@ -137,13 +137,13 @@ impl ExecutionGadget for ErrorOOGPrecompileGadget { Self { precompile_addr, - required_gas, - insufficient_gas, - n_pairs, - n_words, addr_bits, - is_root, call_data_length, + is_root, + n_pairs, + n_words, + required_gas, + insufficient_gas, restore_context, } } diff --git a/zkevm-circuits/src/evm_circuit/execution/error_oog_sload_sstore.rs b/zkevm-circuits/src/evm_circuit/execution/error_oog_sload_sstore.rs index bb455402b0..771be7592b 100644 --- a/zkevm-circuits/src/evm_circuit/execution/error_oog_sload_sstore.rs +++ b/zkevm-circuits/src/evm_circuit/execution/error_oog_sload_sstore.rs @@ -401,8 +401,8 @@ mod test { } Self { - bytecode, gas_cost, + bytecode, ..Default::default() } } diff --git a/zkevm-circuits/src/evm_circuit/execution/error_return_data_oo_bound.rs b/zkevm-circuits/src/evm_circuit/execution/error_return_data_oo_bound.rs index 5670d8cf57..e5f7f30932 100644 --- a/zkevm-circuits/src/evm_circuit/execution/error_return_data_oo_bound.rs +++ b/zkevm-circuits/src/evm_circuit/execution/error_return_data_oo_bound.rs @@ -66,8 +66,8 @@ impl ExecutionGadget for ErrorReturnDataOutOfBoundGadget { Self { opcode, memory_offset, - overflow_gadget, return_data_length, + overflow_gadget, common_error_gadget, } } diff --git a/zkevm-circuits/src/evm_circuit/execution/extcodecopy.rs b/zkevm-circuits/src/evm_circuit/execution/extcodecopy.rs index df0030b642..c39f80d318 100644 --- a/zkevm-circuits/src/evm_circuit/execution/extcodecopy.rs +++ b/zkevm-circuits/src/evm_circuit/execution/extcodecopy.rs @@ -153,8 +153,8 @@ impl ExecutionGadget for ExtcodecopyGadget { memory_address, code_offset, tx_id, - is_warm, reversion_info, + is_warm, code_hash, not_exists, code_size, diff --git a/zkevm-circuits/src/evm_circuit/execution/extcodesize.rs b/zkevm-circuits/src/evm_circuit/execution/extcodesize.rs index dbfce3b460..c2bb2023a9 100644 --- a/zkevm-circuits/src/evm_circuit/execution/extcodesize.rs +++ b/zkevm-circuits/src/evm_circuit/execution/extcodesize.rs @@ -102,8 +102,8 @@ impl ExecutionGadget for ExtcodesizeGadget { Self { same_context, address_word, - tx_id, reversion_info, + tx_id, is_warm, code_hash, not_exists, diff --git a/zkevm-circuits/src/evm_circuit/execution/precompiles/modexp.rs b/zkevm-circuits/src/evm_circuit/execution/precompiles/modexp.rs index 106b9ebd45..7c7ebd28e1 100755 --- a/zkevm-circuits/src/evm_circuit/execution/precompiles/modexp.rs +++ b/zkevm-circuits/src/evm_circuit/execution/precompiles/modexp.rs @@ -75,10 +75,10 @@ impl RandPowRepresent { }; Self { - pow_lookup, bits, - pow, + pow_lookup, cache_for_degree, + pow, } } @@ -524,8 +524,8 @@ impl Limbs { ]; Self { - byte14_split_hi, byte14_split_lo, + byte14_split_hi, limbs, } } @@ -627,8 +627,8 @@ impl ModExpGasCost { words, exp_is_zero, exp_byte_size, - exp_msb, exp_msb_bit_length, + exp_msb, calc_gas, dynamic_gas, } diff --git a/zkevm-circuits/src/evm_circuit/execution/return_revert.rs b/zkevm-circuits/src/evm_circuit/execution/return_revert.rs index 4c241e74f2..5236f9256a 100644 --- a/zkevm-circuits/src/evm_circuit/execution/return_revert.rs +++ b/zkevm-circuits/src/evm_circuit/execution/return_revert.rs @@ -328,20 +328,20 @@ impl ExecutionGadget for ReturnRevertGadget { range, deployed_bytecode_rlc, is_success, + restore_context, copy_length, copy_rw_increase, copy_rw_increase_is_zero, return_data_offset, return_data_length, - restore_context, memory_expansion, code_hash, prev_code_hash, keccak_code_hash, prev_keccak_code_hash, code_size, - address, caller_id, + address, reversion_info, } } diff --git a/zkevm-circuits/src/evm_circuit/execution/selfbalance.rs b/zkevm-circuits/src/evm_circuit/execution/selfbalance.rs index 584fcee949..cf15914541 100644 --- a/zkevm-circuits/src/evm_circuit/execution/selfbalance.rs +++ b/zkevm-circuits/src/evm_circuit/execution/selfbalance.rs @@ -52,8 +52,8 @@ impl ExecutionGadget for SelfbalanceGadget { Self { same_context, - phase2_self_balance, callee_address, + phase2_self_balance, } } diff --git a/zkevm-circuits/src/evm_circuit/execution/sstore.rs b/zkevm-circuits/src/evm_circuit/execution/sstore.rs index c78f65ea25..0d5962af82 100644 --- a/zkevm-circuits/src/evm_circuit/execution/sstore.rs +++ b/zkevm-circuits/src/evm_circuit/execution/sstore.rs @@ -308,11 +308,11 @@ impl SstoreTxRefundGadget { - recreate_slot * (GasCost::SSTORE_CLEARS_SCHEDULE.expr()); Self { + tx_refund_old, + tx_refund_new, value, value_prev, original_value, - tx_refund_old, - tx_refund_new, value_prev_is_zero_gadget, value_is_zero_gadget, original_is_zero_gadget, diff --git a/zkevm-circuits/src/evm_circuit/step.rs b/zkevm-circuits/src/evm_circuit/step.rs index 953493a2cd..bf8f7e3729 100644 --- a/zkevm-circuits/src/evm_circuit/step.rs +++ b/zkevm-circuits/src/evm_circuit/step.rs @@ -444,8 +444,8 @@ impl DynamicSelectorHalf { let target_odd = cell_manager.query_cell(CellType::StoragePhase1); Self { count, - target_pairs, target_odd, + target_pairs, } } diff --git a/zkevm-circuits/src/evm_circuit/util/common_gadget/tx_l1_msg.rs b/zkevm-circuits/src/evm_circuit/util/common_gadget/tx_l1_msg.rs index f85387023c..001e07eb9b 100644 --- a/zkevm-circuits/src/evm_circuit/util/common_gadget/tx_l1_msg.rs +++ b/zkevm-circuits/src/evm_circuit/util/common_gadget/tx_l1_msg.rs @@ -66,8 +66,8 @@ impl TxL1MsgGadget { Self { tx_is_l1msg, - caller_codehash, is_caller_empty, + caller_codehash, } } diff --git a/zkevm-circuits/src/evm_circuit/util/math_gadget/cmp_words.rs b/zkevm-circuits/src/evm_circuit/util/math_gadget/cmp_words.rs index c2eb0cc596..a24f7d5b30 100644 --- a/zkevm-circuits/src/evm_circuit/util/math_gadget/cmp_words.rs +++ b/zkevm-circuits/src/evm_circuit/util/math_gadget/cmp_words.rs @@ -51,8 +51,8 @@ impl CmpWordsGadget { Self { comparison_lo, comparison_hi, - lt, eq, + lt, } } diff --git a/zkevm-circuits/src/evm_circuit/util/math_gadget/min_max.rs b/zkevm-circuits/src/evm_circuit/util/math_gadget/min_max.rs index 3ed000b4eb..102a35a053 100644 --- a/zkevm-circuits/src/evm_circuit/util/math_gadget/min_max.rs +++ b/zkevm-circuits/src/evm_circuit/util/math_gadget/min_max.rs @@ -7,7 +7,7 @@ use halo2_proofs::{ circuit::Value, plonk::{Error, Expression}, }; -/// Returns `rhs` when `lhs < rhs`, and returns `lhs` otherwise. + /// lhs and rhs `< 256**N_BYTES` /// `N_BYTES` is required to be `<= MAX_N_BYTES_INTEGER`. #[derive(Clone, Debug)] diff --git a/zkevm-circuits/src/evm_circuit/util/math_gadget/pair_select.rs b/zkevm-circuits/src/evm_circuit/util/math_gadget/pair_select.rs index 3f790f1589..4eadd96b53 100644 --- a/zkevm-circuits/src/evm_circuit/util/math_gadget/pair_select.rs +++ b/zkevm-circuits/src/evm_circuit/util/math_gadget/pair_select.rs @@ -99,9 +99,9 @@ mod tests { PairSelectionTestContainer { select_gadget, - v, a, b, + v, } } diff --git a/zkevm-circuits/src/lib.rs b/zkevm-circuits/src/lib.rs index 2aa7b7a560..18b58857a8 100644 --- a/zkevm-circuits/src/lib.rs +++ b/zkevm-circuits/src/lib.rs @@ -19,6 +19,7 @@ #![deny(missing_docs)] #![deny(unsafe_code)] #![deny(clippy::debug_assert_with_mut_call)] +#![deny(clippy::inconsistent_struct_constructor)] // We have too many cast between `usize` and `u64`, // we'd better ensure usize is 64-bit on target arch. #[cfg(not(target_pointer_width = "64"))] diff --git a/zkevm-circuits/src/modexp_circuit.rs b/zkevm-circuits/src/modexp_circuit.rs index 33a13e8736..b60ba4c452 100644 --- a/zkevm-circuits/src/modexp_circuit.rs +++ b/zkevm-circuits/src/modexp_circuit.rs @@ -42,8 +42,8 @@ impl SubCircuitConfig for ModExpCircuitConfig { let rangecheck_config = RangeCheckChip::configure(meta); let modexp_config = ModExpChip::configure(meta, &rangecheck_config); Self { - rangecheck_config, modexp_config, + rangecheck_config, modexp_table, } } diff --git a/zkevm-circuits/src/rlp_circuit_fsm.rs b/zkevm-circuits/src/rlp_circuit_fsm.rs index 83f954dce2..953b8419f3 100644 --- a/zkevm-circuits/src/rlp_circuit_fsm.rs +++ b/zkevm-circuits/src/rlp_circuit_fsm.rs @@ -2233,6 +2233,8 @@ impl RlpCircuitConfig { tag, tag_bits, tag_next, + is_list, + max_length, byte_idx, byte_rev_idx, byte_value, @@ -2240,31 +2242,21 @@ impl RlpCircuitConfig { gas_cost_acc, tag_idx, tag_value_acc, - is_list, - max_length, depth, is_padding_in_dt, - - // data table checks. tx_id_check_in_dt, format_check_in_dt, - tx_id_check_in_sm, format_check_in_sm, - - is_tag_begin, is_tag_end, + is_tag_begin, is_case3, transit_to_new_rlp_instance, is_same_rlp_instance, - - // access list checks is_new_access_list_address, is_new_access_list_storage_key, is_access_list_end, is_storage_key_list_end, - - // decoding table stack_op_id_diff, is_stack_depth_zero, is_stack_depth_one, @@ -2274,8 +2266,6 @@ impl RlpCircuitConfig { is_stack_depth_diff, is_stack_al_idx_diff, is_stack_sk_idx_diff, - - // comparators byte_value_lte_0x80, byte_value_gte_0x80, byte_value_lte_0xb8, @@ -2292,8 +2282,6 @@ impl RlpCircuitConfig { depth_eq_two, depth_eq_four, byte_value_is_zero, - - // internal tables data_table, rom_table, u8_table, diff --git a/zkevm-circuits/src/sha256_circuit.rs b/zkevm-circuits/src/sha256_circuit.rs index 44883f089d..52c6b40955 100644 --- a/zkevm-circuits/src/sha256_circuit.rs +++ b/zkevm-circuits/src/sha256_circuit.rs @@ -60,7 +60,7 @@ impl SubCircuitConfig for CircuitConfig { } } -/// ModExp circuit for precompile modexp +/// SHA-256 circuit for precompile modexp #[derive(Clone, Debug, Default)] pub struct SHA256Circuit(Vec, usize, std::marker::PhantomData); diff --git a/zkevm-circuits/src/sha256_circuit/circuit.rs b/zkevm-circuits/src/sha256_circuit/circuit.rs index 84b63fdd27..408b89831b 100644 --- a/zkevm-circuits/src/sha256_circuit/circuit.rs +++ b/zkevm-circuits/src/sha256_circuit/circuit.rs @@ -300,23 +300,19 @@ impl CircuitConfig { let ret = Self { table16, byte_range, - copied_data, trans_byte, bytes_rlc, helper, - s_final_block, - s_common_bytes, - s_padding_size, s_padding, byte_counter, - s_output, - s_begin, s_final, s_enable, + s_common_bytes, + s_padding_size, s_assigned_u16, }; diff --git a/zkevm-circuits/src/sig_circuit.rs b/zkevm-circuits/src/sig_circuit.rs index 62a83f605f..6a3dec5645 100644 --- a/zkevm-circuits/src/sig_circuit.rs +++ b/zkevm-circuits/src/sig_circuit.rs @@ -192,10 +192,10 @@ impl SubCircuitConfig for SigCircuitConfig { Self { ecdsa_config, + rlc_column, + q_keccak, keccak_table, sig_table, - q_keccak, - rlc_column, } } } diff --git a/zkevm-circuits/src/super_circuit.rs b/zkevm-circuits/src/super_circuit.rs index e2dc6c4882..86520a9293 100644 --- a/zkevm-circuits/src/super_circuit.rs +++ b/zkevm-circuits/src/super_circuit.rs @@ -389,25 +389,25 @@ impl SubCircuitConfig for SuperCircuitConfig { SuperCircuitConfig { block_table, mpt_table, - tx_table, rlp_table, + tx_table, poseidon_table, u8_table, u16_table, evm_circuit, state_circuit, - copy_circuit, + tx_circuit, + sig_circuit, + modexp_circuit, + ecc_circuit, + sha256_circuit, bytecode_circuit, + copy_circuit, keccak_circuit, - sha256_circuit, poseidon_circuit, pi_circuit, - rlp_circuit, - tx_circuit, exp_circuit, - sig_circuit, - modexp_circuit, - ecc_circuit, + rlp_circuit, #[cfg(feature = "zktrie")] mpt_circuit, } diff --git a/zkevm-circuits/src/tx_circuit/dev.rs b/zkevm-circuits/src/tx_circuit/dev.rs index e17711710c..58604fde71 100644 --- a/zkevm-circuits/src/tx_circuit/dev.rs +++ b/zkevm-circuits/src/tx_circuit/dev.rs @@ -78,11 +78,11 @@ impl SubCircuitConfig for TxCircuitTesterConfig { let tx_config = TxCircuitConfig::new( meta, TxCircuitConfigArgs { - sig_table, - block_table, tx_table, + block_table, keccak_table, rlp_table, + sig_table, u8_table, u16_table, challenges, @@ -185,11 +185,11 @@ impl Circuit for TxCircuitTester { let tx_config = TxCircuitConfig::new( meta, TxCircuitConfigArgs { - sig_table, - block_table, tx_table, + block_table, keccak_table, rlp_table, + sig_table, u8_table, u16_table, challenges, diff --git a/zkevm-circuits/src/witness/mpt.rs b/zkevm-circuits/src/witness/mpt.rs index ee517c34ce..92788c61a2 100644 --- a/zkevm-circuits/src/witness/mpt.rs +++ b/zkevm-circuits/src/witness/mpt.rs @@ -284,9 +284,9 @@ impl MptUpdates { }) .collect(); let mpt_updates = MptUpdates { - updates, old_root, new_root, + updates, ..Default::default() }; // FIXME: we can remove this assert after the code runs a while and everything is ok? @@ -319,9 +319,9 @@ impl MptUpdates { }) .collect(); MptUpdates { - updates, old_root, new_root, + updates, ..Default::default() } }