diff --git a/Cargo.lock b/Cargo.lock index c05c100a9e349..e761917bf986c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -109,16 +109,16 @@ checksum = "a941c39708478e8eea39243b5983f1c42d2717b3620ee91f4a52115fd02ac43f" dependencies = [ "itertools 0.9.0", "proc-macro-error", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] [[package]] name = "arbitrary" -version = "1.2.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d47fbf90d5149a107494b15a7dc8d69b351be2db3bb9691740e88ec17fd880" +checksum = "b0224938f92e7aef515fac2ff2d18bd1115c1394ddf4a092e0c87e8be9499ee5" dependencies = [ "derive_arbitrary", ] @@ -145,13 +145,34 @@ dependencies = [ "futures-lite", ] +[[package]] +name = "async-stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +dependencies = [ + "async-stream-impl", + "futures-core", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" +dependencies = [ + "proc-macro2 1.0.50", + "quote 1.0.23", + "syn 1.0.107", +] + [[package]] name = "async-trait" version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "705339e0e4a9690e2908d2b3d049d85682cf19fbd5782494498fbf7003a6a282" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -206,7 +227,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7862e21c893d65a1650125d157eaeec691439379a1cee17ee49031b79236ada4" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -218,7 +239,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a8c1df849285fbacd587de7818cc7d13be6cd2cbcd47a04fb1801b0e2706e33" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -323,7 +344,7 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "regex", "rustc-hash", @@ -439,18 +460,19 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "0.2.17" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" +checksum = "b45ea9b00a7b3f2988e9a65ad3917e62123c38dba709b666506207be96d1790b" dependencies = [ "memchr", + "serde", ] [[package]] name = "bumpalo" -version = "3.11.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "byte-slice-cast" @@ -481,9 +503,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad0e1e3e88dd237a156ab9f571021b8a158caa0ae44b1968a241efb5144c1e" +checksum = "c77df041dc383319cc661b428b6961a005db4d6808d5e12536931b1ca9556055" dependencies = [ "serde", ] @@ -628,13 +650,13 @@ dependencies = [ [[package]] name = "clap" -version = "4.0.32" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7db700bc935f9e43e88d00b0850dae18a63773cfbec6d8e070fccf7fef89a39" +checksum = "4ec7a4128863c188deefe750ac1d1dfe66c236909f845af04beed823638dc1b2" dependencies = [ "bitflags", "clap_derive", - "clap_lex 0.3.0", + "clap_lex 0.3.1", "is-terminal", "once_cell", "strsim 0.10.0", @@ -643,13 +665,13 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.0.21" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014" +checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" dependencies = [ "heck", "proc-macro-error", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -665,9 +687,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" +checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade" dependencies = [ "os_str_bytes", ] @@ -683,7 +705,7 @@ name = "codecs-derive" version = "0.1.0" dependencies = [ "parity-scale-codec", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "serde", "syn 1.0.107", @@ -1012,9 +1034,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5add3fc1717409d029b20c5b6903fc0c0b02fa6741d820054f4a2efa5e5816fd" +checksum = "51d1075c37807dcf850c379432f0df05ba52cc30f279c5cfc43cc221ce7f8579" dependencies = [ "cc", "cxxbridge-flags", @@ -1024,14 +1046,14 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c87959ba14bc6fbc61df77c3fcfe180fc32b93538c4f1031dd802ccb5f2ff0" +checksum = "5044281f61b27bc598f2f6647d480aed48d2bf52d6eb0b627d84c0361b17aa70" dependencies = [ "cc", "codespan-reporting", "once_cell", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "scratch", "syn 1.0.107", @@ -1039,17 +1061,17 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69a3e162fde4e594ed2b07d0f83c6c67b745e7f28ce58c6df5e6b6bef99dfb59" +checksum = "61b50bc93ba22c27b0d31128d2d130a0a6b3d267ae27ef7e4fae2167dfe8781c" [[package]] name = "cxxbridge-macro" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e7e2adeb6a0d4a282e581096b06e1791532b7d576dcde5ccd9382acf55db8e6" +checksum = "39e61fda7e62115119469c7b3591fd913ecca96fb766cfd3f2e2502ab7bc87a5" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -1082,7 +1104,7 @@ checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "strsim 0.9.3", "syn 1.0.107", @@ -1096,7 +1118,7 @@ checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "strsim 0.10.0", "syn 1.0.107", @@ -1134,7 +1156,7 @@ dependencies = [ "hashbrown 0.12.3", "lock_api", "once_cell", - "parking_lot_core 0.9.5", + "parking_lot_core 0.9.6", ] [[package]] @@ -1165,11 +1187,11 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a16495aeb28047bb1185fca837baf755e7d71ed3aeed7f8504654ffa927208" +checksum = "cf460bbff5f571bfc762da5102729f59f338be7db17a21fade44c5c4f5005350" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -1182,7 +1204,7 @@ checksum = "a2658621297f2cf68762a6f7dc0bb7e1ff2cfd6583daef8ee0fed6f7ec468ec0" dependencies = [ "darling 0.10.2", "derive_builder_core", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -1194,7 +1216,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2791ea3e372c8495c0bc2033991d76b512cd799d07491fbd6890124db9458bef" dependencies = [ "darling 0.10.2", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -1206,7 +1228,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case 0.4.0", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "rustc_version", "syn 1.0.107", @@ -1349,9 +1371,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "1.5.2" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ "signature", ] @@ -1377,7 +1399,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0188e3c3ba8df5753894d54461f0e39bc91741dc5b22e1c46999ec2c71f4e4" dependencies = [ "enum-ordinalize", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -1457,7 +1479,7 @@ dependencies = [ "log", "rand 0.8.5", "rlp", - "secp256k1 0.24.2", + "secp256k1 0.24.3", "serde", "sha3", "zeroize", @@ -1470,7 +1492,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "570d109b813e904becc80d8d5da38376818a143348413f7149f1340fe04754d4" dependencies = [ "heck", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -1482,7 +1504,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" dependencies = [ "heck", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -1495,7 +1517,7 @@ checksum = "a62bb1df8b45ecb7ffa78dca1c17a438fb193eb083db0b1b494d2a61bcb5096a" dependencies = [ "num-bigint", "num-traits", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "rustc_version", "syn 1.0.107", @@ -1507,7 +1529,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e88bcb3a067a6555d577aba299e75eff9942da276e6506fc6274327daa026132" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -1606,7 +1628,7 @@ dependencies = [ [[package]] name = "ethers-contract" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#72e94f02dd80241a500d9c6d39c4166e77bc73ef" +source = "git+https://github.com/gakonst/ethers-rs#9ebc5b378c672e03cf2cc35cc7a1aa52d326dfae" dependencies = [ "ethers-core", "ethers-providers", @@ -1622,7 +1644,7 @@ dependencies = [ [[package]] name = "ethers-core" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#72e94f02dd80241a500d9c6d39c4166e77bc73ef" +source = "git+https://github.com/gakonst/ethers-rs#9ebc5b378c672e03cf2cc35cc7a1aa52d326dfae" dependencies = [ "arrayvec", "bytes", @@ -1631,11 +1653,12 @@ dependencies = [ "elliptic-curve", "ethabi", "generic-array 0.14.6", + "getrandom 0.2.8", "hex", "k256", "num_enum", "open-fastrlp", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "rand 0.8.5", "rlp", "rlp-derive", @@ -1643,6 +1666,7 @@ dependencies = [ "serde_json", "strum", "syn 1.0.107", + "tempfile", "thiserror", "tiny-keccak", "unicode-xid 0.2.4", @@ -1651,7 +1675,7 @@ dependencies = [ [[package]] name = "ethers-etherscan" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#72e94f02dd80241a500d9c6d39c4166e77bc73ef" +source = "git+https://github.com/gakonst/ethers-rs#9ebc5b378c672e03cf2cc35cc7a1aa52d326dfae" dependencies = [ "ethers-core", "getrandom 0.2.8", @@ -1667,7 +1691,7 @@ dependencies = [ [[package]] name = "ethers-middleware" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#72e94f02dd80241a500d9c6d39c4166e77bc73ef" +source = "git+https://github.com/gakonst/ethers-rs#9ebc5b378c672e03cf2cc35cc7a1aa52d326dfae" dependencies = [ "async-trait", "auto_impl 0.5.0", @@ -1692,13 +1716,14 @@ dependencies = [ [[package]] name = "ethers-providers" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#72e94f02dd80241a500d9c6d39c4166e77bc73ef" +source = "git+https://github.com/gakonst/ethers-rs#9ebc5b378c672e03cf2cc35cc7a1aa52d326dfae" dependencies = [ "async-trait", "auto_impl 1.0.1", "base64 0.21.0", "enr 0.7.0", "ethers-core", + "futures-channel", "futures-core", "futures-timer", "futures-util", @@ -1714,6 +1739,7 @@ dependencies = [ "serde_json", "thiserror", "tokio", + "tokio-tungstenite", "tracing", "tracing-futures", "url", @@ -1727,7 +1753,7 @@ dependencies = [ [[package]] name = "ethers-signers" version = "1.0.2" -source = "git+https://github.com/gakonst/ethers-rs#72e94f02dd80241a500d9c6d39c4166e77bc73ef" +source = "git+https://github.com/gakonst/ethers-rs#9ebc5b378c672e03cf2cc35cc7a1aa52d326dfae" dependencies = [ "async-trait", "coins-bip32", @@ -1909,7 +1935,7 @@ version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -2018,15 +2044,15 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a1e17342619edbc21a964c2afbeb6c820c6a2560032872f397bb97ea127bd0a" +checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" dependencies = [ "aho-corasick", "bstr", @@ -2151,9 +2177,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ "ahash 0.8.2", "serde", @@ -2485,7 +2511,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -2531,12 +2557,12 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c" +checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" dependencies = [ "libc", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -2553,9 +2579,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" +checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" [[package]] name = "is-terminal" @@ -2566,7 +2592,7 @@ dependencies = [ "hermit-abi 0.2.6", "io-lifetimes", "rustix", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -2700,7 +2726,7 @@ checksum = "baa6da1e4199c10d7b1d0a6e5e8bd8e55f351163b6f4b3cbb044672a69bd4c1c" dependencies = [ "heck", "proc-macro-crate", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -2890,7 +2916,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" dependencies = [ - "hashbrown 0.13.1", + "hashbrown 0.13.2", ] [[package]] @@ -2983,7 +3009,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "731f8ecebd9f3a4aa847dfe75455e4757a45da40a7793d2f0b1f9b6ed18b23f3" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -3030,7 +3056,7 @@ dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -3049,7 +3075,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -3071,9 +3097,9 @@ dependencies = [ [[package]] name = "nom" -version = "7.1.1" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", @@ -3177,21 +3203,21 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.5.7" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" +checksum = "8d829733185c1ca374f17e52b762f24f535ec625d2cc1f070e34c8a9068f341b" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.7" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" +checksum = "2be1598bf1c313dcdd12092e3f1920f463462525a21b7b4e11b4168353d0123e" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -3240,7 +3266,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" dependencies = [ "bytes", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -3304,7 +3330,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9299338969a3d2f491d65f140b00ddec470858402f888af98e8642fb5e8965cd" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -3347,7 +3373,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.5", + "parking_lot_core 0.9.6", ] [[package]] @@ -3366,15 +3392,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba" +checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -3420,9 +3446,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f6e86fb9e7026527a0d46bc308b841d73170ef8f443e1807f6ef88526a816d4" +checksum = "4257b4a04d91f7e9e6290be5d3da4804dd5784fafde3a497d73eb2b4a158c30a" dependencies = [ "thiserror", "ucd-trie", @@ -3453,7 +3479,7 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -3584,7 +3610,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", "version_check", @@ -3596,7 +3622,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "version_check", ] @@ -3612,9 +3638,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.49" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" +checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" dependencies = [ "unicode-ident", ] @@ -3714,7 +3740,7 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", ] [[package]] @@ -3872,9 +3898,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" dependencies = [ "aho-corasick", "memchr", @@ -3907,11 +3933,11 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.13" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" +checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" dependencies = [ - "base64 0.13.1", + "base64 0.21.0", "bytes", "encoding_rs", "futures-core", @@ -3959,7 +3985,7 @@ name = "reth" version = "0.1.0" dependencies = [ "backon", - "clap 4.0.32", + "clap 4.1.1", "comfy-table", "confy", "crossterm", @@ -4063,7 +4089,7 @@ dependencies = [ "reth-interfaces", "reth-libmdbx", "reth-primitives", - "secp256k1 0.24.2", + "secp256k1 0.24.3", "serde", "serde_json", "tempfile", @@ -4089,7 +4115,7 @@ dependencies = [ "reth-rlp", "reth-rlp-derive", "reth-tracing", - "secp256k1 0.24.2", + "secp256k1 0.24.3", "serde", "thiserror", "tokio", @@ -4112,7 +4138,7 @@ dependencies = [ "reth-primitives", "reth-rlp", "reth-tracing", - "secp256k1 0.24.2", + "secp256k1 0.24.3", "serde", "serde_with", "thiserror", @@ -4163,7 +4189,7 @@ dependencies = [ "reth-net-common", "reth-primitives", "reth-rlp", - "secp256k1 0.24.2", + "secp256k1 0.24.3", "sha2 0.10.6", "sha3", "thiserror", @@ -4194,7 +4220,7 @@ dependencies = [ "reth-primitives", "reth-rlp", "reth-tracing", - "secp256k1 0.24.2", + "secp256k1 0.24.3", "serde", "smol_str", "snap", @@ -4213,7 +4239,7 @@ dependencies = [ "async-trait", "auto_impl 1.0.1", "hash-db", - "hashbrown 0.13.1", + "hashbrown 0.13.2", "plain_hasher", "reth-db", "reth-interfaces", @@ -4248,7 +4274,7 @@ dependencies = [ "reth-network-api", "reth-primitives", "reth-rpc-types", - "secp256k1 0.24.2", + "secp256k1 0.24.3", "serde", "thiserror", "tokio", @@ -4317,7 +4343,7 @@ version = "0.1.0" dependencies = [ "metrics", "once_cell", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "regex", "serial_test", @@ -4387,7 +4413,7 @@ dependencies = [ "reth-tasks", "reth-tracing", "reth-transaction-pool", - "secp256k1 0.24.2", + "secp256k1 0.24.3", "serde", "serial_test", "tempfile", @@ -4434,7 +4460,7 @@ dependencies = [ "reth-rlp", "reth-rlp-derive", "revm-interpreter", - "secp256k1 0.24.2", + "secp256k1 0.24.3", "serde", "serde_json", "serde_with", @@ -4468,7 +4494,7 @@ dependencies = [ "reth-interfaces", "reth-primitives", "reth-rpc-types", - "secp256k1 0.24.2", + "secp256k1 0.24.3", "serde", "test-fuzz", "thiserror", @@ -4493,7 +4519,7 @@ dependencies = [ "reth-rlp-derive", "revm-interpreter", "rlp", - "secp256k1 0.24.2", + "secp256k1 0.24.3", "smol_str", ] @@ -4501,7 +4527,7 @@ dependencies = [ name = "reth-rlp-derive" version = "0.1.1" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -4568,18 +4594,37 @@ dependencies = [ name = "reth-staged-sync" version = "0.1.0" dependencies = [ + "async-trait", "confy", + "enr 0.7.0", + "ethers-core", + "ethers-middleware", + "ethers-providers", + "ethers-signers", "eyre", + "futures", + "hex", + "rand 0.8.5", "reth-db", "reth-discv4", + "reth-downloaders", + "reth-interfaces", "reth-net-nat", "reth-network", "reth-primitives", "reth-provider", + "reth-staged-sync", + "reth-stages", + "reth-tracing", + "secp256k1 0.24.3", "serde", "serde_json", "shellexpand", "tempfile", + "thiserror", + "tokio", + "tokio-stream", + "tokio-test", "tracing", "walkdir", ] @@ -4662,7 +4707,7 @@ source = "git+https://github.com/bluealloy/revm?rev=a05fb262d87c78ee52d400e6c0f4 dependencies = [ "auto_impl 1.0.1", "bytes", - "hashbrown 0.13.1", + "hashbrown 0.13.2", "hex", "revm-interpreter", "revm-precompiles", @@ -4678,7 +4723,7 @@ dependencies = [ "derive_more", "enumn", "fixed-hash", - "hashbrown 0.13.1", + "hashbrown 0.13.2", "hex", "hex-literal", "proptest", @@ -4695,7 +4740,7 @@ version = "1.1.2" source = "git+https://github.com/bluealloy/revm?rev=a05fb262d87c78ee52d400e6c0f4708d4c527f32#a05fb262d87c78ee52d400e6c0f4708d4c527f32" dependencies = [ "bytes", - "hashbrown 0.13.1", + "hashbrown 0.13.2", "k256", "num", "once_cell", @@ -4758,7 +4803,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -4809,23 +4854,23 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.6" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4feacf7db682c6c329c4ede12649cd36ecab0f3be5b7d74e6a20304725db4549" +checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03" dependencies = [ "bitflags", "errno", "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] name = "rustls" -version = "0.20.7" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ "log", "ring", @@ -4847,11 +4892,11 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" +checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" dependencies = [ - "base64 0.13.1", + "base64 0.21.0", ] [[package]] @@ -4915,19 +4960,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "303959cf613a6f6efd19ed4b4ad5bf79966a13352716299ad532cfb115f4205c" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] [[package]] name = "schannel" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" dependencies = [ - "lazy_static", - "windows-sys 0.36.1", + "windows-sys", ] [[package]] @@ -4980,9 +5024,9 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.24.2" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9512ffd81e3a3503ed401f79c33168b9148c75038956039166cd750eaa037c3" +checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" dependencies = [ "rand 0.8.5", "secp256k1-sys 0.6.1", @@ -5103,7 +5147,7 @@ version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -5133,9 +5177,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bf4a5a814902cd1014dbccfa4d4560fb8432c779471e96e035602519f82eef" +checksum = "30d904179146de381af4c93d3af6ca4984b3152db687dacb9c3c35e86f39809c" dependencies = [ "base64 0.13.1", "chrono", @@ -5149,12 +5193,12 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3452b4c0f6c1e357f73fdb87cd1efabaa12acf328c7a528e252893baeb3f4aa" +checksum = "a1966009f3c05f095697c537312f5415d1e3ed31ce0a56942bac4c771c5c335e" dependencies = [ "darling 0.14.2", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -5179,7 +5223,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b64f9e531ce97c88b4778aad0ceee079216071cffec6ac9b904277f8f92e7fe3" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -5208,6 +5252,17 @@ dependencies = [ "digest 0.10.6", ] +[[package]] +name = "sha1" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.6", +] + [[package]] name = "sha2" version = "0.8.2" @@ -5445,7 +5500,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ "heck", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "rustversion", "syn 1.0.107", @@ -5506,7 +5561,7 @@ version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "unicode-ident", ] @@ -5517,7 +5572,7 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", "unicode-xid 0.2.4", @@ -5545,9 +5600,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] @@ -5571,7 +5626,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9186daca5c58cb307d09731e0ba06b13fd6c036c90672b9bfc31cecf76cf689" dependencies = [ "cargo_metadata", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "serde", "strum_macros", @@ -5586,7 +5641,7 @@ dependencies = [ "darling 0.14.2", "if_chain", "lazy_static", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "subprocess", "syn 1.0.107", @@ -5630,7 +5685,7 @@ version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -5707,9 +5762,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.24.1" +version = "1.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9f76183f91ecfb55e1d7d5602bd1d979e38a3a522fe900241cf195624d67ae" +checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" dependencies = [ "autocfg", "bytes", @@ -5722,7 +5777,7 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -5731,7 +5786,7 @@ version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -5759,6 +5814,31 @@ dependencies = [ "tokio-util 0.7.4", ] +[[package]] +name = "tokio-test" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53474327ae5e166530d17f2d956afcb4f8a004de581b3cae10f12006bc8163e3" +dependencies = [ + "async-stream", + "bytes", + "futures-core", + "tokio", + "tokio-stream", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite", +] + [[package]] name = "tokio-util" version = "0.6.10" @@ -5864,7 +5944,7 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -6056,15 +6136,15 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "trybuild" -version = "1.0.73" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed01de3de062db82c0920b5cabe804f88d599a3f217932292597c678c903754d" +checksum = "6ed2c57956f91546d4d33614265a85d55c8e1ab91484853a10335894786d7db6" dependencies = [ "glob", "once_cell", @@ -6088,6 +6168,25 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "tungstenite" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" +dependencies = [ + "base64 0.13.1", + "byteorder", + "bytes", + "http", + "httparse", + "log", + "rand 0.8.5", + "sha1", + "thiserror", + "url", + "utf-8", +] + [[package]] name = "typenum" version = "1.16.0" @@ -6179,7 +6278,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2e7e85a0596447f0f2ac090e16bc4c516c6fe91771fb0c0ccf7fa3dae896b9c" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", ] @@ -6195,6 +6294,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + [[package]] name = "uuid" version = "0.8.2" @@ -6290,7 +6395,7 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", "wasm-bindgen-shared", @@ -6324,7 +6429,7 @@ version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", "wasm-bindgen-backend", @@ -6424,19 +6529,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - [[package]] name = "windows-sys" version = "0.42.0" @@ -6444,85 +6536,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.0", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" [[package]] name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" [[package]] name = "windows_x86_64_gnu" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] name = "winreg" @@ -6590,7 +6652,7 @@ version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" dependencies = [ - "proc-macro2 1.0.49", + "proc-macro2 1.0.50", "quote 1.0.23", "syn 1.0.107", "synstructure", diff --git a/crates/staged-sync/Cargo.toml b/crates/staged-sync/Cargo.toml index 8f08922118101..b009cc6537fab 100644 --- a/crates/staged-sync/Cargo.toml +++ b/crates/staged-sync/Cargo.toml @@ -21,6 +21,7 @@ reth-network = {path = "../../crates/net/network", features = ["serde"] } reth-primitives = { path = "../../crates/primitives" } reth-provider = { path = "../../crates/storage/provider", features = ["test-utils"] } reth-net-nat = { path = "../../crates/net/nat" } +reth-interfaces = { path = "../interfaces", optional = true } # io serde = "1.0" @@ -32,4 +33,66 @@ walkdir = "2.3.2" eyre = "0.6.8" shellexpand = "3.0.0" tracing = "0.1.37" -tempfile = "3.3.0" + +# crypto +rand = { version = "0.8", optional = true } + +# errors +thiserror = { version = "1", optional = true } + +# enr +enr = { version = "0.7.0", features = ["serde", "rust-secp256k1"], optional = true } + +# ethers +ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false, optional = true } +ethers-providers = { git = "https://github.com/gakonst/ethers-rs", features = ["ws"], default-features = false, optional = true } +ethers-middleware = { git = "https://github.com/gakonst/ethers-rs", default-features = false, optional = true } +ethers-signers = { git = "https://github.com/gakonst/ethers-rs", default-features = false, optional = true } + +# async / futures +async-trait = { version = "0.1", optional = true } +tokio = { version = "1", features = ["io-util", "net", "macros", "rt-multi-thread", "time"], optional = true } +tokio-test = { version = "0.4", optional = true } + +# misc +tempfile = { version = "3.3", optional = true } +hex = { version = "0.4", optional = true } + +[dev-dependencies] +# reth crates +reth-tracing = { path = "../tracing" } +reth-stages = { path = "../stages" } +reth-downloaders = { path = "../net/downloaders" } +reth-staged-sync = { path = ".", features = ["test-utils"] } + +# async/futures +futures = "0.3" +tokio = { version = "1", features = ["io-util", "net", "macros", "rt-multi-thread", "time"] } +tokio-stream = "0.1" + +# crypto +secp256k1 = { version = "0.24", features = [ + "global-context", + "rand-std", + "recovery", +] } + +[features] +test-utils = [ + "reth-network/test-utils", + "reth-interfaces/test-utils", + "reth-network/test-utils", + "reth-provider/test-utils", + "dep:enr", + "dep:ethers-core", + "dep:tempfile", + "dep:thiserror", + "dep:hex", + "dep:rand", + "dep:tokio", + "dep:tokio-test", + "dep:ethers-signers", + "dep:ethers-providers", + "dep:ethers-middleware", + "dep:async-trait" +] diff --git a/crates/staged-sync/src/lib.rs b/crates/staged-sync/src/lib.rs index de122ea70b22f..781199fb5e66c 100644 --- a/crates/staged-sync/src/lib.rs +++ b/crates/staged-sync/src/lib.rs @@ -2,3 +2,7 @@ pub mod config; pub use config::Config; pub mod utils; + +#[cfg(any(test, feature = "test-utils"))] +/// Common helpers for integration testing. +pub mod test_utils; diff --git a/crates/staged-sync/src/test_utils/clique.rs b/crates/staged-sync/src/test_utils/clique.rs new file mode 100644 index 0000000000000..8a75e60098236 --- /dev/null +++ b/crates/staged-sync/src/test_utils/clique.rs @@ -0,0 +1,122 @@ +//! Helper struct for working with a clique geth instance. + +use enr::k256::ecdsa::SigningKey; +use ethers_core::utils::{Geth, GethInstance}; +use ethers_middleware::SignerMiddleware; +use ethers_providers::{Provider, Ws}; +use ethers_signers::{LocalWallet, Wallet}; +use std::{ + io::{BufRead, BufReader}, + net::SocketAddr, +}; + +/// A [`Geth`](ethers_core::utils::Geth) instance configured with Clique and a custom +/// [`Genesis`](ethers_core::utils::Genesis). +/// +/// This holds a [`SignerMiddleware`](ethers_middleware::SignerMiddleware) for +/// enabling block production and creating transactions. +/// +/// # Example +/// ```no_run +/// # use ethers_core::utils::Geth; +/// # use reth_staged_sync::test_utils::CliqueGethInstance; +/// # tokio_test::block_on(async { +/// +/// // this creates a funded geth +/// let clique_geth = Geth::new() +/// .p2p_port(30303) +/// .chain_id(1337u64); +/// +/// // build the funded geth, generating a random signing key and enabling clique +/// let mut clique = CliqueGethInstance::new(clique_geth, None).await; +/// +/// // don't print logs, but drain the stderr +/// clique.prevent_blocking().await; +/// # }); +/// ``` +pub struct CliqueGethInstance { + /// The spawned [`GethInstance`](ethers_core::utils::GethInstance). + pub instance: GethInstance, + /// The provider who can talk to this instance + pub provider: SignerMiddleware, Wallet>, +} + +impl CliqueGethInstance { + /// Sets up a new [`SignerMiddleware`](ethers_middleware::SignerMiddleware) + /// for the [`Geth`](ethers_core::utils::Geth) instance and returns the + /// [`CliqueGethInstance`](crate::test_utils::CliqueGethInstance). + /// + /// The signer is assumed to be the clique signer and the signer for any transactions sent for + /// block production. + /// + /// This also spawns the geth instance. + pub async fn new(geth: Geth, signer: Option) -> Self { + let signer = signer.unwrap_or_else(|| SigningKey::random(&mut rand::thread_rng())); + + let geth = geth.set_clique_private_key(signer.clone()); + + // spawn the geth instance + let instance = geth.spawn(); + + // create the signer + let wallet: LocalWallet = signer.clone().into(); + + // set up ethers provider + let geth_endpoint = SocketAddr::new([127, 0, 0, 1].into(), instance.port()).to_string(); + let provider = Provider::::connect(format!("ws://{geth_endpoint}")).await.unwrap(); + let provider = + SignerMiddleware::new_with_provider_chain(provider, wallet.clone()).await.unwrap(); + + Self { instance, provider } + } + + /// Prints the logs of the [`Geth`](ethers_core::utils::Geth) instance in a new + /// [`task`](tokio::task). + #[allow(dead_code)] + pub async fn print_logs(&mut self) { + // take the stderr of the geth instance and print it + let stderr = self.instance.stderr().unwrap(); + + // print logs in a new task + let mut err_reader = BufReader::new(stderr); + + tokio::spawn(async move { + loop { + if let (Ok(line), line_str) = { + let mut buf = String::new(); + (err_reader.read_line(&mut buf), buf.clone()) + } { + if line == 0 { + break + } + if !line_str.is_empty() { + dbg!(line_str); + } + } + } + }); + } + + /// Prevents the [`Geth`](ethers_core::utils::Geth) instance from blocking due to the `stderr` + /// filling up. + pub async fn prevent_blocking(&mut self) { + // take the stderr of the geth instance and print it + let stderr = self.instance.stderr().unwrap(); + + // print logs in a new task + let mut err_reader = BufReader::new(stderr); + + tokio::spawn(async move { + loop { + if let (Ok(line), _line_str) = { + let mut buf = String::new(); + (err_reader.read_line(&mut buf), buf.clone()) + } { + if line == 0 { + break + } + } + } + }); + } +} diff --git a/crates/staged-sync/src/test_utils/clique_middleware.rs b/crates/staged-sync/src/test_utils/clique_middleware.rs new file mode 100644 index 0000000000000..a90d7caba4297 --- /dev/null +++ b/crates/staged-sync/src/test_utils/clique_middleware.rs @@ -0,0 +1,128 @@ +//! Helper extension traits for working with clique providers. + +use async_trait::async_trait; +use enr::k256::ecdsa::SigningKey; +use ethers_core::{ + types::{transaction::eip2718::TypedTransaction, Address, Block, BlockNumber, H256}, + utils::secret_key_to_address, +}; +use ethers_middleware::SignerMiddleware; +use ethers_providers::Middleware; +use ethers_signers::Signer; +use reth_network::test_utils::enr_to_peer_id; +use reth_primitives::PeerId; +use thiserror::Error; +use tracing::trace; + +/// An error that can occur when using the +/// [`CliqueMiddleware`](crate::test_utils::CliqueMiddleware). +#[derive(Error, Debug)] +pub enum CliqueError { + /// Error encountered when using the provider + #[error(transparent)] + ProviderError(#[from] E), + + /// No genesis block returned from the provider + #[error("no genesis block returned from the provider")] + NoGenesis, + + /// No tip block returned from the provider + #[error("no tip block returned from the provider")] + NoTip, + + /// Account was not successfully unlocked on the provider + #[error("account was not successfully unlocked on the provider")] + AccountNotUnlocked, + + /// Mining was not successfully enabled on the provider + #[error("mining was not successfully enabled on the provider")] + MiningNotEnabled, + + /// Mismatch between locally computed address and address returned from the provider + #[error("local address {local} does not match remote address {remote}")] + AddressMismatch { + /// The locally computed address + local: Address, + + /// The address returned from the provider + remote: Address, + }, +} + +/// Error type for [`CliqueMiddleware`](crate::test_utils::CliqueMiddleware). +pub type CliqueMiddlewareError = CliqueError<::Error>; + +/// Extension trait for [`Middleware`](ethers_providers::Middleware) to provide clique specific +/// functionality. +#[async_trait(?Send)] +pub trait CliqueMiddleware: Send + Sync + Middleware { + /// Enable mining on the clique geth instance by importing and unlocking the signer account + /// derived from given private key and password. + async fn enable_mining( + &self, + signer: SigningKey, + password: String, + ) -> Result<(), CliqueMiddlewareError> { + let our_address = secret_key_to_address(&signer); + + // send the private key to geth and unlock it + let key_bytes = signer.to_bytes().to_vec().into(); + trace!( + private_key=%hex::encode(&key_bytes), + "Importing private key" + ); + + let unlocked_addr = self.import_raw_key(key_bytes, password.to_string()).await?; + if unlocked_addr != our_address { + return Err(CliqueError::AddressMismatch { local: our_address, remote: unlocked_addr }) + } + + let unlock_success = self.unlock_account(our_address, password.to_string(), None).await?; + + if !unlock_success { + return Err(CliqueError::AccountNotUnlocked) + } + + // start mining? + self.start_mining(None).await?; + + // check that we are mining + let mining = self.mining().await?; + if !mining { + return Err(CliqueError::MiningNotEnabled) + } + Ok(()) + } + + /// Returns the chain tip of the [`Geth`](ethers_core::utils::Geth) instance by calling + /// geth's `eth_getBlock`. + async fn remote_tip_block(&self) -> Result, CliqueMiddlewareError> { + self.get_block(BlockNumber::Latest).await?.ok_or(CliqueError::NoTip) + } + + /// Returns the genesis block of the [`Geth`](ethers_core::utils::Geth) instance by calling + /// geth's `eth_getBlock`. + async fn remote_genesis_block(&self) -> Result, CliqueMiddlewareError> { + self.get_block(BlockNumber::Earliest).await?.ok_or(CliqueError::NoGenesis) + } + + /// Signs and sends the given unsigned transactions sequentially, signing with the private key + /// used to configure the [`CliqueGethInstance`](crate::test_utils::CliqueGethInstance). + async fn send_requests>( + &self, + txs: T, + ) -> Result<(), CliqueMiddlewareError> { + for tx in txs { + self.send_transaction(tx, None).await?; + } + Ok(()) + } + + /// Returns the [`Geth`](ethers_core::utils::Geth) instance [`PeerId`](reth_primitives::PeerId) + /// by calling geth's `admin_nodeInfo`. + async fn peer_id(&self) -> Result> { + Ok(enr_to_peer_id(self.node_info().await?.enr)) + } +} + +impl CliqueMiddleware for SignerMiddleware {} diff --git a/crates/staged-sync/src/test_utils/mod.rs b/crates/staged-sync/src/test_utils/mod.rs new file mode 100644 index 0000000000000..51dc7cd579803 --- /dev/null +++ b/crates/staged-sync/src/test_utils/mod.rs @@ -0,0 +1,9 @@ +#![warn(missing_docs, unreachable_pub)] + +//! Common helpers for staged sync integration testing. + +pub mod clique; +pub mod clique_middleware; + +pub use clique::CliqueGethInstance; +pub use clique_middleware::{CliqueError, CliqueMiddleware, CliqueMiddlewareError}; diff --git a/crates/staged-sync/tests/sync.rs b/crates/staged-sync/tests/sync.rs new file mode 100644 index 0000000000000..e437f50cae8cb --- /dev/null +++ b/crates/staged-sync/tests/sync.rs @@ -0,0 +1,140 @@ +use ethers_core::{ + types::{transaction::eip2718::TypedTransaction, Eip1559TransactionRequest, H160, U64}, + utils::Geth, +}; +use ethers_providers::Middleware; +use reth_network::{ + test_utils::{unused_port, unused_tcp_udp, NetworkEventStream}, + NetworkConfig, NetworkManager, +}; +use reth_primitives::{ + constants::EIP1559_INITIAL_BASE_FEE, ChainSpec, Hardfork, Header, PeerId, SealedHeader, +}; +use reth_provider::test_utils::NoopProvider; +use reth_staged_sync::test_utils::{CliqueGethInstance, CliqueMiddleware}; +use secp256k1::SecretKey; +use std::{net::SocketAddr, sync::Arc}; + +#[tokio::test(flavor = "multi_thread")] +async fn can_peer_with_geth() { + reth_tracing::init_test_tracing(); + + let (clique, chainspec) = init_geth().await; + let geth_p2p_port = clique.instance.p2p_port().unwrap(); + + // === initialize reth networking stack === + + let secret_key = SecretKey::new(&mut rand::thread_rng()); + let (reth_p2p, reth_disc) = unused_tcp_udp(); + tracing::info!( + %reth_p2p, + %reth_disc, + "setting up reth networking stack in keepalive test" + ); + + let config = NetworkConfig::>::builder(secret_key) + .listener_addr(reth_p2p) + .discovery_addr(reth_disc) + .chain_spec(chainspec) + .build(Arc::new(NoopProvider::default())); + + let network = NetworkManager::new(config).await.unwrap(); + let handle = network.handle().clone(); + + tokio::task::spawn(network); + + // create networkeventstream to get the next session established event easily + let mut events = NetworkEventStream::new(handle.event_listener()); + let geth_socket = SocketAddr::new([127, 0, 0, 1].into(), geth_p2p_port); + + // get the peer id we should be expecting + let geth_peer_id: PeerId = clique.provider.peer_id().await.unwrap(); + + // add geth as a peer then wait for `PeerAdded` and `SessionEstablished` events. + handle.add_peer(geth_peer_id, geth_socket); + + // wait for the session to be established + let peer_id = events.peer_added_and_established().await.unwrap(); + assert_eq!(geth_peer_id, peer_id); +} + +async fn init_geth() -> (CliqueGethInstance, ChainSpec) { + // first create a signer that we will fund so we can make transactions + let chain_id = 13337u64; + let data_dir = tempfile::tempdir().expect("should be able to create temp geth datadir"); + let dir_path = data_dir.path(); + tracing::info!( + data_dir=?dir_path, + "initializing geth instance" + ); + + // this creates a funded geth + let clique_geth = + Geth::new().chain_id(chain_id).p2p_port(unused_port()).data_dir(dir_path.to_str().unwrap()); + + // build the funded geth + let mut clique = CliqueGethInstance::new(clique_geth, None).await; + let geth_p2p_port = + clique.instance.p2p_port().expect("geth should be configured with a p2p port"); + tracing::info!( + p2p_port=%geth_p2p_port, + rpc_port=%clique.instance.port(), + "configured clique geth instance in keepalive test" + ); + + // don't print logs, but drain the stderr + clique.prevent_blocking().await; + + // get geth to start producing blocks - use a blank password + let clique_private_key = clique + .instance + .clique_private_key() + .clone() + .expect("clique should be configured with a private key"); + clique.provider.enable_mining(clique_private_key, "".into()).await.unwrap(); + + // === check that we have the same genesis hash === + + // get the chainspec from the genesis we configured for geth + let mut chainspec: ChainSpec = clique + .instance + .genesis() + .clone() + .expect("clique should be configured with a genesis") + .into(); + let remote_genesis = SealedHeader::from(clique.provider.remote_genesis_block().await.unwrap()); + + let mut local_genesis_header = Header::from(chainspec.genesis().clone()); + + let hardforks = chainspec.hardforks(); + + // set initial base fee depending on eip-1559 + if let Some(0) = hardforks.get(&Hardfork::London) { + local_genesis_header.base_fee_per_gas = Some(EIP1559_INITIAL_BASE_FEE); + } + + let local_genesis = local_genesis_header.seal(); + assert_eq!(local_genesis, remote_genesis, "genesis blocks should match, we computed {local_genesis:#?} but geth computed {remote_genesis:#?}"); + + // set the chainspec genesis hash + chainspec.genesis_hash = local_genesis.hash(); + + // === create many blocks === + + let nonces = 0..1000u64; + let txs = nonces.map(|nonce| { + // create a tx that just sends to the zero addr + TypedTransaction::Eip1559( + Eip1559TransactionRequest::new().to(H160::zero()).value(1u64).nonce(nonce), + ) + }); + tracing::info!("generated transactions for blocks"); + + // finally send the txs to geth + clique.provider.send_requests(txs).await.unwrap(); + + let block = clique.provider.get_block_number().await.unwrap(); + assert!(block > U64::zero()); + + (clique, chainspec) +}