refactor: pull out rpc/ from net/rpc (#1147)

This commit is contained in:
Georgios Konstantopoulos
2023-02-02 14:17:26 -08:00
committed by GitHub
parent 1f64d8e9d7
commit e048718ea2
71 changed files with 24 additions and 24 deletions

View File

@ -2,11 +2,11 @@
members = [
"bin/reth",
"crate-template",
"crates/rlp",
"crates/rlp/rlp-derive",
"crates/consensus",
"crates/executor",
"crates/interfaces",
"crates/metrics/metrics-derive",
"crates/metrics/common",
"crates/net/common",
"crates/net/ecies",
"crates/net/eth-wire",
@ -15,14 +15,16 @@ members = [
"crates/net/nat",
"crates/net/network-api",
"crates/net/network",
"crates/net/ipc",
"crates/net/rpc",
"crates/net/rpc-api",
"crates/net/rpc-builder",
"crates/net/rpc-engine-api",
"crates/net/rpc-types",
"crates/net/downloaders",
"crates/primitives",
"crates/rlp",
"crates/rlp/rlp-derive",
"crates/rpc/ipc",
"crates/rpc/rpc",
"crates/rpc/rpc-api",
"crates/rpc/rpc-builder",
"crates/rpc/rpc-engine-api",
"crates/rpc/rpc-types",
"crates/staged-sync",
"crates/stages",
"crates/storage/codecs",
@ -33,7 +35,5 @@ members = [
"crates/tracing",
"crates/tasks",
"crates/transaction-pool",
"crates/metrics/metrics-derive",
"crates/metrics/common",
]
default-members = ["bin/reth"]

View File

@ -18,7 +18,7 @@ reth-interfaces = { path = "../../crates/interfaces", features = ["test-utils"]
reth-transaction-pool = { path = "../../crates/transaction-pool" }
reth-consensus = { path = "../../crates/consensus" }
reth-executor = { path = "../../crates/executor" }
# reth-rpc = {path = "../../crates/net/rpc"}
# reth-rpc = {path = "../../crates/rpc/rpc"}
reth-rlp = { path = "../../crates/rlp" }
reth-network = {path = "../../crates/net/network", features = ["serde"] }
reth-network-api = {path = "../../crates/net/network-api" }

View File

@ -9,7 +9,7 @@ readme = "README.md"
[dependencies]
reth-codecs = { path = "../storage/codecs" }
reth-primitives = { path = "../primitives" }
reth-rpc-types = { path = "../net/rpc-types" }
reth-rpc-types = { path = "../rpc/rpc-types" }
reth-network-api = { path = "../net/network-api"}
async-trait = "0.1.57"
thiserror = "1.0.37"

View File

@ -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 })

View File

@ -9,7 +9,7 @@ description = "Helpers for configuring RPC"
[dependencies]
# reth
reth-ipc = { path = "../ipc" }
reth-network-api = { path = "../network-api" }
reth-network-api = { path = "../../net/network-api" }
reth-provider = { path = "../../storage/provider" }
reth-rpc = { path = "../rpc" }
reth-transaction-pool = { path = "../../transaction-pool" }
@ -17,4 +17,4 @@ reth-transaction-pool = { path = "../../transaction-pool" }
jsonrpsee = { version = "0.16", features = ["server"] }
strum = { version = "0.24", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }

View File

@ -27,4 +27,4 @@ thiserror = "1.0.37"
reth-interfaces = { path = "../../interfaces", features = ["test-utils"] }
reth-provider = { path = "../../storage/provider", features = ["test-utils"] }
assert_matches = "1.5.0"
bytes = "1.2"
bytes = "1.2"

View File

@ -12,9 +12,9 @@ Reth RPC types
# reth
reth-primitives = { path = "../../primitives" }
reth-rlp = { path = "../../rlp" }
reth-network-api = { path = "../network-api"}
reth-network-api = { path = "../../net/network-api"}
# misc
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
bytes = "1.2"
bytes = "1.2"

View File

@ -17,7 +17,7 @@ reth-rlp = { path = "../../rlp" }
reth-rpc-types = { path = "../rpc-types" }
reth-provider = { path = "../../storage/provider" }
reth-transaction-pool = { path = "../../transaction-pool" }
reth-network-api = { path = "../network-api" }
reth-network-api = { path = "../../net/network-api" }
reth-rpc-engine-api = { path = "../rpc-engine-api" }
# rpc

View File

@ -12,7 +12,7 @@ description = "Reth storage provider."
reth-codecs = { path = "../codecs" }
reth-primitives = { path = "../../primitives" }
reth-interfaces = { path = "../../interfaces" }
reth-rpc-types = { path = "../../net/rpc-types" }
reth-rpc-types = { path = "../../rpc/rpc-types" }
reth-db = { path = "../db" }
# codecs

View File

@ -46,11 +46,11 @@ These crates are related to networking (p2p and RPC), as well as networking prot
#### RPC
- [`net/rpc-api`](../../crates/net/rpc-api): RPC traits
- [`net/rpc-api`](../../crates/rpc/rpc-api): RPC traits
- Supported transports: HTTP, WS, IPC
- Supported namespaces: `eth_`, `engine_`, `debug_`
- [`net/rpc`](../../crates/net/rpc): Implementation of all ETH JSON RPC traits defined in `rpc-api`.
- [`net/rpc-types`](../../crates/net/rpc-types): Types relevant for the RPC endpoints above, grouped by namespace
- [`net/rpc`](../../crates/rpc/rpc): Implementation of all ETH JSON RPC traits defined in `rpc-api`.
- [`net/rpc-types`](../../crates/rpc/rpc-types): Types relevant for the RPC endpoints above, grouped by namespace
#### Downloaders
@ -84,4 +84,4 @@ Small utility crates.
[libmdbx-rs]: https://crates.io/crates/libmdbx
[discv4]: https://github.com/ethereum/devp2p/blob/master/discv4.md
[jsonrpsee]: https://github.com/paritytech/jsonrpsee/
[tracing]: https://crates.io/crates/tracing
[tracing]: https://crates.io/crates/tracing