diff --git a/Cargo.lock b/Cargo.lock index 53919de4b30c..b80d5d5647c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4672,7 +4672,7 @@ dependencies = [ "reth-ecies", "reth-eth-wire", "reth-network", - "reth-network-types", + "reth-network-peers", "reth-primitives", "secp256k1 0.28.2", "tokio", @@ -6249,7 +6249,7 @@ dependencies = [ "reth-evm", "reth-execution-errors", "reth-network-p2p", - "reth-network-types", + "reth-network-peers", "reth-primitives", "reth-provider", "reth-revm", @@ -6541,7 +6541,7 @@ dependencies = [ "rand 0.8.5", "reth-net-common", "reth-net-nat", - "reth-network-types", + "reth-network-peers", "reth-primitives", "reth-tracing", "schnellru", @@ -6568,7 +6568,7 @@ dependencies = [ "multiaddr", "rand 0.8.5", "reth-metrics", - "reth-network-types", + "reth-network-peers", "reth-primitives", "reth-tracing", "secp256k1 0.28.2", @@ -6588,7 +6588,7 @@ dependencies = [ "parking_lot 0.12.3", "rand 0.8.5", "reth-net-common", - "reth-network-types", + "reth-network-peers", "reth-primitives", "reth-tracing", "schnellru", @@ -6621,7 +6621,7 @@ dependencies = [ "reth-db-api", "reth-metrics", "reth-network-p2p", - "reth-network-types", + "reth-network-peers", "reth-primitives", "reth-provider", "reth-tasks", @@ -6682,7 +6682,7 @@ dependencies = [ "pin-project", "rand 0.8.5", "reth-net-common", - "reth-network-types", + "reth-network-peers", "reth-primitives", "secp256k1 0.28.2", "sha2 0.10.8", @@ -6736,7 +6736,7 @@ dependencies = [ "reth-eth-wire-types", "reth-metrics", "reth-net-common", - "reth-network-types", + "reth-network-peers", "reth-primitives", "reth-tracing", "secp256k1 0.28.2", @@ -7107,7 +7107,7 @@ dependencies = [ "reth-network", "reth-network-api", "reth-network-p2p", - "reth-network-types", + "reth-network-peers", "reth-primitives", "reth-provider", "reth-rpc-types", @@ -7136,7 +7136,7 @@ dependencies = [ "alloy-primitives", "enr", "reth-eth-wire", - "reth-network-types", + "reth-network-peers", "reth-rpc-types", "serde", "thiserror", @@ -7153,7 +7153,7 @@ dependencies = [ "reth-consensus", "reth-eth-wire-types", "reth-network-api", - "reth-network-types", + "reth-network-peers", "reth-primitives", "reth-storage-errors", "thiserror", @@ -7162,7 +7162,7 @@ dependencies = [ ] [[package]] -name = "reth-network-types" +name = "reth-network-peers" version = "0.2.0-beta.9" dependencies = [ "alloy-primitives", @@ -7295,7 +7295,7 @@ dependencies = [ "reth-net-nat", "reth-network", "reth-network-p2p", - "reth-network-types", + "reth-network-peers", "reth-primitives", "reth-provider", "reth-prune-types", @@ -7523,7 +7523,7 @@ dependencies = [ "rayon", "reth-codecs", "reth-ethereum-forks", - "reth-network-types", + "reth-network-peers", "reth-static-file-types", "revm", "revm-primitives", @@ -7673,7 +7673,7 @@ dependencies = [ "reth-evm-optimism", "reth-metrics", "reth-network-api", - "reth-network-types", + "reth-network-peers", "reth-primitives", "reth-provider", "reth-revm", @@ -7707,7 +7707,7 @@ version = "0.2.0-beta.9" dependencies = [ "jsonrpsee", "reth-engine-primitives", - "reth-network-types", + "reth-network-peers", "reth-primitives", "reth-rpc-types", "serde", @@ -7882,7 +7882,7 @@ dependencies = [ "reth-execution-errors", "reth-exex", "reth-network-p2p", - "reth-network-types", + "reth-network-peers", "reth-primitives", "reth-provider", "reth-prune-types", diff --git a/Cargo.toml b/Cargo.toml index fafd469027e3..b281d4e7d5f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,7 @@ members = [ "crates/net/network-api/", "crates/net/network/", "crates/net/p2p/", - "crates/net/types/", + "crates/net/peers/", "crates/node-core/", "crates/node/api/", "crates/node/builder/", @@ -281,7 +281,7 @@ reth-net-common = { path = "crates/net/common" } reth-net-nat = { path = "crates/net/nat" } reth-network = { path = "crates/net/network" } reth-network-api = { path = "crates/net/network-api" } -reth-network-types = { path = "crates/net/types" } +reth-network-peers = { path = "crates/net/peers" } reth-network-p2p = { path = "crates/net/p2p" } reth-nippy-jar = { path = "crates/storage/nippy-jar" } reth-node-api = { path = "crates/node/api" } diff --git a/crates/consensus/auto-seal/Cargo.toml b/crates/consensus/auto-seal/Cargo.toml index 21e192e282ec..8aa6e1656d94 100644 --- a/crates/consensus/auto-seal/Cargo.toml +++ b/crates/consensus/auto-seal/Cargo.toml @@ -25,7 +25,7 @@ reth-evm.workspace = true reth-engine-primitives.workspace = true reth-consensus.workspace = true reth-rpc-types.workspace = true -reth-network-types.workspace = true +reth-network-peers.workspace = true reth-tokio-util.workspace = true # async diff --git a/crates/consensus/auto-seal/src/client.rs b/crates/consensus/auto-seal/src/client.rs index 339f10cf2b71..b9befa73857b 100644 --- a/crates/consensus/auto-seal/src/client.rs +++ b/crates/consensus/auto-seal/src/client.rs @@ -7,7 +7,7 @@ use reth_network_p2p::{ headers::client::{HeadersClient, HeadersFut, HeadersRequest}, priority::Priority, }; -use reth_network_types::{PeerId, WithPeerId}; +use reth_network_peers::{PeerId, WithPeerId}; use reth_primitives::{BlockBody, BlockHashOrNumber, Header, HeadersDirection, B256}; use std::fmt::Debug; use tracing::{trace, warn}; diff --git a/crates/net/discv4/Cargo.toml b/crates/net/discv4/Cargo.toml index 719ec83a6894..8e8c5101525d 100644 --- a/crates/net/discv4/Cargo.toml +++ b/crates/net/discv4/Cargo.toml @@ -16,7 +16,7 @@ workspace = true reth-primitives.workspace = true reth-net-common.workspace = true reth-net-nat.workspace = true -reth-network-types.workspace = true +reth-network-peers.workspace = true # ethereum alloy-rlp = { workspace = true, features = ["derive"] } diff --git a/crates/net/discv4/src/lib.rs b/crates/net/discv4/src/lib.rs index 84ff6034f27a..f0f7a9b0a1aa 100644 --- a/crates/net/discv4/src/lib.rs +++ b/crates/net/discv4/src/lib.rs @@ -39,7 +39,7 @@ use discv5::{ use enr::Enr; use parking_lot::Mutex; use proto::{EnrRequest, EnrResponse}; -use reth_network_types::{pk2id, PeerId}; +use reth_network_peers::{pk2id, PeerId}; use reth_primitives::{bytes::Bytes, hex, ForkId, B256}; use secp256k1::SecretKey; use std::{ @@ -214,7 +214,7 @@ impl Discv4 { /// # use std::io; /// use rand::thread_rng; /// use reth_discv4::{Discv4, Discv4Config}; - /// use reth_network_types::{pk2id, PeerId}; + /// use reth_network_peers::{pk2id, PeerId}; /// use reth_primitives::NodeRecord; /// use secp256k1::SECP256K1; /// use std::{net::SocketAddr, str::FromStr}; diff --git a/crates/net/discv4/src/node.rs b/crates/net/discv4/src/node.rs index c2e6d329e0d2..0a8f436c3f0e 100644 --- a/crates/net/discv4/src/node.rs +++ b/crates/net/discv4/src/node.rs @@ -1,5 +1,5 @@ use generic_array::GenericArray; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{keccak256, NodeRecord}; /// The key type for the table. diff --git a/crates/net/discv4/src/proto.rs b/crates/net/discv4/src/proto.rs index ce72e264bc6c..c319b164e097 100644 --- a/crates/net/discv4/src/proto.rs +++ b/crates/net/discv4/src/proto.rs @@ -3,7 +3,7 @@ use crate::{error::DecodePacketError, MAX_PACKET_SIZE, MIN_PACKET_SIZE}; use alloy_rlp::{Decodable, Encodable, Error as RlpError, Header, RlpDecodable, RlpEncodable}; use enr::Enr; -use reth_network_types::{pk2id, PeerId}; +use reth_network_peers::{pk2id, PeerId}; use reth_primitives::{ bytes::{Buf, BufMut, Bytes, BytesMut}, keccak256, EnrForkIdEntry, ForkId, NodeRecord, B256, diff --git a/crates/net/discv4/src/table.rs b/crates/net/discv4/src/table.rs index 00e1fe50c29e..315bd33bcd79 100644 --- a/crates/net/discv4/src/table.rs +++ b/crates/net/discv4/src/table.rs @@ -1,6 +1,6 @@ //! Additional support for tracking nodes. -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use std::{collections::HashMap, net::IpAddr, time::Instant}; /// Keeps track of nodes from which we have received a `Pong` message. diff --git a/crates/net/discv4/src/test_utils.rs b/crates/net/discv4/src/test_utils.rs index 71c4a543b7b6..49521ec694ec 100644 --- a/crates/net/discv4/src/test_utils.rs +++ b/crates/net/discv4/src/test_utils.rs @@ -6,7 +6,7 @@ use crate::{ IngressReceiver, PeerId, SAFE_MAX_DATAGRAM_NEIGHBOUR_RECORDS, }; use rand::{thread_rng, Rng, RngCore}; -use reth_network_types::pk2id; +use reth_network_peers::pk2id; use reth_primitives::{hex, ForkHash, ForkId, NodeRecord, B256}; use secp256k1::{SecretKey, SECP256K1}; use std::{ diff --git a/crates/net/discv5/Cargo.toml b/crates/net/discv5/Cargo.toml index a73888ae0ea2..a7450b1c1a75 100644 --- a/crates/net/discv5/Cargo.toml +++ b/crates/net/discv5/Cargo.toml @@ -15,7 +15,7 @@ workspace = true # reth reth-primitives.workspace = true reth-metrics.workspace = true -reth-network-types.workspace = true +reth-network-peers.workspace = true # ethereum alloy-rlp.workspace = true diff --git a/crates/net/discv5/src/enr.rs b/crates/net/discv5/src/enr.rs index 162370bb4cf6..a1417aa439cd 100644 --- a/crates/net/discv5/src/enr.rs +++ b/crates/net/discv5/src/enr.rs @@ -3,7 +3,7 @@ use discv5::enr::{CombinedPublicKey, EnrPublicKey, NodeId}; use enr::Enr; -use reth_network_types::{id2pk, pk2id, PeerId}; +use reth_network_peers::{id2pk, pk2id, PeerId}; use secp256k1::{PublicKey, SecretKey}; /// Extracts a [`CombinedPublicKey::Secp256k1`] from a [`discv5::Enr`] and converts it to a diff --git a/crates/net/discv5/src/lib.rs b/crates/net/discv5/src/lib.rs index 4effa1f79bd2..6ebb3b9ba6d9 100644 --- a/crates/net/discv5/src/lib.rs +++ b/crates/net/discv5/src/lib.rs @@ -22,7 +22,7 @@ use enr::{discv4_id_to_discv5_id, EnrCombinedKeyWrapper}; use futures::future::join_all; use itertools::Itertools; use rand::{Rng, RngCore}; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{bytes::Bytes, EnrForkIdEntry, ForkId, NodeRecord}; use secp256k1::SecretKey; use tokio::{sync::mpsc, task}; diff --git a/crates/net/dns/Cargo.toml b/crates/net/dns/Cargo.toml index 8076bd4e1e2d..040b8d27beea 100644 --- a/crates/net/dns/Cargo.toml +++ b/crates/net/dns/Cargo.toml @@ -15,7 +15,7 @@ workspace = true # reth reth-primitives.workspace = true reth-net-common.workspace = true -reth-network-types.workspace = true +reth-network-peers.workspace = true # ethereum secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery", "serde"] } diff --git a/crates/net/dns/src/lib.rs b/crates/net/dns/src/lib.rs index 4738d935f82c..4edcdbeb3172 100644 --- a/crates/net/dns/src/lib.rs +++ b/crates/net/dns/src/lib.rs @@ -22,7 +22,7 @@ use crate::{ pub use config::DnsDiscoveryConfig; use enr::Enr; use error::ParseDnsEntryError; -use reth_network_types::pk2id; +use reth_network_peers::pk2id; use reth_primitives::{EnrForkIdEntry, ForkId, NodeRecord}; use schnellru::{ByLength, LruMap}; use secp256k1::SecretKey; diff --git a/crates/net/downloaders/Cargo.toml b/crates/net/downloaders/Cargo.toml index f767aec09821..eb55d6e9bc4a 100644 --- a/crates/net/downloaders/Cargo.toml +++ b/crates/net/downloaders/Cargo.toml @@ -19,7 +19,7 @@ reth-tasks.workspace = true reth-provider.workspace = true reth-config.workspace = true reth-consensus.workspace = true -reth-network-types.workspace = true +reth-network-peers.workspace = true # optional deps for the test-utils feature reth-db = { workspace = true, optional = true } diff --git a/crates/net/downloaders/src/bodies/request.rs b/crates/net/downloaders/src/bodies/request.rs index 08f223ef035b..f27801041e83 100644 --- a/crates/net/downloaders/src/bodies/request.rs +++ b/crates/net/downloaders/src/bodies/request.rs @@ -6,7 +6,7 @@ use reth_network_p2p::{ error::{DownloadError, DownloadResult}, priority::Priority, }; -use reth_network_types::{PeerId, WithPeerId}; +use reth_network_peers::{PeerId, WithPeerId}; use reth_primitives::{BlockBody, GotExpected, SealedBlock, SealedHeader, B256}; use std::{ collections::VecDeque, diff --git a/crates/net/downloaders/src/file_client.rs b/crates/net/downloaders/src/file_client.rs index 1562e4a6c894..0ef12f1ba552 100644 --- a/crates/net/downloaders/src/file_client.rs +++ b/crates/net/downloaders/src/file_client.rs @@ -8,7 +8,7 @@ use reth_network_p2p::{ headers::client::{HeadersClient, HeadersFut, HeadersRequest}, priority::Priority, }; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{ BlockBody, BlockHash, BlockHashOrNumber, BlockNumber, BytesMut, Header, HeadersDirection, SealedHeader, B256, diff --git a/crates/net/downloaders/src/headers/reverse_headers.rs b/crates/net/downloaders/src/headers/reverse_headers.rs index 9980f1ba7163..e123ce71229a 100644 --- a/crates/net/downloaders/src/headers/reverse_headers.rs +++ b/crates/net/downloaders/src/headers/reverse_headers.rs @@ -16,7 +16,7 @@ use reth_network_p2p::{ }, priority::Priority, }; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{ BlockHashOrNumber, BlockNumber, GotExpected, Header, HeadersDirection, SealedHeader, B256, }; diff --git a/crates/net/downloaders/src/test_utils/bodies_client.rs b/crates/net/downloaders/src/test_utils/bodies_client.rs index ae970931b017..7b655dae2891 100644 --- a/crates/net/downloaders/src/test_utils/bodies_client.rs +++ b/crates/net/downloaders/src/test_utils/bodies_client.rs @@ -3,7 +3,7 @@ use reth_network_p2p::{ download::DownloadClient, priority::Priority, }; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{BlockBody, B256}; use std::{ collections::HashMap, diff --git a/crates/net/ecies/Cargo.toml b/crates/net/ecies/Cargo.toml index 6dbf1d4c52d2..01c8d9f640e6 100644 --- a/crates/net/ecies/Cargo.toml +++ b/crates/net/ecies/Cargo.toml @@ -13,7 +13,7 @@ workspace = true [dependencies] reth-primitives.workspace = true reth-net-common.workspace = true -reth-network-types.workspace = true +reth-network-peers.workspace = true alloy-rlp = { workspace = true, features = ["derive"] } futures.workspace = true diff --git a/crates/net/ecies/src/algorithm.rs b/crates/net/ecies/src/algorithm.rs index f7e4e9af36fd..d76502457d0c 100644 --- a/crates/net/ecies/src/algorithm.rs +++ b/crates/net/ecies/src/algorithm.rs @@ -13,7 +13,7 @@ use ctr::Ctr64BE; use digest::{crypto_common::KeyIvInit, Digest}; use educe::Educe; use rand::{thread_rng, Rng}; -use reth_network_types::{id2pk, pk2id}; +use reth_network_peers::{id2pk, pk2id}; use reth_primitives::{ bytes::{BufMut, Bytes, BytesMut}, B128, B256, B512 as PeerId, diff --git a/crates/net/ecies/src/stream.rs b/crates/net/ecies/src/stream.rs index 0329d4fef427..02c834fe0dcf 100644 --- a/crates/net/ecies/src/stream.rs +++ b/crates/net/ecies/src/stream.rs @@ -175,7 +175,7 @@ where #[cfg(test)] mod tests { use super::*; - use reth_network_types::pk2id; + use reth_network_peers::pk2id; use secp256k1::SECP256K1; use tokio::net::{TcpListener, TcpStream}; diff --git a/crates/net/eth-wire/Cargo.toml b/crates/net/eth-wire/Cargo.toml index a13f13ebc3eb..852cc74f9a1d 100644 --- a/crates/net/eth-wire/Cargo.toml +++ b/crates/net/eth-wire/Cargo.toml @@ -19,7 +19,7 @@ reth-ecies.workspace = true alloy-rlp = { workspace = true, features = ["derive"] } reth-discv4.workspace = true reth-eth-wire-types.workspace = true -reth-network-types.workspace = true +reth-network-peers.workspace = true # metrics reth-metrics.workspace = true diff --git a/crates/net/eth-wire/src/ethstream.rs b/crates/net/eth-wire/src/ethstream.rs index 88d02ce67b14..e8d4e79eaf88 100644 --- a/crates/net/eth-wire/src/ethstream.rs +++ b/crates/net/eth-wire/src/ethstream.rs @@ -354,7 +354,7 @@ mod tests { use futures::{SinkExt, StreamExt}; use reth_discv4::DEFAULT_DISCOVERY_PORT; use reth_ecies::stream::ECIESStream; - use reth_network_types::pk2id; + use reth_network_peers::pk2id; use reth_primitives::{ForkFilter, Head, NamedChain, B256, U256}; use secp256k1::{SecretKey, SECP256K1}; use std::time::Duration; diff --git a/crates/net/eth-wire/src/hello.rs b/crates/net/eth-wire/src/hello.rs index b8af52504ef5..fbdffecec38a 100644 --- a/crates/net/eth-wire/src/hello.rs +++ b/crates/net/eth-wire/src/hello.rs @@ -2,7 +2,7 @@ use crate::{capability::Capability, EthVersion, ProtocolVersion}; use alloy_rlp::{RlpDecodable, RlpEncodable}; use reth_codecs::derive_arbitrary; use reth_discv4::DEFAULT_DISCOVERY_PORT; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::constants::RETH_CLIENT_VERSION; use crate::protocol::Protocol; @@ -39,7 +39,7 @@ impl HelloMessageWithProtocols { /// /// ``` /// use reth_eth_wire::HelloMessageWithProtocols; - /// use reth_network_types::pk2id; + /// use reth_network_peers::pk2id; /// use secp256k1::{SecretKey, SECP256K1}; /// let secret_key = SecretKey::new(&mut rand::thread_rng()); /// let id = pk2id(&secret_key.public_key(SECP256K1)); @@ -121,7 +121,7 @@ impl HelloMessage { /// /// ``` /// use reth_eth_wire::HelloMessage; - /// use reth_network_types::pk2id; + /// use reth_network_peers::pk2id; /// use secp256k1::{SecretKey, SECP256K1}; /// let secret_key = SecretKey::new(&mut rand::thread_rng()); /// let id = pk2id(&secret_key.public_key(SECP256K1)); @@ -210,7 +210,7 @@ impl HelloMessageBuilder { mod tests { use alloy_rlp::{Decodable, Encodable, EMPTY_STRING_CODE}; use reth_discv4::DEFAULT_DISCOVERY_PORT; - use reth_network_types::pk2id; + use reth_network_peers::pk2id; use secp256k1::{SecretKey, SECP256K1}; use crate::{ diff --git a/crates/net/eth-wire/src/test_utils.rs b/crates/net/eth-wire/src/test_utils.rs index 4376bc358b60..46ff1eee3ece 100644 --- a/crates/net/eth-wire/src/test_utils.rs +++ b/crates/net/eth-wire/src/test_utils.rs @@ -4,7 +4,7 @@ use crate::{ EthVersion, HelloMessageWithProtocols, P2PStream, ProtocolVersion, Status, UnauthedP2PStream, }; use reth_discv4::DEFAULT_DISCOVERY_PORT; -use reth_network_types::pk2id; +use reth_network_peers::pk2id; use reth_primitives::{Chain, ForkFilter, Head, B256, U256}; use secp256k1::{SecretKey, SECP256K1}; use std::net::SocketAddr; diff --git a/crates/net/network-api/Cargo.toml b/crates/net/network-api/Cargo.toml index 3e8ed584fc3e..634c45a79c7b 100644 --- a/crates/net/network-api/Cargo.toml +++ b/crates/net/network-api/Cargo.toml @@ -15,7 +15,7 @@ workspace = true # reth reth-eth-wire.workspace = true reth-rpc-types.workspace = true -reth-network-types.workspace = true +reth-network-peers.workspace = true # ethereum alloy-primitives.workspace = true diff --git a/crates/net/network-api/src/lib.rs b/crates/net/network-api/src/lib.rs index 957bd860be69..97bd784065e8 100644 --- a/crates/net/network-api/src/lib.rs +++ b/crates/net/network-api/src/lib.rs @@ -19,7 +19,7 @@ use std::{future::Future, net::SocketAddr, sync::Arc, time::Instant}; pub use error::NetworkError; pub use reputation::{Reputation, ReputationChangeKind}; -use reth_network_types::NodeRecord; +use reth_network_peers::NodeRecord; /// The `PeerId` type. pub type PeerId = alloy_primitives::B512; diff --git a/crates/net/network-api/src/noop.rs b/crates/net/network-api/src/noop.rs index b022ced4bc3b..0678b928857d 100644 --- a/crates/net/network-api/src/noop.rs +++ b/crates/net/network-api/src/noop.rs @@ -9,7 +9,7 @@ use crate::{ }; use enr::{secp256k1::SecretKey, Enr}; use reth_eth_wire::{DisconnectReason, ProtocolVersion}; -use reth_network_types::NodeRecord; +use reth_network_peers::NodeRecord; use reth_rpc_types::{admin::EthProtocolInfo, NetworkStatus}; use std::net::{IpAddr, SocketAddr}; diff --git a/crates/net/network/Cargo.toml b/crates/net/network/Cargo.toml index e70958450a3d..b41d3db54867 100644 --- a/crates/net/network/Cargo.toml +++ b/crates/net/network/Cargo.toml @@ -28,7 +28,7 @@ reth-provider.workspace = true reth-rpc-types.workspace = true reth-tokio-util.workspace = true reth-consensus.workspace = true -reth-network-types.workspace = true +reth-network-peers.workspace = true # ethereum enr = { workspace = true, features = ["serde", "rust-secp256k1"] } diff --git a/crates/net/network/src/config.rs b/crates/net/network/src/config.rs index 26fd3f8a61c6..3066c9eafb46 100644 --- a/crates/net/network/src/config.rs +++ b/crates/net/network/src/config.rs @@ -12,7 +12,7 @@ use reth_discv4::{Discv4Config, Discv4ConfigBuilder, NatResolver, DEFAULT_DISCOV use reth_discv5::NetworkStackId; use reth_dns_discovery::DnsDiscoveryConfig; use reth_eth_wire::{HelloMessage, HelloMessageWithProtocols, Status}; -use reth_network_types::{pk2id, PeerId}; +use reth_network_peers::{pk2id, PeerId}; use reth_primitives::{ mainnet_nodes, sepolia_nodes, ChainSpec, ForkFilter, Head, TrustedPeer, MAINNET, }; diff --git a/crates/net/network/src/discovery.rs b/crates/net/network/src/discovery.rs index c5af0a5561e0..38346ec1d0da 100644 --- a/crates/net/network/src/discovery.rs +++ b/crates/net/network/src/discovery.rs @@ -12,7 +12,7 @@ use reth_discv5::{DiscoveredPeer, Discv5}; use reth_dns_discovery::{ DnsDiscoveryConfig, DnsDiscoveryHandle, DnsDiscoveryService, DnsNodeRecordUpdate, DnsResolver, }; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{EnrForkIdEntry, ForkId, NodeRecord}; use secp256k1::SecretKey; use std::{ diff --git a/crates/net/network/src/eth_requests.rs b/crates/net/network/src/eth_requests.rs index 800844e5177c..2e403a517dc0 100644 --- a/crates/net/network/src/eth_requests.rs +++ b/crates/net/network/src/eth_requests.rs @@ -11,7 +11,7 @@ use reth_eth_wire::{ Receipts, }; use reth_network_p2p::error::RequestResult; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{BlockBody, BlockHashOrNumber, Header, HeadersDirection}; use reth_provider::{BlockReader, HeaderProvider, ReceiptProvider}; use std::{ diff --git a/crates/net/network/src/fetch/client.rs b/crates/net/network/src/fetch/client.rs index a8a4b9f07c1b..85ac8bb99cad 100644 --- a/crates/net/network/src/fetch/client.rs +++ b/crates/net/network/src/fetch/client.rs @@ -11,7 +11,7 @@ use reth_network_p2p::{ headers::client::{HeadersClient, HeadersRequest}, priority::Priority, }; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{Header, B256}; use std::sync::{ atomic::{AtomicUsize, Ordering}, diff --git a/crates/net/network/src/fetch/mod.rs b/crates/net/network/src/fetch/mod.rs index 949cd2b1aa9e..4825532e4856 100644 --- a/crates/net/network/src/fetch/mod.rs +++ b/crates/net/network/src/fetch/mod.rs @@ -9,7 +9,7 @@ use reth_network_p2p::{ headers::client::HeadersRequest, priority::Priority, }; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{BlockBody, Header, B256}; use std::{ collections::{HashMap, VecDeque}, diff --git a/crates/net/network/src/import.rs b/crates/net/network/src/import.rs index 2d18da9d41e1..11acfd03b462 100644 --- a/crates/net/network/src/import.rs +++ b/crates/net/network/src/import.rs @@ -1,7 +1,7 @@ //! This module provides an abstraction over block import in the form of the `BlockImport` trait. use crate::message::NewBlockMessage; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use std::task::{Context, Poll}; /// Abstraction over block import. diff --git a/crates/net/network/src/manager.rs b/crates/net/network/src/manager.rs index 318b48729267..47a7b1a1c09e 100644 --- a/crates/net/network/src/manager.rs +++ b/crates/net/network/src/manager.rs @@ -44,7 +44,7 @@ use reth_eth_wire::{ use reth_metrics::common::mpsc::UnboundedMeteredSender; use reth_net_common::bandwidth_meter::BandwidthMeter; use reth_network_api::ReputationChangeKind; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{ForkId, NodeRecord}; use reth_provider::{BlockNumReader, BlockReader}; use reth_rpc_types::{admin::EthProtocolInfo, NetworkStatus}; diff --git a/crates/net/network/src/message.rs b/crates/net/network/src/message.rs index 4bf3c0d89a28..9d55051e3748 100644 --- a/crates/net/network/src/message.rs +++ b/crates/net/network/src/message.rs @@ -11,7 +11,7 @@ use reth_eth_wire::{ SharedTransactions, Transactions, }; use reth_network_p2p::error::{RequestError, RequestResult}; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{ BlockBody, Bytes, Header, PooledTransactionsElement, ReceiptWithBloom, B256, }; diff --git a/crates/net/network/src/network.rs b/crates/net/network/src/network.rs index 603ffd410521..838aeec7892f 100644 --- a/crates/net/network/src/network.rs +++ b/crates/net/network/src/network.rs @@ -13,7 +13,7 @@ use reth_network_api::{ ReputationChangeKind, }; use reth_network_p2p::sync::{NetworkSyncUpdater, SyncState, SyncStateProvider}; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{Head, NodeRecord, TransactionSigned, B256}; use reth_rpc_types::NetworkStatus; use reth_tokio_util::{EventSender, EventStream}; diff --git a/crates/net/network/src/peers/manager.rs b/crates/net/network/src/peers/manager.rs index b362dc5ba6d4..bd7be4b3406f 100644 --- a/crates/net/network/src/peers/manager.rs +++ b/crates/net/network/src/peers/manager.rs @@ -14,7 +14,7 @@ use futures::StreamExt; use reth_eth_wire::{errors::EthStreamError, DisconnectReason}; use reth_net_common::ban_list::BanList; use reth_network_api::{PeerKind, ReputationChangeKind}; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{ForkId, NodeRecord}; use std::{ collections::{hash_map::Entry, HashMap, HashSet, VecDeque}, @@ -1557,7 +1557,7 @@ mod tests { }; use reth_net_common::ban_list::BanList; use reth_network_api::{Direction, ReputationChangeKind}; - use reth_network_types::PeerId; + use reth_network_peers::PeerId; use reth_primitives::B512; use std::{ collections::HashSet, diff --git a/crates/net/network/src/session/active.rs b/crates/net/network/src/session/active.rs index c06b3aba8e29..0a70ffa06d51 100644 --- a/crates/net/network/src/session/active.rs +++ b/crates/net/network/src/session/active.rs @@ -20,7 +20,7 @@ use reth_eth_wire::{ }; use reth_metrics::common::mpsc::MeteredPollSender; use reth_network_p2p::error::RequestError; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use std::{ collections::VecDeque, future::Future, @@ -769,7 +769,7 @@ mod tests { UnauthedEthStream, UnauthedP2PStream, }; use reth_net_common::bandwidth_meter::{BandwidthMeter, MeteredStream}; - use reth_network_types::pk2id; + use reth_network_peers::pk2id; use reth_primitives::{ForkFilter, Hardfork, MAINNET}; use secp256k1::{SecretKey, SECP256K1}; use tokio::{ diff --git a/crates/net/network/src/session/handle.rs b/crates/net/network/src/session/handle.rs index 6099349915bd..b28b1e27e390 100644 --- a/crates/net/network/src/session/handle.rs +++ b/crates/net/network/src/session/handle.rs @@ -12,7 +12,7 @@ use reth_eth_wire::{ DisconnectReason, EthVersion, Status, }; use reth_network_api::PeerInfo; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use std::{io, net::SocketAddr, sync::Arc, time::Instant}; use tokio::sync::{ mpsc::{self, error::SendError}, diff --git a/crates/net/network/src/session/mod.rs b/crates/net/network/src/session/mod.rs index 053d420ec2b9..0c7697dc2095 100644 --- a/crates/net/network/src/session/mod.rs +++ b/crates/net/network/src/session/mod.rs @@ -19,7 +19,7 @@ use reth_net_common::{ bandwidth_meter::{BandwidthMeter, MeteredStream}, stream::HasRemoteAddr, }; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{ForkFilter, ForkId, ForkTransition, Head}; use reth_tasks::TaskSpawner; use secp256k1::SecretKey; diff --git a/crates/net/network/src/state.rs b/crates/net/network/src/state.rs index 55e76e5044e6..afbf05dde691 100644 --- a/crates/net/network/src/state.rs +++ b/crates/net/network/src/state.rs @@ -18,7 +18,7 @@ use reth_eth_wire::{ capability::Capabilities, BlockHashNumber, DisconnectReason, NewBlockHashes, Status, }; use reth_network_api::PeerKind; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{ForkId, B256}; use reth_provider::BlockNumReader; use std::{ @@ -534,7 +534,7 @@ mod tests { BlockBodies, EthVersion, }; use reth_network_p2p::{bodies::client::BodiesClient, error::RequestError}; - use reth_network_types::PeerId; + use reth_network_peers::PeerId; use reth_primitives::{BlockBody, Header, B256}; use reth_provider::test_utils::NoopProvider; use std::{ diff --git a/crates/net/network/src/swarm.rs b/crates/net/network/src/swarm.rs index df56aa702a56..cfc1f841713c 100644 --- a/crates/net/network/src/swarm.rs +++ b/crates/net/network/src/swarm.rs @@ -12,7 +12,7 @@ use reth_eth_wire::{ errors::EthStreamError, EthVersion, Status, }; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_provider::{BlockNumReader, BlockReader}; use std::{ io, diff --git a/crates/net/network/src/test_utils/init.rs b/crates/net/network/src/test_utils/init.rs index 32a4be5b20bd..87ccbb5f9d79 100644 --- a/crates/net/network/src/test_utils/init.rs +++ b/crates/net/network/src/test_utils/init.rs @@ -1,5 +1,5 @@ use enr::{k256::ecdsa::SigningKey, Enr, EnrPublicKey}; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use std::{net::SocketAddr, time::Duration}; /// The timeout for tests that create a `GethInstance` diff --git a/crates/net/network/src/test_utils/testnet.rs b/crates/net/network/src/test_utils/testnet.rs index 468cff9508ad..331687dc417b 100644 --- a/crates/net/network/src/test_utils/testnet.rs +++ b/crates/net/network/src/test_utils/testnet.rs @@ -14,7 +14,7 @@ use futures::{FutureExt, StreamExt}; use pin_project::pin_project; use reth_eth_wire::{protocol::Protocol, DisconnectReason, HelloMessageWithProtocols}; use reth_network_api::{NetworkInfo, Peers}; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::MAINNET; use reth_provider::{ test_utils::NoopProvider, BlockReader, BlockReaderIdExt, HeaderProvider, StateProviderFactory, diff --git a/crates/net/network/src/transactions/fetcher.rs b/crates/net/network/src/transactions/fetcher.rs index ceca265a82ad..e1f89a6a4cdd 100644 --- a/crates/net/network/src/transactions/fetcher.rs +++ b/crates/net/network/src/transactions/fetcher.rs @@ -41,7 +41,7 @@ use reth_eth_wire::{ PartiallyValidData, RequestTxHashes, ValidAnnouncementData, }; use reth_network_p2p::error::{RequestError, RequestResult}; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{PooledTransactionsElement, TxHash}; use schnellru::ByLength; #[cfg(debug_assertions)] diff --git a/crates/net/network/src/transactions/mod.rs b/crates/net/network/src/transactions/mod.rs index 73760c5c2e1d..14568590252f 100644 --- a/crates/net/network/src/transactions/mod.rs +++ b/crates/net/network/src/transactions/mod.rs @@ -26,7 +26,7 @@ use reth_network_p2p::{ error::{RequestError, RequestResult}, sync::SyncStateProvider, }; -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use reth_primitives::{ FromRecoveredPooledTransaction, PooledTransactionsElement, TransactionSigned, TxHash, B256, }; diff --git a/crates/net/p2p/Cargo.toml b/crates/net/p2p/Cargo.toml index 46ce37a38491..cfc83ffce26d 100644 --- a/crates/net/p2p/Cargo.toml +++ b/crates/net/p2p/Cargo.toml @@ -16,7 +16,7 @@ reth-primitives.workspace = true reth-network-api.workspace = true reth-eth-wire-types.workspace = true reth-consensus.workspace = true -reth-network-types.workspace = true +reth-network-peers.workspace = true reth-storage-errors.workspace = true # async diff --git a/crates/net/p2p/src/download.rs b/crates/net/p2p/src/download.rs index 823860507ae5..07505144a7b8 100644 --- a/crates/net/p2p/src/download.rs +++ b/crates/net/p2p/src/download.rs @@ -1,4 +1,4 @@ -use reth_network_types::PeerId; +use reth_network_peers::PeerId; use std::fmt::Debug; /// Generic download client for peer penalization diff --git a/crates/net/p2p/src/either.rs b/crates/net/p2p/src/either.rs index e8017e880feb..5d0014e6fd2d 100644 --- a/crates/net/p2p/src/either.rs +++ b/crates/net/p2p/src/either.rs @@ -15,7 +15,7 @@ where A: DownloadClient, B: DownloadClient, { - fn report_bad_message(&self, peer_id: reth_network_types::PeerId) { + fn report_bad_message(&self, peer_id: reth_network_peers::PeerId) { match self { Self::Left(a) => a.report_bad_message(peer_id), Self::Right(b) => b.report_bad_message(peer_id), diff --git a/crates/net/p2p/src/error.rs b/crates/net/p2p/src/error.rs index 3cc2f24070f1..e005f4ea9253 100644 --- a/crates/net/p2p/src/error.rs +++ b/crates/net/p2p/src/error.rs @@ -1,7 +1,7 @@ use super::headers::client::HeadersRequest; use reth_consensus::ConsensusError; use reth_network_api::ReputationChangeKind; -use reth_network_types::WithPeerId; +use reth_network_peers::WithPeerId; use reth_primitives::{ BlockHashOrNumber, BlockNumber, GotExpected, GotExpectedBoxed, Header, B256, }; @@ -13,7 +13,7 @@ use tokio::sync::{mpsc, oneshot}; /// Result alias for result of a request. pub type RequestResult = Result; -/// Result with [`PeerId`][reth_network_types::PeerId] +/// Result with [`PeerId`][reth_network_peers::PeerId] pub type PeerRequestResult = RequestResult>; /// Helper trait used to validate responses. diff --git a/crates/net/p2p/src/full_block.rs b/crates/net/p2p/src/full_block.rs index 24ec07b89318..93af03d5b076 100644 --- a/crates/net/p2p/src/full_block.rs +++ b/crates/net/p2p/src/full_block.rs @@ -6,7 +6,7 @@ use crate::{ }; use futures::Stream; use reth_consensus::{Consensus, ConsensusError}; -use reth_network_types::WithPeerId; +use reth_network_peers::WithPeerId; use reth_primitives::{ BlockBody, GotExpected, Header, HeadersDirection, SealedBlock, SealedHeader, B256, }; diff --git a/crates/net/p2p/src/test_utils/bodies.rs b/crates/net/p2p/src/test_utils/bodies.rs index 46bd3ec9b888..7f14133ab846 100644 --- a/crates/net/p2p/src/test_utils/bodies.rs +++ b/crates/net/p2p/src/test_utils/bodies.rs @@ -22,7 +22,7 @@ impl Debug for TestBodiesClient { } impl DownloadClient for TestBodiesClient { - fn report_bad_message(&self, _peer_id: reth_network_types::PeerId) { + fn report_bad_message(&self, _peer_id: reth_network_peers::PeerId) { // noop } diff --git a/crates/net/p2p/src/test_utils/full_block.rs b/crates/net/p2p/src/test_utils/full_block.rs index c0a26539f87e..cfba59dbf745 100644 --- a/crates/net/p2p/src/test_utils/full_block.rs +++ b/crates/net/p2p/src/test_utils/full_block.rs @@ -6,7 +6,7 @@ use crate::{ priority::Priority, }; use parking_lot::Mutex; -use reth_network_types::{PeerId, WithPeerId}; +use reth_network_peers::{PeerId, WithPeerId}; use reth_primitives::{ BlockBody, BlockHashOrNumber, BlockNumHash, Header, HeadersDirection, SealedBlock, SealedHeader, B256, diff --git a/crates/net/p2p/src/test_utils/headers.rs b/crates/net/p2p/src/test_utils/headers.rs index 354732c2d2f0..706ceded9909 100644 --- a/crates/net/p2p/src/test_utils/headers.rs +++ b/crates/net/p2p/src/test_utils/headers.rs @@ -12,7 +12,7 @@ use crate::{ }; use futures::{Future, FutureExt, Stream, StreamExt}; use reth_consensus::{test_utils::TestConsensus, Consensus}; -use reth_network_types::{PeerId, WithPeerId}; +use reth_network_peers::{PeerId, WithPeerId}; use reth_primitives::{Header, HeadersDirection, SealedHeader}; use std::{ fmt, diff --git a/crates/net/types/Cargo.toml b/crates/net/peers/Cargo.toml similarity index 90% rename from crates/net/types/Cargo.toml rename to crates/net/peers/Cargo.toml index c406f13d3475..4b411ebbff53 100644 --- a/crates/net/types/Cargo.toml +++ b/crates/net/peers/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "reth-network-types" +name = "reth-network-peers" version.workspace = true edition.workspace = true rust-version.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true -description = "Network types and utils" +description = "Network peer types and utils" [lints] workspace = true diff --git a/crates/net/types/src/lib.rs b/crates/net/peers/src/lib.rs similarity index 100% rename from crates/net/types/src/lib.rs rename to crates/net/peers/src/lib.rs diff --git a/crates/net/types/src/node_record.rs b/crates/net/peers/src/node_record.rs similarity index 100% rename from crates/net/types/src/node_record.rs rename to crates/net/peers/src/node_record.rs diff --git a/crates/net/types/src/trusted_peer.rs b/crates/net/peers/src/trusted_peer.rs similarity index 100% rename from crates/net/types/src/trusted_peer.rs rename to crates/net/peers/src/trusted_peer.rs diff --git a/crates/node-core/Cargo.toml b/crates/node-core/Cargo.toml index 01c078d37d74..94d7aa453262 100644 --- a/crates/node-core/Cargo.toml +++ b/crates/node-core/Cargo.toml @@ -94,7 +94,7 @@ procfs = "0.16.0" [dev-dependencies] # test vectors generation proptest.workspace = true -reth-network-types.workspace = true +reth-network-peers.workspace = true [features] optimism = [ diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 60abf42a85eb..7136c575bcbc 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -15,7 +15,7 @@ workspace = true # reth reth-codecs.workspace = true reth-ethereum-forks.workspace = true -reth-network-types.workspace = true +reth-network-peers.workspace = true reth-static-file-types.workspace = true revm.workspace = true revm-primitives = { workspace = true, features = ["serde"] } diff --git a/crates/primitives/src/net.rs b/crates/primitives/src/net.rs index a70a32e8fc67..41fc6dfe691a 100644 --- a/crates/primitives/src/net.rs +++ b/crates/primitives/src/net.rs @@ -1,4 +1,4 @@ -pub use reth_network_types::{NodeRecord, NodeRecordParseError, TrustedPeer}; +pub use reth_network_peers::{NodeRecord, NodeRecordParseError, TrustedPeer}; // Ethereum bootnodes come from // OP bootnodes come from diff --git a/crates/rpc/rpc-api/Cargo.toml b/crates/rpc/rpc-api/Cargo.toml index fe22eae0f6a7..00581a1a16f4 100644 --- a/crates/rpc/rpc-api/Cargo.toml +++ b/crates/rpc/rpc-api/Cargo.toml @@ -16,7 +16,7 @@ workspace = true reth-primitives.workspace = true reth-rpc-types.workspace = true reth-engine-primitives.workspace = true -reth-network-types.workspace = true +reth-network-peers.workspace = true # misc jsonrpsee = { workspace = true, features = ["server", "macros"] } diff --git a/crates/rpc/rpc-api/src/admin.rs b/crates/rpc/rpc-api/src/admin.rs index 4c31221cdfe2..15904fee4989 100644 --- a/crates/rpc/rpc-api/src/admin.rs +++ b/crates/rpc/rpc-api/src/admin.rs @@ -1,5 +1,5 @@ use jsonrpsee::{core::RpcResult, proc_macros::rpc}; -use reth_network_types::AnyNode; +use reth_network_peers::AnyNode; use reth_primitives::NodeRecord; use reth_rpc_types::{admin::NodeInfo, PeerInfo}; diff --git a/crates/rpc/rpc/Cargo.toml b/crates/rpc/rpc/Cargo.toml index 2214a23d298a..700099b41e3f 100644 --- a/crates/rpc/rpc/Cargo.toml +++ b/crates/rpc/rpc/Cargo.toml @@ -28,7 +28,7 @@ reth-consensus-common.workspace = true reth-rpc-types-compat.workspace = true revm-inspectors = { workspace = true, features = ["js-tracer"] } reth-evm.workspace = true -reth-network-types.workspace = true +reth-network-peers.workspace = true reth-evm-optimism = { workspace = true, optional = true } diff --git a/crates/rpc/rpc/src/admin.rs b/crates/rpc/rpc/src/admin.rs index 9e8a0b8aa273..b1b0ca70580c 100644 --- a/crates/rpc/rpc/src/admin.rs +++ b/crates/rpc/rpc/src/admin.rs @@ -3,7 +3,7 @@ use alloy_primitives::B256; use async_trait::async_trait; use jsonrpsee::core::RpcResult; use reth_network_api::{NetworkInfo, PeerKind, Peers}; -use reth_network_types::AnyNode; +use reth_network_peers::AnyNode; use reth_primitives::{ChainSpec, NodeRecord}; use reth_rpc_api::AdminApiServer; use reth_rpc_types::{ diff --git a/crates/stages/stages/Cargo.toml b/crates/stages/stages/Cargo.toml index 974d47c872b0..44e344f8aa58 100644 --- a/crates/stages/stages/Cargo.toml +++ b/crates/stages/stages/Cargo.toml @@ -60,7 +60,7 @@ reth-static-file.workspace = true reth-testing-utils.workspace = true reth-trie = { workspace = true, features = ["test-utils"] } reth-provider = { workspace = true, features = ["test-utils"] } -reth-network-types.workspace = true +reth-network-peers.workspace = true alloy-rlp.workspace = true itertools.workspace = true diff --git a/crates/stages/stages/src/lib.rs b/crates/stages/stages/src/lib.rs index dc300e684b83..4e60e168a1bb 100644 --- a/crates/stages/stages/src/lib.rs +++ b/crates/stages/stages/src/lib.rs @@ -19,7 +19,7 @@ //! # use reth_evm_ethereum::execute::EthExecutorProvider; //! # use reth_primitives::{MAINNET, B256}; //! # use reth_prune_types::PruneModes; -//! # use reth_network_types::PeerId; +//! # use reth_network_peers::PeerId; //! # use reth_stages::Pipeline; //! # use reth_stages::sets::DefaultStages; //! # use tokio::sync::watch; diff --git a/examples/manual-p2p/Cargo.toml b/examples/manual-p2p/Cargo.toml index 139cb0e1827c..5a9a999b9953 100644 --- a/examples/manual-p2p/Cargo.toml +++ b/examples/manual-p2p/Cargo.toml @@ -11,7 +11,7 @@ reth-network.workspace = true reth-discv4.workspace = true reth-eth-wire.workspace = true reth-ecies.workspace = true -reth-network-types.workspace = true +reth-network-peers.workspace = true secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] } diff --git a/examples/manual-p2p/src/main.rs b/examples/manual-p2p/src/main.rs index e97cb3662d29..ba01307b211f 100644 --- a/examples/manual-p2p/src/main.rs +++ b/examples/manual-p2p/src/main.rs @@ -16,7 +16,7 @@ use reth_eth_wire::{ EthMessage, EthStream, HelloMessage, P2PStream, Status, UnauthedEthStream, UnauthedP2PStream, }; use reth_network::config::rng_secret_key; -use reth_network_types::pk2id; +use reth_network_peers::pk2id; use reth_primitives::{ mainnet_nodes, Chain, Hardfork, Head, NodeRecord, MAINNET, MAINNET_GENESIS_HASH, };