From d67e83d2d36e911bee4ecb0e3addf46dbfaf58bf Mon Sep 17 00:00:00 2001 From: pinkiebell <40266861+pinkiebell@users.noreply.github.com> Date: Fri, 9 Sep 2022 15:26:49 +0200 Subject: [PATCH] upgrade ethers-* packages to 0.17.0 (#758) * upgrade ethers-* packages to 0.17.0 fixes #757 * fix * fix: use vector of static size * confused naming scheme * mock: change type signature of Block.nonce to H64 --- Cargo.lock | 1156 ++++++++--------- bus-mapping/Cargo.toml | 4 +- bus-mapping/src/circuit_input_builder.rs | 4 +- .../src/circuit_input_builder/block.rs | 4 +- bus-mapping/src/mock.rs | 5 +- circuit-benchmarks/Cargo.toml | 2 +- eth-types/Cargo.toml | 4 +- eth-types/src/geth_types.rs | 9 +- eth-types/src/lib.rs | 2 +- integration-tests/Cargo.toml | 2 +- .../src/bin/gen_blockchain_data.rs | 4 +- mock/Cargo.toml | 7 +- mock/src/block.rs | 19 +- mock/src/transaction.rs | 11 +- zkevm-circuits/Cargo.toml | 4 +- zkevm-circuits/src/test_util.rs | 6 +- 16 files changed, 586 insertions(+), 657 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5bee211c40..54559fc977 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,16 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - [[package]] name = "adler" version = "1.0.2" @@ -89,6 +79,15 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + [[package]] name = "async-trait" version = "0.1.57" @@ -124,9 +123,9 @@ dependencies = [ [[package]] name = "auto_impl" -version = "0.5.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7862e21c893d65a1650125d157eaeec691439379a1cee17ee49031b79236ada4" +checksum = "8a8c1df849285fbacd587de7818cc7d13be6cd2cbcd47a04fb1801b0e2706e33" dependencies = [ "proc-macro-error", "proc-macro2", @@ -176,9 +175,9 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "base64ct" -version = "1.5.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2b2456fd614d856680dcd9fcc660a51a820fa09daef2e49772b56a193c8474" +checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" [[package]] name = "bech32" @@ -195,6 +194,21 @@ dependencies = [ "serde", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" @@ -211,39 +225,25 @@ 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 2.0.0", + "funty", "radium 0.7.0", "tap", - "wyz 0.5.0", + "wyz", ] [[package]] name = "blake2" -version = "0.9.2" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" +checksum = "b9cf849ee05b2ee5fba5e36f97ff8ec2533916700fc0758d40d92136a42f3388" dependencies = [ - "crypto-mac 0.8.0", - "digest 0.9.0", - "opaque-debug 0.3.0", + "digest 0.10.3", ] [[package]] @@ -273,7 +273,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding 0.1.5", + "block-padding", "byte-tools 0.3.1", "byteorder", "generic-array 0.12.4", @@ -285,7 +285,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding 0.2.1", "generic-array 0.14.6", ] @@ -307,12 +306,6 @@ dependencies = [ "byte-tools 0.3.1", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "bs58" version = "0.4.0" @@ -401,37 +394,6 @@ dependencies = [ "serde", ] -[[package]] -name = "camino" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad0e1e3e88dd237a156ab9f571021b8a158caa0ae44b1968a241efb5144c1e" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" -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.13", - "serde", - "serde_json", -] - [[package]] name = "cast" version = "0.3.0" @@ -515,57 +477,58 @@ dependencies = [ [[package]] name = "coins-bip32" -version = "0.3.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b669993c632e5fec4a297085ec57381f53e4646c123cb77a7ca754e005c921" +checksum = "634c509653de24b439672164bbf56f5f582a2ab0e313d3b0f6af0b7345cf2560" dependencies = [ "bincode", "bs58", "coins-core", - "digest 0.9.0", - "hmac 0.11.0", + "digest 0.10.3", + "getrandom", + "hmac 0.12.1", "k256", "lazy_static", "serde", - "sha2 0.9.9", + "sha2 0.10.5", "thiserror", ] [[package]] name = "coins-bip39" -version = "0.3.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38426029442f91bd49973d6f59f28e3dbb14e633e3019ac4ec6bce402c44f81c" +checksum = "2a11892bcac83b4c6e95ab84b5b06c76d9d70ad73548dd07418269c5c7977171" dependencies = [ "bitvec 0.17.4", "coins-bip32", "getrandom", "hex", - "hmac 0.11.0", - "pbkdf2", + "hmac 0.12.1", + "pbkdf2 0.11.0", "rand", - "sha2 0.9.9", + "sha2 0.10.5", "thiserror", ] [[package]] name = "coins-core" -version = "0.2.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d257d975731955ee86fa7f348000c3fea09c262e84c70c11e994a85aa4f467a7" +checksum = "c94090a6663f224feae66ab01e41a2555a8296ee07b5f20dab8888bdefc9f617" dependencies = [ "base58check", "base64 0.12.3", "bech32", "blake2", - "digest 0.9.0", + "digest 0.10.3", "generic-array 0.14.6", "hex", - "ripemd160", + "ripemd", "serde", "serde_derive", - "sha2 0.9.9", - "sha3 0.9.1", + "sha2 0.10.5", + "sha3 0.10.2", "thiserror", ] @@ -594,15 +557,9 @@ checksum = "ed3d0b5ff30645a68f35ece8cea4556ca14ef8a1651455f789a099a0513532a6" [[package]] name = "const-oid" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6f2aa4d0537bcc1c74df8755072bd31c1ef1a3a1b85a68e8404a8c353b7b8b" - -[[package]] -name = "const-oid" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" [[package]] name = "constant_time_eq" @@ -612,9 +569,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "convert_case" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +checksum = "fb4a24b1aaf0fd0ce8b45161144d6f42cd91677fd5940fd431183eb023b3a2b8" [[package]] name = "core-foundation" @@ -776,21 +733,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83bd3bb4314701c568e340cd8cf78c975aa0ca79e03d3f6d1677d5b0c9c0c03" -dependencies = [ - "generic-array 0.14.6", - "rand_core", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-bigint" -version = "0.3.2" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +checksum = "9f2b443d17d49dad5ef0ede301c3179cc923b8822f3393b4d2c28c269dd4a122" dependencies = [ "generic-array 0.14.6", "rand_core", @@ -818,16 +763,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "crypto-mac" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" -dependencies = [ - "generic-array 0.14.6", - "subtle", -] - [[package]] name = "csv" version = "1.1.6" @@ -862,9 +797,9 @@ dependencies = [ [[package]] name = "ctr" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a232f92a03f37dd7d7dd2adc67166c77e9cd88de5b019b9a9eecfaeaf7bfd481" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" dependencies = [ "cipher", ] @@ -915,20 +850,12 @@ dependencies = [ [[package]] name = "der" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79b71cca7d95d7681a4b3b9cdf63c8dbc3730d0584c2c74e31416d64a90493f4" -dependencies = [ - "const-oid 0.6.2", -] - -[[package]] -name = "der" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" dependencies = [ - "const-oid 0.7.1", + "const-oid", + "zeroize", ] [[package]] @@ -997,6 +924,7 @@ checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" dependencies = [ "block-buffer 0.10.2", "crypto-common", + "subtle", ] [[package]] @@ -1029,6 +957,12 @@ dependencies = [ "libloading", ] +[[package]] +name = "dunce" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "453440c271cf5577fd2a40e4942540cb7d0d2f85e27c8d07dd0023c925a67541" + [[package]] name = "dwrote" version = "0.11.0" @@ -1046,7 +980,7 @@ name = "ecc" version = "0.1.0" source = "git+https://github.com/privacy-scaling-explorations/halo2wrong?tag=v2022_08_24#56639b615295e08e0ef145d8a0c3876f606a7c5c" dependencies = [ - "group 0.12.0", + "group", "integer", "num-bigint", "num-integer", @@ -1061,7 +995,7 @@ version = "0.1.0" source = "git+https://github.com/privacy-scaling-explorations/halo2wrong?tag=v2022_08_24#56639b615295e08e0ef145d8a0c3876f606a7c5c" dependencies = [ "ecc", - "group 0.12.0", + "group", "num-bigint", "num-integer", "num-traits", @@ -1071,13 +1005,13 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.12.4" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43ee23aa5b4f68c7a092b5c3beb25f50c406adc75e2363634f242f28ab255372" +checksum = "1826508d57f3140a2e8e3c307b19915a266c92a1b8c2f6bb54e29e5d72a394ae" dependencies = [ - "der 0.4.5", - "elliptic-curve 0.10.6", - "hmac 0.11.0", + "der", + "elliptic-curve", + "rfc6979", "signature", ] @@ -1089,33 +1023,31 @@ checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "elliptic-curve" -version = "0.10.6" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beca177dcb8eb540133e7680baff45e7cc4d93bf22002676cec549f82343721b" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ - "crypto-bigint 0.2.11", - "ff 0.10.1", + "base16ct", + "crypto-bigint", + "der", + "digest 0.10.3", + "ff", "generic-array 0.14.6", - "group 0.10.0", + "group", "pkcs8", "rand_core", + "sec1", "subtle", "zeroize", ] [[package]] -name = "elliptic-curve" -version = "0.11.12" +name = "ena" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +checksum = "d7402b94a93c24e742487327a7cd839dc9d36fec9de9fb25b09f2dae459f36c3" dependencies = [ - "base16ct", - "crypto-bigint 0.3.2", - "der 0.5.1", - "generic-array 0.14.6", - "rand_core", - "subtle", - "zeroize", + "log", ] [[package]] @@ -1142,22 +1074,22 @@ dependencies = [ [[package]] name = "eth-keystore" -version = "0.3.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d47d900a7dea08593d398104f8288e37858b0ad714c8d08cd03fdb86563e6402" +checksum = "6f65b750ac950f2f825b36d08bef4cda4112e19a7b1a68f6e2bb499413e12440" dependencies = [ "aes", "ctr", - "digest 0.9.0", + "digest 0.10.3", "hex", - "hmac 0.11.0", - "pbkdf2", + "hmac 0.12.1", + "pbkdf2 0.11.0", "rand", "scrypt", "serde", "serde_json", - "sha2 0.9.9", - "sha3 0.9.1", + "sha2 0.10.5", + "sha3 0.10.2", "thiserror", "uuid", ] @@ -1185,25 +1117,26 @@ dependencies = [ [[package]] name = "ethabi" -version = "15.0.0" +version = "17.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f76ef192b63e8a44b3d08832acebbb984c3fba154b5c26f70037c860202a0d4b" +checksum = "e4966fba78396ff92db3b817ee71143eccd98acf0f876b8d600e585a670c5d1b" dependencies = [ - "anyhow", "ethereum-types", "hex", + "once_cell", + "regex", "serde", "serde_json", - "sha3 0.9.1", + "sha3 0.10.2", "thiserror", "uint", ] [[package]] name = "ethbloom" -version = "0.11.1" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" +checksum = "11da94e443c60508eb62cf256243a64da87304c2802ac2528847f79d750007ef" dependencies = [ "crunchy", "fixed-hash", @@ -1214,9 +1147,9 @@ dependencies = [ [[package]] name = "ethereum-types" -version = "0.12.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" +checksum = "b2827b94c556145446fcce834ca86b7abf0c39a805883fe20e72c5bfdb5a0dc6" dependencies = [ "ethbloom", "fixed-hash", @@ -1228,10 +1161,11 @@ dependencies = [ [[package]] name = "ethers" -version = "0.6.2" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59989141d334913ea2784f923e014ff9f7da373455aa12f884ab5f71378eb465" +checksum = "16142eeb3155cfa5aec6be3f828a28513a28bd995534f945fa70e7d608f16c10" dependencies = [ + "ethers-addressbook", "ethers-contract", "ethers-core", "ethers-etherscan", @@ -1242,109 +1176,86 @@ dependencies = [ ] [[package]] -name = "ethers-contract" -version = "0.6.2" +name = "ethers-addressbook" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c49f7c627973e1fcb46404d7846b3bc6c2a7a33616628258f61d26c6e6b89a" +checksum = "e23f8992ecf45ea9dd2983696aabc566c108723585f07f5dc8c9efb24e52d3db" dependencies = [ - "ethers-contract-abigen", - "ethers-contract-derive", "ethers-core", - "ethers-providers", - "futures-util", - "hex", "once_cell", - "pin-project", "serde", "serde_json", - "thiserror", ] [[package]] -name = "ethers-contract-abigen" -version = "0.6.3" +name = "ethers-contract" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658ab90a1fc5f338e8bf6fa6cd614ef4c8d573da40d0c89f45d21c595bda5f3b" +checksum = "2e0010fffc97c5abcf75a30fd75676b1ed917b2b82beb8270391333618e2847d" dependencies = [ - "Inflector", - "anyhow", - "cfg-if", "ethers-core", - "getrandom", + "ethers-providers", + "futures-util", "hex", "once_cell", - "proc-macro2", - "quote", - "reqwest", + "pin-project", "serde", "serde_json", - "syn", - "url", -] - -[[package]] -name = "ethers-contract-derive" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f974650dae34a335f3e2f32166be0739d7f87c3825842ad6f8195164cb5ea433" -dependencies = [ - "ethers-contract-abigen", - "ethers-core", - "hex", - "proc-macro2", - "quote", - "serde_json", - "syn", + "thiserror", ] [[package]] name = "ethers-core" -version = "0.6.3" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f15e1a2a54bc6bc3f8ea94afafbb374264f8322fcacdae06fefda80a206739ac" +checksum = "0ebdd63c828f58aa067f40f9adcbea5e114fb1f90144b3a1e2858e0c9b1ff4e8" dependencies = [ "arrayvec", "bytes", - "cargo_metadata", + "chrono", "convert_case", - "ecdsa 0.12.4", - "elliptic-curve 0.11.12", + "elliptic-curve", "ethabi", + "fastrlp", "generic-array 0.14.6", "hex", "k256", - "once_cell", "proc-macro2", - "quote", "rand", "rlp", "rlp-derive", + "rust_decimal", "serde", "serde_json", + "strum", "syn", "thiserror", "tiny-keccak", + "unicode-xid", ] [[package]] name = "ethers-etherscan" -version = "0.2.2" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa6bfff9fc96e83d3a25390fe7a505b6c1ae4290314251bf0825cfed90d1b750" +checksum = "b279a3d00bd219caa2f9a34451b4accbfa9a1eaafc26dcda9d572591528435f0" dependencies = [ "ethers-core", + "getrandom", "reqwest", + "semver 1.0.13", "serde", "serde-aux", "serde_json", "thiserror", + "tracing", ] [[package]] name = "ethers-middleware" -version = "0.6.2" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3831e5e98736715e848ec966dd76ce216a8e4f531f7d3e09ef43eead1c63df" +checksum = "b1e7e8632d28175352b9454bbcb604643b6ca1de4d36dc99b3f86860d75c132b" dependencies = [ "async-trait", "ethers-contract", @@ -1352,6 +1263,7 @@ dependencies = [ "ethers-etherscan", "ethers-providers", "ethers-signers", + "futures-locks", "futures-util", "instant", "reqwest", @@ -1366,20 +1278,24 @@ dependencies = [ [[package]] name = "ethers-providers" -version = "0.6.2" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e68d511a99f39a26c9b32a6f62360789ba0e214d8f4c012bf1fbdc7b00da0e4f" +checksum = "e46482e4d1e79b20c338fd9db9e166184eb387f0a4e7c05c5b5c0aa2e8c8900c" dependencies = [ "async-trait", "auto_impl", - "bytes", + "base64 0.13.0", "ethers-core", "futures-channel", "futures-core", "futures-timer", "futures-util", + "getrandom", + "hashers", "hex", - "parking_lot", + "http", + "once_cell", + "parking_lot 0.11.2", "pin-project", "reqwest", "serde", @@ -1387,7 +1303,6 @@ dependencies = [ "thiserror", "tokio", "tokio-tungstenite", - "tokio-util 0.6.10", "tracing", "tracing-futures", "url", @@ -1400,45 +1315,49 @@ dependencies = [ [[package]] name = "ethers-signers" -version = "0.6.2" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9e76778f397d5185bb09d9ea4238f41880394e4fb3b6d5fdc75541c0a70df55" +checksum = "73a72ecad124e8ccd18d6a43624208cab0199e59621b1f0fa6b776b2e0529107" dependencies = [ "async-trait", "coins-bip32", "coins-bip39", - "elliptic-curve 0.11.12", + "elliptic-curve", "eth-keystore", "ethers-core", - "futures-executor", - "futures-util", "hex", "rand", - "semver 1.0.13", - "sha2 0.9.9", + "sha2 0.10.5", "thiserror", ] [[package]] name = "ethers-solc" -version = "0.1.2" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b73d8386c8a965c90a4fd3accea7e409d20051f613950efa9c442560bd4f03" +checksum = "ebe5db405d0e584aa8dae154ffebb90f2305cae588fd11d9f6b857ebe3a79294" dependencies = [ + "cfg-if", "colored", + "dunce", "ethers-core", "getrandom", "glob", "hex", "home", "md-5", + "num_cpus", "once_cell", + "path-slash", + "rayon", "regex", "semver 1.0.13", "serde", "serde_json", - "sha2 0.9.9", + "solang-parser", "thiserror", + "tiny-keccak", + "tokio", "tracing", "walkdir", ] @@ -1460,22 +1379,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] -name = "fastrand" -version = "1.8.0" +name = "fastrlp" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "089263294bb1c38ac73649a6ad563dd9a5142c8dc0482be15b8b9acb22a1611e" dependencies = [ - "instant", + "arrayvec", + "auto_impl", + "bytes", + "ethereum-types", + "fastrlp-derive", ] [[package]] -name = "ff" -version = "0.10.1" +name = "fastrlp-derive" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f40b2dcd8bc322217a5f6559ae5f9e9d1de202a2ecee2e9eafcbece7562a4f" +checksum = "e1fa41ebc231af281098b11ad4a4f6182ec9096902afffe948034a20d4e1385a" dependencies = [ - "rand_core", - "subtle", + "bytes", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1501,6 +1426,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "float-ord" version = "0.2.0" @@ -1584,12 +1515,6 @@ dependencies = [ "pkg-config", ] -[[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" @@ -1644,6 +1569,17 @@ version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68" +[[package]] +name = "futures-locks" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eb42d4fb72227be5778429f9ef5240a38a358925a49f05b5cf702ce7c7e558a" +dependencies = [ + "futures-channel", + "futures-task", + "tokio", +] + [[package]] name = "futures-macro" version = "0.3.24" @@ -1691,6 +1627,15 @@ dependencies = [ "slab", ] +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + [[package]] name = "gadgets" version = "0.1.0" @@ -1779,23 +1724,12 @@ dependencies = [ [[package]] name = "group" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c363a5301b8f153d80747126a04b3c82073b9fe3130571a9d170cacdeaf7912" +checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" dependencies = [ - "ff 0.10.1", - "rand_core", - "subtle", -] - -[[package]] -name = "group" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" -dependencies = [ - "byteorder", - "ff 0.12.0", + "byteorder", + "ff", "rand_core", "subtle", ] @@ -1815,7 +1749,7 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util 0.7.3", + "tokio-util", "tracing", ] @@ -1832,8 +1766,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e925780549adee8364c7f2b685c753f6f3df23bde520c67416e93bf615933760" dependencies = [ "blake2b_simd", - "ff 0.12.0", - "group 0.12.0", + "ff", + "group", "pasta_curves", "plotters", "rand_core", @@ -1847,8 +1781,8 @@ version = "0.2.0" source = "git+https://github.com/privacy-scaling-explorations/halo2.git?tag=v2022_08_19#0cccba00d16065465c36dce51714637c428bd24c" dependencies = [ "blake2b_simd", - "ff 0.12.0", - "group 0.12.0", + "ff", + "group", "halo2curves", "rand_core", "rayon", @@ -1860,8 +1794,8 @@ name = "halo2curves" version = "0.2.1" source = "git+https://github.com/privacy-scaling-explorations/halo2curves?tag=0.2.1#f75ed26c961179186e9cec02cc3f841ca9e3fec1" dependencies = [ - "ff 0.12.0", - "group 0.12.0", + "ff", + "group", "lazy_static", "num-bigint", "num-traits", @@ -1877,7 +1811,7 @@ name = "halo2wrong" version = "0.1.0" source = "git+https://github.com/privacy-scaling-explorations/halo2wrong?tag=v2022_08_24#56639b615295e08e0ef145d8a0c3876f606a7c5c" dependencies = [ - "group 0.12.0", + "group", "halo2_proofs 0.2.0", "num-bigint", "num-integer", @@ -1890,6 +1824,15 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashers" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +dependencies = [ + "fxhash", +] + [[package]] name = "heck" version = "0.4.0" @@ -1917,18 +1860,17 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" dependencies = [ - "crypto-mac 0.8.0", + "crypto-mac", "digest 0.9.0", ] [[package]] name = "hmac" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac 0.11.1", - "digest 0.9.0", + "digest 0.10.3", ] [[package]] @@ -2023,22 +1965,9 @@ checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" dependencies = [ "http", "hyper", - "rustls 0.20.6", + "rustls", "tokio", - "tokio-rustls 0.23.4", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", + "tokio-rustls", ] [[package]] @@ -2089,9 +2018,9 @@ dependencies = [ [[package]] name = "impl-codec" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ "parity-scale-codec", ] @@ -2152,7 +2081,7 @@ name = "integer" version = "0.1.0" source = "git+https://github.com/privacy-scaling-explorations/halo2wrong?tag=v2022_08_24#56639b615295e08e0ef145d8a0c3876f606a7c5c" dependencies = [ - "group 0.12.0", + "group", "maingate", "num-bigint", "num-integer", @@ -2226,15 +2155,15 @@ dependencies = [ [[package]] name = "k256" -version = "0.9.6" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "903ae2481bcdfdb7b68e0a9baa4b7c9aff600b9ae2e8e5bb5833b8c91ab851ea" +checksum = "6db2573d3fd3e4cc741affc9b5ce1a8ce36cf29f09f80f36da4309d0ae6d7854" dependencies = [ "cfg-if", - "ecdsa 0.12.4", - "elliptic-curve 0.10.6", - "sha2 0.9.9", - "sha3 0.9.1", + "ecdsa 0.14.5", + "elliptic-curve", + "sha2 0.10.5", + "sha3 0.10.2", ] [[package]] @@ -2258,6 +2187,38 @@ dependencies = [ "rand", ] +[[package]] +name = "lalrpop" +version = "0.19.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b30455341b0e18f276fa64540aff54deafb54c589de6aca68659c63dd2d5d823" +dependencies = [ + "ascii-canvas", + "atty", + "bit-set", + "diff", + "ena", + "itertools", + "lalrpop-util", + "petgraph", + "pico-args", + "regex", + "regex-syntax", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "lalrpop-util" +version = "0.19.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcf796c978e9b4d983414f4caedc9273aa33ee214c5b887bd55fde84c85d2dc4" +dependencies = [ + "regex", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -2352,7 +2313,7 @@ name = "maingate" version = "0.1.0" source = "git+https://github.com/privacy-scaling-explorations/halo2wrong?tag=v2022_08_24#56639b615295e08e0ef145d8a0c3876f606a7c5c" dependencies = [ - "group 0.12.0", + "group", "halo2wrong", "num-bigint", "num-integer", @@ -2369,13 +2330,11 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] name = "md-5" -version = "0.9.1" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" +checksum = "66b48670c893079d3c2ed79114e3644b7004df1c361a4e0ad52e2e6940d07c3d" dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "opaque-debug 0.3.0", + "digest 0.10.3", ] [[package]] @@ -2425,7 +2384,6 @@ name = "mock" version = "0.1.0" dependencies = [ "eth-types", - "ethbloom", "ethers-core", "ethers-signers", "external-tracer", @@ -2436,22 +2394,10 @@ dependencies = [ ] [[package]] -name = "native-tls" -version = "0.2.10" +name = "new_debug_unreachable" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] +checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" [[package]] name = "num" @@ -2564,51 +2510,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" -[[package]] -name = "openssl" -version = "0.10.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "618febf65336490dfcf20b73f885f5651a0c89c64c2d4a8c3662585a70bf5bd0" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5f9bd0c2710541a3cda73d6f9ac4f1b240de4ae261065d309dbe73d9dceb42f" -dependencies = [ - "autocfg", - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "output_vt100" version = "0.1.3" @@ -2620,12 +2521,12 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "2.3.1" +version = "3.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" +checksum = "9182e4a71cae089267ab03e67c99368db7cd877baf50f931e5d6d4b71e195ac0" dependencies = [ "arrayvec", - "bitvec 0.20.4", + "bitvec 1.0.1", "byte-slice-cast", "impl-trait-for-tuples", "parity-scale-codec-derive", @@ -2634,9 +2535,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "2.3.1" +version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" +checksum = "9299338969a3d2f491d65f140b00ddec470858402f888af98e8642fb5e8965cd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2652,7 +2553,17 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core", + "parking_lot_core 0.8.5", +] + +[[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 0.9.3", ] [[package]] @@ -2669,11 +2580,35 @@ dependencies = [ "winapi", ] +[[package]] +name = "parking_lot_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-sys", +] + [[package]] name = "password-hash" -version = "0.2.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77e0b28ace46c5a396546bcf443bf422b57049617433d8854227352a4a9b24e7" +checksum = "1d791538a6dcc1e7cb7fe6f6b58aca40e7f79403c45b2bc274008b5e647af1d8" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" dependencies = [ "base64ct", "rand_core", @@ -2687,8 +2622,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "369d7785168ad7ff0cbe467d968ca3e19a927d8536b11ef9c21b4e454b15ba42" dependencies = [ "blake2b_simd", - "ff 0.12.0", - "group 0.12.0", + "ff", + "group", "lazy_static", "rand", "static_assertions", @@ -2701,6 +2636,12 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" +[[package]] +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + [[package]] name = "pathfinder_geometry" version = "0.5.1" @@ -2722,15 +2663,23 @@ dependencies = [ [[package]] name = "pbkdf2" -version = "0.8.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +checksum = "271779f35b581956db91a3e55737327a03aa051e90b1c47aeb189508533adfd7" dependencies = [ - "base64ct", - "crypto-mac 0.11.1", - "hmac 0.11.0", - "password-hash", - "sha2 0.9.9", + "digest 0.10.3", +] + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.3", + "hmac 0.12.1", + "password-hash 0.4.2", + "sha2 0.10.5", ] [[package]] @@ -2749,6 +2698,16 @@ dependencies = [ "ucd-trie", ] +[[package]] +name = "petgraph" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" +dependencies = [ + "fixedbitset", + "indexmap", +] + [[package]] name = "pharos" version = "0.5.3" @@ -2759,6 +2718,56 @@ dependencies = [ "rustc_version 0.4.0", ] +[[package]] +name = "phf" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" +dependencies = [ + "phf_macros", + "phf_shared", + "proc-macro-hack", +] + +[[package]] +name = "phf_generator" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pico-args" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8bcd96cb740d03149cbad5518db9fd87126a10ab519c011893b1754134c468" + [[package]] name = "pin-project" version = "1.0.12" @@ -2793,11 +2802,11 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkcs8" -version = "0.7.6" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee3ef9b64d26bad0536099c816c6734379e45bbd5f14798def6809e5cc350447" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ - "der 0.4.5", + "der", "spki", ] @@ -2871,6 +2880,12 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + [[package]] name = "pretty_assertions" version = "1.3.0" @@ -2885,9 +2900,9 @@ dependencies = [ [[package]] name = "primitive-types" -version = "0.10.1" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" +checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" dependencies = [ "fixed-hash", "impl-codec", @@ -2931,6 +2946,12 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-hack" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" + [[package]] name = "proc-macro2" version = "1.0.43" @@ -2955,12 +2976,6 @@ 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" @@ -3073,15 +3088,6 @@ version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - [[package]] name = "reqwest" version = "0.11.11" @@ -3098,32 +3104,40 @@ dependencies = [ "http-body", "hyper", "hyper-rustls", - "hyper-tls", "ipnet", "js-sys", "lazy_static", "log", "mime", - "native-tls", "percent-encoding", "pin-project-lite", - "rustls 0.20.6", + "rustls", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "tokio", - "tokio-native-tls", - "tokio-rustls 0.23.4", + "tokio-rustls", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.22.4", + "webpki-roots", "winreg", ] +[[package]] +name = "rfc6979" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +dependencies = [ + "crypto-bigint", + "hmac 0.12.1", + "zeroize", +] + [[package]] name = "ring" version = "0.16.20" @@ -3140,14 +3154,12 @@ dependencies = [ ] [[package]] -name = "ripemd160" -version = "0.9.1" +name = "ripemd" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" +checksum = "1facec54cb5e0dc08553501fa740091086d0259ad0067e0d4103448e4cb22ed3" dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "opaque-debug 0.3.0", + "digest 0.10.3", ] [[package]] @@ -3171,6 +3183,17 @@ dependencies = [ "syn", ] +[[package]] +name = "rust_decimal" +version = "1.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee9164faf726e4f3ece4978b25ca877ddc6802fa77f38cdccb32c7f805ecd70c" +dependencies = [ + "arrayvec", + "num-traits", + "serde", +] + [[package]] name = "rustc-hex" version = "2.1.0" @@ -3195,19 +3218,6 @@ dependencies = [ "semver 1.0.13", ] -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64 0.13.0", - "log", - "ring", - "sct 0.6.1", - "webpki 0.21.4", -] - [[package]] name = "rustls" version = "0.20.6" @@ -3216,20 +3226,8 @@ checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033" dependencies = [ "log", "ring", - "sct 0.7.0", - "webpki 0.22.0", -] - -[[package]] -name = "rustls-native-certs" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" -dependencies = [ - "openssl-probe", - "rustls 0.19.1", - "schannel", - "security-framework", + "sct", + "webpki", ] [[package]] @@ -3255,9 +3253,9 @@ checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "salsa20" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecbd2eb639fd7cab5804a0837fe373cc2172d15437e804c054a9fb885cb923b0" +checksum = "0c0fbb5f676da676c260ba276a8f43a8dc67cf02d1438423aeb1c677a7212686" dependencies = [ "cipher", ] @@ -3271,16 +3269,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "schannel" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" -dependencies = [ - "lazy_static", - "windows-sys", -] - [[package]] name = "scopeguard" version = "1.1.0" @@ -3289,26 +3277,15 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scrypt" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879588d8f90906e73302547e20fffefdd240eb3e0e744e142321f5d49dea0518" +checksum = "e73d6d7c6311ebdbd9184ad6c4447b2f36337e327bda107d3ba9e3c374f9d325" dependencies = [ - "base64ct", - "hmac 0.11.0", - "password-hash", - "pbkdf2", + "hmac 0.12.1", + "password-hash 0.3.2", + "pbkdf2 0.10.1", "salsa20", - "sha2 0.9.9", -] - -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", + "sha2 0.10.5", ] [[package]] @@ -3322,26 +3299,17 @@ dependencies = [ ] [[package]] -name = "security-framework" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.6.1" +name = "sec1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ - "core-foundation-sys", - "libc", + "base16ct", + "der", + "generic-array 0.14.6", + "pkcs8", + "subtle", + "zeroize", ] [[package]] @@ -3442,15 +3410,13 @@ dependencies = [ [[package]] name = "sha-1" -version = "0.9.8" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" dependencies = [ - "block-buffer 0.9.0", "cfg-if", "cpufeatures", - "digest 0.9.0", - "opaque-debug 0.3.0", + "digest 0.10.3", ] [[package]] @@ -3476,16 +3442,17 @@ dependencies = [ "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", - "sha2-asm", ] [[package]] -name = "sha2-asm" -version = "0.6.2" +name = "sha2" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf27176fb5d15398e3a479c652c20459d9dac830dedd1fa55b42a77dbcdbfcea" +checksum = "cf9db03534dff993187064c4e0c05a5708d2a9728ace9a8959b77bedf415dac5" dependencies = [ - "cc", + "cfg-if", + "cpufeatures", + "digest 0.10.3", ] [[package]] @@ -3500,18 +3467,6 @@ dependencies = [ "keccak", ] -[[package]] -name = "sha3" -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.2" @@ -3524,14 +3479,20 @@ dependencies = [ [[package]] name = "signature" -version = "1.3.2" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2807892cfa58e081aa1f1111391c7a0649d4fa127a4ffbe34bcbfb35a1171a4" +checksum = "f0ea32af43239f0d353a7dd75a22d94c329c8cdaafdcb4c1c1335aa10c298a4a" dependencies = [ - "digest 0.9.0", + "digest 0.10.3", "rand_core", ] +[[package]] +name = "siphasher" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" + [[package]] name = "slab" version = "0.4.7" @@ -3557,6 +3518,19 @@ dependencies = [ "winapi", ] +[[package]] +name = "solang-parser" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f68b8280e3f354d5646218319bcee4febe42833cef5ebf653cfc49d0a94409" +dependencies = [ + "itertools", + "lalrpop", + "lalrpop-util", + "phf", + "unicode-xid", +] + [[package]] name = "spin" version = "0.5.2" @@ -3565,11 +3539,12 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spki" -version = "0.4.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c01a0c15da1b0b0e1494112e7af814a678fec9bd157881b49beac661e9b6f32" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ - "der 0.4.5", + "base64ct", + "der", ] [[package]] @@ -3578,6 +3553,19 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "string_cache" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213494b7a2b503146286049378ce02b482200519accc31872ee8be91fa820a08" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot 0.12.1", + "phf_shared", + "precomputed-hash", +] + [[package]] name = "strsim" version = "0.9.3" @@ -3589,6 +3577,9 @@ name = "strum" version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros", +] [[package]] name = "strum_macros" @@ -3638,16 +3629,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] -name = "tempfile" -version = "3.3.0" +name = "term" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" dependencies = [ - "cfg-if", - "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", + "dirs-next", + "rustversion", "winapi", ] @@ -3764,67 +3752,31 @@ dependencies = [ "syn", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" -dependencies = [ - "rustls 0.19.1", - "tokio", - "webpki 0.21.4", -] - [[package]] name = "tokio-rustls" version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.6", + "rustls", "tokio", - "webpki 0.22.0", + "webpki", ] [[package]] name = "tokio-tungstenite" -version = "0.15.0" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "511de3f85caf1c98983545490c3d09685fa8eb634e57eec22bb4db271f46cbd8" +checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" dependencies = [ "futures-util", "log", - "pin-project", - "rustls 0.19.1", + "rustls", "tokio", - "tokio-rustls 0.22.0", + "tokio-rustls", "tungstenite", - "webpki 0.21.4", - "webpki-roots 0.21.1", -] - -[[package]] -name = "tokio-util" -version = "0.6.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", + "webpki", + "webpki-roots", ] [[package]] @@ -3912,9 +3864,9 @@ checksum = "7b3e06c9b9d80ed6b745c7159c40b311ad2916abb34a49e9be2653b90db0d8dd" [[package]] name = "tungstenite" -version = "0.14.0" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0b2d8558abd2e276b0a8df5c05a2ec762609344191e5fd23e292c910e9165b5" +checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" dependencies = [ "base64 0.13.0", "byteorder", @@ -3923,13 +3875,12 @@ dependencies = [ "httparse", "log", "rand", - "rustls 0.19.1", - "rustls-native-certs", + "rustls", "sha-1", "thiserror", "url", "utf-8", - "webpki 0.21.4", + "webpki", ] [[package]] @@ -3983,6 +3934,12 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +[[package]] +name = "unicode-xid" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" + [[package]] name = "untrusted" version = "0.7.1" @@ -4017,12 +3974,6 @@ dependencies = [ "serde", ] -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "version_check" version = "0.9.4" @@ -4136,7 +4087,7 @@ checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ "futures", "js-sys", - "parking_lot", + "parking_lot 0.11.2", "pin-utils", "wasm-bindgen", "wasm-bindgen-futures", @@ -4153,16 +4104,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki" version = "0.22.0" @@ -4173,22 +4114,13 @@ dependencies = [ "untrusted", ] -[[package]] -name = "webpki-roots" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" -dependencies = [ - "webpki 0.21.4", -] - [[package]] name = "webpki-roots" version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1c760f0d366a6c24a02ed7816e23e691f5d92291f94d15e836006fd11b04daf" dependencies = [ - "webpki 0.22.0", + "webpki", ] [[package]] @@ -4307,12 +4239,6 @@ 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.0" @@ -4342,9 +4268,9 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.4.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d68d9dcec5f9b43a30d38c49f91dfedfaac384cb8f085faca366c26207dd1619" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" [[package]] name = "zkevm-circuits" diff --git a/bus-mapping/Cargo.toml b/bus-mapping/Cargo.toml index 54a2e04b1c..d8d47aa727 100644 --- a/bus-mapping/Cargo.toml +++ b/bus-mapping/Cargo.toml @@ -11,8 +11,8 @@ gadgets = { path = "../gadgets" } keccak256 = { path = "../keccak256" } mock = { path = "../mock", optional = true } -ethers-core = "0.6" -ethers-providers = "0.6" +ethers-core = "0.17.0" +ethers-providers = "0.17.0" halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2022_08_19" } itertools = "0.10" lazy_static = "1.4" diff --git a/bus-mapping/src/circuit_input_builder.rs b/bus-mapping/src/circuit_input_builder.rs index 23b6966e9e..6c67ed2df5 100644 --- a/bus-mapping/src/circuit_input_builder.rs +++ b/bus-mapping/src/circuit_input_builder.rs @@ -313,7 +313,9 @@ impl BuilderClient

{ None, RW::WRITE, AccessValue::Account { - address: eth_block.author, + address: eth_block + .author + .ok_or(Error::EthTypeError(eth_types::Error::IncompleteBlock))?, }, )]; for (tx_index, tx) in eth_block.transactions.iter().enumerate() { diff --git a/bus-mapping/src/circuit_input_builder/block.rs b/bus-mapping/src/circuit_input_builder/block.rs index f34640fc12..d63ceb1480 100644 --- a/bus-mapping/src/circuit_input_builder/block.rs +++ b/bus-mapping/src/circuit_input_builder/block.rs @@ -87,7 +87,9 @@ impl Block { Ok(Self { chain_id, history_hashes, - coinbase: eth_block.author, + coinbase: eth_block + .author + .ok_or(Error::EthTypeError(eth_types::Error::IncompleteBlock))?, gas_limit: eth_block.gas_limit.low_u64(), number: eth_block .number diff --git a/bus-mapping/src/mock.rs b/bus-mapping/src/mock.rs index cdd1b33572..5db03048f0 100644 --- a/bus-mapping/src/mock.rs +++ b/bus-mapping/src/mock.rs @@ -41,7 +41,10 @@ impl BlockData { let mut sdb = StateDB::new(); let mut code_db = CodeDB::new(); - sdb.set_account(&geth_data.eth_block.author, state_db::Account::zero()); + sdb.set_account( + &geth_data.eth_block.author.expect("Block.author"), + state_db::Account::zero(), + ); for tx in geth_data.eth_block.transactions.iter() { sdb.set_account(&tx.from, state_db::Account::zero()); if let Some(to) = tx.to.as_ref() { diff --git a/circuit-benchmarks/Cargo.toml b/circuit-benchmarks/Cargo.toml index 29f81d740d..1ee2b8e1ad 100644 --- a/circuit-benchmarks/Cargo.toml +++ b/circuit-benchmarks/Cargo.toml @@ -17,7 +17,7 @@ rand = "0.8" itertools = "0.10" eth-types = { path = "../eth-types" } env_logger = "0.9" -ethers-signers = "0.6" +ethers-signers = "0.17.0" mock = { path="../mock" } rand_chacha = "0.3" diff --git a/eth-types/Cargo.toml b/eth-types/Cargo.toml index 8a4f2547ad..a7cb1ff00c 100644 --- a/eth-types/Cargo.toml +++ b/eth-types/Cargo.toml @@ -6,8 +6,8 @@ authors = ["The appliedzkp team"] license = "MIT OR Apache-2.0" [dependencies] -ethers-core = "0.6" -ethers-signers = "0.6" +ethers-core = "0.17.0" +ethers-signers = "0.17.0" hex = "0.4" lazy_static = "1.4" halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2022_08_19" } diff --git a/eth-types/src/geth_types.rs b/eth-types/src/geth_types.rs index 7565d28279..23f588347c 100644 --- a/eth-types/src/geth_types.rs +++ b/eth-types/src/geth_types.rs @@ -6,7 +6,6 @@ use crate::{ Word, U64, }; use ethers_core::types::TransactionRequest; -use ethers_core::utils::keccak256; use ethers_signers::{LocalWallet, Signer}; use halo2_proofs::halo2curves::{group::ff::PrimeField, secp256k1}; use num::Integer; @@ -65,7 +64,7 @@ impl TryFrom<&Block> for BlockConstants { fn try_from(block: &Block) -> Result { Ok(Self { - coinbase: block.author, + coinbase: block.author.ok_or(Error::IncompleteBlock)?, timestamp: block.timestamp, number: block.number.ok_or(Error::IncompleteBlock)?, difficulty: block.difficulty, @@ -199,7 +198,7 @@ impl Transaction { )?; // msg = rlp([nonce, gasPrice, gas, to, value, data, sig_v, r, s]) let req: TransactionRequest = self.into(); - let msg = req.rlp(chain_id); + let msg = req.chain_id(chain_id).rlp(); let msg_hash: [u8; 32] = Keccak256::digest(&msg) .as_slice() .to_vec() @@ -247,9 +246,7 @@ impl GethData { assert_eq!(Word::from(wallet.chain_id()), self.chain_id); let geth_tx: Transaction = (&*tx).into(); let req: TransactionRequest = (&geth_tx).into(); - let tx_rlp = req.rlp(self.chain_id.as_u64()); - let sighash = keccak256(tx_rlp.as_ref()).into(); - let sig = wallet.sign_hash(sighash, true); + let sig = wallet.sign_transaction_sync(&req.chain_id(self.chain_id.as_u64()).into()); tx.v = U64::from(sig.v); tx.r = sig.r; tx.s = sig.s; diff --git a/eth-types/src/lib.rs b/eth-types/src/lib.rs index 57283c3a7d..734e30da88 100644 --- a/eth-types/src/lib.rs +++ b/eth-types/src/lib.rs @@ -38,7 +38,7 @@ pub use ethers_core::abi::ethereum_types::U512; use ethers_core::types; pub use ethers_core::types::{ transaction::{eip2930::AccessList, response::Transaction}, - Address, Block, Bytes, Signature, H160, H256, U256, U64, + Address, Block, Bytes, Signature, H160, H256, H64, U256, U64, }; use serde::{de, Deserialize, Serialize}; diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index 6172f3b29e..f5e79b9d68 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" [dependencies] lazy_static = "1.4" -ethers = "0.6" +ethers = { version = "0.17.0", features = ["ethers-solc"] } serde_json = "1.0.66" serde = {version = "1.0.130", features = ["derive"] } bus-mapping = { path = "../bus-mapping"} diff --git a/integration-tests/src/bin/gen_blockchain_data.rs b/integration-tests/src/bin/gen_blockchain_data.rs index 8ae1cc058f..d1e846fe2d 100644 --- a/integration-tests/src/bin/gen_blockchain_data.rs +++ b/integration-tests/src/bin/gen_blockchain_data.rs @@ -98,8 +98,8 @@ async fn main() { path: path_sol.to_str().expect("path is not str").to_string(), name: name.to_string(), abi, - bin, - bin_runtime, + bin: bin.into_bytes().expect("bin"), + bin_runtime: bin_runtime.into_bytes().expect("bin_runtime"), }; let mut path_json = path_sol.clone(); diff --git a/mock/Cargo.toml b/mock/Cargo.toml index 3c0a7f6696..406341ab7d 100644 --- a/mock/Cargo.toml +++ b/mock/Cargo.toml @@ -9,9 +9,8 @@ license = "MIT OR Apache-2.0" eth-types = { path = "../eth-types" } external-tracer = { path = "../external-tracer" } lazy_static = "1.4" -ethbloom = "0.11.1" itertools = "0.10.3" -ethers-signers = "0.6" -ethers-core = "0.6" +ethers-signers = "0.17.0" +ethers-core = "0.17.0" rand_chacha = "0.3" -rand = "0.8" \ No newline at end of file +rand = "0.8" diff --git a/mock/src/block.rs b/mock/src/block.rs index 4844c96559..3ad79e098d 100644 --- a/mock/src/block.rs +++ b/mock/src/block.rs @@ -1,8 +1,9 @@ //! Mock Block definition and builder related methods. use crate::{MockTransaction, MOCK_CHAIN_ID}; -use eth_types::{Address, Block, Bytes, Hash, Transaction, Word, U64}; -use ethbloom::Bloom; +use eth_types::{Address, Block, Bytes, Hash, Transaction, Word, H64, U64}; +use ethers_core::types::Bloom; +use ethers_core::types::OtherFields; #[derive(Clone, Debug)] /// Mock structure which represents an Ethereum Block and can be used for tests. @@ -30,7 +31,7 @@ pub struct MockBlock { pub(crate) transactions: Vec, size: Word, mix_hash: Hash, - nonce: U64, + nonce: H64, // This field is handled here as we assume that all block txs have the same ChainId. // Also, the field is stored in the block_table since we don't have a chain_config // structure/table. @@ -61,7 +62,7 @@ impl Default for MockBlock { transactions: Vec::new(), size: Word::zero(), mix_hash: Hash::zero(), - nonce: U64::zero(), + nonce: H64::zero(), chain_id: *MOCK_CHAIN_ID, } } @@ -73,7 +74,7 @@ impl From for Block { hash: mock.hash.or_else(|| Some(Hash::default())), parent_hash: mock.parent_hash, uncles_hash: mock.uncles_hash, - author: mock.author, + author: Some(mock.author), state_root: mock.state_root, transactions_root: mock.transactions_root, receipts_root: mock.receipts_root, @@ -96,6 +97,7 @@ impl From for Block { mix_hash: Some(mock.mix_hash), nonce: Some(mock.nonce), base_fee_per_gas: Some(mock.base_fee_per_gas), + other: OtherFields::default(), } } } @@ -106,7 +108,7 @@ impl From for Block<()> { hash: mock.hash.or_else(|| Some(Hash::default())), parent_hash: mock.parent_hash, uncles_hash: mock.uncles_hash, - author: mock.author, + author: Some(mock.author), state_root: mock.state_root, transactions_root: mock.transactions_root, receipts_root: mock.receipts_root, @@ -125,6 +127,7 @@ impl From for Block<()> { mix_hash: Some(mock.mix_hash), nonce: Some(mock.nonce), base_fee_per_gas: Some(mock.base_fee_per_gas), + other: OtherFields::default(), } } } @@ -261,8 +264,8 @@ impl MockBlock { } /// Set nonce field for the MockBlock. - pub fn nonce(&mut self, nonce: u64) -> &mut Self { - self.nonce = U64::from(nonce); + pub fn nonce(&mut self, nonce: H64) -> &mut Self { + self.nonce = nonce; self } diff --git a/mock/src/transaction.rs b/mock/src/transaction.rs index 1fee669969..c96fd23826 100644 --- a/mock/src/transaction.rs +++ b/mock/src/transaction.rs @@ -6,10 +6,10 @@ use eth_types::{ geth_types::Transaction as GethTransaction, AccessList, Address, Bytes, Hash, Transaction, Word, U64, }; +use ethers_core::types::OtherFields; use ethers_core::{ rand::{CryptoRng, RngCore}, types::TransactionRequest, - utils::keccak256, }; use ethers_signers::{LocalWallet, Signer}; use lazy_static::lazy_static; @@ -181,6 +181,7 @@ impl From for Transaction { max_priority_fee_per_gas: Some(mock.max_priority_fee_per_gas), max_fee_per_gas: Some(mock.max_fee_per_gas), chain_id: Some(mock.chain_id), + other: OtherFields::default(), } } } @@ -307,10 +308,8 @@ impl MockTransaction { .value(self.value) .data(self.input.clone()) .gas(self.gas) - .gas_price(self.gas_price); - - let tx_rlp = tx.rlp(self.chain_id.low_u64()); - let sighash = keccak256(tx_rlp.as_ref()).into(); + .gas_price(self.gas_price) + .chain_id(self.chain_id.low_u64()); match (self.v, self.r, self.s) { (None, None, None) => { @@ -320,7 +319,7 @@ impl MockTransaction { .from .as_wallet() .with_chain_id(self.chain_id.low_u64()) - .sign_hash(sighash, true); + .sign_transaction_sync(&tx.into()); // Set sig parameters self.sig_data((sig.v, sig.r, sig.s)); } diff --git a/zkevm-circuits/Cargo.toml b/zkevm-circuits/Cargo.toml index 4c11b457f4..f9f753f03e 100644 --- a/zkevm-circuits/Cargo.toml +++ b/zkevm-circuits/Cargo.toml @@ -15,7 +15,7 @@ array-init = "2.0.0" bus-mapping = { path = "../bus-mapping" } eth-types = { path = "../eth-types" } gadgets = { path = "../gadgets" } -ethers-core = "0.6" +ethers-core = "0.17.0" strum = "0.24" strum_macros = "0.24" rand_xorshift = "0.3" @@ -41,7 +41,7 @@ hex = "0.4.3" mock = { path = "../mock" } itertools = "0.10.1" pretty_assertions = "1.0.0" -ethers-signers = "0.6" +ethers-signers = "0.17.0" rand_chacha = "0.3" [features] diff --git a/zkevm-circuits/src/test_util.rs b/zkevm-circuits/src/test_util.rs index 100e2719dd..79c87893b1 100644 --- a/zkevm-circuits/src/test_util.rs +++ b/zkevm-circuits/src/test_util.rs @@ -2,7 +2,6 @@ use crate::{state_circuit::StateCircuit, witness::Block}; use bus_mapping::mock::BlockData; use eth_types::geth_types::{GethData, Transaction}; use ethers_core::types::{NameOrAddress, TransactionRequest}; -use ethers_core::utils::keccak256; use ethers_signers::{LocalWallet, Signer}; use halo2_proofs::dev::{MockProver, VerifyFailure}; use halo2_proofs::halo2curves::bn256::Fr; @@ -83,6 +82,7 @@ pub fn rand_tx(mut rng: R, chain_id: u64) -> Transaction { let to = wallet1.address(); let data = b"hello"; let tx = TransactionRequest::new() + .chain_id(chain_id) .from(from) .to(to) .nonce(3) @@ -90,9 +90,7 @@ pub fn rand_tx(mut rng: R, chain_id: u64) -> Transaction { .data(data) .gas(500_000) .gas_price(1234); - let tx_rlp = tx.rlp(chain_id); - let sighash = keccak256(tx_rlp.as_ref()).into(); - let sig = wallet0.sign_hash(sighash, true); + let sig = wallet0.sign_transaction_sync(&tx.clone().into()); let to = tx.to.map(|to| match to { NameOrAddress::Address(a) => a, _ => unreachable!(),