From aea81afb7f5b1c30e7494fa6b8cd6798d78510d1 Mon Sep 17 00:00:00 2001 From: Oliver Nordbjerg Date: Mon, 6 May 2024 15:08:45 +0200 Subject: [PATCH] chore: bump alloy --- Cargo.lock | 152 +++++++++++++----- Cargo.toml | 38 +++-- .../rpc-types-compat/src/engine/payload.rs | 13 +- crates/rpc/rpc-types/src/beacon/payload.rs | 4 + 4 files changed, 154 insertions(+), 53 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1a984e04de8be..66bdbb821ba96 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -143,6 +143,19 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-consensus" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" +dependencies = [ + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", + "c-kzg", + "serde", +] + [[package]] name = "alloy-consensus" version = "0.1.0" @@ -182,6 +195,20 @@ dependencies = [ "alloy-primitives", "alloy-rlp", "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "c-kzg", + "once_cell", + "serde", + "sha2 0.10.8", +] + +[[package]] +name = "alloy-eips" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "arbitrary", "c-kzg", "derive_more", @@ -219,6 +246,17 @@ dependencies = [ "serde_json", ] +[[package]] +name = "alloy-genesis" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" +dependencies = [ + "alloy-primitives", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", + "serde", + "serde_json", +] + [[package]] name = "alloy-genesis" version = "0.1.0" @@ -245,7 +283,7 @@ dependencies = [ [[package]] name = "alloy-json-rpc" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=17c5650#17c5650f91472b3c0e29ea5cede6ce2bc7f87018" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" dependencies = [ "alloy-primitives", "serde", @@ -257,13 +295,13 @@ dependencies = [ [[package]] name = "alloy-network" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=17c5650#17c5650f91472b3c0e29ea5cede6ce2bc7f87018" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" dependencies = [ - "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", - "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "alloy-json-rpc", "alloy-primitives", - "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "alloy-signer", "alloy-sol-types", "async-trait", @@ -274,9 +312,9 @@ dependencies = [ [[package]] name = "alloy-node-bindings" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=17c5650#17c5650f91472b3c0e29ea5cede6ce2bc7f87018" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" dependencies = [ - "alloy-genesis 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-genesis 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "alloy-primitives", "k256", "serde_json", @@ -316,15 +354,15 @@ dependencies = [ [[package]] name = "alloy-provider" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=17c5650#17c5650f91472b3c0e29ea5cede6ce2bc7f87018" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" dependencies = [ - "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "alloy-json-rpc", "alloy-network", "alloy-primitives", "alloy-rpc-client", - "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", - "alloy-rpc-types-trace", + "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", + "alloy-rpc-types-trace 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "alloy-transport", "alloy-transport-http", "async-stream", @@ -366,7 +404,7 @@ dependencies = [ [[package]] name = "alloy-rpc-client" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=17c5650#17c5650f91472b3c0e29ea5cede6ce2bc7f87018" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -395,6 +433,24 @@ dependencies = [ "alloy-rlp", "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", "alloy-sol-types", + "itertools 0.12.1", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "alloy-rpc-types" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" +dependencies = [ + "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", + "alloy-genesis 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", + "alloy-sol-types", "arbitrary", "itertools 0.12.1", "jsonrpsee-types", @@ -426,24 +482,24 @@ dependencies = [ [[package]] name = "alloy-rpc-types-anvil" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=17c5650#17c5650f91472b3c0e29ea5cede6ce2bc7f87018" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" dependencies = [ "alloy-primitives", - "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "serde", ] [[package]] name = "alloy-rpc-types-engine" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=17c5650#17c5650f91472b3c0e29ea5cede6ce2bc7f87018" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" dependencies = [ - "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", - "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "alloy-primitives", "alloy-rlp", - "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", - "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "ethereum_ssz", "ethereum_ssz_derive", "jsonrpsee-types", @@ -465,6 +521,18 @@ dependencies = [ "serde_json", ] +[[package]] +name = "alloy-rpc-types-trace" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", + "alloy-serde 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", + "serde", + "serde_json", +] + [[package]] name = "alloy-serde" version = "0.1.0" @@ -475,6 +543,16 @@ dependencies = [ "serde_json", ] +[[package]] +name = "alloy-serde" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + [[package]] name = "alloy-serde" version = "0.1.0" @@ -488,7 +566,7 @@ dependencies = [ [[package]] name = "alloy-signer" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=17c5650#17c5650f91472b3c0e29ea5cede6ce2bc7f87018" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" dependencies = [ "alloy-primitives", "async-trait", @@ -501,9 +579,9 @@ dependencies = [ [[package]] name = "alloy-signer-wallet" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=17c5650#17c5650f91472b3c0e29ea5cede6ce2bc7f87018" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" dependencies = [ - "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "alloy-network", "alloy-primitives", "alloy-signer", @@ -576,7 +654,7 @@ dependencies = [ [[package]] name = "alloy-transport" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=17c5650#17c5650f91472b3c0e29ea5cede6ce2bc7f87018" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" dependencies = [ "alloy-json-rpc", "base64 0.22.1", @@ -594,7 +672,7 @@ dependencies = [ [[package]] name = "alloy-transport-http" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=17c5650#17c5650f91472b3c0e29ea5cede6ce2bc7f87018" +source = "git+https://github.com/alloy-rs/alloy?rev=c3ea7bc#c3ea7bce27113086030c94919954d42be5cad78a" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -2964,7 +3042,7 @@ dependencies = [ name = "exex-rollup" version = "0.0.0" dependencies = [ - "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "alloy-rlp", "alloy-sol-types", "eyre", @@ -6586,8 +6664,8 @@ dependencies = [ name = "reth-codecs" version = "0.2.0-beta.6" dependencies = [ - "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", - "alloy-genesis 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", + "alloy-genesis 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "alloy-primitives", "arbitrary", "bytes", @@ -6792,9 +6870,9 @@ dependencies = [ name = "reth-e2e-test-utils" version = "0.2.0-beta.6" dependencies = [ - "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "alloy-network", - "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "alloy-signer", "alloy-signer-wallet", "eyre", @@ -7531,8 +7609,8 @@ name = "reth-primitives" version = "0.2.0-beta.6" dependencies = [ "alloy-chains", - "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", - "alloy-genesis 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", + "alloy-genesis 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "alloy-primitives", "alloy-rlp", "alloy-trie", @@ -7797,13 +7875,13 @@ dependencies = [ name = "reth-rpc-types" version = "0.2.0-beta.6" dependencies = [ - "alloy-genesis 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-genesis 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "alloy-primitives", "alloy-rlp", - "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "alloy-rpc-types-anvil", "alloy-rpc-types-engine", - "alloy-rpc-types-trace", + "alloy-rpc-types-trace 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "arbitrary", "bytes", "enr", @@ -7827,7 +7905,7 @@ name = "reth-rpc-types-compat" version = "0.2.0-beta.6" dependencies = [ "alloy-rlp", - "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "reth-primitives", "reth-rpc-types", "serde_json", @@ -7933,7 +8011,7 @@ dependencies = [ name = "reth-testing-utils" version = "0.2.0-beta.6" dependencies = [ - "alloy-genesis 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", + "alloy-genesis 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=c3ea7bc)", "reth-primitives", "secp256k1", ] @@ -8071,7 +8149,7 @@ source = "git+https://github.com/paradigmxyz/evm-inspectors?rev=089efac#089efacf dependencies = [ "alloy-primitives", "alloy-rpc-types 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", - "alloy-rpc-types-trace", + "alloy-rpc-types-trace 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=17c5650)", "alloy-sol-types", "anstyle", "boa_engine", diff --git a/Cargo.toml b/Cargo.toml index e48db171291d1..83f2c2c6a8154 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -278,8 +278,13 @@ reth-node-events = { path = "crates/node/events" } reth-testing-utils = { path = "testing/testing-utils" } # revm -revm = { version = "8.0.0", features = ["std", "secp256k1"], default-features = false } -revm-primitives = { version = "3.1.0", features = ["std"], default-features = false } +revm = { version = "8.0.0", features = [ + "std", + "secp256k1", +], default-features = false } +revm-primitives = { version = "3.1.0", features = [ + "std", +], default-features = false } revm-inspectors = { git = "https://github.com/paradigmxyz/evm-inspectors", rev = "089efac" } # eth @@ -289,20 +294,20 @@ alloy-dyn-abi = "0.7.2" alloy-sol-types = "0.7.2" alloy-rlp = "0.3.4" alloy-trie = "0.3.1" -alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "17c5650" } -alloy-rpc-types-anvil = { git = "https://github.com/alloy-rs/alloy", rev = "17c5650" } -alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "17c5650" } -alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/alloy", rev = "17c5650" } -alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "17c5650" } -alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "17c5650" } -alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "17c5650", default-features = false, features = [ +alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "c3ea7bc" } +alloy-rpc-types-anvil = { git = "https://github.com/alloy-rs/alloy", rev = "c3ea7bc" } +alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "c3ea7bc" } +alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/alloy", rev = "c3ea7bc" } +alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "c3ea7bc" } +alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "c3ea7bc" } +alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "c3ea7bc", default-features = false, features = [ "reqwest", ] } -alloy-eips = { git = "https://github.com/alloy-rs/alloy", default-features = false, rev = "17c5650" } -alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "17c5650" } -alloy-signer-wallet = { git = "https://github.com/alloy-rs/alloy", rev = "17c5650" } -alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "17c5650" } -alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "17c5650" } +alloy-eips = { git = "https://github.com/alloy-rs/alloy", default-features = false, rev = "c3ea7bc" } +alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "c3ea7bc" } +alloy-signer-wallet = { git = "https://github.com/alloy-rs/alloy", rev = "c3ea7bc" } +alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "c3ea7bc" } +alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "c3ea7bc" } # misc auto_impl = "1" @@ -376,7 +381,10 @@ secp256k1 = { version = "0.28", default-features = false, features = [ "recovery", ] } # TODO: Remove `k256` feature: https://github.com/sigp/enr/pull/74 -enr = { version = "0.12.0", default-features = false, features = ["k256", "rust-secp256k1"] } +enr = { version = "0.12.0", default-features = false, features = [ + "k256", + "rust-secp256k1", +] } # for eip-4844 c-kzg = "1.0.0" diff --git a/crates/rpc/rpc-types-compat/src/engine/payload.rs b/crates/rpc/rpc-types-compat/src/engine/payload.rs index 3ab9a74b9717a..00e5c17090665 100644 --- a/crates/rpc/rpc-types-compat/src/engine/payload.rs +++ b/crates/rpc/rpc-types-compat/src/engine/payload.rs @@ -8,7 +8,8 @@ use reth_primitives::{ }; use reth_rpc_types::engine::{ payload::{ExecutionPayloadBodyV1, ExecutionPayloadFieldV2, ExecutionPayloadInputV2}, - ExecutionPayload, ExecutionPayloadV1, ExecutionPayloadV2, ExecutionPayloadV3, PayloadError, + ExecutionPayload, ExecutionPayloadV1, ExecutionPayloadV2, ExecutionPayloadV3, + ExecutionPayloadV4, PayloadError, }; /// Converts [ExecutionPayloadV1] to [Block] @@ -83,6 +84,15 @@ pub fn try_payload_v3_to_block(payload: ExecutionPayloadV3) -> Result Result { + // this performs the same conversion as the underlying V3 payload. + // + // the new request lists (`deposit_requests`, `withdrawal_requests`) are EL -> CL only, so we do + // not do anything special here to handle them + try_payload_v3_to_block(payload.payload_inner) +} + /// Converts [SealedBlock] to [ExecutionPayload] pub fn block_to_payload(value: SealedBlock) -> ExecutionPayload { if value.header.parent_beacon_block_root.is_some() { @@ -224,6 +234,7 @@ pub fn try_into_block( ExecutionPayload::V1(payload) => try_payload_v1_to_block(payload)?, ExecutionPayload::V2(payload) => try_payload_v2_to_block(payload)?, ExecutionPayload::V3(payload) => try_payload_v3_to_block(payload)?, + ExecutionPayload::V4(payload) => try_payload_v4_to_block(payload)?, }; base_payload.header.parent_beacon_block_root = parent_beacon_block_root; diff --git a/crates/rpc/rpc-types/src/beacon/payload.rs b/crates/rpc/rpc-types/src/beacon/payload.rs index a4898b723fa12..2bc4cde781b64 100644 --- a/crates/rpc/rpc-types/src/beacon/payload.rs +++ b/crates/rpc/rpc-types/src/beacon/payload.rs @@ -498,6 +498,10 @@ impl<'a> From<&'a ExecutionPayload> for BeaconExecutionPayload<'a> { ExecutionPayload::V3(payload) => { BeaconExecutionPayload::V3(BeaconExecutionPayloadV3::from(payload)) } + ExecutionPayload::V4(_payload) => { + // TODO(onbjerg): Implement `ExecutionPayloadV4` support + todo!() + } } } }