From cd85832ca9898ff8032ecf1d001faab4e6d12588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keszey=20D=C3=A1niel?= Date: Thu, 12 Sep 2024 14:48:03 +0200 Subject: [PATCH] start to submit to taikoL1 --- Cargo.lock | 1105 +++++++++++++++-- config-gwyneth-reth.toml | 6 +- crates/rbuilder/Cargo.toml | 2 + .../src/live_builder/order_input/orderpool.rs | 252 +++- .../order_input/txpool_fetcher.rs | 1 - 5 files changed, 1194 insertions(+), 172 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6cb5d49c..277b916c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,16 @@ # 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 = "addr2line" version = "0.22.0" @@ -603,7 +613,7 @@ dependencies = [ "alloy-rpc-types-eth 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "alloy-serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpsee-types 0.23.2", - "jsonwebtoken", + "jsonwebtoken 9.3.0", "rand 0.8.5", "serde", "thiserror", @@ -622,7 +632,7 @@ dependencies = [ "alloy-serde 0.2.0 (git+https://github.com/alloy-rs/alloy?rev=f2d80032)", "ethereum_ssz", "ethereum_ssz_derive", - "jsonwebtoken", + "jsonwebtoken 9.3.0", "rand 0.8.5", "serde", "thiserror", @@ -916,7 +926,7 @@ dependencies = [ "pin-project", "serde_json", "tokio", - "tokio-util", + "tokio-util 0.7.11", "tracing", ] @@ -1247,6 +1257,15 @@ dependencies = [ "zstd 0.12.4", ] +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + [[package]] name = "asn1_der" version = "0.7.6" @@ -1477,6 +1496,12 @@ dependencies = [ "url", ] +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + [[package]] name = "beef" version = "0.5.2" @@ -1591,17 +1616,29 @@ dependencies = [ "dyn_size_of", ] +[[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", - "radium", + "funty 2.0.0", + "radium 0.7.0", "serde", "tap", - "wyz", + "wyz 0.5.1", ] [[package]] @@ -1610,6 +1647,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ + "block-padding 0.2.1", "generic-array", ] @@ -1622,6 +1660,12 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + [[package]] name = "block-padding" version = "0.3.3" @@ -1857,6 +1901,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ + "sha2 0.10.8", "tinyvec", ] @@ -2159,6 +2204,58 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +[[package]] +name = "coins-bip32" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58 0.5.1", + "coins-core", + "digest 0.10.7", + "hmac 0.12.1", + "k256 0.13.3", + "serde", + "sha2 0.10.8", + "thiserror", +] + +[[package]] +name = "coins-bip39" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +dependencies = [ + "bitvec 1.0.1", + "coins-bip32", + "hmac 0.12.1", + "once_cell", + "pbkdf2 0.12.2", + "rand 0.8.5", + "sha2 0.10.8", + "thiserror", +] + +[[package]] +name = "coins-core" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +dependencies = [ + "base64 0.21.7", + "bech32", + "bs58 0.5.1", + "digest 0.10.7", + "generic-array", + "hex", + "ripemd", + "serde", + "serde_derive", + "sha2 0.10.8", + "sha3 0.10.8", + "thiserror", +] + [[package]] name = "colorchoice" version = "1.0.1" @@ -2752,7 +2849,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4355c25cbf99edcb6b4a0e906f6bdc6956eda149e84455bea49696429b2f8e8" dependencies = [ "futures", - "tokio-util", + "tokio-util 0.7.11", ] [[package]] @@ -3091,6 +3188,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ena" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" +dependencies = [ + "log", +] + [[package]] name = "encode_unicode" version = "0.3.6" @@ -3127,7 +3233,25 @@ dependencies = [ "rand 0.8.5", "rlp", "serde", - "sha3", + "sha3 0.10.8", + "zeroize", +] + +[[package]] +name = "enr" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" +dependencies = [ + "base64 0.21.7", + "bytes", + "hex", + "k256 0.13.3", + "log", + "rand 0.8.5", + "rlp", + "serde", + "sha3 0.10.8", "zeroize", ] @@ -3145,9 +3269,9 @@ dependencies = [ "k256 0.13.3", "log", "rand 0.8.5", - "secp256k1", + "secp256k1 0.29.0", "serde", - "sha3", + "sha3 0.10.8", "zeroize", ] @@ -3213,23 +3337,73 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "eth-keystore" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +dependencies = [ + "aes 0.8.4", + "ctr 0.9.2", + "digest 0.10.7", + "hex", + "hmac 0.12.1", + "pbkdf2 0.11.0", + "rand 0.8.5", + "scrypt", + "serde", + "serde_json", + "sha2 0.10.8", + "sha3 0.10.8", + "thiserror", + "uuid 0.8.2", +] + +[[package]] +name = "ethabi" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c98847055d934070b90e806e12d3936b787d0a115068981c1d8dfd5dfef5a5" +dependencies = [ + "ethereum-types 0.12.1", + "hex", + "serde", + "serde_json", + "sha3 0.9.1", + "thiserror", + "uint", +] + [[package]] name = "ethabi" version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" dependencies = [ - "ethereum-types", + "ethereum-types 0.14.1", "hex", "once_cell", "regex", "serde", "serde_json", - "sha3", + "sha3 0.10.8", "thiserror", "uint", ] +[[package]] +name = "ethbloom" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" +dependencies = [ + "crunchy", + "fixed-hash 0.7.0", + "impl-rlp", + "impl-serde 0.3.2", + "tiny-keccak", +] + [[package]] name = "ethbloom" version = "0.13.0" @@ -3237,10 +3411,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", - "fixed-hash", - "impl-codec", + "fixed-hash 0.8.0", + "impl-codec 0.6.0", "impl-rlp", - "impl-serde", + "impl-serde 0.4.0", "scale-info", "tiny-keccak", ] @@ -3269,18 +3443,32 @@ dependencies = [ "tokio-stream", ] +[[package]] +name = "ethereum-types" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" +dependencies = [ + "ethbloom 0.11.1", + "fixed-hash 0.7.0", + "impl-rlp", + "impl-serde 0.3.2", + "primitive-types 0.10.1", + "uint", +] + [[package]] name = "ethereum-types" version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", + "ethbloom 0.13.0", + "fixed-hash 0.8.0", + "impl-codec 0.6.0", "impl-rlp", - "impl-serde", - "primitive-types", + "impl-serde 0.4.0", + "primitive-types 0.12.2", "scale-info", "uint", ] @@ -3291,7 +3479,7 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d3627f83d8b87b432a5fad9934b4565260722a141a2c40f371f8080adec9425" dependencies = [ - "ethereum-types", + "ethereum-types 0.14.1", "itertools 0.10.5", "smallvec", ] @@ -3308,6 +3496,93 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ethers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" +dependencies = [ + "ethers-addressbook", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-middleware", + "ethers-providers", + "ethers-signers", + "ethers-solc", +] + +[[package]] +name = "ethers-addressbook" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" +dependencies = [ + "ethers-core", + "once_cell", + "serde", + "serde_json", +] + +[[package]] +name = "ethers-contract" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" +dependencies = [ + "const-hex", + "ethers-contract-abigen", + "ethers-contract-derive", + "ethers-core", + "ethers-providers", + "futures-util", + "once_cell", + "pin-project", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "ethers-contract-abigen" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" +dependencies = [ + "Inflector", + "const-hex", + "dunce", + "ethers-core", + "ethers-etherscan", + "eyre", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "reqwest 0.11.27", + "serde", + "serde_json", + "syn 2.0.72", + "toml 0.8.15", + "walkdir", +] + +[[package]] +name = "ethers-contract-derive" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" +dependencies = [ + "Inflector", + "const-hex", + "ethers-contract-abigen", + "ethers-core", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.72", +] + [[package]] name = "ethers-core" version = "2.0.14" @@ -3316,25 +3591,159 @@ checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" dependencies = [ "arrayvec", "bytes", + "cargo_metadata", "chrono", "const-hex", "elliptic-curve 0.13.8", - "ethabi", + "ethabi 18.0.0", "generic-array", "k256 0.13.3", "num_enum", + "once_cell", "open-fastrlp", "rand 0.8.5", "rlp", "serde", "serde_json", "strum", + "syn 2.0.72", "tempfile", "thiserror", "tiny-keccak", "unicode-xid", ] +[[package]] +name = "ethers-etherscan" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" +dependencies = [ + "chrono", + "ethers-core", + "reqwest 0.11.27", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-middleware" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" +dependencies = [ + "async-trait", + "auto_impl", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-providers", + "ethers-signers", + "futures-channel", + "futures-locks", + "futures-util", + "instant", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "tracing-futures", + "url", +] + +[[package]] +name = "ethers-providers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" +dependencies = [ + "async-trait", + "auto_impl", + "base64 0.21.7", + "bytes", + "const-hex", + "enr 0.10.0", + "ethers-core", + "futures-core", + "futures-timer", + "futures-util", + "hashers", + "http 0.2.12", + "instant", + "jsonwebtoken 8.3.0", + "once_cell", + "pin-project", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-tungstenite 0.20.1", + "tracing", + "tracing-futures", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "ws_stream_wasm", +] + +[[package]] +name = "ethers-signers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" +dependencies = [ + "async-trait", + "coins-bip32", + "coins-bip39", + "const-hex", + "elliptic-curve 0.13.8", + "eth-keystore", + "ethers-core", + "rand 0.8.5", + "sha2 0.10.8", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-solc" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" +dependencies = [ + "cfg-if", + "const-hex", + "dirs", + "dunce", + "ethers-core", + "glob", + "home", + "md-5", + "num_cpus", + "once_cell", + "path-slash", + "rayon", + "regex", + "semver 1.0.23", + "serde", + "serde_json", + "solang-parser", + "svm-rs", + "thiserror", + "tiny-keccak", + "tokio", + "tracing", + "walkdir", + "yansi", +] + [[package]] name = "ethnum" version = "1.5.0" @@ -3430,7 +3839,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "bitvec", + "bitvec 1.0.1", "rand_core 0.6.4", "subtle", ] @@ -3441,6 +3850,18 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +[[package]] +name = "fixed-hash" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + [[package]] name = "fixed-hash" version = "0.8.0" @@ -3454,6 +3875,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 = "flate2" version = "1.0.30" @@ -3473,7 +3900,7 @@ dependencies = [ "futures-core", "futures-sink", "nanorand", - "spin", + "spin 0.9.8", ] [[package]] @@ -3518,6 +3945,22 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + +[[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" @@ -3609,6 +4052,16 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "futures-locks" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" +dependencies = [ + "futures-channel", + "futures-task", +] + [[package]] name = "futures-macro" version = "0.3.30" @@ -3878,7 +4331,7 @@ dependencies = [ "indexmap 2.2.6", "slab", "tokio", - "tokio-util", + "tokio-util 0.7.11", "tracing", ] @@ -3897,7 +4350,7 @@ dependencies = [ "indexmap 2.2.6", "slab", "tokio", - "tokio-util", + "tokio-util 0.7.11", "tracing", ] @@ -3941,6 +4394,15 @@ dependencies = [ "serde", ] +[[package]] +name = "hashers" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +dependencies = [ + "fxhash", +] + [[package]] name = "hashlink" version = "0.8.4" @@ -4485,6 +4947,17 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +[[package]] +name = "idna" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "idna" version = "0.4.0" @@ -4505,13 +4978,22 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "impl-codec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" +dependencies = [ + "parity-scale-codec 2.3.1", +] + [[package]] name = "impl-codec" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.6.12", ] [[package]] @@ -4523,6 +5005,15 @@ dependencies = [ "rlp", ] +[[package]] +name = "impl-serde" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" +dependencies = [ + "serde", +] + [[package]] name = "impl-serde" version = "0.4.0" @@ -4615,7 +5106,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "block-padding", + "block-padding 0.3.3", "generic-array", ] @@ -4792,6 +5283,21 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "jsonrpc-core" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +dependencies = [ + "futures", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", +] + [[package]] name = "jsonrpsee" version = "0.20.3" @@ -4845,7 +5351,7 @@ dependencies = [ "thiserror", "tokio", "tokio-rustls 0.24.1", - "tokio-util", + "tokio-util 0.7.11", "tracing", "url", "webpki-roots 0.25.4", @@ -4871,7 +5377,7 @@ dependencies = [ "thiserror", "tokio", "tokio-rustls 0.26.0", - "tokio-util", + "tokio-util 0.7.11", "tracing", "url", ] @@ -5020,7 +5526,7 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", - "tokio-util", + "tokio-util 0.7.11", "tower", "tracing", ] @@ -5048,7 +5554,7 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", - "tokio-util", + "tokio-util 0.7.11", "tower", "tracing", ] @@ -5128,6 +5634,20 @@ dependencies = [ "url", ] +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.7", + "pem 1.1.1", + "ring 0.16.20", + "serde", + "serde_json", + "simple_asn1", +] + [[package]] name = "jsonwebtoken" version = "9.3.0" @@ -5136,8 +5656,8 @@ checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" dependencies = [ "base64 0.21.7", "js-sys", - "pem", - "ring", + "pem 3.0.4", + "ring 0.17.8", "serde", "serde_json", "simple_asn1", @@ -5218,13 +5738,43 @@ dependencies = [ "serde_yaml 0.9.34+deprecated", ] +[[package]] +name = "lalrpop" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +dependencies = [ + "ascii-canvas", + "bit-set", + "ena", + "itertools 0.11.0", + "lalrpop-util", + "petgraph", + "regex", + "regex-syntax 0.8.4", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", + "walkdir", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +dependencies = [ + "regex-automata 0.4.7", +] + [[package]] name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin", + "spin 0.9.8", ] [[package]] @@ -5683,6 +6233,12 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + [[package]] name = "md-5" version = "0.10.6" @@ -5947,7 +6503,7 @@ dependencies = [ "log", "memchr", "mime", - "spin", + "spin 0.9.8", "version_check", ] @@ -6356,7 +6912,7 @@ dependencies = [ "arrayvec", "auto_impl", "bytes", - "ethereum-types", + "ethereum-types 0.14.1", "open-fastrlp-derive", ] @@ -6456,19 +7012,45 @@ dependencies = [ "group 0.13.0", ] +[[package]] +name = "parity-scale-codec" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" +dependencies = [ + "arrayvec", + "bitvec 0.20.4", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive 2.3.1", + "serde", +] + [[package]] name = "parity-scale-codec" version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +dependencies = [ + "arrayvec", + "bitvec 1.0.1", + "byte-slice-cast", + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec-derive 3.6.12", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -6582,6 +7164,12 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + [[package]] name = "pbkdf2" version = "0.11.0" @@ -6594,6 +7182,25 @@ dependencies = [ "sha2 0.10.8", ] +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac 0.12.1", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + [[package]] name = "pem" version = "3.0.4" @@ -6630,6 +7237,16 @@ dependencies = [ "ucd-trie", ] +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap 2.2.6", +] + [[package]] name = "ph" version = "0.8.3" @@ -7156,16 +7773,39 @@ dependencies = [ "termtree", ] +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn 2.0.72", +] + +[[package]] +name = "primitive-types" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" +dependencies = [ + "fixed-hash 0.7.0", + "impl-codec 0.5.1", + "impl-rlp", + "impl-serde 0.3.2", + "uint", +] + [[package]] name = "primitive-types" version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ - "fixed-hash", - "impl-codec", + "fixed-hash 0.8.0", + "impl-codec 0.6.0", "impl-rlp", - "impl-serde", + "impl-serde 0.4.0", "scale-info", "uint", ] @@ -7387,7 +8027,7 @@ checksum = "ddf517c03a109db8100448a4be38d498df8a210a99fe0e1b9eaf39e78c640efe" dependencies = [ "bytes", "rand 0.8.5", - "ring", + "ring 0.17.8", "rustc-hash 1.1.0", "rustls 0.23.12", "slab", @@ -7417,6 +8057,12 @@ dependencies = [ "proc-macro2", ] +[[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" @@ -7609,6 +8255,7 @@ dependencies = [ "ethereum-consensus", "ethereum_ssz", "ethereum_ssz_derive", + "ethers", "exponential-backoff", "eyre", "flate2", @@ -7627,7 +8274,7 @@ dependencies = [ "mev-share-sse", "mockall", "once_cell", - "primitive-types", + "primitive-types 0.12.2", "priority-queue", "prometheus", "rand 0.8.5", @@ -7653,7 +8300,7 @@ dependencies = [ "revm", "revm-inspectors", "revm-primitives", - "secp256k1", + "secp256k1 0.29.0", "serde", "serde_json", "serde_with", @@ -7668,14 +8315,15 @@ dependencies = [ "time", "tokio", "tokio-stream", - "tokio-util", + "tokio-util 0.7.11", "toml 0.8.15", "tracing", "tracing-subscriber", "tungstenite 0.23.0", "url", - "uuid", + "uuid 1.10.0", "warp", + "web3", "zip", ] @@ -7807,6 +8455,7 @@ dependencies = [ "http 0.2.12", "http-body 0.4.6", "hyper 0.14.30", + "hyper-rustls 0.24.2", "hyper-tls 0.5.0", "ipnet", "js-sys", @@ -7816,6 +8465,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "serde", "serde_json", @@ -7824,13 +8474,15 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", - "tokio-util", + "tokio-rustls 0.24.1", + "tokio-util 0.7.11", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "web-sys", + "webpki-roots 0.25.4", "winreg 0.50.0", ] @@ -8184,7 +8836,7 @@ dependencies = [ "libc", "rand 0.8.5", "reth-fs-util", - "secp256k1", + "secp256k1 0.29.0", "thiserror", ] @@ -8312,7 +8964,7 @@ dependencies = [ "derive_more", "metrics", "modular-bitfield", - "parity-scale-codec", + "parity-scale-codec 3.6.12", "proptest", "reth-codecs", "reth-primitives", @@ -8365,7 +9017,7 @@ dependencies = [ "reth-net-nat", "reth-network-peers", "schnellru", - "secp256k1", + "secp256k1 0.29.0", "serde", "thiserror", "tokio", @@ -8393,7 +9045,7 @@ dependencies = [ "reth-ethereum-forks", "reth-metrics", "reth-network-peers", - "secp256k1", + "secp256k1 0.29.0", "thiserror", "tokio", "tracing", @@ -8413,7 +9065,7 @@ dependencies = [ "reth-network-peers", "reth-tokio-util", "schnellru", - "secp256k1", + "secp256k1 0.29.0", "thiserror", "tokio", "tokio-stream", @@ -8444,7 +9096,7 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", - "tokio-util", + "tokio-util 0.7.11", "tracing", ] @@ -8456,7 +9108,7 @@ dependencies = [ "aes 0.8.4", "alloy-primitives", "alloy-rlp", - "block-padding", + "block-padding 0.3.3", "byteorder", "cipher 0.4.4", "concat-kdf", @@ -8468,13 +9120,13 @@ dependencies = [ "pin-project", "rand 0.8.5", "reth-network-peers", - "secp256k1", + "secp256k1 0.29.0", "sha2 0.10.8", - "sha3", + "sha3 0.10.8", "thiserror", "tokio", "tokio-stream", - "tokio-util", + "tokio-util 0.7.11", "tracing", "typenum", ] @@ -8547,7 +9199,7 @@ dependencies = [ "reth-rpc-types", "serde", "serde_json", - "tokio-util", + "tokio-util 0.7.11", "tracing", ] @@ -8585,7 +9237,7 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", - "tokio-util", + "tokio-util 0.7.11", "tracing", ] @@ -8790,7 +9442,7 @@ dependencies = [ "reth-tasks", "reth-tracing", "tokio", - "tokio-util", + "tokio-util 0.7.11", ] [[package]] @@ -8828,7 +9480,7 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", - "tokio-util", + "tokio-util 0.7.11", "tower", "tracing", ] @@ -8867,7 +9519,7 @@ dependencies = [ "metrics", "reth-metrics-derive", "tokio", - "tokio-util", + "tokio-util 0.7.11", ] [[package]] @@ -8941,14 +9593,14 @@ dependencies = [ "reth-transaction-pool", "rustc-hash 2.0.0", "schnellru", - "secp256k1", + "secp256k1 0.29.0", "serde", "serde_json", "smallvec", "thiserror", "tokio", "tokio-stream", - "tokio-util", + "tokio-util 0.7.11", "tracing", ] @@ -8993,7 +9645,7 @@ dependencies = [ "alloy-primitives", "alloy-rlp", "enr 0.12.1", - "secp256k1", + "secp256k1 0.29.0", "serde_with", "thiserror", "tokio", @@ -9096,7 +9748,7 @@ dependencies = [ "reth-tasks", "reth-tracing", "reth-transaction-pool", - "secp256k1", + "secp256k1 0.29.0", "tokio", "tokio-stream", "tracing", @@ -9153,7 +9805,7 @@ dependencies = [ "reth-tasks", "reth-tracing", "reth-transaction-pool", - "secp256k1", + "secp256k1 0.29.0", "serde_json", "shellexpand", "tikv-jemalloc-ctl", @@ -9297,7 +9949,7 @@ dependencies = [ "reth-static-file-types", "reth-trie-common", "revm-primitives", - "secp256k1", + "secp256k1 0.29.0", "serde", "tempfile", "thiserror-no-std", @@ -9441,7 +10093,7 @@ dependencies = [ "http-body 1.0.1", "hyper 1.4.1", "jsonrpsee 0.23.2", - "jsonwebtoken", + "jsonwebtoken 9.3.0", "parking_lot 0.12.3", "pin-project", "rand 0.8.5", @@ -9467,7 +10119,7 @@ dependencies = [ "revm", "revm-inspectors", "revm-primitives", - "secp256k1", + "secp256k1 0.29.0", "serde", "serde_json", "thiserror", @@ -10006,7 +10658,7 @@ dependencies = [ "once_cell", "revm-primitives", "ripemd", - "secp256k1", + "secp256k1 0.29.0", "sha2 0.10.8", "substrate-bn", ] @@ -10021,7 +10673,7 @@ dependencies = [ "alloy-primitives", "auto_impl", "bitflags 2.6.0", - "bitvec", + "bitvec 1.0.1", "c-kzg", "cfg-if", "derive_more", @@ -10055,6 +10707,21 @@ dependencies = [ "subtle", ] +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + [[package]] name = "ring" version = "0.17.8" @@ -10065,8 +10732,8 @@ dependencies = [ "cfg-if", "getrandom 0.2.15", "libc", - "spin", - "untrusted", + "spin 0.9.8", + "untrusted 0.9.0", "windows-sys 0.52.0", ] @@ -10176,8 +10843,8 @@ dependencies = [ "fastrlp", "num-bigint", "num-traits", - "parity-scale-codec", - "primitive-types", + "parity-scale-codec 3.6.12", + "primitive-types 0.12.2", "proptest", "rand 0.8.5", "rlp", @@ -10255,7 +10922,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring", + "ring 0.17.8", "rustls-webpki 0.101.7", "sct", ] @@ -10268,7 +10935,7 @@ checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ "log", "once_cell", - "ring", + "ring 0.17.8", "rustls-pki-types", "rustls-webpki 0.102.6", "subtle", @@ -10358,8 +11025,8 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring", - "untrusted", + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] @@ -10368,9 +11035,9 @@ version = "0.102.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" dependencies = [ - "ring", + "ring 0.17.8", "rustls-pki-types", - "untrusted", + "untrusted 0.9.0", ] [[package]] @@ -10414,6 +11081,15 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad97d4ce1560a5e27cec89519dc8300d1aa6035b099821261c651486a19e44d5" +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher 0.4.4", +] + [[package]] name = "same-file" version = "1.0.6" @@ -10431,7 +11107,7 @@ checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" dependencies = [ "cfg-if", "derive_more", - "parity-scale-codec", + "parity-scale-codec 3.6.12", "scale-info-derive", ] @@ -10496,14 +11172,26 @@ dependencies = [ "tendril", ] +[[package]] +name = "scrypt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +dependencies = [ + "hmac 0.12.1", + "pbkdf2 0.11.0", + "salsa20", + "sha2 0.10.8", +] + [[package]] name = "sct" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", - "untrusted", + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] @@ -10534,6 +11222,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "secp256k1" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c42e6f1735c5f00f51e43e28d6634141f2bcad10931b2609ddd74a86d751260" +dependencies = [ + "secp256k1-sys 0.4.2", +] + [[package]] name = "secp256k1" version = "0.29.0" @@ -10541,10 +11238,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e0cc0f1cf93f4969faf3ea1c7d8a9faed25918d96affa959720823dfe86d4f3" dependencies = [ "rand 0.8.5", - "secp256k1-sys", + "secp256k1-sys 0.10.0", "serde", ] +[[package]] +name = "secp256k1-sys" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "957da2573cde917463ece3570eab4a0b3f19de6f1646cde62e6fd3868f566036" +dependencies = [ + "cc", +] + [[package]] name = "secp256k1-sys" version = "0.10.0" @@ -10833,6 +11539,18 @@ dependencies = [ "digest 0.10.7", ] +[[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", +] + [[package]] name = "sha3" version = "0.10.8" @@ -11064,6 +11782,26 @@ dependencies = [ "sha1", ] +[[package]] +name = "solang-parser" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" +dependencies = [ + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "phf 0.11.2", + "thiserror", + "unicode-xid", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "spin" version = "0.9.8" @@ -11181,7 +11919,7 @@ dependencies = [ "tokio-stream", "tracing", "url", - "uuid", + "uuid 1.10.0", ] [[package]] @@ -11265,7 +12003,7 @@ dependencies = [ "thiserror", "time", "tracing", - "uuid", + "uuid 1.10.0", "whoami", ] @@ -11308,7 +12046,7 @@ dependencies = [ "thiserror", "time", "tracing", - "uuid", + "uuid 1.10.0", "whoami", ] @@ -11335,7 +12073,7 @@ dependencies = [ "tracing", "url", "urlencoding", - "uuid", + "uuid 1.10.0", ] [[package]] @@ -11344,7 +12082,7 @@ version = "0.9.0" source = "git+https://github.com/ralexstokes/ssz-rs?rev=84ef2b71aa004f6767420badb42c902ad56b8b72#84ef2b71aa004f6767420badb42c902ad56b8b72" dependencies = [ "alloy-primitives", - "bitvec", + "bitvec 1.0.1", "serde", "sha2 0.9.9", "ssz_rs_derive 0.9.0 (git+https://github.com/ralexstokes/ssz-rs?rev=84ef2b71aa004f6767420badb42c902ad56b8b72)", @@ -11356,7 +12094,7 @@ version = "0.9.0" source = "git+https://github.com/ralexstokes/ssz-rs.git#84ef2b71aa004f6767420badb42c902ad56b8b72" dependencies = [ "alloy-primitives", - "bitvec", + "bitvec 1.0.1", "serde", "sha2 0.9.9", "ssz_rs_derive 0.9.0 (git+https://github.com/ralexstokes/ssz-rs.git)", @@ -11538,6 +12276,26 @@ dependencies = [ "num-traits", ] +[[package]] +name = "svm-rs" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" +dependencies = [ + "dirs", + "fs2", + "hex", + "once_cell", + "reqwest 0.11.27", + "semver 1.0.23", + "serde", + "serde_json", + "sha2 0.10.8", + "thiserror", + "url", + "zip", +] + [[package]] name = "syn" version = "1.0.109" @@ -11691,6 +12449,17 @@ dependencies = [ "utf-8", ] +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + [[package]] name = "termtree" version = "0.4.1" @@ -11951,7 +12720,22 @@ dependencies = [ "futures-core", "pin-project-lite", "tokio", - "tokio-util", + "tokio-util 0.7.11", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", + "tungstenite 0.20.1", + "webpki-roots 0.25.4", ] [[package]] @@ -11982,6 +12766,21 @@ dependencies = [ "webpki-roots 0.26.3", ] +[[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-io", + "futures-sink", + "log", + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-util" version = "0.7.11" @@ -12066,7 +12865,7 @@ dependencies = [ "rand 0.8.5", "slab", "tokio", - "tokio-util", + "tokio-util 0.7.11", "tower-layer", "tower-service", "tracing", @@ -12095,12 +12894,12 @@ dependencies = [ "percent-encoding", "pin-project-lite", "tokio", - "tokio-util", + "tokio-util 0.7.11", "tower", "tower-layer", "tower-service", "tracing", - "uuid", + "uuid 1.10.0", ] [[package]] @@ -12287,6 +13086,26 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 0.2.12", + "httparse", + "log", + "rand 0.8.5", + "rustls 0.21.12", + "sha1", + "thiserror", + "url", + "utf-8", +] + [[package]] name = "tungstenite" version = "0.21.0" @@ -12466,6 +13285,12 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "untrusted" version = "0.9.0" @@ -12530,6 +13355,16 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom 0.2.15", + "serde", +] + [[package]] name = "uuid" version = "1.10.0" @@ -12637,7 +13472,7 @@ dependencies = [ "serde_urlencoded", "tokio", "tokio-tungstenite 0.21.0", - "tokio-util", + "tokio-util 0.7.11", "tower-service", "tracing", ] @@ -12759,6 +13594,54 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web3" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f258e254752d210b84fe117b31f1e3cc9cbf04c0d747eb7f8cf7cf5e370f6d" +dependencies = [ + "arrayvec", + "base64 0.13.1", + "bytes", + "derive_more", + "ethabi 16.0.0", + "ethereum-types 0.12.1", + "futures", + "futures-timer", + "headers", + "hex", + "idna 0.2.3", + "jsonrpc-core", + "log", + "once_cell", + "parking_lot 0.12.3", + "pin-project", + "reqwest 0.11.27", + "rlp", + "secp256k1 0.21.3", + "serde", + "serde_json", + "soketto 0.7.1", + "tiny-keccak", + "tokio", + "tokio-stream", + "tokio-util 0.6.10", + "url", + "web3-async-native-tls", +] + +[[package]] +name = "web3-async-native-tls" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f6d8d1636b2627fe63518d5a9b38a569405d9c9bc665c43c9c341de57227ebb" +dependencies = [ + "native-tls", + "thiserror", + "tokio", + "url", +] + [[package]] name = "webpki-roots" version = "0.25.4" @@ -13122,6 +14005,12 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "wyz" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" + [[package]] name = "wyz" version = "0.5.1" @@ -13146,6 +14035,12 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + [[package]] name = "yoke" version = "0.7.4" @@ -13267,7 +14162,7 @@ dependencies = [ "crossbeam-utils", "flate2", "hmac 0.12.1", - "pbkdf2", + "pbkdf2 0.11.0", "sha1", "time", "zstd 0.11.2+zstd.1.5.2", diff --git a/config-gwyneth-reth.toml b/config-gwyneth-reth.toml index e4276a6a..30bcf6aa 100644 --- a/config-gwyneth-reth.toml +++ b/config-gwyneth-reth.toml @@ -5,17 +5,17 @@ telemetry_ip = "0.0.0.0" chain = "/network-configs/genesis.json" # This shall be something like: "/tmp/reth-test-mjcfsdgE/" -reth_datadir = "" +reth_datadir = "/tmp/reth-test-A0chOJld/" relay_secret_key = "5eae315483f028b5cdd5d1090ff0c7618b18737ea9bf3c35047189db22835c48" coinbase_secret_key = "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" # This shall be something like: "http://172.16.152.12:4000". To gather the correct IP, in (host machine) terminal we can query by: # docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' CL_CONTAINER_HASH -cl_node_url = [""] +cl_node_url = ["http://172.16.160.12:4000"] jsonrpc_server_port = 9646 jsonrpc_server_ip = "0.0.0.0" # Not exactly the same because the random postfix is generated every time, but something like: "/tmp/reth.ipc-3ZTH1DJ4" -el_node_ipc_path = "" +el_node_ipc_path = "reth.ipc-T5GAdIhD" extra_data = "⚡🤖" dry_run = false diff --git a/crates/rbuilder/Cargo.toml b/crates/rbuilder/Cargo.toml index 822719f0..d0a06e0b 100644 --- a/crates/rbuilder/Cargo.toml +++ b/crates/rbuilder/Cargo.toml @@ -7,6 +7,8 @@ build = "build.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +ethers = "2.0" +web3 = "0.18.0" tokio = "1.38.0" serde = "1.0.188" serde_json = "1.0.105" diff --git a/crates/rbuilder/src/live_builder/order_input/orderpool.rs b/crates/rbuilder/src/live_builder/order_input/orderpool.rs index d40d2168..500cfaae 100644 --- a/crates/rbuilder/src/live_builder/order_input/orderpool.rs +++ b/crates/rbuilder/src/live_builder/order_input/orderpool.rs @@ -3,6 +3,9 @@ use crate::primitives::{ ShareBundleReplacementKey, }; use ahash::HashMap; +use alloy_primitives::Address; +use alloy_provider::Provider; +use alloy_transport_http::Http; use lru::LruCache; use reth::{primitives::constants::SLOT_DURATION, providers::StateProviderBox}; use std::{ @@ -18,20 +21,53 @@ use super::{ replaceable_order_sink::ReplaceableOrderSink, ReplaceableOrderPoolCommand, }; +use ethers::{ + prelude::*, + types::{Bytes, H256, U256}, +}; + +use web3::{ + Web3, + contract::{Contract, Options}, +}; +use url::Url; const BLOCKS_TO_KEEP_TXS: u32 = 5; const TIME_TO_KEEP_TXS: Duration = SLOT_DURATION.saturating_mul(BLOCKS_TO_KEEP_TXS); const TIME_TO_KEEP_BUNDLE_CANCELLATIONS: Duration = Duration::from_secs(60); -/// Push to pull for OrderSink. Just poll de UnboundedReceiver to get the orders. + +// For testing Gwyneth +const MEMPOOL_TX_THRESHOLD: usize = 1; +// Constants for L1 RPC URL and TaikoL1 address +const L1_RPC_URL: &str = "http://your_l1_rpc_url"; +const TAIKO_L1_ADDRESS: &str = "your_taiko_l1_address_here"; + +#[derive(Clone, Debug)] +struct BlockMetadata { + block_hash: H256, + parent_block_hash: H256, + parent_meta_hash: H256, + l1_hash: H256, + difficulty: U256, + blob_hash: H256, + extra_data: H256, + coinbase: Address, + l2_block_number: u64, + gas_limit: u32, + l1_state_block_number: u32, + timestamp: u64, + tx_list_byte_offset: u32, + tx_list_byte_size: u32, + blob_used: bool, +} + #[derive(Debug)] pub struct OrdersForBlock { pub new_order_sub: mpsc::UnboundedReceiver, } impl OrdersForBlock { - /// Helper to create a OrdersForBlock "wrapped" with a OrderSender2OrderSink. - /// Give this OrdersForBlock to an order pull stage and push on the returned OrderSender2OrderSink pub fn new_with_sink() -> (Self, OrderSender2OrderSink) { let (sink, sender) = OrderSender2OrderSink::new(); ( @@ -43,10 +79,8 @@ impl OrdersForBlock { } } -/// Events (orders/cancellations) for a single block #[derive(Debug, Default)] struct BundleBlockStore { - /// Bundles and SharedBundles bundles: Vec, cancelled_sbundles: Vec, } @@ -57,19 +91,12 @@ struct SinkSubscription { block_number: u64, } -/// returned by add_sink to be used on remove_sink #[derive(Debug, Eq, Hash, PartialEq, Clone)] pub struct OrderPoolSubscriptionId(u64); -/// Repository of ALL orders and cancellations that arrives us via process_commands. No processing is done here. -/// The idea is that OrderPool is alive from the start of the universe and we can ask for the -/// events (Orders and cancellations) for a particular block even if the orders arrived in the past. -/// Since by infra restrictions bundle cancellations don't have an associated block so we store them for a while and asume -/// they are valid for all in progress sinks #[derive(Debug)] pub struct OrderPool { mempool_txs: Vec<(Order, Instant)>, - /// cancelled bundle, cancellation arrival time bundle_cancellations: VecDeque<(BundleReplacementKey, Instant)>, bundles_by_target_block: HashMap, known_orders: LruCache<(OrderId, u64), ()>, @@ -95,13 +122,66 @@ impl OrderPool { } } - pub fn process_commands(&mut self, commands: Vec) { + pub async fn process_commands(&mut self, commands: Vec) { println!("Dani debug: OrderPool received {} commands to process", commands.len()); - commands.into_iter().for_each(|oc| self.process_command(oc)); + for command in commands { + self.process_command(command).await; + } println!("Dani debug: OrderPool finished processing commands"); } - fn process_order(&mut self, order: &Order) { + async fn process_command(&mut self, command: ReplaceableOrderPoolCommand) { + match &command { + ReplaceableOrderPoolCommand::Order(order) => { + println!("Dani debug: Processing order: {:?}", order.id()); + self.process_order(order).await; + }, + ReplaceableOrderPoolCommand::CancelShareBundle(c) => { + println!("Dani debug: Processing cancel share bundle: {:?}", c.key); + self.process_remove_sbundle(c); + }, + ReplaceableOrderPoolCommand::CancelBundle(key) => { + println!("Dani debug: Processing cancel bundle: {:?}", key); + self.process_remove_bundle(key); + }, + } + + let target_block = command.target_block(); + println!("Dani debug: Command target block: {:?}", target_block); + + let initial_sink_count = self.sinks.len(); + self.sinks.retain(|_, sub| { + if !sub.sink.is_alive() { + println!("Dani debug: Removing dead sink"); + return false; + } + if target_block.is_none() || target_block == Some(sub.block_number) { + let send_ok = match command.clone() { + ReplaceableOrderPoolCommand::Order(o) => { + println!("Dani debug: Inserting order into sink"); + sub.sink.insert_order(o) + }, + ReplaceableOrderPoolCommand::CancelShareBundle(cancel) => { + println!("Dani debug: Removing share bundle from sink"); + sub.sink.remove_bundle(OrderReplacementKey::ShareBundle(cancel.key)) + }, + ReplaceableOrderPoolCommand::CancelBundle(key) => { + println!("Dani debug: Removing bundle from sink"); + sub.sink.remove_bundle(OrderReplacementKey::Bundle(key)) + } + }; + if !send_ok { + println!("Dani debug: Failed to send to sink, removing sink"); + return false; + } + } + true + }); + let final_sink_count = self.sinks.len(); + println!("Dani debug: Sink count changed from {} to {}", initial_sink_count, final_sink_count); + } + + async fn process_order(&mut self, order: &Order) { let target_block = order.target_block(); let order_id = order.id(); if self @@ -115,7 +195,15 @@ impl OrderPool { let (order, target_block) = match &order { Order::Tx(..) => { + println!("Dani debug: Order TX to mempool"); self.mempool_txs.push((order.clone(), Instant::now())); + + if self.mempool_txs.len() >= MEMPOOL_TX_THRESHOLD { + if let Err(e) = self.propose_block().await { + error!("Failed to propose block: {:?}", e); + } + } + (order, None) } Order::Bundle(bundle) => { @@ -153,55 +241,93 @@ impl OrderPool { self.bundle_cancellations.push_back((*key, Instant::now())); } - fn process_command(&mut self, command: ReplaceableOrderPoolCommand) { - match &command { - ReplaceableOrderPoolCommand::Order(order) => { - println!("Dani debug: Processing order: {:?}", order.id()); - self.process_order(order) - }, - ReplaceableOrderPoolCommand::CancelShareBundle(c) => { - println!("Dani debug: Processing cancel share bundle: {:?}", c.key); - self.process_remove_sbundle(c) - }, - ReplaceableOrderPoolCommand::CancelBundle(key) => { - println!("Dani debug: Processing cancel bundle: {:?}", key); - self.process_remove_bundle(key) - }, + async fn propose_block(&mut self) -> Result<(), Box> { + // ALl i need is: + //RPC connection to localhost port 8545 and submit to the L1 Taiko contract: + + // let url = Url::parse(L1_RPC_URL)?; + // let transport = Http::new(url); + + //let provider = Provider::::try_from("L1_RPC_URL").unwrap(); + // let provider = Provider::new(RpcClient::new(transport)); + + // let tx_lists: Vec = self.mempool_txs.iter() + // .map(|(order, _)| Bytes::from(order.rlp_bytes())) + // .collect(); + + // let tx_list_hash = web3::signing::keccak256(&rlp::encode_list(&tx_lists)); + + // let meta = self.create_block_metadata(H256::from_slice(&tx_list_hash), tx_lists[0].len() as u32); + // let meta_encoded = ethabi::encode(&[ethabi::Token::Tuple(vec![ + // ethabi::Token::FixedBytes(meta.block_hash.as_bytes().to_vec()), + // ethabi::Token::FixedBytes(meta.parent_block_hash.as_bytes().to_vec()), + // ethabi::Token::FixedBytes(meta.parent_meta_hash.as_bytes().to_vec()), + // ethabi::Token::FixedBytes(meta.l1_hash.as_bytes().to_vec()), + // ethabi::Token::Uint(meta.difficulty.into()), + // ethabi::Token::FixedBytes(meta.blob_hash.as_bytes().to_vec()), + // ethabi::Token::FixedBytes(meta.extra_data.as_bytes().to_vec()), + // ethabi::Token::Address(meta.coinbase.into()), + // ethabi::Token::Uint(meta.l2_block_number.into()), + // ethabi::Token::Uint(meta.gas_limit.into()), + // ethabi::Token::Uint(meta.l1_state_block_number.into()), + // ethabi::Token::Uint(meta.timestamp.into()), + // ethabi::Token::Uint(meta.tx_list_byte_offset.into()), + // ethabi::Token::Uint(meta.tx_list_byte_size.into()), + // ethabi::Token::Bool(meta.blob_used), + // ])]); + + // let function = ethabi::Function { + // name: "proposeBlock".to_string(), + // inputs: vec![ + // ethabi::Param { name: "params".to_string(), kind: ethabi::ParamType::Array(Box::new(ethabi::ParamType::Bytes)) }, + // ethabi::Param { name: "txList".to_string(), kind: ethabi::ParamType::Array(Box::new(ethabi::ParamType::Bytes)) }, + // ], + // outputs: vec![], + // constant: false, + // state_mutability: ethabi::StateMutability::NonPayable, + // }; + + // let data = function.encode_input(&[ + // ethabi::Token::Array(vec![ethabi::Token::Bytes(meta_encoded)]), + // ethabi::Token::Array(tx_lists.into_iter().map(|b| ethabi::Token::Bytes(b.0)).collect()), + // ])?; + + // let tx_object = TransactionRequest { + // to: Some(TAIKO_L1_ADDRESS.parse()?), + // data: Some(Bytes(data)), + // ..Default::default() + // }; + + // let accounts = web3.eth().accounts().await?; + // let tx_hash = web3.eth().send_transaction(tx_object).await?; + + // println!("Block proposed successfully. Transaction hash: {:?}", tx_hash); + // self.mempool_txs.clear(); + + Ok(()) + } + + fn create_block_metadata(&self, tx_list_hash: H256, tx_list_byte_size: u32) -> BlockMetadata { + BlockMetadata { + block_hash: H256::random(), + parent_block_hash: H256::zero(), + parent_meta_hash: H256::zero(), + l1_hash: H256::zero(), + difficulty: U256::zero(), + blob_hash: tx_list_hash, + extra_data: H256::zero(), + coinbase: Address::random(), + l2_block_number: 0, + gas_limit: 15_000_000, + l1_state_block_number: 0, + timestamp: std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_secs() as u64, + tx_list_byte_offset: 0, + tx_list_byte_size, + blob_used: false, } - - let target_block = command.target_block(); - println!("Dani debug: Command target block: {:?}", target_block); - - let initial_sink_count = self.sinks.len(); - self.sinks.retain(|_, sub| { - if !sub.sink.is_alive() { - println!("Dani debug: Removing dead sink"); - return false; - } - if target_block.is_none() || target_block == Some(sub.block_number) { - let send_ok = match command.clone() { - ReplaceableOrderPoolCommand::Order(o) => { - println!("Dani debug: Inserting order into sink"); - sub.sink.insert_order(o) - }, - ReplaceableOrderPoolCommand::CancelShareBundle(cancel) => { - println!("Dani debug: Removing share bundle from sink"); - sub.sink.remove_bundle(OrderReplacementKey::ShareBundle(cancel.key)) - }, - ReplaceableOrderPoolCommand::CancelBundle(key) => { - println!("Dani debug: Removing bundle from sink"); - sub.sink.remove_bundle(OrderReplacementKey::Bundle(key)) - } - }; - if !send_ok { - println!("Dani debug: Failed to send to sink, removing sink"); - return false; - } - } - true - }); - let final_sink_count = self.sinks.len(); - println!("Dani debug: Sink count changed from {} to {}", initial_sink_count, final_sink_count); } /// Adds a sink and pushes the current state for the block diff --git a/crates/rbuilder/src/live_builder/order_input/txpool_fetcher.rs b/crates/rbuilder/src/live_builder/order_input/txpool_fetcher.rs index cfe3ffce..3fc1f31f 100644 --- a/crates/rbuilder/src/live_builder/order_input/txpool_fetcher.rs +++ b/crates/rbuilder/src/live_builder/order_input/txpool_fetcher.rs @@ -121,7 +121,6 @@ async fn get_tx_with_blobs( } else { println!("Dani debug: get_tx_with_blobs_3_2"); return Ok(None); - }; println!("Dani debug: get_tx_with_blobs_4");