From fb6902880c42eaf6e1ff80a6ce04050a5244d514 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 7 Jan 2025 23:31:04 +0100 Subject: [PATCH] chore: rm beacon consensus deps (#13716) --- Cargo.lock | 8 +++----- crates/cli/commands/Cargo.toml | 2 +- crates/cli/commands/src/import.rs | 2 +- crates/cli/commands/src/stage/run.rs | 2 +- crates/engine/tree/Cargo.toml | 1 + crates/engine/tree/src/tree/mod.rs | 2 +- crates/ethereum/engine-primitives/src/lib.rs | 3 +-- crates/ethereum/node/Cargo.toml | 2 +- crates/ethereum/node/src/node.rs | 7 +++---- crates/node/api/Cargo.toml | 1 - crates/node/api/src/node.rs | 2 +- crates/rpc/rpc-builder/Cargo.toml | 1 - crates/rpc/rpc-builder/tests/it/utils.rs | 2 +- crates/rpc/rpc-engine-api/Cargo.toml | 1 - crates/rpc/rpc-engine-api/src/engine_api.rs | 3 +-- crates/rpc/rpc-engine-api/src/error.rs | 3 +-- 16 files changed, 17 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 33c431f6d..c6fd91d38 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6710,7 +6710,6 @@ dependencies = [ "proptest", "proptest-arbitrary-interop", "ratatui", - "reth-beacon-consensus", "reth-chainspec", "reth-cli", "reth-cli-runner", @@ -6726,6 +6725,7 @@ dependencies = [ "reth-ecies", "reth-eth-wire", "reth-ethereum-cli", + "reth-ethereum-consensus", "reth-evm", "reth-exex", "reth-fs-util", @@ -7299,6 +7299,7 @@ dependencies = [ "reth-db", "reth-engine-primitives", "reth-errors", + "reth-ethereum-consensus", "reth-ethereum-engine-primitives", "reth-evm", "reth-exex-types", @@ -8014,7 +8015,6 @@ version = "1.1.5" dependencies = [ "alloy-rpc-types-engine", "eyre", - "reth-beacon-consensus", "reth-consensus", "reth-db-api", "reth-engine-primitives", @@ -8161,11 +8161,11 @@ dependencies = [ "futures", "rand 0.8.5", "reth-basic-payload-builder", - "reth-beacon-consensus", "reth-chainspec", "reth-consensus", "reth-db", "reth-e2e-test-utils", + "reth-ethereum-consensus", "reth-ethereum-engine-primitives", "reth-ethereum-payload-builder", "reth-evm", @@ -8956,7 +8956,6 @@ dependencies = [ "jsonrpsee", "metrics", "pin-project", - "reth-beacon-consensus", "reth-chainspec", "reth-consensus", "reth-engine-primitives", @@ -9006,7 +9005,6 @@ dependencies = [ "jsonrpsee-types", "metrics", "parking_lot", - "reth-beacon-consensus", "reth-chainspec", "reth-engine-primitives", "reth-ethereum-engine-primitives", diff --git a/crates/cli/commands/Cargo.toml b/crates/cli/commands/Cargo.toml index 2220efda5..c5f6cef0d 100644 --- a/crates/cli/commands/Cargo.toml +++ b/crates/cli/commands/Cargo.toml @@ -11,7 +11,7 @@ repository.workspace = true [dependencies] # reth -reth-beacon-consensus.workspace = true +reth-ethereum-consensus.workspace = true reth-chainspec.workspace = true reth-cli.workspace = true reth-ethereum-cli.workspace = true diff --git a/crates/cli/commands/src/import.rs b/crates/cli/commands/src/import.rs index a73322a90..7f5fd2d2f 100644 --- a/crates/cli/commands/src/import.rs +++ b/crates/cli/commands/src/import.rs @@ -3,7 +3,6 @@ use crate::common::{AccessRights, CliNodeTypes, Environment, EnvironmentArgs}; use alloy_primitives::B256; use clap::Parser; use futures::{Stream, StreamExt}; -use reth_beacon_consensus::EthBeaconConsensus; use reth_chainspec::{EthChainSpec, EthereumHardforks}; use reth_cli::chainspec::ChainSpecParser; use reth_config::Config; @@ -15,6 +14,7 @@ use reth_downloaders::{ file_client::{ChunkedFileReader, FileClient, DEFAULT_BYTE_LEN_CHUNK_CHAIN_FILE}, headers::reverse_headers::ReverseHeadersDownloaderBuilder, }; +use reth_ethereum_consensus::EthBeaconConsensus; use reth_evm::execute::BlockExecutorProvider; use reth_network_p2p::{ bodies::downloader::BodyDownloader, diff --git a/crates/cli/commands/src/stage/run.rs b/crates/cli/commands/src/stage/run.rs index 1a4783b9d..c7655f0ac 100644 --- a/crates/cli/commands/src/stage/run.rs +++ b/crates/cli/commands/src/stage/run.rs @@ -6,7 +6,6 @@ use crate::common::{AccessRights, CliNodeTypes, Environment, EnvironmentArgs}; use alloy_eips::BlockHashOrNumber; use alloy_primitives::Sealable; use clap::Parser; -use reth_beacon_consensus::EthBeaconConsensus; use reth_chainspec::{EthChainSpec, EthereumHardforks}; use reth_cli::chainspec::ChainSpecParser; use reth_cli_runner::CliContext; @@ -18,6 +17,7 @@ use reth_downloaders::{ headers::reverse_headers::ReverseHeadersDownloaderBuilder, }; use reth_eth_wire::NetPrimitivesFor; +use reth_ethereum_consensus::EthBeaconConsensus; use reth_evm::execute::BlockExecutorProvider; use reth_exex::ExExManagerHandle; use reth_network::BlockDownloaderProvider; diff --git a/crates/engine/tree/Cargo.toml b/crates/engine/tree/Cargo.toml index 0d2284e39..572f09550 100644 --- a/crates/engine/tree/Cargo.toml +++ b/crates/engine/tree/Cargo.toml @@ -73,6 +73,7 @@ reth-chain-state = { workspace = true, features = ["test-utils"] } reth-chainspec.workspace = true reth-db = { workspace = true, features = ["test-utils"] } reth-ethereum-engine-primitives.workspace = true +reth-ethereum-consensus.workspace = true reth-evm = { workspace = true, features = ["test-utils"] } reth-exex-types.workspace = true reth-network-p2p = { workspace = true, features = ["test-utils"] } diff --git a/crates/engine/tree/src/tree/mod.rs b/crates/engine/tree/src/tree/mod.rs index 00531da7f..7726ba489 100644 --- a/crates/engine/tree/src/tree/mod.rs +++ b/crates/engine/tree/src/tree/mod.rs @@ -2785,10 +2785,10 @@ mod tests { use alloy_rlp::Decodable; use alloy_rpc_types_engine::{CancunPayloadFields, ExecutionPayloadSidecar}; use assert_matches::assert_matches; - use reth_beacon_consensus::EthBeaconConsensus; use reth_chain_state::{test_utils::TestBlockBuilder, BlockState}; use reth_chainspec::{ChainSpec, HOLESKY, MAINNET}; use reth_engine_primitives::ForkchoiceStatus; + use reth_ethereum_consensus::EthBeaconConsensus; use reth_ethereum_engine_primitives::{EthEngineTypes, EthereumEngineValidator}; use reth_evm::test_utils::MockExecutorProvider; use reth_primitives::{Block, BlockExt, EthPrimitives}; diff --git a/crates/ethereum/engine-primitives/src/lib.rs b/crates/ethereum/engine-primitives/src/lib.rs index d1301882c..350780d0b 100644 --- a/crates/ethereum/engine-primitives/src/lib.rs +++ b/crates/ethereum/engine-primitives/src/lib.rs @@ -9,8 +9,6 @@ #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] mod payload; -use std::sync::Arc; - use alloy_rpc_types_engine::{ExecutionPayload, ExecutionPayloadSidecar, PayloadError}; pub use alloy_rpc_types_engine::{ ExecutionPayloadEnvelopeV2, ExecutionPayloadEnvelopeV3, ExecutionPayloadEnvelopeV4, @@ -26,6 +24,7 @@ use reth_payload_primitives::{ use reth_payload_validator::ExecutionPayloadValidator; use reth_primitives::{Block, NodePrimitives, SealedBlock, SealedBlockFor}; use reth_rpc_types_compat::engine::payload::block_to_payload; +use std::sync::Arc; /// The types used in the default mainnet ethereum beacon consensus engine. #[derive(Debug, Default, Clone, serde::Deserialize, serde::Serialize)] diff --git a/crates/ethereum/node/Cargo.toml b/crates/ethereum/node/Cargo.toml index e532b844a..4f4f7b0f8 100644 --- a/crates/ethereum/node/Cargo.toml +++ b/crates/ethereum/node/Cargo.toml @@ -16,6 +16,7 @@ reth-payload-builder.workspace = true reth-ethereum-engine-primitives.workspace = true reth-basic-payload-builder.workspace = true reth-ethereum-payload-builder.workspace = true +reth-ethereum-consensus.workspace = true reth-node-builder.workspace = true reth-tracing.workspace = true reth-provider.workspace = true @@ -24,7 +25,6 @@ reth-network.workspace = true reth-evm.workspace = true reth-evm-ethereum.workspace = true reth-consensus.workspace = true -reth-beacon-consensus.workspace = true reth-rpc.workspace = true reth-node-api.workspace = true reth-chainspec.workspace = true diff --git a/crates/ethereum/node/src/node.rs b/crates/ethereum/node/src/node.rs index f37e08ef5..5c5879983 100644 --- a/crates/ethereum/node/src/node.rs +++ b/crates/ethereum/node/src/node.rs @@ -1,9 +1,11 @@ //! Ethereum Node types config. +pub use crate::payload::EthereumPayloadBuilder; use crate::{EthEngineTypes, EthEvmConfig}; -use reth_beacon_consensus::EthBeaconConsensus; use reth_chainspec::ChainSpec; use reth_consensus::{ConsensusError, FullConsensus}; +use reth_ethereum_consensus::EthBeaconConsensus; +pub use reth_ethereum_engine_primitives::EthereumEngineValidator; use reth_ethereum_engine_primitives::{ EthBuiltPayload, EthPayloadAttributes, EthPayloadBuilderAttributes, }; @@ -30,9 +32,6 @@ use reth_transaction_pool::{ use reth_trie_db::MerklePatriciaTrie; use std::sync::Arc; -pub use crate::payload::EthereumPayloadBuilder; -pub use reth_ethereum_engine_primitives::EthereumEngineValidator; - /// Type configuration for a regular Ethereum node. #[derive(Debug, Default, Clone, Copy)] #[non_exhaustive] diff --git a/crates/node/api/Cargo.toml b/crates/node/api/Cargo.toml index d952a8abf..fa323108d 100644 --- a/crates/node/api/Cargo.toml +++ b/crates/node/api/Cargo.toml @@ -13,7 +13,6 @@ workspace = true [dependencies] # reth reth-db-api.workspace = true -reth-beacon-consensus.workspace = true reth-consensus.workspace = true reth-evm.workspace = true reth-provider.workspace = true diff --git a/crates/node/api/src/node.rs b/crates/node/api/src/node.rs index 66c131581..498297c2d 100644 --- a/crates/node/api/src/node.rs +++ b/crates/node/api/src/node.rs @@ -2,12 +2,12 @@ use crate::ConfigureEvm; use alloy_rpc_types_engine::JwtSecret; -use reth_beacon_consensus::BeaconConsensusEngineHandle; use reth_consensus::{ConsensusError, FullConsensus}; use reth_db_api::{ database_metrics::{DatabaseMetadata, DatabaseMetrics}, Database, }; +use reth_engine_primitives::BeaconConsensusEngineHandle; use reth_evm::execute::BlockExecutorProvider; use reth_network_api::FullNetwork; use reth_node_core::node_config::NodeConfig; diff --git a/crates/rpc/rpc-builder/Cargo.toml b/crates/rpc/rpc-builder/Cargo.toml index 7dbbe7608..957e2e33c 100644 --- a/crates/rpc/rpc-builder/Cargo.toml +++ b/crates/rpc/rpc-builder/Cargo.toml @@ -51,7 +51,6 @@ tokio = { workspace = true, features = ["rt", "rt-multi-thread"] } [dev-dependencies] reth-chainspec.workspace = true -reth-beacon-consensus.workspace = true reth-network-api.workspace = true reth-network-peers.workspace = true reth-evm-ethereum.workspace = true diff --git a/crates/rpc/rpc-builder/tests/it/utils.rs b/crates/rpc/rpc-builder/tests/it/utils.rs index d9d8a9e45..dab771503 100644 --- a/crates/rpc/rpc-builder/tests/it/utils.rs +++ b/crates/rpc/rpc-builder/tests/it/utils.rs @@ -4,9 +4,9 @@ use std::{ }; use alloy_rpc_types_engine::{ClientCode, ClientVersionV1}; -use reth_beacon_consensus::BeaconConsensusEngineHandle; use reth_chainspec::MAINNET; use reth_consensus::noop::NoopConsensus; +use reth_engine_primitives::BeaconConsensusEngineHandle; use reth_ethereum_engine_primitives::{EthEngineTypes, EthereumEngineValidator}; use reth_evm::execute::BasicBlockExecutorProvider; use reth_evm_ethereum::{execute::EthExecutionStrategyFactory, EthEvmConfig}; diff --git a/crates/rpc/rpc-engine-api/Cargo.toml b/crates/rpc/rpc-engine-api/Cargo.toml index ae3fc490d..9bf9ae707 100644 --- a/crates/rpc/rpc-engine-api/Cargo.toml +++ b/crates/rpc/rpc-engine-api/Cargo.toml @@ -17,7 +17,6 @@ reth-chainspec.workspace = true reth-primitives.workspace = true reth-rpc-api.workspace = true reth-storage-api.workspace = true -reth-beacon-consensus.workspace = true reth-payload-builder.workspace = true reth-payload-builder-primitives.workspace = true reth-payload-primitives.workspace = true diff --git a/crates/rpc/rpc-engine-api/src/engine_api.rs b/crates/rpc/rpc-engine-api/src/engine_api.rs index db27d8a1e..9e1f68072 100644 --- a/crates/rpc/rpc-engine-api/src/engine_api.rs +++ b/crates/rpc/rpc-engine-api/src/engine_api.rs @@ -16,9 +16,8 @@ use alloy_rpc_types_engine::{ use async_trait::async_trait; use jsonrpsee_core::RpcResult; use parking_lot::Mutex; -use reth_beacon_consensus::BeaconConsensusEngineHandle; use reth_chainspec::{EthereumHardforks, Hardforks}; -use reth_engine_primitives::{EngineTypes, EngineValidator}; +use reth_engine_primitives::{BeaconConsensusEngineHandle, EngineTypes, EngineValidator}; use reth_payload_builder::PayloadStore; use reth_payload_primitives::{ validate_payload_timestamp, EngineApiMessageVersion, PayloadBuilderAttributes, diff --git a/crates/rpc/rpc-engine-api/src/error.rs b/crates/rpc/rpc-engine-api/src/error.rs index 4210d415b..f5c12f800 100644 --- a/crates/rpc/rpc-engine-api/src/error.rs +++ b/crates/rpc/rpc-engine-api/src/error.rs @@ -2,8 +2,7 @@ use alloy_primitives::{B256, U256}; use jsonrpsee_types::error::{ INTERNAL_ERROR_CODE, INVALID_PARAMS_CODE, INVALID_PARAMS_MSG, SERVER_ERROR_MSG, }; -use reth_beacon_consensus::BeaconForkChoiceUpdateError; -use reth_engine_primitives::BeaconOnNewPayloadError; +use reth_engine_primitives::{BeaconForkChoiceUpdateError, BeaconOnNewPayloadError}; use reth_payload_builder_primitives::PayloadBuilderError; use reth_payload_primitives::EngineObjectValidationError; use thiserror::Error;