mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor: move node-core/engine to standalone crate (#9120)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
25
Cargo.lock
generated
25
Cargo.lock
generated
@ -6265,6 +6265,7 @@ dependencies = [
|
|||||||
"reth-discv4",
|
"reth-discv4",
|
||||||
"reth-discv5",
|
"reth-discv5",
|
||||||
"reth-downloaders",
|
"reth-downloaders",
|
||||||
|
"reth-engine-util",
|
||||||
"reth-errors",
|
"reth-errors",
|
||||||
"reth-ethereum-payload-builder",
|
"reth-ethereum-payload-builder",
|
||||||
"reth-evm",
|
"reth-evm",
|
||||||
@ -6289,6 +6290,7 @@ dependencies = [
|
|||||||
"reth-primitives",
|
"reth-primitives",
|
||||||
"reth-provider",
|
"reth-provider",
|
||||||
"reth-prune",
|
"reth-prune",
|
||||||
|
"reth-prune-types",
|
||||||
"reth-revm",
|
"reth-revm",
|
||||||
"reth-rpc",
|
"reth-rpc",
|
||||||
"reth-rpc-api",
|
"reth-rpc-api",
|
||||||
@ -6904,6 +6906,24 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "reth-engine-util"
|
||||||
|
version = "1.0.0"
|
||||||
|
dependencies = [
|
||||||
|
"eyre",
|
||||||
|
"futures",
|
||||||
|
"pin-project",
|
||||||
|
"reth-beacon-consensus",
|
||||||
|
"reth-engine-primitives",
|
||||||
|
"reth-fs-util",
|
||||||
|
"reth-rpc",
|
||||||
|
"reth-rpc-types",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"tokio-util",
|
||||||
|
"tracing",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reth-errors"
|
name = "reth-errors"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@ -7447,6 +7467,7 @@ dependencies = [
|
|||||||
"reth-db-api",
|
"reth-db-api",
|
||||||
"reth-db-common",
|
"reth-db-common",
|
||||||
"reth-downloaders",
|
"reth-downloaders",
|
||||||
|
"reth-engine-util",
|
||||||
"reth-evm",
|
"reth-evm",
|
||||||
"reth-exex",
|
"reth-exex",
|
||||||
"reth-network",
|
"reth-network",
|
||||||
@ -7494,7 +7515,6 @@ dependencies = [
|
|||||||
"metrics-process",
|
"metrics-process",
|
||||||
"metrics-util",
|
"metrics-util",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"pin-project",
|
|
||||||
"procfs",
|
"procfs",
|
||||||
"proptest",
|
"proptest",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
@ -7506,7 +7526,6 @@ dependencies = [
|
|||||||
"reth-db-api",
|
"reth-db-api",
|
||||||
"reth-discv4",
|
"reth-discv4",
|
||||||
"reth-discv5",
|
"reth-discv5",
|
||||||
"reth-engine-primitives",
|
|
||||||
"reth-fs-util",
|
"reth-fs-util",
|
||||||
"reth-metrics",
|
"reth-metrics",
|
||||||
"reth-net-nat",
|
"reth-net-nat",
|
||||||
@ -7527,13 +7546,11 @@ dependencies = [
|
|||||||
"reth-tracing",
|
"reth-tracing",
|
||||||
"reth-transaction-pool",
|
"reth-transaction-pool",
|
||||||
"secp256k1",
|
"secp256k1",
|
||||||
"serde",
|
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"shellexpand",
|
"shellexpand",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tikv-jemalloc-ctl",
|
"tikv-jemalloc-ctl",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-util",
|
|
||||||
"tower",
|
"tower",
|
||||||
"tracing",
|
"tracing",
|
||||||
"vergen",
|
"vergen",
|
||||||
|
|||||||
@ -26,6 +26,7 @@ members = [
|
|||||||
"crates/ethereum-forks/",
|
"crates/ethereum-forks/",
|
||||||
"crates/e2e-test-utils/",
|
"crates/e2e-test-utils/",
|
||||||
"crates/engine-primitives/",
|
"crates/engine-primitives/",
|
||||||
|
"crates/engine/util/",
|
||||||
"crates/errors/",
|
"crates/errors/",
|
||||||
"crates/ethereum-forks/",
|
"crates/ethereum-forks/",
|
||||||
"crates/ethereum/consensus/",
|
"crates/ethereum/consensus/",
|
||||||
@ -279,6 +280,7 @@ reth-downloaders = { path = "crates/net/downloaders" }
|
|||||||
reth-e2e-test-utils = { path = "crates/e2e-test-utils" }
|
reth-e2e-test-utils = { path = "crates/e2e-test-utils" }
|
||||||
reth-ecies = { path = "crates/net/ecies" }
|
reth-ecies = { path = "crates/net/ecies" }
|
||||||
reth-engine-primitives = { path = "crates/engine-primitives" }
|
reth-engine-primitives = { path = "crates/engine-primitives" }
|
||||||
|
reth-engine-util = { path = "crates/engine/util" }
|
||||||
reth-errors = { path = "crates/errors" }
|
reth-errors = { path = "crates/errors" }
|
||||||
reth-eth-wire = { path = "crates/net/eth-wire" }
|
reth-eth-wire = { path = "crates/net/eth-wire" }
|
||||||
reth-eth-wire-types = { path = "crates/net/eth-wire-types" }
|
reth-eth-wire-types = { path = "crates/net/eth-wire-types" }
|
||||||
|
|||||||
@ -66,6 +66,8 @@ reth-node-builder.workspace = true
|
|||||||
reth-node-events.workspace = true
|
reth-node-events.workspace = true
|
||||||
reth-consensus.workspace = true
|
reth-consensus.workspace = true
|
||||||
reth-optimism-primitives.workspace = true
|
reth-optimism-primitives.workspace = true
|
||||||
|
reth-prune-types.workspace = true
|
||||||
|
reth-engine-util.workspace = true
|
||||||
reth-prune.workspace = true
|
reth-prune.workspace = true
|
||||||
|
|
||||||
# crypto
|
# crypto
|
||||||
|
|||||||
@ -14,10 +14,10 @@ use reth_cli_runner::CliContext;
|
|||||||
use reth_config::Config;
|
use reth_config::Config;
|
||||||
use reth_consensus::Consensus;
|
use reth_consensus::Consensus;
|
||||||
use reth_db::DatabaseEnv;
|
use reth_db::DatabaseEnv;
|
||||||
|
use reth_engine_util::engine_store::{EngineMessageStore, StoredEngineApiMessage};
|
||||||
use reth_fs_util as fs;
|
use reth_fs_util as fs;
|
||||||
use reth_network::NetworkHandle;
|
use reth_network::NetworkHandle;
|
||||||
use reth_network_api::NetworkInfo;
|
use reth_network_api::NetworkInfo;
|
||||||
use reth_node_core::engine::engine_store::{EngineMessageStore, StoredEngineApiMessage};
|
|
||||||
use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService};
|
use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService};
|
||||||
use reth_provider::{
|
use reth_provider::{
|
||||||
providers::BlockchainProvider, CanonStateSubscriptions, ChainSpecProvider, ProviderFactory,
|
providers::BlockchainProvider, CanonStateSubscriptions, ChainSpecProvider, ProviderFactory,
|
||||||
|
|||||||
42
crates/engine/util/Cargo.toml
Normal file
42
crates/engine/util/Cargo.toml
Normal file
@ -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",
|
||||||
|
]
|
||||||
@ -33,7 +33,6 @@ reth-discv4.workspace = true
|
|||||||
reth-discv5.workspace = true
|
reth-discv5.workspace = true
|
||||||
reth-net-nat.workspace = true
|
reth-net-nat.workspace = true
|
||||||
reth-network-peers.workspace = true
|
reth-network-peers.workspace = true
|
||||||
reth-engine-primitives.workspace = true
|
|
||||||
reth-tasks.workspace = true
|
reth-tasks.workspace = true
|
||||||
reth-consensus-common.workspace = true
|
reth-consensus-common.workspace = true
|
||||||
reth-beacon-consensus.workspace = true
|
reth-beacon-consensus.workspace = true
|
||||||
@ -46,8 +45,6 @@ alloy-rpc-types-engine.workspace = true
|
|||||||
|
|
||||||
# async
|
# async
|
||||||
tokio.workspace = true
|
tokio.workspace = true
|
||||||
tokio-util.workspace = true
|
|
||||||
pin-project.workspace = true
|
|
||||||
|
|
||||||
# metrics
|
# metrics
|
||||||
reth-metrics.workspace = true
|
reth-metrics.workspace = true
|
||||||
@ -69,7 +66,6 @@ once_cell.workspace = true
|
|||||||
# io
|
# io
|
||||||
dirs-next = "2.0.0"
|
dirs-next = "2.0.0"
|
||||||
shellexpand = "3.0.0"
|
shellexpand = "3.0.0"
|
||||||
serde.workspace = true
|
|
||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
|
|
||||||
# http/rpc
|
# http/rpc
|
||||||
|
|||||||
@ -11,7 +11,6 @@
|
|||||||
pub mod args;
|
pub mod args;
|
||||||
pub mod cli;
|
pub mod cli;
|
||||||
pub mod dirs;
|
pub mod dirs;
|
||||||
pub mod engine;
|
|
||||||
pub mod exit;
|
pub mod exit;
|
||||||
pub mod metrics;
|
pub mod metrics;
|
||||||
pub mod node_config;
|
pub mod node_config;
|
||||||
|
|||||||
@ -45,6 +45,7 @@ reth-node-events.workspace = true
|
|||||||
reth-consensus.workspace = true
|
reth-consensus.workspace = true
|
||||||
reth-consensus-debug-client.workspace = true
|
reth-consensus-debug-client.workspace = true
|
||||||
reth-rpc-types.workspace = true
|
reth-rpc-types.workspace = true
|
||||||
|
reth-engine-util.workspace = true
|
||||||
|
|
||||||
## async
|
## async
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
|
|||||||
@ -13,17 +13,16 @@ use reth_beacon_consensus::{
|
|||||||
BeaconConsensusEngine,
|
BeaconConsensusEngine,
|
||||||
};
|
};
|
||||||
use reth_consensus_debug_client::{DebugConsensusClient, EtherscanBlockProvider, RpcBlockProvider};
|
use reth_consensus_debug_client::{DebugConsensusClient, EtherscanBlockProvider, RpcBlockProvider};
|
||||||
|
use reth_engine_util::EngineMessageStreamExt;
|
||||||
use reth_exex::ExExManagerHandle;
|
use reth_exex::ExExManagerHandle;
|
||||||
use reth_network::NetworkEvents;
|
use reth_network::NetworkEvents;
|
||||||
use reth_node_api::FullNodeTypes;
|
use reth_node_api::FullNodeTypes;
|
||||||
use reth_node_core::{
|
use reth_node_core::{
|
||||||
dirs::{ChainPath, DataDirPath},
|
dirs::{ChainPath, DataDirPath},
|
||||||
engine::EngineMessageStreamExt,
|
|
||||||
exit::NodeExitFuture,
|
exit::NodeExitFuture,
|
||||||
version::{CARGO_PKG_VERSION, CLIENT_CODE, NAME_CLIENT, VERGEN_GIT_SHA},
|
version::{CARGO_PKG_VERSION, CLIENT_CODE, NAME_CLIENT, VERGEN_GIT_SHA},
|
||||||
};
|
};
|
||||||
use reth_node_events::{cl::ConsensusLayerHealthEvents, node};
|
use reth_node_events::{cl::ConsensusLayerHealthEvents, node};
|
||||||
|
|
||||||
use reth_primitives::format_ether;
|
use reth_primitives::format_ether;
|
||||||
use reth_provider::providers::BlockchainProvider;
|
use reth_provider::providers::BlockchainProvider;
|
||||||
use reth_rpc_engine_api::EngineApi;
|
use reth_rpc_engine_api::EngineApi;
|
||||||
|
|||||||
Reference in New Issue
Block a user