Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename network-types to network-peers #8699

Merged
merged 1 commit into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/auto-seal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/consensus/auto-seal/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion crates/net/discv4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
4 changes: 2 additions & 2 deletions crates/net/discv4/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion crates/net/discv4/src/node.rs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion crates/net/discv4/src/proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/net/discv4/src/table.rs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion crates/net/discv4/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
2 changes: 1 addition & 1 deletion crates/net/discv5/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/net/discv5/src/enr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/net/discv5/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion crates/net/dns/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/net/dns/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crates/net/downloaders/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion crates/net/downloaders/src/bodies/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/net/downloaders/src/file_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/net/downloaders/src/headers/reverse_headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
2 changes: 1 addition & 1 deletion crates/net/downloaders/src/test_utils/bodies_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/net/ecies/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/net/ecies/src/algorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/net/ecies/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
2 changes: 1 addition & 1 deletion crates/net/eth-wire/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/net/eth-wire/src/ethstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading
Loading