From 44a8e6589bbcfe0fe2bf3a1ccc195c33d71ea718 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 28 Sep 2022 12:56:10 -0400 Subject: [PATCH 1/4] feat: add p2p crate --- Cargo.lock | 4 ++++ crates/p2p/Cargo.toml | 10 ++++++++++ crates/p2p/src/lib.rs | 8 ++++++++ 3 files changed, 22 insertions(+) create mode 100644 crates/p2p/Cargo.toml create mode 100644 crates/p2p/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 06a2a488903..ee140b7b4a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -645,6 +645,10 @@ version = "0.1.0" name = "reth-crate-template" version = "0.1.0" +[[package]] +name = "reth-p2p" +version = "0.1.0" + [[package]] name = "reth-primitives" version = "0.1.0" diff --git a/crates/p2p/Cargo.toml b/crates/p2p/Cargo.toml new file mode 100644 index 00000000000..8142387f238 --- /dev/null +++ b/crates/p2p/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "reth-p2p" +version = "0.1.0" +edition = "2021" +license = "MIT OR Apache-2.0" +repository = "https://github.com/foundry-rs/reth" +readme = "README.md" +description = "utilities for interacting with ethereum's peer to peer network" + +[dependencies] diff --git a/crates/p2p/src/lib.rs b/crates/p2p/src/lib.rs new file mode 100644 index 00000000000..dd3d4d73efc --- /dev/null +++ b/crates/p2p/src/lib.rs @@ -0,0 +1,8 @@ +#![warn(missing_debug_implementations, missing_docs, unreachable_pub)] +#![deny(unused_must_use, rust_2018_idioms)] +#![doc(test( + no_crate_inject, + attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables)) +))] + +//! utilities for interacting with ethereum's peer to peer network From d3e28b68c1caea2ee8585e3c9f617f7275665f98 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 28 Sep 2022 20:16:02 -0400 Subject: [PATCH 2/4] move p2p to net subfolder --- crates/{ => net}/p2p/Cargo.toml | 0 crates/{ => net}/p2p/src/lib.rs | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename crates/{ => net}/p2p/Cargo.toml (100%) rename crates/{ => net}/p2p/src/lib.rs (100%) diff --git a/crates/p2p/Cargo.toml b/crates/net/p2p/Cargo.toml similarity index 100% rename from crates/p2p/Cargo.toml rename to crates/net/p2p/Cargo.toml diff --git a/crates/p2p/src/lib.rs b/crates/net/p2p/src/lib.rs similarity index 100% rename from crates/p2p/src/lib.rs rename to crates/net/p2p/src/lib.rs From 878387d8a7424fc0c289ddd0bb4826fb98726651 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Wed, 28 Sep 2022 20:23:15 -0400 Subject: [PATCH 3/4] add lib.rs and Cargo.toml to net --- Cargo.lock | 2 +- crates/net/Cargo.toml | 10 ++++++++++ crates/net/src/lib.rs | 8 ++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 crates/net/Cargo.toml create mode 100644 crates/net/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index ee140b7b4a9..7632e48aa97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -646,7 +646,7 @@ name = "reth-crate-template" version = "0.1.0" [[package]] -name = "reth-p2p" +name = "reth-net" version = "0.1.0" [[package]] diff --git a/crates/net/Cargo.toml b/crates/net/Cargo.toml new file mode 100644 index 00000000000..88397ac4c8e --- /dev/null +++ b/crates/net/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "reth-net" +version = "0.1.0" +edition = "2021" +license = "MIT OR Apache-2.0" +repository = "https://github.com/foundry-rs/reth" +readme = "README.md" +description = "networking utilities for reth" + +[dependencies] diff --git a/crates/net/src/lib.rs b/crates/net/src/lib.rs new file mode 100644 index 00000000000..f3c5cf261d9 --- /dev/null +++ b/crates/net/src/lib.rs @@ -0,0 +1,8 @@ +#![warn(missing_debug_implementations, missing_docs, unreachable_pub)] +#![deny(unused_must_use, rust_2018_idioms)] +#![doc(test( + no_crate_inject, + attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables)) +))] + +//! networking utilities for reth From 3cce52724cee8c42d8abbe771d6d36c74e6ab697 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Fri, 30 Sep 2022 11:44:49 -0400 Subject: [PATCH 4/4] remove net crate, use explicit names in workspace --- Cargo.lock | 2 +- Cargo.toml | 3 ++- crates/net/Cargo.toml | 10 ---------- crates/net/p2p/Cargo.toml | 2 +- crates/net/p2p/src/lib.rs | 2 +- crates/net/src/lib.rs | 8 -------- 6 files changed, 5 insertions(+), 22 deletions(-) delete mode 100644 crates/net/Cargo.toml delete mode 100644 crates/net/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 7632e48aa97..ee140b7b4a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -646,7 +646,7 @@ name = "reth-crate-template" version = "0.1.0" [[package]] -name = "reth-net" +name = "reth-p2p" version = "0.1.0" [[package]] diff --git a/Cargo.toml b/Cargo.toml index 43a9c63511e..b22c2a824b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,8 @@ edition = "2021" [workspace] members = [ "crate-template", - "crates/*" + "crates/primitives", + "crates/net/p2p" ] [dependencies] diff --git a/crates/net/Cargo.toml b/crates/net/Cargo.toml deleted file mode 100644 index 88397ac4c8e..00000000000 --- a/crates/net/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[package] -name = "reth-net" -version = "0.1.0" -edition = "2021" -license = "MIT OR Apache-2.0" -repository = "https://github.com/foundry-rs/reth" -readme = "README.md" -description = "networking utilities for reth" - -[dependencies] diff --git a/crates/net/p2p/Cargo.toml b/crates/net/p2p/Cargo.toml index 8142387f238..ac3fef40742 100644 --- a/crates/net/p2p/Cargo.toml +++ b/crates/net/p2p/Cargo.toml @@ -5,6 +5,6 @@ edition = "2021" license = "MIT OR Apache-2.0" repository = "https://github.com/foundry-rs/reth" readme = "README.md" -description = "utilities for interacting with ethereum's peer to peer network" +description = "Utilities for interacting with ethereum's peer to peer network." [dependencies] diff --git a/crates/net/p2p/src/lib.rs b/crates/net/p2p/src/lib.rs index dd3d4d73efc..bec2e0709f2 100644 --- a/crates/net/p2p/src/lib.rs +++ b/crates/net/p2p/src/lib.rs @@ -5,4 +5,4 @@ attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables)) ))] -//! utilities for interacting with ethereum's peer to peer network +//! Utilities for interacting with ethereum's peer to peer network. diff --git a/crates/net/src/lib.rs b/crates/net/src/lib.rs deleted file mode 100644 index f3c5cf261d9..00000000000 --- a/crates/net/src/lib.rs +++ /dev/null @@ -1,8 +0,0 @@ -#![warn(missing_debug_implementations, missing_docs, unreachable_pub)] -#![deny(unused_must_use, rust_2018_idioms)] -#![doc(test( - no_crate_inject, - attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables)) -))] - -//! networking utilities for reth