Skip to content

Commit

Permalink
node: replace reth-primitive imports (#10791)
Browse files Browse the repository at this point in the history
  • Loading branch information
estensen authored Sep 9, 2024
1 parent e7a4c85 commit 75b8499
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 15 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions crates/node/builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ reth-transaction-pool.workspace = true

## ethereum
alloy-network.workspace = true
alloy-primitives.workspace = true

## async
futures.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion crates/node/builder/src/launch/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
use std::{sync::Arc, thread::available_parallelism};

use alloy_primitives::{BlockNumber, B256};
use eyre::Context;
use rayon::ThreadPoolBuilder;
use reth_auto_seal_consensus::MiningMode;
Expand Down Expand Up @@ -34,7 +35,7 @@ use reth_node_metrics::{
server::{MetricServer, MetricServerConfig},
version::VersionInfo,
};
use reth_primitives::{BlockNumber, Head, B256};
use reth_primitives::Head;
use reth_provider::{
providers::{BlockchainProvider, BlockchainProvider2, StaticFileProvider},
BlockHashReader, CanonStateNotificationSender, ChainSpecProvider, ProviderFactory,
Expand Down
5 changes: 1 addition & 4 deletions crates/node/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ reth-node-types.workspace = true

# ethereum
alloy-genesis.workspace = true
alloy-primitives.workspace = true
alloy-rpc-types-engine.workspace = true


# misc
eyre.workspace = true
clap = { workspace = true, features = ["derive"] }
Expand All @@ -63,8 +63,6 @@ dirs-next = "2.0.0"
shellexpand.workspace = true
serde_json.workspace = true



# tracing
tracing.workspace = true

Expand All @@ -78,7 +76,6 @@ secp256k1 = { workspace = true, features = [
# async
futures.workspace = true


[dev-dependencies]
# test vectors generation
proptest.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/node/core/src/args/debug.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//! clap [Args](clap::Args) for debugging purposes
use alloy_primitives::B256;
use clap::{
builder::{PossibleValue, TypedValueParser},
Arg, Args, Command,
};
use reth_primitives::B256;
use std::{collections::HashSet, ffi::OsStr, fmt, path::PathBuf, str::FromStr};
use strum::{AsRefStr, EnumIter, IntoStaticStr, ParseError, VariantArray, VariantNames};

Expand Down
2 changes: 1 addition & 1 deletion crates/node/core/src/args/pruning.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//! Pruning and full node arguments
use crate::args::error::ReceiptsLogError;
use alloy_primitives::{Address, BlockNumber};
use clap::Args;
use reth_chainspec::ChainSpec;
use reth_config::config::PruneConfig;
use reth_primitives::{Address, BlockNumber};
use reth_prune_types::{PruneMode, PruneModes, ReceiptsLogPruneConfig, MINIMUM_PRUNING_DISTANCE};
use std::collections::BTreeMap;

Expand Down
2 changes: 1 addition & 1 deletion crates/node/core/src/args/txpool.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Transaction pool arguments
use crate::cli::config::RethTransactionPoolConfig;
use alloy_primitives::Address;
use clap::Args;
use reth_primitives::Address;
use reth_transaction_pool::{
blobstore::disk::DEFAULT_MAX_CACHED_BLOBS,
pool::{NEW_TX_LISTENER_BUFFER_SIZE, PENDING_TX_LISTENER_BUFFER_SIZE},
Expand Down
2 changes: 1 addition & 1 deletion crates/node/core/src/cli/config.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Config traits for various node components.
use alloy_primitives::Bytes;
use reth_network::protocol::IntoRlpxSubProtocol;
use reth_primitives::Bytes;
use reth_transaction_pool::PoolConfig;
use std::{borrow::Cow, time::Duration};

Expand Down
5 changes: 2 additions & 3 deletions crates/node/core/src/node_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ use reth_network_p2p::headers::client::HeadersClient;
use serde::{de::DeserializeOwned, Serialize};
use std::{fs, path::Path};

use alloy_primitives::{BlockNumber, B256};
use reth_node_types::NodeTypesWithDB;
use reth_primitives::{
revm_primitives::EnvKzgSettings, BlockHashOrNumber, BlockNumber, Head, SealedHeader, B256,
};
use reth_primitives::{revm_primitives::EnvKzgSettings, BlockHashOrNumber, Head, SealedHeader};
use reth_provider::{BlockHashReader, HeaderProvider, ProviderFactory, StageCheckpointReader};
use reth_stages_types::StageId;
use reth_storage_errors::provider::ProviderResult;
Expand Down
6 changes: 4 additions & 2 deletions crates/node/events/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ repository.workspace = true
workspace = true

[dependencies]
# reth
reth-provider.workspace = true
reth-beacon-consensus.workspace = true
reth-network = { workspace = true, features = ["serde"] }
Expand All @@ -21,7 +22,8 @@ reth-static-file.workspace = true
reth-primitives.workspace = true
reth-primitives-traits.workspace = true

# alloy
# ethereum
alloy-primitives.workspace = true
alloy-rpc-types-engine.workspace = true

# async
Expand All @@ -32,6 +34,6 @@ futures.workspace = true

tracing.workspace = true

#misc
# misc
pin-project.workspace = true
humantime.workspace = true
3 changes: 2 additions & 1 deletion crates/node/events/src/node.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
//! Support for handling events emitted by node components.
use crate::cl::ConsensusLayerHealthEvent;
use alloy_primitives::{BlockNumber, B256};
use alloy_rpc_types_engine::ForkchoiceState;
use futures::Stream;
use reth_beacon_consensus::{
BeaconConsensusEngineEvent, ConsensusEngineLiveSyncProgress, ForkchoiceStatus,
};
use reth_network::NetworkEvent;
use reth_network_api::PeersInfo;
use reth_primitives::{constants, BlockNumber, B256};
use reth_primitives::constants;
use reth_primitives_traits::{format_gas, format_gas_throughput};
use reth_prune::PrunerEvent;
use reth_stages::{EntitiesCheckpoint, ExecOutput, PipelineEvent, StageCheckpoint, StageId};
Expand Down

0 comments on commit 75b8499

Please sign in to comment.