From 1f64d8e9d79fecf7a102ce1f07fbedb3aa85ba24 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Thu, 2 Feb 2023 13:54:13 -0800 Subject: [PATCH] refactor: pull reth/common/rlp up to reth/rlp (#1146) --- Cargo.toml | 4 ++-- bin/reth/Cargo.toml | 2 +- crates/executor/Cargo.toml | 2 +- crates/net/discv4/Cargo.toml | 4 ++-- crates/net/dns/Cargo.toml | 2 +- crates/net/downloaders/Cargo.toml | 4 ++-- crates/net/ecies/Cargo.toml | 2 +- crates/net/eth-wire/Cargo.toml | 2 +- crates/net/network/Cargo.toml | 4 ++-- crates/net/rpc-engine-api/Cargo.toml | 2 +- crates/net/rpc-types/Cargo.toml | 2 +- crates/net/rpc/Cargo.toml | 2 +- crates/primitives/Cargo.toml | 4 ++-- crates/primitives/src/hardfork.rs | 2 +- crates/{common => }/rlp/Cargo.toml | 2 +- crates/{common/rlp-derive => rlp}/LICENCE | 0 crates/{common => }/rlp/README.md | 0 crates/{common => }/rlp/benches/bench.rs | 0 crates/{common => rlp}/rlp-derive/Cargo.toml | 0 crates/{common/rlp => rlp/rlp-derive}/LICENCE | 0 crates/{common => rlp}/rlp-derive/README.md | 0 crates/{common => rlp}/rlp-derive/src/de.rs | 0 crates/{common => rlp}/rlp-derive/src/en.rs | 0 crates/{common => rlp}/rlp-derive/src/lib.rs | 0 crates/{common => rlp}/rlp-derive/src/utils.rs | 0 crates/{common => }/rlp/src/decode.rs | 0 crates/{common => }/rlp/src/encode.rs | 0 crates/{common => }/rlp/src/lib.rs | 0 crates/{common => }/rlp/src/types.rs | 0 crates/{common => }/rlp/tests/rlp.rs | 0 crates/stages/Cargo.toml | 2 +- 31 files changed, 21 insertions(+), 21 deletions(-) rename crates/{common => }/rlp/Cargo.toml (94%) rename crates/{common/rlp-derive => rlp}/LICENCE (100%) rename crates/{common => }/rlp/README.md (100%) rename crates/{common => }/rlp/benches/bench.rs (100%) rename crates/{common => rlp}/rlp-derive/Cargo.toml (100%) rename crates/{common/rlp => rlp/rlp-derive}/LICENCE (100%) rename crates/{common => rlp}/rlp-derive/README.md (100%) rename crates/{common => rlp}/rlp-derive/src/de.rs (100%) rename crates/{common => rlp}/rlp-derive/src/en.rs (100%) rename crates/{common => rlp}/rlp-derive/src/lib.rs (100%) rename crates/{common => rlp}/rlp-derive/src/utils.rs (100%) rename crates/{common => }/rlp/src/decode.rs (100%) rename crates/{common => }/rlp/src/encode.rs (100%) rename crates/{common => }/rlp/src/lib.rs (100%) rename crates/{common => }/rlp/src/types.rs (100%) rename crates/{common => }/rlp/tests/rlp.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 7b4a34441..585886be5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,8 +2,8 @@ members = [ "bin/reth", "crate-template", - "crates/common/rlp", - "crates/common/rlp-derive", + "crates/rlp", + "crates/rlp/rlp-derive", "crates/consensus", "crates/executor", "crates/interfaces", diff --git a/bin/reth/Cargo.toml b/bin/reth/Cargo.toml index aeb374783..02e97e909 100644 --- a/bin/reth/Cargo.toml +++ b/bin/reth/Cargo.toml @@ -19,7 +19,7 @@ reth-transaction-pool = { path = "../../crates/transaction-pool" } reth-consensus = { path = "../../crates/consensus" } reth-executor = { path = "../../crates/executor" } # reth-rpc = {path = "../../crates/net/rpc"} -reth-rlp = { path = "../../crates/common/rlp" } +reth-rlp = { path = "../../crates/rlp" } reth-network = {path = "../../crates/net/network", features = ["serde"] } reth-network-api = {path = "../../crates/net/network-api" } reth-downloaders = {path = "../../crates/net/downloaders" } diff --git a/crates/executor/Cargo.toml b/crates/executor/Cargo.toml index e5b80f08d..1c75bd83a 100644 --- a/crates/executor/Cargo.toml +++ b/crates/executor/Cargo.toml @@ -10,7 +10,7 @@ readme = "README.md" # reth reth-primitives = { path = "../primitives" } reth-interfaces = { path = "../interfaces" } -reth-rlp = { path = "../common/rlp" } +reth-rlp = { path = "../rlp" } reth-db = { path = "../storage/db" } reth-provider = { path = "../storage/provider" } diff --git a/crates/net/discv4/Cargo.toml b/crates/net/discv4/Cargo.toml index 9d2e9ec01..236f70ad2 100644 --- a/crates/net/discv4/Cargo.toml +++ b/crates/net/discv4/Cargo.toml @@ -12,8 +12,8 @@ Ethereum network discovery [dependencies] # reth reth-primitives = { path = "../../primitives" } -reth-rlp = { path = "../../common/rlp", features = ["enr"] } -reth-rlp-derive = { path = "../../common/rlp-derive" } +reth-rlp = { path = "../../rlp", features = ["enr"] } +reth-rlp-derive = { path = "../../rlp/rlp-derive" } reth-net-common = { path = "../common" } reth-net-nat = { path = "../nat" } diff --git a/crates/net/dns/Cargo.toml b/crates/net/dns/Cargo.toml index dfefa5ebf..72fd2cd2e 100644 --- a/crates/net/dns/Cargo.toml +++ b/crates/net/dns/Cargo.toml @@ -11,7 +11,7 @@ description = "Support for EIP-1459 Node Discovery via DNS" # reth reth-primitives = { path = "../../primitives" } reth-net-common = { path = "../common" } -reth-rlp = { path = "../../common/rlp" } +reth-rlp = { path = "../../rlp" } # ethereum secp256k1 = { version = "0.24", features = [ diff --git a/crates/net/downloaders/Cargo.toml b/crates/net/downloaders/Cargo.toml index 75505fdba..6c4b58c48 100644 --- a/crates/net/downloaders/Cargo.toml +++ b/crates/net/downloaders/Cargo.toml @@ -27,7 +27,7 @@ tracing = "0.1.37" metrics = "0.20.1" thiserror = { version = "1", optional = true } -reth-rlp = { path = "../../common/rlp", optional = true } +reth-rlp = { path = "../../rlp", optional = true } [dev-dependencies] reth-db = { path = "../../storage/db", features = ["test-utils"] } @@ -36,7 +36,7 @@ reth-tracing = { path = "../../tracing" } assert_matches = "1.5.0" tokio = { version = "1", features = ["macros", "rt-multi-thread"] } -reth-rlp = { path = "../../common/rlp" } +reth-rlp = { path = "../../rlp" } thiserror = "1" tempfile = "3.3" diff --git a/crates/net/ecies/Cargo.toml b/crates/net/ecies/Cargo.toml index 86608bff5..3f558084a 100644 --- a/crates/net/ecies/Cargo.toml +++ b/crates/net/ecies/Cargo.toml @@ -7,7 +7,7 @@ repository = "https://github.com/paradigmxyz/reth" readme = "README.md" [dependencies] -reth-rlp = { path = "../../common/rlp", features = ["derive", "ethereum-types", "std"] } +reth-rlp = { path = "../../rlp", features = ["derive", "ethereum-types", "std"] } reth-primitives = { path = "../../primitives" } reth-net-common = { path = "../common" } diff --git a/crates/net/eth-wire/Cargo.toml b/crates/net/eth-wire/Cargo.toml index 42551fec2..56e8efccf 100644 --- a/crates/net/eth-wire/Cargo.toml +++ b/crates/net/eth-wire/Cargo.toml @@ -16,7 +16,7 @@ serde = "1" # reth reth-codecs = { path = "../../storage/codecs" } reth-primitives = { path = "../../primitives" } -reth-rlp = { path = "../../common/rlp", features = ["alloc", "derive", "std", "ethereum-types", "smol_str"] } +reth-rlp = { path = "../../rlp", features = ["alloc", "derive", "std", "ethereum-types", "smol_str"] } # used for Chain and builders ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false } diff --git a/crates/net/network/Cargo.toml b/crates/net/network/Cargo.toml index d982ecdf7..4ab788e80 100644 --- a/crates/net/network/Cargo.toml +++ b/crates/net/network/Cargo.toml @@ -25,8 +25,8 @@ reth-discv4 = { path = "../discv4" } reth-dns-discovery = { path = "../dns" } reth-eth-wire = { path = "../eth-wire" } reth-ecies = { path = "../ecies" } -reth-rlp = { path = "../../common/rlp" } -reth-rlp-derive = { path = "../../common/rlp-derive" } +reth-rlp = { path = "../../rlp" } +reth-rlp-derive = { path = "../../rlp/rlp-derive" } reth-tasks = { path = "../../tasks" } reth-transaction-pool = { path = "../../transaction-pool" } reth-provider = { path = "../../storage/provider"} diff --git a/crates/net/rpc-engine-api/Cargo.toml b/crates/net/rpc-engine-api/Cargo.toml index 37e085dd3..dcda77219 100644 --- a/crates/net/rpc-engine-api/Cargo.toml +++ b/crates/net/rpc-engine-api/Cargo.toml @@ -11,7 +11,7 @@ description = "Implementation of Engine API" reth-primitives = { path = "../../primitives" } reth-interfaces = { path = "../../interfaces" } reth-provider = { path = "../../storage/provider" } -reth-rlp = { path = "../../common/rlp" } +reth-rlp = { path = "../../rlp" } reth-executor = { path = "../../executor" } reth-rpc-types = { path = "../rpc-types" } diff --git a/crates/net/rpc-types/Cargo.toml b/crates/net/rpc-types/Cargo.toml index 1cc36a9ce..f60227380 100644 --- a/crates/net/rpc-types/Cargo.toml +++ b/crates/net/rpc-types/Cargo.toml @@ -11,7 +11,7 @@ Reth RPC types [dependencies] # reth reth-primitives = { path = "../../primitives" } -reth-rlp = { path = "../../common/rlp" } +reth-rlp = { path = "../../rlp" } reth-network-api = { path = "../network-api"} # misc diff --git a/crates/net/rpc/Cargo.toml b/crates/net/rpc/Cargo.toml index 9e5f4f9d6..9af326aea 100644 --- a/crates/net/rpc/Cargo.toml +++ b/crates/net/rpc/Cargo.toml @@ -13,7 +13,7 @@ Reth RPC implementation reth-interfaces = { path = "../../interfaces" } reth-primitives = { path = "../../primitives" } reth-rpc-api = { path = "../rpc-api" } -reth-rlp = { path = "../../common/rlp" } +reth-rlp = { path = "../../rlp" } reth-rpc-types = { path = "../rpc-types" } reth-provider = { path = "../../storage/provider" } reth-transaction-pool = { path = "../../transaction-pool" } diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index d21740163..46d56a914 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -9,12 +9,12 @@ description = "Commonly used types in reth." [dependencies] # reth -reth-rlp = { path = "../common/rlp", features = [ +reth-rlp = { path = "../rlp", features = [ "std", "derive", "ethereum-types", ] } -reth-rlp-derive = { path = "../common/rlp-derive" } +reth-rlp-derive = { path = "../rlp/rlp-derive" } reth-codecs = { version = "0.1.0", path = "../storage/codecs" } revm-interpreter = { git = "https://github.com/bluealloy/revm", rev = "a05fb262d87c78ee52d400e6c0f4708d4c527f32", features = [ diff --git a/crates/primitives/src/hardfork.rs b/crates/primitives/src/hardfork.rs index 42ea1f160..f310879b2 100644 --- a/crates/primitives/src/hardfork.rs +++ b/crates/primitives/src/hardfork.rs @@ -48,7 +48,7 @@ impl Hardfork { curr_block_number = b; } } else { - return Some(ForkId { hash: curr_forkhash, next: b }) + return Some(ForkId { hash: curr_forkhash, next: b }); } } Some(ForkId { hash: curr_forkhash, next: 0 }) diff --git a/crates/common/rlp/Cargo.toml b/crates/rlp/Cargo.toml similarity index 94% rename from crates/common/rlp/Cargo.toml rename to crates/rlp/Cargo.toml index 92761b36d..b62da94f6 100644 --- a/crates/common/rlp/Cargo.toml +++ b/crates/rlp/Cargo.toml @@ -15,7 +15,7 @@ smol_str = { version = "0.1", default-features = false, optional = true } enr = { version = "0.7", default-features = false, optional = true } rlp = { version = "0.5.2", default-features = false, optional = true } ethereum-types = { version = "0.14", features = ["codec"], optional = true } -reth-rlp-derive = { version = "0.1", path = "../rlp-derive", optional = true } +reth-rlp-derive = { version = "0.1", path = "./rlp-derive", optional = true } revm-interpreter = { git = "https://github.com/bluealloy/revm", rev = "a05fb262d87c78ee52d400e6c0f4708d4c527f32", features = ["serde"] } [dev-dependencies] diff --git a/crates/common/rlp-derive/LICENCE b/crates/rlp/LICENCE similarity index 100% rename from crates/common/rlp-derive/LICENCE rename to crates/rlp/LICENCE diff --git a/crates/common/rlp/README.md b/crates/rlp/README.md similarity index 100% rename from crates/common/rlp/README.md rename to crates/rlp/README.md diff --git a/crates/common/rlp/benches/bench.rs b/crates/rlp/benches/bench.rs similarity index 100% rename from crates/common/rlp/benches/bench.rs rename to crates/rlp/benches/bench.rs diff --git a/crates/common/rlp-derive/Cargo.toml b/crates/rlp/rlp-derive/Cargo.toml similarity index 100% rename from crates/common/rlp-derive/Cargo.toml rename to crates/rlp/rlp-derive/Cargo.toml diff --git a/crates/common/rlp/LICENCE b/crates/rlp/rlp-derive/LICENCE similarity index 100% rename from crates/common/rlp/LICENCE rename to crates/rlp/rlp-derive/LICENCE diff --git a/crates/common/rlp-derive/README.md b/crates/rlp/rlp-derive/README.md similarity index 100% rename from crates/common/rlp-derive/README.md rename to crates/rlp/rlp-derive/README.md diff --git a/crates/common/rlp-derive/src/de.rs b/crates/rlp/rlp-derive/src/de.rs similarity index 100% rename from crates/common/rlp-derive/src/de.rs rename to crates/rlp/rlp-derive/src/de.rs diff --git a/crates/common/rlp-derive/src/en.rs b/crates/rlp/rlp-derive/src/en.rs similarity index 100% rename from crates/common/rlp-derive/src/en.rs rename to crates/rlp/rlp-derive/src/en.rs diff --git a/crates/common/rlp-derive/src/lib.rs b/crates/rlp/rlp-derive/src/lib.rs similarity index 100% rename from crates/common/rlp-derive/src/lib.rs rename to crates/rlp/rlp-derive/src/lib.rs diff --git a/crates/common/rlp-derive/src/utils.rs b/crates/rlp/rlp-derive/src/utils.rs similarity index 100% rename from crates/common/rlp-derive/src/utils.rs rename to crates/rlp/rlp-derive/src/utils.rs diff --git a/crates/common/rlp/src/decode.rs b/crates/rlp/src/decode.rs similarity index 100% rename from crates/common/rlp/src/decode.rs rename to crates/rlp/src/decode.rs diff --git a/crates/common/rlp/src/encode.rs b/crates/rlp/src/encode.rs similarity index 100% rename from crates/common/rlp/src/encode.rs rename to crates/rlp/src/encode.rs diff --git a/crates/common/rlp/src/lib.rs b/crates/rlp/src/lib.rs similarity index 100% rename from crates/common/rlp/src/lib.rs rename to crates/rlp/src/lib.rs diff --git a/crates/common/rlp/src/types.rs b/crates/rlp/src/types.rs similarity index 100% rename from crates/common/rlp/src/types.rs rename to crates/rlp/src/types.rs diff --git a/crates/common/rlp/tests/rlp.rs b/crates/rlp/tests/rlp.rs similarity index 100% rename from crates/common/rlp/tests/rlp.rs rename to crates/rlp/tests/rlp.rs diff --git a/crates/stages/Cargo.toml b/crates/stages/Cargo.toml index 828108a31..608c3d988 100644 --- a/crates/stages/Cargo.toml +++ b/crates/stages/Cargo.toml @@ -18,7 +18,7 @@ normal = [ reth-primitives = { path = "../primitives" } reth-interfaces = { path = "../interfaces" } reth-executor = { path = "../executor" } -reth-rlp = { path = "../common/rlp" } +reth-rlp = { path = "../rlp" } reth-db = { path = "../storage/db" } reth-provider = { path = "../storage/provider" }