diff --git a/Cargo.lock b/Cargo.lock index 53919de4b30..b80d5d5647c 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 fafd469027e..b281d4e7d5f 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 21e192e282e..8aa6e1656d9 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 339f10cf2b7..b9befa73857 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 719ec83a689..8e8c5101525 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 84ff6034f27..f0f7a9b0a1a 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 c2e6d329e0d..0a8f436c3f0 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 ce72e264bc6..c319b164e09 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 00e1fe50c29..315bd33bcd7 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 71c4a543b7b..49521ec694e 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 a73888ae0ea..a7450b1c1a7 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 162370bb4cf..a1417aa439c 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 4effa1f79bd..6ebb3b9ba6d 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 8076bd4e1e2..040b8d27bee 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 4738d935f82..4edcdbeb317 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 f767aec0982..eb55d6e9bc4 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 08f223ef035..f27801041e8 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 1562e4a6c89..0ef12f1ba55 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 9980f1ba716..e123ce71229 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 ae970931b01..7b655dae289 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 6dbf1d4c52d..01c8d9f640e 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 f7e4e9af36f..d76502457d0 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 0329d4fef42..02c834fe0dc 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 a13f13ebc3e..852cc74f9a1 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 88d02ce67b1..e8d4e79eaf8 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 b8af52504ef..fbdffecec38 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 4376bc358b6..46ff1eee3ec 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 3e8ed584fc3..634c45a79c7 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 957bd860be6..97bd784065e 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 b022ced4bc3..0678b928857 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 e70958450a3..b41d3db5486 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 26fd3f8a61c..3066c9eafb4 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 c5af0a5561e..38346ec1d0d 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 800844e5177..2e403a517dc 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 a8a4b9f07c1..85ac8bb99ca 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 949cd2b1aa9..4825532e485 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 2d18da9d41e..11acfd03b46 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 318b4872926..47a7b1a1c09 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 4bf3c0d89a2..9d55051e374 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 603ffd41052..838aeec7892 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 b362dc5ba6d..bd7be4b3406 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 c06b3aba8e2..0a70ffa06d5 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 6099349915b..b28b1e27e39 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 053d420ec2b..0c7697dc209 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 55e76e5044e..afbf05dde69 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 df56aa702a5..cfc1f841713 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 32a4be5b20b..87ccbb5f9d7 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 468cff9508a..331687dc417 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 ceca265a82a..e1f89a6a4cd 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 73760c5c2e1..14568590252 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 46ce37a3849..cfc83ffce26 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 823860507ae..07505144a7b 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 e8017e880fe..5d0014e6fd2 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 3cc2f24070f..e005f4ea925 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 24ec07b8931..93af03d5b07 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 46bd3ec9b88..7f14133ab84 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 c0a26539f87..cfba59dbf74 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 354732c2d2f..706ceded990 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 c406f13d347..4b411ebbff5 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 01c078d37d7..94d7aa45326 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 60abf42a85e..7136c575bcb 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 a70a32e8fc6..41fc6dfe691 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 fe22eae0f6a..00581a1a16f 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 4c31221cdfe..15904fee498 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 2214a23d298..700099b41e3 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 9e8a0b8aa27..b1b0ca70580 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 974d47c872b..44e344f8aa5 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 dc300e684b8..4e60e168a1b 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 139cb0e1827..5a9a999b995 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 e97cb3662d2..ba01307b211 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, };