From c4c13c7f3c74841d1fdb1ac60ef481df9e47748f Mon Sep 17 00:00:00 2001 From: Steven Gu Date: Thu, 16 Nov 2023 17:02:44 +0800 Subject: [PATCH] Create `develop` branch. --- Cargo.lock | 607 ++++-------------- Cargo.toml | 8 +- bin/src/mock_testnet.rs | 12 +- integration/src/test_util/capacity_checker.rs | 12 +- integration/tests/integration.rs | 12 +- integration/tests/mock_tests.rs | 2 +- 6 files changed, 160 insertions(+), 493 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f63f9636a..3f0d9ef17 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -31,15 +31,15 @@ dependencies = [ [[package]] name = "aggregator" version = "0.1.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=develop#b02de5df8007de35c9e73cb886c0fe1ebb9e5963" dependencies = [ "ark-std", - "env_logger 0.10.0", + "env_logger", "eth-types", - "ethers-core 2.0.7", + "ethers-core", "halo2_proofs", "hex", - "itertools", + "itertools 0.11.0", "log", "rand", "serde", @@ -226,9 +226,9 @@ version = "0.10.0" dependencies = [ "anyhow", "clap", - "ethers-providers 1.0.2", + "ethers-providers", "integration", - "itertools", + "itertools 0.11.0", "log", "log4rs", "prover", @@ -294,16 +294,6 @@ dependencies = [ "constant_time_eq", ] -[[package]] -name = "block-buffer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a076c298b9ecdb530ed9d967e74a6027d6a7478924520acddcddc24c1c8ab3ab" -dependencies = [ - "arrayref", - "byte-tools", -] - [[package]] name = "block-buffer" version = "0.9.0" @@ -311,7 +301,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ "block-padding", - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -320,7 +310,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -335,7 +325,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" dependencies = [ - "sha2 0.10.6", + "sha2", "tinyvec", ] @@ -348,17 +338,16 @@ checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "bus-mapping" version = "0.1.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=develop#b02de5df8007de35c9e73cb886c0fe1ebb9e5963" dependencies = [ "eth-types", - "ethers-core 2.0.7", - "ethers-providers 2.0.7", + "ethers-core", + "ethers-providers", "ethers-signers", "gadgets", "halo2_proofs", "hex", - "itertools", - "keccak256", + "itertools 0.11.0", "lazy_static", "log", "mock", @@ -370,8 +359,8 @@ dependencies = [ "revm-precompile", "serde", "serde_json", - "strum", - "strum_macros", + "strum 0.25.0", + "strum_macros 0.25.3", ] [[package]] @@ -380,12 +369,6 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" -[[package]] -name = "byte-tools" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" - [[package]] name = "byteorder" version = "1.4.3" @@ -502,10 +485,10 @@ dependencies = [ "bs58", "coins-core", "digest 0.10.7", - "hmac 0.12.1", + "hmac", "k256 0.13.1", "serde", - "sha2 0.10.6", + "sha2", "thiserror", ] @@ -517,11 +500,11 @@ checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" dependencies = [ "bitvec", "coins-bip32", - "hmac 0.12.1", + "hmac", "once_cell", "pbkdf2 0.12.2", "rand", - "sha2 0.10.6", + "sha2", "thiserror", ] @@ -535,12 +518,12 @@ dependencies = [ "bech32", "bs58", "digest 0.10.7", - "generic-array 0.14.7", + "generic-array", "hex", "ripemd", "serde", "serde_derive", - "sha2 0.10.6", + "sha2", "sha3 0.10.6", "thiserror", ] @@ -657,7 +640,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ - "generic-array 0.14.7", + "generic-array", "rand_core", "subtle", "zeroize", @@ -669,7 +652,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" dependencies = [ - "generic-array 0.14.7", + "generic-array", "rand_core", "subtle", "zeroize", @@ -681,20 +664,10 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.7", + "generic-array", "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 = "ctr" version = "0.9.2" @@ -796,7 +769,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", - "zeroize", ] [[package]] @@ -833,22 +805,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "digest" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b072242a8cbaf9c145665af9d250c59af3b958f83ed6824e13533cf76d5b90" -dependencies = [ - "generic-array 0.9.1", -] - [[package]] name = "digest" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -892,7 +855,7 @@ dependencies = [ "elliptic-curve 0.13.5", "rfc6979 0.4.0", "signature 2.1.0", - "spki 0.7.2", + "spki", ] [[package]] @@ -912,7 +875,7 @@ dependencies = [ "der 0.6.1", "digest 0.10.7", "ff 0.12.1", - "generic-array 0.14.7", + "generic-array", "group 0.12.1", "rand_core", "sec1 0.3.0", @@ -930,9 +893,9 @@ dependencies = [ "crypto-bigint 0.5.3", "digest 0.10.7", "ff 0.13.0", - "generic-array 0.14.7", + "generic-array", "group 0.13.0", - "pkcs8 0.10.2", + "pkcs8", "rand_core", "sec1 0.7.3", "subtle", @@ -977,19 +940,6 @@ dependencies = [ "syn 2.0.13", ] -[[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" @@ -1034,13 +984,13 @@ dependencies = [ "ctr", "digest 0.10.7", "hex", - "hmac 0.12.1", + "hmac", "pbkdf2 0.11.0", "rand", "scrypt", "serde", "serde_json", - "sha2 0.10.6", + "sha2", "sha3 0.10.6", "thiserror", "uuid", @@ -1049,15 +999,14 @@ dependencies = [ [[package]] name = "eth-types" version = "0.1.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=develop#b02de5df8007de35c9e73cb886c0fe1ebb9e5963" dependencies = [ - "ethers-core 2.0.7", + "ethers-core", "ethers-signers", "halo2_proofs", "hex", - "itertools", + "itertools 0.11.0", "lazy_static", - "libsecp256k1", "num", "num-bigint", "once_cell", @@ -1067,8 +1016,8 @@ dependencies = [ "serde_json", "serde_with", "sha3 0.10.6", - "strum", - "strum_macros", + "strum 0.25.0", + "strum_macros 0.25.3", "subtle", "uint", ] @@ -1121,32 +1070,6 @@ dependencies = [ "uint", ] -[[package]] -name = "ethers-core" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade3e9c97727343984e1ceada4fdab11142d2ee3472d2c67027d56b1251d4f15" -dependencies = [ - "arrayvec", - "bytes", - "chrono", - "elliptic-curve 0.12.3", - "ethabi", - "generic-array 0.14.7", - "hex", - "k256 0.11.6", - "open-fastrlp", - "rand", - "rlp", - "rlp-derive", - "serde", - "serde_json", - "strum", - "thiserror", - "tiny-keccak", - "unicode-xid", -] - [[package]] name = "ethers-core" version = "2.0.7" @@ -1157,7 +1080,7 @@ dependencies = [ "chrono", "elliptic-curve 0.13.5", "ethabi", - "generic-array 0.14.7", + "generic-array", "hex", "k256 0.13.1", "num_enum 0.6.1", @@ -1166,50 +1089,13 @@ dependencies = [ "rlp", "serde", "serde_json", - "strum", + "strum 0.24.1", "tempfile", "thiserror", "tiny-keccak", "unicode-xid", ] -[[package]] -name = "ethers-providers" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a9e0597aa6b2fdc810ff58bc95e4eeaa2c219b3e615ed025106ecb027407d8" -dependencies = [ - "async-trait", - "auto_impl", - "base64 0.13.1", - "ethers-core 1.0.2", - "futures-channel", - "futures-core", - "futures-timer", - "futures-util", - "getrandom", - "hashers", - "hex", - "http", - "once_cell", - "parking_lot 0.11.2", - "pin-project", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-tungstenite 0.17.2", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-timer", - "web-sys", - "ws_stream_wasm", -] - [[package]] name = "ethers-providers" version = "2.0.7" @@ -1221,7 +1107,7 @@ dependencies = [ "base64 0.21.0", "bytes", "enr", - "ethers-core 2.0.7", + "ethers-core", "futures-channel", "futures-core", "futures-timer", @@ -1237,7 +1123,7 @@ dependencies = [ "serde_json", "thiserror", "tokio", - "tokio-tungstenite 0.19.0", + "tokio-tungstenite", "tracing", "tracing-futures", "url", @@ -1258,10 +1144,10 @@ dependencies = [ "coins-bip39", "elliptic-curve 0.13.5", "eth-keystore", - "ethers-core 2.0.7", + "ethers-core", "hex", "rand", - "sha2 0.10.6", + "sha2", "thiserror", "tracing", ] @@ -1269,7 +1155,7 @@ dependencies = [ [[package]] name = "external-tracer" version = "0.1.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=develop#b02de5df8007de35c9e73cb886c0fe1ebb9e5963" dependencies = [ "eth-types", "geth-utils", @@ -1449,22 +1335,12 @@ dependencies = [ [[package]] name = "gadgets" version = "0.1.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=develop#b02de5df8007de35c9e73cb886c0fe1ebb9e5963" dependencies = [ - "digest 0.7.6", "eth-types", "halo2_proofs", - "sha3 0.7.3", - "strum", -] - -[[package]] -name = "generic-array" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d00328cedcac5e81c683e5620ca6a30756fc23027ebf9bff405c0e8da1fbb7e" -dependencies = [ - "typenum", + "sha3 0.10.6", + "strum 0.25.0", ] [[package]] @@ -1481,9 +1357,9 @@ dependencies = [ [[package]] name = "geth-utils" version = "0.1.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=develop#b02de5df8007de35c9e73cb886c0fe1ebb9e5963" dependencies = [ - "env_logger 0.9.3", + "env_logger", "gobuild 0.1.0-alpha.2 (git+https://github.com/scroll-tech/gobuild.git)", "log", ] @@ -1495,10 +1371,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if 1.0.0", - "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -1612,7 +1486,7 @@ source = "git+https://github.com/scroll-tech/halo2-lib?tag=v0.1.5#70588177930400 dependencies = [ "ff 0.12.1", "halo2_proofs", - "itertools", + "itertools 0.10.5", "num-bigint", "num-integer", "num-traits", @@ -1628,7 +1502,7 @@ dependencies = [ "ff 0.12.1", "group 0.12.1", "halo2-base", - "itertools", + "itertools 0.10.5", "num-bigint", "num-integer", "num-traits", @@ -1650,8 +1524,8 @@ dependencies = [ "rand", "serde", "serde_json", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "subtle", ] @@ -1660,10 +1534,10 @@ name = "halo2-mpt-circuits" version = "0.1.0" source = "git+https://github.com/scroll-tech/mpt-circuit.git?tag=v0.7.0#578c210ceb88d3c143ee2a013ad836d19285d9c1" dependencies = [ - "ethers-core 2.0.7", + "ethers-core", "halo2_proofs", "hex", - "itertools", + "itertools 0.10.5", "lazy_static", "log", "num-bigint", @@ -1672,8 +1546,8 @@ dependencies = [ "rand", "serde", "serde_json", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "thiserror", ] @@ -1797,16 +1671,6 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" -[[package]] -name = "hmac" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] - [[package]] name = "hmac" version = "0.12.1" @@ -1816,17 +1680,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "hmac-drbg" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" -dependencies = [ - "digest 0.9.0", - "generic-array 0.14.7", - "hmac 0.8.1", -] - [[package]] name = "http" version = "0.2.9" @@ -1900,9 +1753,9 @@ dependencies = [ "futures-util", "http", "hyper", - "rustls 0.21.7", + "rustls", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", ] [[package]] @@ -1999,7 +1852,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -2009,9 +1862,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if 1.0.0", - "js-sys", - "wasm-bindgen", - "web-sys", ] [[package]] @@ -2021,7 +1871,7 @@ dependencies = [ "anyhow", "glob", "halo2_proofs", - "itertools", + "itertools 0.11.0", "log", "log4rs", "prover", @@ -2069,6 +1919,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.6" @@ -2093,7 +1952,7 @@ dependencies = [ "cfg-if 1.0.0", "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.6", + "sha2", "sha3 0.10.6", ] @@ -2107,7 +1966,7 @@ dependencies = [ "ecdsa 0.16.8", "elliptic-curve 0.13.5", "once_cell", - "sha2 0.10.6", + "sha2", "signature 2.1.0", ] @@ -2123,12 +1982,12 @@ dependencies = [ [[package]] name = "keccak256" version = "0.1.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=develop#b02de5df8007de35c9e73cb886c0fe1ebb9e5963" dependencies = [ - "env_logger 0.9.3", + "env_logger", "eth-types", "halo2_proofs", - "itertools", + "itertools 0.11.0", "lazy_static", "log", "num-bigint", @@ -2150,54 +2009,6 @@ version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" -[[package]] -name = "libsecp256k1" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" -dependencies = [ - "arrayref", - "base64 0.13.1", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand", - "serde", - "sha2 0.9.9", - "typenum", -] - -[[package]] -name = "libsecp256k1-core" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" -dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", -] - -[[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "libsecp256k1-gen-genmult" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" -dependencies = [ - "libsecp256k1-core", -] - [[package]] name = "link-cplusplus" version = "1.0.8" @@ -2258,7 +2069,7 @@ dependencies = [ "libc", "log", "log-mdc", - "parking_lot 0.12.1", + "parking_lot", "thiserror", "thread-id", "winapi", @@ -2332,21 +2143,21 @@ dependencies = [ "rand", "serde", "serde_json", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "subtle", ] [[package]] name = "mock" version = "0.1.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=develop#b02de5df8007de35c9e73cb886c0fe1ebb9e5963" dependencies = [ "eth-types", - "ethers-core 2.0.7", + "ethers-core", "ethers-signers", "external-tracer", - "itertools", + "itertools 0.11.0", "lazy_static", "log", "rand", @@ -2356,7 +2167,7 @@ dependencies = [ [[package]] name = "mpt-zktrie" version = "0.1.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=develop#b02de5df8007de35c9e73cb886c0fe1ebb9e5963" dependencies = [ "eth-types", "halo2-mpt-circuits", @@ -2576,17 +2387,6 @@ dependencies = [ "syn 1.0.109", ] -[[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" @@ -2594,21 +2394,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.7", -] - -[[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", - "winapi", + "parking_lot_core", ] [[package]] @@ -2661,7 +2447,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest 0.10.7", - "hmac 0.12.1", + "hmac", ] [[package]] @@ -2712,16 +2498,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[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" @@ -2729,7 +2505,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ "der 0.7.8", - "spki 0.7.2", + "spki", ] [[package]] @@ -2828,7 +2604,7 @@ dependencies = [ [[package]] name = "prover" version = "0.1.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=develop#b02de5df8007de35c9e73cb886c0fe1ebb9e5963" dependencies = [ "aggregator", "anyhow", @@ -2838,11 +2614,11 @@ dependencies = [ "chrono", "dotenvy", "eth-types", - "ethers-core 2.0.7", + "ethers-core", "git-version", "halo2_proofs", "hex", - "itertools", + "itertools 0.11.0", "log", "log4rs", "mpt-zktrie", @@ -2854,7 +2630,7 @@ dependencies = [ "serde_derive", "serde_json", "serde_stacker", - "sha2 0.10.6", + "sha2", "snark-verifier", "snark-verifier-sdk", "zkevm-circuits", @@ -3003,13 +2779,13 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.7", + "rustls", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", "tower-service", "url", "wasm-bindgen", @@ -3047,7 +2823,7 @@ dependencies = [ "revm-primitives", "ripemd", "secp256k1 0.26.0", - "sha2 0.10.6", + "sha2", "sha3 0.10.6", "substrate-bn", ] @@ -3083,7 +2859,7 @@ dependencies = [ "primitive-types", "ripemd", "secp256k1 0.24.3", - "sha2 0.10.6", + "sha2", "sha3 0.10.6", "substrate-bn", ] @@ -3095,7 +2871,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ "crypto-bigint 0.4.9", - "hmac 0.12.1", + "hmac", "zeroize", ] @@ -3105,7 +2881,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "hmac 0.12.1", + "hmac", "subtle", ] @@ -3229,18 +3005,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rustls" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" -dependencies = [ - "log", - "ring", - "sct", - "webpki", -] - [[package]] name = "rustls" version = "0.21.7" @@ -3345,10 +3109,10 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" dependencies = [ - "hmac 0.12.1", + "hmac", "pbkdf2 0.11.0", "salsa20", - "sha2 0.10.6", + "sha2", ] [[package]] @@ -3369,8 +3133,7 @@ checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ "base16ct 0.1.1", "der 0.6.1", - "generic-array 0.14.7", - "pkcs8 0.9.0", + "generic-array", "subtle", "zeroize", ] @@ -3383,8 +3146,8 @@ checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct 0.2.0", "der 0.7.8", - "generic-array 0.14.7", - "pkcs8 0.10.2", + "generic-array", + "pkcs8", "subtle", "zeroize", ] @@ -3518,17 +3281,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -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" @@ -3540,19 +3292,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "sha2" version = "0.10.6" @@ -3564,18 +3303,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "sha3" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b64dcef59ed4290b9fb562b53df07f564690d6539e8ecdd4728cf392477530bc" -dependencies = [ - "block-buffer 0.3.3", - "byte-tools", - "digest 0.7.6", - "keccak", -] - [[package]] name = "sha3" version = "0.9.1" @@ -3652,7 +3379,7 @@ dependencies = [ "halo2-base", "halo2-ecc", "hex", - "itertools", + "itertools 0.10.5", "lazy_static", "num-bigint", "num-integer", @@ -3672,11 +3399,11 @@ version = "0.0.1" source = "git+https://github.com/scroll-tech/snark-verifier?tag=v0.1.5#bc1d39ae31f3fe520c51dd150f0fefaf9653c465" dependencies = [ "bincode", - "env_logger 0.10.0", + "env_logger", "ethereum-types", "halo2-base", "hex", - "itertools", + "itertools 0.10.5", "lazy_static", "log", "num-bigint", @@ -3715,16 +3442,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -[[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" @@ -3766,9 +3483,15 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros", + "strum_macros 0.24.3", ] +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" + [[package]] name = "strum_macros" version = "0.24.3" @@ -3782,6 +3505,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.13", +] + [[package]] name = "substrate-bn" version = "0.6.0" @@ -3934,7 +3670,7 @@ dependencies = [ "libc", "mio", "num_cpus", - "parking_lot 0.12.1", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2 0.5.4", @@ -3953,43 +3689,16 @@ dependencies = [ "syn 2.0.13", ] -[[package]] -name = "tokio-rustls" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" -dependencies = [ - "rustls 0.20.8", - "tokio", - "webpki", -] - [[package]] name = "tokio-rustls" version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.7", + "rustls", "tokio", ] -[[package]] -name = "tokio-tungstenite" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" -dependencies = [ - "futures-util", - "log", - "rustls 0.20.8", - "tokio", - "tokio-rustls 0.23.4", - "tungstenite 0.17.3", - "webpki", - "webpki-roots 0.22.6", -] - [[package]] name = "tokio-tungstenite" version = "0.19.0" @@ -3998,10 +3707,10 @@ checksum = "ec509ac96e9a0c43427c74f003127d953a265737636129424288d27cb5c4b12c" dependencies = [ "futures-util", "log", - "rustls 0.21.7", + "rustls", "tokio", - "tokio-rustls 0.24.1", - "tungstenite 0.19.0", + "tokio-rustls", + "tungstenite", "webpki-roots 0.23.1", ] @@ -4090,27 +3799,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" -[[package]] -name = "tungstenite" -version = "0.17.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" -dependencies = [ - "base64 0.13.1", - "byteorder", - "bytes", - "http", - "httparse", - "log", - "rand", - "rustls 0.20.8", - "sha-1", - "thiserror", - "url", - "utf-8", - "webpki", -] - [[package]] name = "tungstenite" version = "0.19.0" @@ -4124,7 +3812,7 @@ dependencies = [ "httparse", "log", "rand", - "rustls 0.21.7", + "rustls", "sha1", "thiserror", "url", @@ -4310,21 +3998,6 @@ version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" -[[package]] -name = "wasm-timer" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" -dependencies = [ - "futures", - "js-sys", - "parking_lot 0.11.2", - "pin-utils", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "web-sys" version = "0.3.61" @@ -4345,15 +4018,6 @@ dependencies = [ "untrusted", ] -[[package]] -name = "webpki-roots" -version = "0.22.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] - [[package]] name = "webpki-roots" version = "0.23.1" @@ -4597,24 +4261,23 @@ checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" [[package]] name = "zkevm-circuits" version = "0.1.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.9.7#2055cc0bb970aa28d597c945b6078e2469af8862" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?branch=develop#b02de5df8007de35c9e73cb886c0fe1ebb9e5963" dependencies = [ "array-init", "bus-mapping", "either", - "env_logger 0.9.3", + "env_logger", "eth-types", - "ethers-core 2.0.7", + "ethers-core", "ethers-signers", "gadgets", "halo2-base", "halo2-ecc", "halo2_proofs", "hex", - "itertools", + "itertools 0.11.0", "keccak256", "lazy_static", - "libsecp256k1", "log", "maingate", "misc-precompiled-circuit", @@ -4633,15 +4296,15 @@ dependencies = [ "sha3 0.10.6", "snark-verifier", "snark-verifier-sdk", - "strum", - "strum_macros", + "strum 0.25.0", + "strum_macros 0.25.3", "subtle", ] [[package]] name = "zktrie" version = "0.2.0" -source = "git+https://github.com/scroll-tech/zktrie.git?branch=v0.6#83318659773604fa565e2ebeb810a6d3746f0af4" +source = "git+https://github.com/scroll-tech/zktrie.git?branch=v0.7#a130ea543d291d4b71724f91cb8a49745c593a0c" dependencies = [ "gobuild 0.1.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/Cargo.toml b/Cargo.toml index 608d2a84e..d5550be78 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,9 +12,9 @@ license = "MIT OR Apache-2.0" [workspace.dependencies] anyhow = "1.0" clap = { version = "3.1", features = ["derive"] } -ethers-providers = "1.0" +ethers-providers = "2.0.7" glob = "0.3" -itertools = "0.10" +itertools = "0.11" log = "0.4" log4rs = { version = "1.2", default_features = false, features = ["console_appender", "file_appender"] } rand = "0.8" @@ -26,8 +26,8 @@ serde_json = "1.0" tokio = { version = "1.32", features = ["full"] } halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "develop" } -prover = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.9.7", default-features = false, features = ["parallel_syn", "scroll", "shanghai"] } -zkevm-circuits = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.9.7", default-features = false, features = ["parallel_syn", "scroll", "shanghai"] } +prover = { git = "https://github.com/scroll-tech/zkevm-circuits.git", branch = "develop", default-features = false, features = ["parallel_syn", "scroll", "shanghai"] } +zkevm-circuits = { git = "https://github.com/scroll-tech/zkevm-circuits.git", branch = "develop", features = ["parallel_syn", "scroll", "shanghai"] } integration = { path = "integration" } diff --git a/bin/src/mock_testnet.rs b/bin/src/mock_testnet.rs index 6db0c3caf..b0dc57b2e 100644 --- a/bin/src/mock_testnet.rs +++ b/bin/src/mock_testnet.rs @@ -59,7 +59,7 @@ async fn main() { block_traces.push(trace); } - let witness_block = match build_block(&block_traces, batch_id, chunk_id) { + let witness_block = match build_block(block_traces, batch_id, chunk_id) { Ok(block) => block, Err(e) => { log::error!("mock-testnet: building block failed {e:?}"); @@ -87,9 +87,13 @@ async fn main() { log::info!("mock-testnet: END"); } -fn build_block(block_traces: &[BlockTrace], batch_id: i64, chunk_id: i64) -> Result { - let witness_block = block_traces_to_witness_block(block_traces)?; - run_circuit_capacity_checker(batch_id, chunk_id, block_traces, &witness_block); +fn build_block( + block_traces: Vec, + batch_id: i64, + chunk_id: i64, +) -> Result { + let witness_block = block_traces_to_witness_block(block_traces.clone())?; + run_circuit_capacity_checker(batch_id, chunk_id, &block_traces, &witness_block); Ok(witness_block) } diff --git a/integration/src/test_util/capacity_checker.rs b/integration/src/test_util/capacity_checker.rs index 2ff79b589..dd511069c 100644 --- a/integration/src/test_util/capacity_checker.rs +++ b/integration/src/test_util/capacity_checker.rs @@ -6,7 +6,7 @@ use prover::{ }, BlockTrace, WitnessBlock, }; -use std::{slice, time::Duration}; +use std::time::Duration; use zkevm_circuits::evm_circuit::ExecutionState; pub fn prepare_circuit_capacity_checker() { @@ -89,9 +89,7 @@ fn ccc_block_whole_block( _block_idx: usize, block: &BlockTrace, ) { - checker - .estimate_circuit_capacity(slice::from_ref(block)) - .unwrap(); + checker.estimate_circuit_capacity(block.clone()).unwrap(); } fn ccc_block_tx_by_tx(checker: &mut CircuitCapacityChecker, block_idx: usize, block: &BlockTrace) { @@ -120,7 +118,7 @@ fn ccc_block_tx_by_tx(checker: &mut CircuitCapacityChecker, block_idx: usize, bl tx_storage_trace: vec![], // not used }; log::debug!("calling estimate_circuit_capacity"); - let results = checker.estimate_circuit_capacity(&[tx_trace]).unwrap(); + let results = checker.estimate_circuit_capacity(tx_trace).unwrap(); log::info!( "after {}th block {}th tx: {:#?}", block_idx, @@ -220,7 +218,9 @@ fn get_ccc_result_by_whole_block( let mut checker = CircuitCapacityChecker::new(); checker.light_mode = light_mode; - checker.estimate_circuit_capacity(blocks).unwrap(); + blocks.iter().for_each(|b| { + checker.estimate_circuit_capacity(b.clone()).unwrap(); + }); let ccc_result = checker.get_acc_row_usage(false); pretty_print_row_usage( &ccc_result, diff --git a/integration/tests/integration.rs b/integration/tests/integration.rs index 0937628ce..e313c596f 100644 --- a/integration/tests/integration.rs +++ b/integration/tests/integration.rs @@ -56,7 +56,7 @@ fn test_cs_same_for_vk_consistent() { assert!(pk.get_vk().cs() == vk.cs(), "Dummy super cicuit"); let block_trace = load_block_traces_for_test().1; - let real_circuit = SuperCircuit::from_block_traces(&block_trace).unwrap().0; + let real_circuit = SuperCircuit::from_block_traces(block_trace).unwrap().0; let pk = keygen_pk2(¶ms, &real_circuit).unwrap(); let vk = keygen_vk(¶ms, &real_circuit).unwrap(); @@ -73,7 +73,7 @@ fn test_capacity_checker() { prepare_circuit_capacity_checker(); let block_traces = vec![get_block_trace_from_file(trace_path)]; - let witness_block = block_traces_to_witness_block(&block_traces).unwrap(); + let witness_block = block_traces_to_witness_block(block_traces.clone()).unwrap(); let avg_each_tx_time = run_circuit_capacity_checker(0, 0, &block_traces, &witness_block); assert!(avg_each_tx_time < Duration::from_millis(100)); @@ -86,7 +86,7 @@ fn estimate_circuit_rows() { let (_, block_trace) = load_block_traces_for_test(); log::info!("estimating used rows for batch"); - let rows = SuperCircuit::estimate_rows(&block_trace); + let rows = SuperCircuit::estimate_rows(block_trace); log::info!("super circuit: {:?}", rows); } @@ -98,10 +98,10 @@ fn test_deterministic() { type C = SuperCircuit; let block_trace = load_block_traces_for_test().1; - let circuit1 = C::from_block_traces(&block_trace).unwrap().0; + let circuit1 = C::from_block_traces(block_trace.clone()).unwrap().0; let prover1 = MockProver::<_>::run(*INNER_DEGREE, &circuit1, circuit1.instance()).unwrap(); - let circuit2 = C::from_block_traces(&block_trace).unwrap().0; + let circuit2 = C::from_block_traces(block_trace).unwrap().0; let prover2 = MockProver::<_>::run(*INNER_DEGREE, &circuit2, circuit2.instance()).unwrap(); let advice1 = prover1.advices(); @@ -133,7 +133,7 @@ fn test_vk_same() { let params = load_params(PARAMS_DIR, *INNER_DEGREE, None).unwrap(); let dummy_circuit = C::dummy_inner_circuit(); - let real_circuit = C::from_block_traces(&block_trace).unwrap().0; + let real_circuit = C::from_block_traces(block_trace).unwrap().0; let vk_empty = keygen_vk(¶ms, &dummy_circuit).unwrap(); let vk_real = keygen_vk(¶ms, &real_circuit).unwrap(); let vk_empty_bytes = serialize_vk(&vk_empty); diff --git a/integration/tests/mock_tests.rs b/integration/tests/mock_tests.rs index 4dd2704c0..bfe0d6d81 100644 --- a/integration/tests/mock_tests.rs +++ b/integration/tests/mock_tests.rs @@ -7,5 +7,5 @@ fn test_mock_prove() { init_env_and_log("mock_tests"); let block_traces = load_block_traces_for_test().1; - Prover::::mock_prove_target_circuit_batch(&block_traces).unwrap(); + Prover::::mock_prove_target_circuit_batch(block_traces).unwrap(); }