chore: reduce reth-primitives usage in node-core (#13000)

This commit is contained in:
Matthias Seitz
2024-11-29 08:35:12 +01:00
committed by GitHub
parent b10f576933
commit 88bde87f70
5 changed files with 19 additions and 10 deletions

1
Cargo.lock generated
View File

@ -8067,6 +8067,7 @@ dependencies = [
"reth-db",
"reth-discv4",
"reth-discv5",
"reth-ethereum-forks",
"reth-net-nat",
"reth-network",
"reth-network-p2p",

View File

@ -34,6 +34,7 @@ reth-net-nat.workspace = true
reth-network-peers.workspace = true
reth-prune-types.workspace = true
reth-stages-types.workspace = true
reth-ethereum-forks.workspace = true
# ethereum
alloy-primitives.workspace = true

View File

@ -15,9 +15,11 @@ pub mod exit;
pub mod node_config;
pub mod utils;
pub mod version;
/// Re-exported from `reth_primitives`.
/// Re-exported primitive types
pub mod primitives {
pub use reth_primitives::*;
pub use reth_ethereum_forks::*;
pub use reth_primitives_traits::*;
}
/// Re-export of `reth_rpc_*` crates.

View File

@ -9,22 +9,26 @@ use crate::{
utils::get_single_header,
};
use alloy_consensus::BlockHeader;
use alloy_eips::BlockHashOrNumber;
use alloy_primitives::{BlockNumber, B256};
use eyre::eyre;
use reth_chainspec::{ChainSpec, EthChainSpec, MAINNET};
use reth_config::config::PruneConfig;
use reth_ethereum_forks::Head;
use reth_network_p2p::headers::client::HeadersClient;
use serde::{de::DeserializeOwned, Serialize};
use std::{fs, path::Path};
use alloy_eips::BlockHashOrNumber;
use alloy_primitives::{BlockNumber, B256};
use reth_primitives::{Head, SealedHeader};
use reth_primitives_traits::SealedHeader;
use reth_stages_types::StageId;
use reth_storage_api::{
BlockHashReader, DatabaseProviderFactory, HeaderProvider, StageCheckpointReader,
};
use reth_storage_errors::provider::ProviderResult;
use std::{net::SocketAddr, path::PathBuf, sync::Arc};
use serde::{de::DeserializeOwned, Serialize};
use std::{
fs,
net::SocketAddr,
path::{Path, PathBuf},
sync::Arc,
};
use tracing::*;
/// This includes all necessary configuration to launch the node.

View File

@ -9,7 +9,8 @@ use reth_consensus::Consensus;
use reth_network_p2p::{
bodies::client::BodiesClient, headers::client::HeadersClient, priority::Priority,
};
use reth_primitives::{SealedBlock, SealedHeader};
use reth_primitives::SealedBlock;
use reth_primitives_traits::SealedHeader;
use std::{
env::VarError,
path::{Path, PathBuf},