Skip to content

Commit

Permalink
refactor: move node-core/engine to standalone crate (#9120)
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Seitz <[email protected]>
  • Loading branch information
tcoratger and mattsse authored Jun 26, 2024
1 parent 8775a93 commit 1fde1dc
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 12 deletions.
25 changes: 21 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ members = [
"crates/ethereum-forks/",
"crates/e2e-test-utils/",
"crates/engine-primitives/",
"crates/engine/util/",
"crates/errors/",
"crates/ethereum-forks/",
"crates/ethereum/consensus/",
Expand Down Expand Up @@ -279,6 +280,7 @@ reth-downloaders = { path = "crates/net/downloaders" }
reth-e2e-test-utils = { path = "crates/e2e-test-utils" }
reth-ecies = { path = "crates/net/ecies" }
reth-engine-primitives = { path = "crates/engine-primitives" }
reth-engine-util = { path = "crates/engine/util" }
reth-errors = { path = "crates/errors" }
reth-eth-wire = { path = "crates/net/eth-wire" }
reth-eth-wire-types = { path = "crates/net/eth-wire-types" }
Expand Down
2 changes: 2 additions & 0 deletions bin/reth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ reth-node-builder.workspace = true
reth-node-events.workspace = true
reth-consensus.workspace = true
reth-optimism-primitives.workspace = true
reth-prune-types.workspace = true
reth-engine-util.workspace = true
reth-prune.workspace = true

# crypto
Expand Down
2 changes: 1 addition & 1 deletion bin/reth/src/commands/debug_cmd/replay_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ use reth_cli_runner::CliContext;
use reth_config::Config;
use reth_consensus::Consensus;
use reth_db::DatabaseEnv;
use reth_engine_util::engine_store::{EngineMessageStore, StoredEngineApiMessage};
use reth_fs_util as fs;
use reth_network::NetworkHandle;
use reth_network_api::NetworkInfo;
use reth_node_core::engine::engine_store::{EngineMessageStore, StoredEngineApiMessage};
use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService};
use reth_provider::{
providers::BlockchainProvider, CanonStateSubscriptions, ChainSpecProvider, ProviderFactory,
Expand Down
42 changes: 42 additions & 0 deletions crates/engine/util/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[package]
name = "reth-engine-util"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies]
# reth
reth-fs-util.workspace = true
reth-rpc.workspace = true
reth-rpc-types.workspace = true
reth-engine-primitives.workspace = true
reth-beacon-consensus.workspace = true

# async
tokio-util.workspace = true
pin-project.workspace = true

# misc
eyre.workspace = true

# io
serde.workspace = true
serde_json.workspace = true

# tracing
tracing.workspace = true

# async
futures.workspace = true

[features]
optimism = [
"reth-rpc/optimism",
"reth-beacon-consensus/optimism",
]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions crates/node-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ reth-discv4.workspace = true
reth-discv5.workspace = true
reth-net-nat.workspace = true
reth-network-peers.workspace = true
reth-engine-primitives.workspace = true
reth-tasks.workspace = true
reth-consensus-common.workspace = true
reth-beacon-consensus.workspace = true
Expand All @@ -46,8 +45,6 @@ alloy-rpc-types-engine.workspace = true

# async
tokio.workspace = true
tokio-util.workspace = true
pin-project.workspace = true

# metrics
reth-metrics.workspace = true
Expand All @@ -69,7 +66,6 @@ once_cell.workspace = true
# io
dirs-next = "2.0.0"
shellexpand = "3.0.0"
serde.workspace = true
serde_json.workspace = true

# http/rpc
Expand Down
1 change: 0 additions & 1 deletion crates/node-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
pub mod args;
pub mod cli;
pub mod dirs;
pub mod engine;
pub mod exit;
pub mod metrics;
pub mod node_config;
Expand Down
1 change: 1 addition & 0 deletions crates/node/builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ reth-node-events.workspace = true
reth-consensus.workspace = true
reth-consensus-debug-client.workspace = true
reth-rpc-types.workspace = true
reth-engine-util.workspace = true

## async
futures.workspace = true
Expand Down
3 changes: 1 addition & 2 deletions crates/node/builder/src/launch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@ use reth_beacon_consensus::{
BeaconConsensusEngine,
};
use reth_consensus_debug_client::{DebugConsensusClient, EtherscanBlockProvider, RpcBlockProvider};
use reth_engine_util::EngineMessageStreamExt;
use reth_exex::ExExManagerHandle;
use reth_network::NetworkEvents;
use reth_node_api::FullNodeTypes;
use reth_node_core::{
dirs::{ChainPath, DataDirPath},
engine::EngineMessageStreamExt,
exit::NodeExitFuture,
version::{CARGO_PKG_VERSION, CLIENT_CODE, NAME_CLIENT, VERGEN_GIT_SHA},
};
use reth_node_events::{cl::ConsensusLayerHealthEvents, node};

use reth_primitives::format_ether;
use reth_provider::providers::BlockchainProvider;
use reth_rpc_engine_api::EngineApi;
Expand Down

0 comments on commit 1fde1dc

Please sign in to comment.