From d5b7852ba5091ab74a76ddfb9792cb808dc22be4 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Thu, 19 Oct 2023 14:39:35 -0600 Subject: [PATCH 1/4] order decl --- nix/mev.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/mev.nix b/nix/mev.nix index 12fdb91e..cde9f7bd 100644 --- a/nix/mev.nix +++ b/nix/mev.nix @@ -10,8 +10,8 @@ let darwin.apple_sdk.frameworks.Network ]; nativeBuildInputs = lib.optionals pkgs.stdenv.isLinux [ - perl clang + perl ]; LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; }; From 782bc63e0afad4739525461788c05149cdfd44ca Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Thu, 19 Oct 2023 14:39:46 -0600 Subject: [PATCH 2/4] add `pkg-config` which suddenly is needed... --- nix/mev.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/mev.nix b/nix/mev.nix index cde9f7bd..aa186dab 100644 --- a/nix/mev.nix +++ b/nix/mev.nix @@ -12,6 +12,7 @@ let nativeBuildInputs = lib.optionals pkgs.stdenv.isLinux [ clang perl + pkg-config ]; LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; }; From 4cf26a72c5a3aee7a84c45152cf7118d7b025d26 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Thu, 19 Oct 2023 15:14:07 -0600 Subject: [PATCH 3/4] update to recent reth commit --- Cargo.lock | 528 ++++++++++++------ Cargo.toml | 23 +- mev-build-rs/src/reth_builder/build.rs | 8 +- mev-build-rs/src/reth_builder/builder.rs | 6 +- mev-build-rs/src/reth_builder/error.rs | 4 +- .../src/reth_builder/payload_builder.rs | 31 +- mev-build-rs/src/reth_builder/reth_compat.rs | 12 +- mev-build-rs/src/reth_builder/service.rs | 2 +- mev-build-rs/src/reth_builder/service_ext.rs | 41 +- 9 files changed, 425 insertions(+), 230 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a9017cdc..f189b463 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -136,17 +136,120 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +[[package]] +name = "alloy-dyn-abi" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e0daba57ddaba12dc9b21f608b843251f3de017f94a431dca4e7f4f72e5ba9" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "const-hex", + "derive_more", + "itoa", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-abi" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63c9319ad8b2b623c6a3ac15899f8ffb71479224762dbaedc385c16efbb6cfe3" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-primitives" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0628ec0ba5b98b3370bb6be17b12f23bfce8ee4ad83823325a20546d9b03b78" +dependencies = [ + "alloy-rlp", + "arbitrary", + "bytes", + "cfg-if", + "const-hex", + "derive_arbitrary", + "derive_more", + "getrandom 0.2.10", + "hex-literal", + "itoa", + "proptest", + "proptest-derive", + "rand 0.8.5", + "ruint", + "serde", + "tiny-keccak", +] + [[package]] name = "alloy-rlp" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc0fac0fc16baf1f63f78b47c3d24718f3619b0714076f6a02957d808d52cbef" dependencies = [ + "alloy-rlp-derive", "arrayvec", "bytes", "smol_str", ] +[[package]] +name = "alloy-rlp-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0391754c09fab4eae3404d19d0d297aa1c670c1775ab51d8a5312afeca23157" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a98ad1696a2e17f010ae8e43e9f2a1e930ed176a8e3ff77acfeff6dfb07b42c" +dependencies = [ + "const-hex", + "dunce", + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.38", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81c61ccc29e7c58bf16a2f780898852348183f58b127bde03ced6d07ad544787" +dependencies = [ + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98d7107bed88e8f09f0ddcc3335622d87bfb6821f3e0c7473329fb1cfad5e015" +dependencies = [ + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -641,6 +744,15 @@ dependencies = [ "serde", ] +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "bindgen" version = "0.64.0" @@ -704,6 +816,12 @@ dependencies = [ "syn 2.0.38", ] +[[package]] +name = "binout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "288c7b1c00556959bb7dc822d8adad4a30edd0d3a1fcc6839515792b8f300e5f" + [[package]] name = "bit-set" version = "0.5.3" @@ -735,6 +853,15 @@ dependencies = [ "serde", ] +[[package]] +name = "bitm" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7becd9fb525c1c507eb025ec37129a0d9320aee17c841085a48101f4f18c0d27" +dependencies = [ + "dyn_size_of", +] + [[package]] name = "bitvec" version = "1.0.1" @@ -1019,33 +1146,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "c-kzg" -version = "0.1.0" -source = "git+https://github.com/ethereum/c-kzg-4844?rev=f5f6f863d475847876a2bd5ee252058d37c3a15d#f5f6f863d475847876a2bd5ee252058d37c3a15d" -dependencies = [ - "bindgen 0.66.1", - "blst", - "cc", - "glob", - "hex", - "libc", - "serde", -] - -[[package]] -name = "c-kzg" -version = "0.1.0" -source = "git+https://github.com/ethereum/c-kzg-4844#d637761a2ece4f13dbcffcae09253408e430a6e1" -dependencies = [ - "bindgen 0.66.1", - "blst", - "cc", - "glob", - "hex", - "libc", -] - [[package]] name = "c-kzg" version = "0.1.1" @@ -1218,7 +1318,7 @@ checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" [[package]] name = "codecs-derive" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "convert_case 0.6.0", "parity-scale-codec", @@ -1577,6 +1677,20 @@ dependencies = [ "cipher 0.4.4", ] +[[package]] +name = "cuckoofilter" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b810a8449931679f64cd7eef1bbd0fa315801b6d5d9cdc1ace2804d6529eee18" +dependencies = [ + "byteorder", + "fnv", + "rand 0.7.3", + "serde", + "serde_bytes", + "serde_derive", +] + [[package]] name = "curve25519-dalek" version = "4.1.1" @@ -1954,6 +2068,12 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" +[[package]] +name = "dyn_size_of" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b8b8aeb5763fce4ccb8916a3c111f4b004d2de4d74b21da803f5671446cf519" + [[package]] name = "ecdsa" version = "0.14.8" @@ -2277,7 +2397,7 @@ dependencies = [ "async-stream", "blst", "bs58 0.4.0", - "c-kzg 0.1.1", + "c-kzg", "enr 0.6.2", "hex", "integer-sqrt", @@ -4038,6 +4158,12 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "lz4_flex" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ea9b256699eda7b0387ffbc776dd625e28bde3918446381781245b7a50349d8" + [[package]] name = "mach2" version = "0.4.1" @@ -4090,6 +4216,15 @@ version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +[[package]] +name = "memmap2" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.9.0" @@ -4891,6 +5026,19 @@ dependencies = [ "indexmap 2.0.2", ] +[[package]] +name = "ph" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb7b1e6e2f58e63b69c3eab9ab28bea7074d327e8334a72f16cc9096c98315b9" +dependencies = [ + "binout", + "bitm", + "dyn_size_of", + "rayon", + "wyhash", +] + [[package]] name = "pharos" version = "0.5.3" @@ -5522,8 +5670,9 @@ dependencies = [ [[package]] name = "reth" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-rlp", "aquamarine", "backon", "boyer-moore-magiclen", @@ -5536,10 +5685,10 @@ dependencies = [ "eyre", "fdlimit", "futures", - "hex", "human_bytes", "humantime", "hyper", + "itertools 0.11.0", "jemalloc-ctl", "jemallocator", "metrics", @@ -5549,6 +5698,7 @@ dependencies = [ "pin-project", "pretty_assertions", "proptest", + "rand 0.8.5", "reth-auto-seal-consensus", "reth-basic-payload-builder", "reth-beacon-consensus", @@ -5563,18 +5713,20 @@ dependencies = [ "reth-net-nat", "reth-network", "reth-network-api", + "reth-nippy-jar", "reth-payload-builder", "reth-primitives", "reth-provider", "reth-prune", "reth-revm", "reth-revm-inspectors", - "reth-rlp", "reth-rpc", "reth-rpc-api", "reth-rpc-builder", "reth-rpc-engine-api", "reth-rpc-types", + "reth-rpc-types-compat", + "reth-snapshot", "reth-stages", "reth-tasks", "reth-tracing", @@ -5587,7 +5739,7 @@ dependencies = [ "tempfile", "thiserror", "tokio", - "toml 0.7.8", + "toml 0.8.2", "tracing", "tui", "vergen", @@ -5596,7 +5748,7 @@ dependencies = [ [[package]] name = "reth-auto-seal-consensus" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "futures-util", "reth-beacon-consensus", @@ -5614,8 +5766,9 @@ dependencies = [ [[package]] name = "reth-basic-payload-builder" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-rlp", "futures-core", "futures-util", "metrics", @@ -5625,7 +5778,6 @@ dependencies = [ "reth-primitives", "reth-provider", "reth-revm", - "reth-rlp", "reth-tasks", "reth-transaction-pool", "revm", @@ -5636,7 +5788,7 @@ dependencies = [ [[package]] name = "reth-beacon-consensus" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "futures", "metrics", @@ -5650,6 +5802,7 @@ dependencies = [ "reth-prune", "reth-rpc-types", "reth-rpc-types-compat", + "reth-snapshot", "reth-stages", "reth-tasks", "schnellru", @@ -5662,7 +5815,7 @@ dependencies = [ [[package]] name = "reth-blockchain-tree" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "aquamarine", "linked_hash_set", @@ -5675,13 +5828,14 @@ dependencies = [ "reth-primitives", "reth-provider", "reth-stages", + "tokio", "tracing", ] [[package]] name = "reth-codecs" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "arbitrary", "bytes", @@ -5694,7 +5848,7 @@ dependencies = [ [[package]] name = "reth-config" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "confy", "reth-discv4", @@ -5712,7 +5866,7 @@ dependencies = [ [[package]] name = "reth-consensus-common" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "reth-interfaces", "reth-primitives", @@ -5722,7 +5876,7 @@ dependencies = [ [[package]] name = "reth-db" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "arbitrary", "bytes", @@ -5735,6 +5889,7 @@ dependencies = [ "page_size", "parity-scale-codec", "parking_lot 0.12.1", + "paste", "postcard", "proptest", "proptest-derive", @@ -5743,7 +5898,9 @@ dependencies = [ "reth-interfaces", "reth-libmdbx", "reth-metrics", + "reth-nippy-jar", "reth-primitives", + "reth-tracing", "serde", "tempfile", "thiserror", @@ -5754,18 +5911,17 @@ dependencies = [ [[package]] name = "reth-discv4" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-rlp", "discv5", "enr 0.9.1", "generic-array", - "hex", "parking_lot 0.12.1", "reth-net-common", "reth-net-nat", "reth-primitives", - "reth-rlp", - "reth-rlp-derive", + "rlp", "secp256k1", "serde", "thiserror", @@ -5777,8 +5933,9 @@ dependencies = [ [[package]] name = "reth-dns-discovery" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-rlp", "async-trait", "data-encoding", "enr 0.9.1", @@ -5786,7 +5943,6 @@ dependencies = [ "parking_lot 0.12.1", "reth-net-common", "reth-primitives", - "reth-rlp", "schnellru", "secp256k1", "serde", @@ -5801,8 +5957,9 @@ dependencies = [ [[package]] name = "reth-downloaders" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-rlp", "futures", "futures-util", "itertools 0.11.0", @@ -5813,7 +5970,6 @@ dependencies = [ "reth-interfaces", "reth-metrics", "reth-primitives", - "reth-rlp", "reth-tasks", "tempfile", "thiserror", @@ -5826,9 +5982,10 @@ dependencies = [ [[package]] name = "reth-ecies" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "aes 0.8.3", + "alloy-rlp", "block-padding", "byteorder", "cipher 0.4.4", @@ -5842,7 +5999,6 @@ dependencies = [ "rand 0.8.5", "reth-net-common", "reth-primitives", - "reth-rlp", "secp256k1", "sha2 0.10.8", "sha3", @@ -5857,11 +6013,11 @@ dependencies = [ [[package]] name = "reth-eth-wire" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-rlp", "async-trait", "bytes", - "ethers-core", "futures", "metrics", "pin-project", @@ -5870,9 +6026,7 @@ dependencies = [ "reth-ecies", "reth-metrics", "reth-primitives", - "reth-rlp", "serde", - "smol_str", "snap", "thiserror", "tokio", @@ -5884,7 +6038,7 @@ dependencies = [ [[package]] name = "reth-interfaces" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "async-trait", "auto_impl", @@ -5897,6 +6051,7 @@ dependencies = [ "reth-codecs", "reth-eth-wire", "reth-network-api", + "reth-nippy-jar", "reth-primitives", "reth-rpc-types", "revm-primitives", @@ -5910,7 +6065,7 @@ dependencies = [ [[package]] name = "reth-ipc" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "async-trait", "bytes", @@ -5930,7 +6085,7 @@ dependencies = [ [[package]] name = "reth-libmdbx" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "bitflags 2.4.1", "byteorder", @@ -5945,7 +6100,7 @@ dependencies = [ [[package]] name = "reth-mdbx-sys" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "bindgen 0.68.1", "cc", @@ -5955,7 +6110,7 @@ dependencies = [ [[package]] name = "reth-metrics" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "futures", "metrics", @@ -5967,7 +6122,7 @@ dependencies = [ [[package]] name = "reth-metrics-derive" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "once_cell", "proc-macro2", @@ -5979,7 +6134,7 @@ dependencies = [ [[package]] name = "reth-net-common" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "pin-project", "reth-primitives", @@ -5989,7 +6144,7 @@ dependencies = [ [[package]] name = "reth-net-nat" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "igd", "pin-project-lite", @@ -6003,8 +6158,9 @@ dependencies = [ [[package]] name = "reth-network" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-rlp", "aquamarine", "async-trait", "auto_impl", @@ -6028,8 +6184,6 @@ dependencies = [ "reth-network-api", "reth-primitives", "reth-provider", - "reth-rlp", - "reth-rlp-derive", "reth-rpc-types", "reth-tasks", "reth-transaction-pool", @@ -6046,7 +6200,7 @@ dependencies = [ [[package]] name = "reth-network-api" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "async-trait", "reth-discv4", @@ -6058,18 +6212,40 @@ dependencies = [ "tokio", ] +[[package]] +name = "reth-nippy-jar" +version = "0.1.0-alpha.10" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" +dependencies = [ + "anyhow", + "bincode", + "bytes", + "cuckoofilter", + "hex", + "lz4_flex", + "memmap2", + "ph", + "serde", + "sucds 0.8.1", + "tempfile", + "thiserror", + "tracing", + "tracing-appender", + "zstd 0.12.4", +] + [[package]] name = "reth-payload-builder" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-rlp", "futures-util", "metrics", "reth-interfaces", "reth-metrics", "reth-primitives", "reth-revm-primitives", - "reth-rlp", "reth-rpc-types", "reth-rpc-types-compat", "reth-transaction-pool", @@ -6084,41 +6260,36 @@ dependencies = [ [[package]] name = "reth-primitives" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", "arbitrary", + "byteorder", "bytes", - "c-kzg 0.1.0 (git+https://github.com/ethereum/c-kzg-4844?rev=f5f6f863d475847876a2bd5ee252058d37c3a15d)", + "c-kzg", + "clap", "crc", - "crunchy", "derive_more", - "ethers-core", - "fixed-hash", - "hex", - "hex-literal", - "impl-serde", "itertools 0.11.0", "modular-bitfield", + "num_enum 0.7.0", "once_cell", - "paste", "proptest", "proptest-derive", "rayon", "reth-codecs", - "reth-rlp", - "reth-rlp-derive", "revm-primitives", - "ruint", "secp256k1", "serde", "serde_json", "serde_with", "sha2 0.10.8", "strum 0.25.0", - "sucds", + "sucds 0.6.0", "tempfile", "thiserror", - "tiny-keccak", "tokio", "tokio-stream", "tracing", @@ -6129,8 +6300,9 @@ dependencies = [ [[package]] name = "reth-provider" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-rlp", "auto_impl", "itertools 0.11.0", "parking_lot 0.12.1", @@ -6138,10 +6310,11 @@ dependencies = [ "rayon", "reth-db", "reth-interfaces", + "reth-nippy-jar", "reth-primitives", "reth-revm-primitives", - "reth-rlp", "reth-trie", + "revm", "tokio", "tokio-stream", "tracing", @@ -6150,7 +6323,7 @@ dependencies = [ [[package]] name = "reth-prune" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "itertools 0.11.0", "metrics", @@ -6160,7 +6333,9 @@ dependencies = [ "reth-metrics", "reth-primitives", "reth-provider", + "reth-snapshot", "thiserror", + "tokio", "tokio-stream", "tracing", ] @@ -6168,7 +6343,7 @@ dependencies = [ [[package]] name = "reth-revm" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "reth-consensus-common", "reth-interfaces", @@ -6183,67 +6358,42 @@ dependencies = [ [[package]] name = "reth-revm-inspectors" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-sol-types", "boa_engine", "boa_gc", - "hashbrown 0.14.1", - "icu_collections", - "icu_provider_macros", "reth-primitives", "reth-rpc-types", "revm", "serde", "serde_json", "thiserror", - "tinystr", "tokio", ] [[package]] name = "reth-revm-primitives" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "reth-primitives", "revm", ] -[[package]] -name = "reth-rlp" -version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", - "c-kzg 0.1.0 (git+https://github.com/ethereum/c-kzg-4844?rev=f5f6f863d475847876a2bd5ee252058d37c3a15d)", - "ethereum-types", - "reth-rlp-derive", - "revm-primitives", - "smol_str", -] - -[[package]] -name = "reth-rlp-derive" -version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.38", -] - [[package]] name = "reth-rpc" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-dyn-abi", + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", "async-trait", "bytes", - "ethers-core", + "derive_more", "futures", - "hex", "http", "http-body", "hyper", @@ -6261,7 +6411,6 @@ dependencies = [ "reth-primitives", "reth-provider", "reth-revm", - "reth-rlp", "reth-rpc-api", "reth-rpc-engine-api", "reth-rpc-types", @@ -6286,7 +6435,7 @@ dependencies = [ [[package]] name = "reth-rpc-api" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "jsonrpsee", "reth-primitives", @@ -6297,7 +6446,7 @@ dependencies = [ [[package]] name = "reth-rpc-builder" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "hyper", "jsonrpsee", @@ -6326,13 +6475,15 @@ dependencies = [ [[package]] name = "reth-rpc-engine-api" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "async-trait", "jsonrpsee-core", "jsonrpsee-types", + "metrics", "reth-beacon-consensus", "reth-interfaces", + "reth-metrics", "reth-payload-builder", "reth-primitives", "reth-provider", @@ -6348,12 +6499,13 @@ dependencies = [ [[package]] name = "reth-rpc-types" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-primitives", + "alloy-rlp", "itertools 0.11.0", "jsonrpsee-types", "reth-primitives", - "reth-rlp", "serde", "serde_json", "thiserror", @@ -6362,17 +6514,33 @@ dependencies = [ [[package]] name = "reth-rpc-types-compat" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-rlp", "reth-primitives", - "reth-rlp", "reth-rpc-types", ] +[[package]] +name = "reth-snapshot" +version = "0.1.0-alpha.10" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" +dependencies = [ + "clap", + "reth-db", + "reth-interfaces", + "reth-nippy-jar", + "reth-primitives", + "reth-provider", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "reth-stages" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "aquamarine", "async-trait", @@ -6400,7 +6568,7 @@ dependencies = [ [[package]] name = "reth-tasks" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "dyn-clone", "futures-util", @@ -6415,7 +6583,7 @@ dependencies = [ [[package]] name = "reth-tracing" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ "rolling-file", "tracing", @@ -6427,8 +6595,9 @@ dependencies = [ [[package]] name = "reth-transaction-pool" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-rlp", "aquamarine", "async-trait", "auto_impl", @@ -6443,8 +6612,9 @@ dependencies = [ "reth-metrics", "reth-primitives", "reth-provider", - "reth-rlp", + "reth-revm-primitives", "reth-tasks", + "revm", "serde", "thiserror", "tokio", @@ -6455,14 +6625,14 @@ dependencies = [ [[package]] name = "reth-trie" version = "0.1.0-alpha.10" -source = "git+https://github.com/paradigmxyz/reth?rev=1b16d804ef01f4ec3c25e7986381c22739c105b9#1b16d804ef01f4ec3c25e7986381c22739c105b9" +source = "git+https://github.com/paradigmxyz/reth?rev=5dd5555c5c7d8e43420e273e7005b8af63a847a5#5dd5555c5c7d8e43420e273e7005b8af63a847a5" dependencies = [ + "alloy-rlp", + "auto_impl", "derive_more", - "hex", "reth-db", "reth-interfaces", "reth-primitives", - "reth-rlp", "thiserror", "tokio", "tracing", @@ -6470,8 +6640,9 @@ dependencies = [ [[package]] name = "revm" -version = "3.3.0" -source = "git+https://github.com/bluealloy/revm/?rev=516f62cc#516f62ccc1c5f2a62e5fc58115213fe04c7f7a8c" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f4ca8ae0345104523b4af1a8a7ea97cfa1865cdb7a7c25d23c1a18d9b48598" dependencies = [ "auto_impl", "revm-interpreter", @@ -6480,22 +6651,20 @@ dependencies = [ [[package]] name = "revm-interpreter" -version = "1.1.2" -source = "git+https://github.com/bluealloy/revm/?rev=516f62cc#516f62ccc1c5f2a62e5fc58115213fe04c7f7a8c" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f959cafdf64a7f89b014fa73dc2325001cf654b3d9400260b212d19a2ebe3da0" dependencies = [ - "derive_more", - "enumn", "revm-primitives", - "sha3", ] [[package]] name = "revm-precompile" -version = "2.0.3" -source = "git+https://github.com/bluealloy/revm/?rev=516f62cc#516f62ccc1c5f2a62e5fc58115213fe04c7f7a8c" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d360a88223d85709d2e95d4609eb1e19c649c47e28954bfabae5e92bb37e83e" dependencies = [ - "c-kzg 0.1.0 (git+https://github.com/ethereum/c-kzg-4844)", - "hex", + "c-kzg", "k256 0.13.1", "num", "once_cell", @@ -6503,35 +6672,26 @@ dependencies = [ "ripemd", "secp256k1", "sha2 0.10.8", - "sha3", "substrate-bn", ] [[package]] name = "revm-primitives" -version = "1.1.2" -source = "git+https://github.com/bluealloy/revm/?rev=516f62cc#516f62ccc1c5f2a62e5fc58115213fe04c7f7a8c" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51187b852d9e458816a2e19c81f1dd6c924077e1a8fccd16e4f044f865f299d7" dependencies = [ - "arbitrary", + "alloy-primitives", + "alloy-rlp", "auto_impl", "bitflags 2.4.1", "bitvec", - "bytes", - "c-kzg 0.1.0 (git+https://github.com/ethereum/c-kzg-4844)", - "derive_more", + "c-kzg", "enumn", - "fixed-hash", "hashbrown 0.14.1", "hex", - "hex-literal", "once_cell", - "primitive-types", - "proptest", - "proptest-derive", - "rlp", - "ruint", "serde", - "sha3", ] [[package]] @@ -7000,6 +7160,15 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde_bytes" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" +dependencies = [ + "serde", +] + [[package]] name = "serde_derive" version = "1.0.189" @@ -7500,6 +7669,16 @@ dependencies = [ "anyhow", ] +[[package]] +name = "sucds" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53d46182afe6ed822a94c54a532dc0d59691a8f49226bdc4596529ca864cdd6" +dependencies = [ + "anyhow", + "num-traits", +] + [[package]] name = "svm-rs" version = "0.3.0" @@ -7542,6 +7721,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b837ef12ab88835251726eb12237655e61ec8dc8a280085d1961cdc3dfd047" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "sync_wrapper" version = "0.1.2" @@ -8745,6 +8936,15 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wyhash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf6e163c25e3fac820b4b453185ea2dea3b6a3e0a721d4d23d75bd33734c295" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "wyz" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index 053b5b6f..a55e137a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,17 +10,12 @@ version = "0.3.0" ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "c84f44ee7ec04613adf5f2be845df35e05de1efc" } beacon-api-client = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "c84f44ee7ec04613adf5f2be845df35e05de1efc" } -reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "1b16d804ef01f4ec3c25e7986381c22739c105b9" } -reth-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "1b16d804ef01f4ec3c25e7986381c22739c105b9" } -reth-provider = { git = "https://github.com/paradigmxyz/reth", rev = "1b16d804ef01f4ec3c25e7986381c22739c105b9" } -reth-rpc-types = { git = "https://github.com/paradigmxyz/reth", rev = "1b16d804ef01f4ec3c25e7986381c22739c105b9" } -reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", rev = "1b16d804ef01f4ec3c25e7986381c22739c105b9" } -reth-interfaces = { git = "https://github.com/paradigmxyz/reth", rev = "1b16d804ef01f4ec3c25e7986381c22739c105b9" } -reth-revm = { git = "https://github.com/paradigmxyz/reth", rev = "1b16d804ef01f4ec3c25e7986381c22739c105b9" } - -reth = { git = "https://github.com/paradigmxyz/reth", rev = "1b16d804ef01f4ec3c25e7986381c22739c105b9" } -revm = { git = "https://github.com/bluealloy/revm/", rev = "516f62cc" } - -[patch.crates-io] -revm = { git = "https://github.com/bluealloy/revm/", rev = "516f62cc" } -revm-primitives = { git = "https://github.com/bluealloy/revm/", rev = "516f62cc" } +reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "5dd5555c5c7d8e43420e273e7005b8af63a847a5" } +reth-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "5dd5555c5c7d8e43420e273e7005b8af63a847a5" } +reth-provider = { git = "https://github.com/paradigmxyz/reth", rev = "5dd5555c5c7d8e43420e273e7005b8af63a847a5" } +reth-rpc-types = { git = "https://github.com/paradigmxyz/reth", rev = "5dd5555c5c7d8e43420e273e7005b8af63a847a5" } +reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", rev = "5dd5555c5c7d8e43420e273e7005b8af63a847a5" } +reth-interfaces = { git = "https://github.com/paradigmxyz/reth", rev = "5dd5555c5c7d8e43420e273e7005b8af63a847a5" } +reth-revm = { git = "https://github.com/paradigmxyz/reth", rev = "5dd5555c5c7d8e43420e273e7005b8af63a847a5" } +reth = { git = "https://github.com/paradigmxyz/reth", rev = "5dd5555c5c7d8e43420e273e7005b8af63a847a5" } +revm = "3.5.0" diff --git a/mev-build-rs/src/reth_builder/build.rs b/mev-build-rs/src/reth_builder/build.rs index cb293cf5..2517b6f0 100644 --- a/mev-build-rs/src/reth_builder/build.rs +++ b/mev-build-rs/src/reth_builder/build.rs @@ -14,7 +14,7 @@ use mev_rs::{ signing::sign_builder_message, types::{BidTrace, SignedBidSubmission}, }; -use reth_primitives::{Bytes, ChainSpec, SealedBlock, Withdrawal, H256, U256}; +use reth_primitives::{Bytes, ChainSpec, SealedBlock, Withdrawal, B256, U256}; use revm::primitives::{BlockEnv, CfgEnv}; use std::sync::{Arc, Mutex}; @@ -48,11 +48,11 @@ fn make_submission( #[derive(Debug, Clone)] pub struct BuildContext { pub slot: Slot, - pub parent_hash: H256, + pub parent_hash: B256, pub proposer: BlsPublicKey, pub timestamp: u64, pub proposer_fee_recipient: ExecutionAddress, - pub prev_randao: H256, + pub prev_randao: B256, pub withdrawals: Vec, pub relays: Vec, pub chain_spec: Arc, @@ -69,7 +69,7 @@ pub struct BuildContext { pub subsidy: U256, } -pub fn compute_build_id(slot: Slot, parent_hash: H256, proposer: &BlsPublicKey) -> BuildIdentifier { +pub fn compute_build_id(slot: Slot, parent_hash: B256, proposer: &BlsPublicKey) -> BuildIdentifier { let mut data = Vec::with_capacity(88); slot.serialize(&mut data).expect("can serialize"); parent_hash.serialize(&mut data).expect("can serialize"); diff --git a/mev-build-rs/src/reth_builder/builder.rs b/mev-build-rs/src/reth_builder/builder.rs index 49d1e00f..f464addf 100644 --- a/mev-build-rs/src/reth_builder/builder.rs +++ b/mev-build-rs/src/reth_builder/builder.rs @@ -10,7 +10,7 @@ use ethereum_consensus::{ use ethers::signers::{LocalWallet, Signer}; use mev_rs::{blinded_block_relayer::BlindedBlockRelayer, types::ProposerSchedule, Relay}; use reth_payload_builder::PayloadBuilderAttributes; -use reth_primitives::{BlockNumberOrTag, Bytes, ChainSpec, H256, U256}; +use reth_primitives::{Address, BlockNumberOrTag, Bytes, ChainSpec, B256, U256}; use reth_provider::{BlockReaderIdExt, BlockSource, StateProviderFactory}; use reth_transaction_pool::TransactionPool; use std::{ @@ -313,7 +313,7 @@ impl Bui fn construct_build_context( &self, slot: Slot, - parent_hash: H256, + parent_hash: B256, proposer: &BlsPublicKey, payload_attributes: PayloadBuilderAttributes, validator_preferences: &ValidatorPreferences, @@ -345,7 +345,7 @@ impl Bui // TODO: configurable "fee collection strategy" // fee collection strategy: drive all fees to builder - block_env.coinbase = self.builder_wallet.address().into(); + block_env.coinbase = Address::from(self.builder_wallet.address().to_fixed_bytes()); let subsidy = U256::from(self.subsidy_gwei); let subsidy_in_wei = subsidy * U256::from(10u64.pow(9)); diff --git a/mev-build-rs/src/reth_builder/error.rs b/mev-build-rs/src/reth_builder/error.rs index 164618fe..e8cda55f 100644 --- a/mev-build-rs/src/reth_builder/error.rs +++ b/mev-build-rs/src/reth_builder/error.rs @@ -1,7 +1,7 @@ use crate::reth_builder::build::BuildIdentifier; use ethereum_consensus::{primitives::Slot, Error as ConsensusError}; use reth_interfaces::RethError; -use reth_primitives::H256; +use reth_primitives::B256; use revm::primitives::EVMError; use thiserror::Error; @@ -12,7 +12,7 @@ pub enum Error { #[error("missing a build request with identifier {0}")] MissingBuild(BuildIdentifier), #[error("missing parent block {0}")] - MissingParentBlock(H256), + MissingParentBlock(B256), #[error("payload requested but build {0} has not produced one yet")] PayloadNotPrepared(BuildIdentifier), #[error("{0}")] diff --git a/mev-build-rs/src/reth_builder/payload_builder.rs b/mev-build-rs/src/reth_builder/payload_builder.rs index d566ae54..c898ae82 100644 --- a/mev-build-rs/src/reth_builder/payload_builder.rs +++ b/mev-build-rs/src/reth_builder/payload_builder.rs @@ -8,14 +8,15 @@ use crate::reth_builder::{ use ethers::{ signers::Signer, types::{ - transaction::eip2718::TypedTransaction, Eip1559TransactionRequest, H160 as ethers_H160, + transaction::eip2718::TypedTransaction, Eip1559TransactionRequest, H160, + U256 as ethers_U256, }, }; use reth_interfaces::RethError; use reth_primitives::{ constants::{BEACON_NONCE, EMPTY_OMMER_ROOT}, - proofs, Block, Bytes, ChainSpec, Header, IntoRecoveredTransaction, Receipt, TransactionSigned, - TransactionSignedEcRecovered, Withdrawal, H256, U256, + proofs, Address, Block, Bytes, ChainSpec, Header, IntoRecoveredTransaction, Receipt, Receipts, + TransactionSigned, TransactionSignedEcRecovered, Withdrawal, B256, U256, }; use reth_provider::{BundleStateWithReceipts, StateProvider, StateProviderFactory}; use reth_revm::{ @@ -34,7 +35,7 @@ fn process_withdrawals>( chain_spec: &ChainSpec, db: &mut State, timestamp: u64, -) -> Result { +) -> Result { let balance_increments = post_block_withdrawals_balance_increments(chain_spec, timestamp, withdrawals); db.increment_balances(balance_increments)?; @@ -111,10 +112,10 @@ fn assemble_payload_with_payments( let transactions_root = proofs::calculate_transaction_root(&context.executed_txs); let state_root = client.latest()?.state_root(&bundle_state.clone())?; - let receipts = bundle_state.receipts_by_block(block_number); + let receipts = bundle_state.receipts_by_block(block_number).to_vec(); let bundle = BundleStateWithReceipts::new( context.db.take_bundle(), - vec![receipts.to_vec()], + Receipts::from_vec(vec![receipts]), block_number, ); let receipts_root = bundle.receipts_root_slow(block_number).expect("Number is in range"); @@ -130,7 +131,7 @@ fn assemble_payload_with_payments( receipts_root, logs_bloom, timestamp: context.build.timestamp, - mix_hash: H256::from_slice(context.build.prev_randao.as_ref()), + mix_hash: B256::from_slice(context.build.prev_randao.as_ref()), nonce: BEACON_NONCE, base_fee_per_gas: Some(base_fee), number: block_number, @@ -162,11 +163,13 @@ fn construct_payment_tx( context: &mut ExecutionContext, ) -> Result { let sender = context.build.builder_wallet.address(); - let signer_account = context.db.load_cache_account(sender.into())?; + let reth_sender = Address::from(sender.to_fixed_bytes()); + let signer_account = context.db.load_cache_account(reth_sender)?; let nonce = signer_account.account_info().expect("account exists").nonce; let chain_id = context.build.chain_spec.genesis().config.chain_id; - let fee_recipient = ethers_H160::from_slice(context.build.proposer_fee_recipient.as_ref()); + let fee_recipient = H160::from_slice(context.build.proposer_fee_recipient.as_ref()); + let value = ethers_U256::from_big_endian(&context.total_payment.to_be_bytes::<32>()); let tx = Eip1559TransactionRequest::new() .from(sender) .to(fee_recipient) @@ -174,7 +177,7 @@ fn construct_payment_tx( .gas(21000) .max_fee_per_gas(context.build.base_fee()) .max_priority_fee_per_gas(0) - .value(context.total_payment) + .value(value) .data(ethers::types::Bytes::default()) .access_list(ethers::types::transaction::eip2930::AccessList::default()) .nonce(nonce) @@ -185,10 +188,10 @@ fn construct_payment_tx( let signature = wallet.sign_transaction_sync(&tx).expect("can make transaction"); let tx_encoded = tx.rlp_signed(&signature); - let payment_tx = TransactionSigned::decode_enveloped(Bytes::from(tx_encoded.as_ref())) - .expect("can decode valid txn"); + let tx_encoded = Bytes::from(tx_encoded.0); + let payment_tx = TransactionSigned::decode_enveloped(tx_encoded).expect("can decode valid txn"); - Ok(TransactionSignedEcRecovered::from_signed_transaction(payment_tx, sender.into())) + Ok(TransactionSignedEcRecovered::from_signed_transaction(payment_tx, reth_sender)) } struct ExecutionContext<'a> { @@ -226,7 +229,7 @@ impl<'a> ExecutionContext<'a> { revm::State::builder().with_database_ref(StateProviderDatabase::new(state)).build(); let bundle_state = BundleStateWithReceipts::new( db.take_bundle(), - vec![], + Receipts::default(), u64::from_le_bytes(context.block_env.number.to_le_bytes()), ); Ok(ExecutionContext { diff --git a/mev-build-rs/src/reth_builder/reth_compat.rs b/mev-build-rs/src/reth_builder/reth_compat.rs index b0131c23..8f34e125 100644 --- a/mev-build-rs/src/reth_builder/reth_compat.rs +++ b/mev-build-rs/src/reth_builder/reth_compat.rs @@ -7,18 +7,18 @@ use ethereum_consensus::{ }, }; use mev_rs::types::ExecutionPayload; -use reth_primitives::{Bloom, SealedBlock, H160, H256, U256}; +use reth_primitives::{Address, Bloom, SealedBlock, B256, U256}; -pub(crate) fn to_bytes32(value: H256) -> Bytes32 { - Bytes32::try_from(value.as_bytes()).unwrap() +pub(crate) fn to_bytes32(value: B256) -> Bytes32 { + Bytes32::try_from(value.as_ref()).unwrap() } -fn to_bytes20(value: H160) -> ExecutionAddress { - ExecutionAddress::try_from(value.as_bytes()).unwrap() +fn to_bytes20(value: Address) -> ExecutionAddress { + ExecutionAddress::try_from(value.as_ref()).unwrap() } fn to_byte_vector(value: Bloom) -> ByteVector<256> { - ByteVector::<256>::try_from(value.as_bytes()).unwrap() + ByteVector::<256>::try_from(value.as_ref()).unwrap() } pub(crate) fn to_u256(value: &U256) -> ssz_rs::U256 { diff --git a/mev-build-rs/src/reth_builder/service.rs b/mev-build-rs/src/reth_builder/service.rs index c2624003..becefe30 100644 --- a/mev-build-rs/src/reth_builder/service.rs +++ b/mev-build-rs/src/reth_builder/service.rs @@ -101,7 +101,7 @@ impl< pool, client, chain_spec, - Bytes::from(config.extra_data.as_bytes()), + Bytes::from(config.extra_data), builder_wallet, config.bid_percent.unwrap_or(DEFAULT_BID_PERCENT), config.subsidy_gwei.unwrap_or_default(), diff --git a/mev-build-rs/src/reth_builder/service_ext.rs b/mev-build-rs/src/reth_builder/service_ext.rs index dcadc0b8..7168e06c 100644 --- a/mev-build-rs/src/reth_builder/service_ext.rs +++ b/mev-build-rs/src/reth_builder/service_ext.rs @@ -5,12 +5,16 @@ use ethereum_consensus::{ state_transition::Context, }; use reth::{ - cli::ext::{RethCliExt, RethNodeCommandConfig}, + cli::{ + components::RethNodeComponents, + config::PayloadBuilderConfig, + ext::{RethCliExt, RethNodeCommandConfig}, + }, node::NodeCommand, runner::CliContext, - tasks::TaskManager, + tasks::{TaskManager, TaskSpawner}, }; -use reth_payload_builder::PayloadBuilderService; +use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService}; use std::{sync::Arc, time::Duration}; use tracing::warn; @@ -56,23 +60,14 @@ impl RethCliExt for ServiceExt { } impl RethNodeCommandConfig for ServiceExt { - fn spawn_payload_builder_service( + fn spawn_payload_builder_service( &mut self, _conf: &Conf, - provider: Provider, - pool: Pool, - executor: Tasks, - chain_spec: std::sync::Arc, - ) -> eyre::Result + components: &Reth, + ) -> eyre::Result where - Conf: reth::cli::config::PayloadBuilderConfig, - Provider: reth::providers::StateProviderFactory - + reth::providers::BlockReaderIdExt - + Clone - + Unpin - + 'static, - Pool: reth::transaction_pool::TransactionPool + Unpin + 'static, - Tasks: reth::tasks::TaskSpawner + Clone + Unpin + 'static, + Conf: PayloadBuilderConfig, + Reth: RethNodeComponents, { let build_config = self.config.clone(); let network = &self.network; @@ -87,10 +82,10 @@ impl RethNodeCommandConfig for ServiceExt { build_config, context, clock, - pool.clone(), - provider.clone(), + components.pool(), + components.provider(), bidder, - chain_spec.clone(), + components.chain_spec(), ) .unwrap(); @@ -110,8 +105,10 @@ impl RethNodeCommandConfig for ServiceExt { } }); - executor.spawn_critical("boost builder", fut); - executor.spawn_critical("payload builder service", Box::pin(payload_service)); + components.task_executor().spawn_critical("boost builder", fut); + components + .task_executor() + .spawn_critical("payload builder service", Box::pin(payload_service)); Ok(payload_builder) } From 00945be504244d97637d84f336c87a167e72936e Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Thu, 19 Oct 2023 16:22:03 -0600 Subject: [PATCH 4/4] use patched revm-primitives for "pure" building --- Cargo.lock | 3 +-- Cargo.toml | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f189b463..35f6dfed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6678,8 +6678,7 @@ dependencies = [ [[package]] name = "revm-primitives" version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51187b852d9e458816a2e19c81f1dd6c924077e1a8fccd16e4f044f865f299d7" +source = "git+https://github.com/ralexstokes/revm?rev=929530a5b2575c97f3c055f4f8d8b9ba273cb3dd#929530a5b2575c97f3c055f4f8d8b9ba273cb3dd" dependencies = [ "alloy-primitives", "alloy-rlp", diff --git a/Cargo.toml b/Cargo.toml index a55e137a..5b87a762 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,3 +19,10 @@ reth-interfaces = { git = "https://github.com/paradigmxyz/reth", rev = "5dd5555c reth-revm = { git = "https://github.com/paradigmxyz/reth", rev = "5dd5555c5c7d8e43420e273e7005b8af63a847a5" } reth = { git = "https://github.com/paradigmxyz/reth", rev = "5dd5555c5c7d8e43420e273e7005b8af63a847a5" } revm = "3.5.0" + +[patch.crates-io] +# We patch `revm-primitives` so that all generated files go into the expected place ("OUT_DIR") which +# works well with rust `nix` builders and does not work well otherwise. +# TODO: It looks like later versions of this crate remove the problematic build script and so once `reth` updates +# (which indirectly uses this dependency) then we can drop this patch. +revm-primitives = { git = "https://github.com/ralexstokes/revm", rev = "929530a5b2575c97f3c055f4f8d8b9ba273cb3dd" }