Skip to content

Commit e20cb91

Browse files
rupam-04emhane
andauthored
Extract layers module from rpc crate (#8163)
Co-authored-by: Emilia Hane <emiliaha95@gmail.com>
1 parent bab96be commit e20cb91

File tree

24 files changed

+352
-289
lines changed

24 files changed

+352
-289
lines changed

Cargo.lock

Lines changed: 269 additions & 260 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ members = [
4646
"crates/rpc/rpc-testing-util/",
4747
"crates/rpc/rpc-types/",
4848
"crates/rpc/rpc-types-compat/",
49+
"crates/rpc/rpc-layer",
4950
"crates/engine-primitives/",
5051
"crates/ethereum/engine-primitives/",
5152
"crates/ethereum/node",
@@ -264,6 +265,7 @@ reth-rpc-builder = { path = "crates/rpc/rpc-builder" }
264265
reth-rpc-engine-api = { path = "crates/rpc/rpc-engine-api" }
265266
reth-rpc-types = { path = "crates/rpc/rpc-types" }
266267
reth-rpc-types-compat = { path = "crates/rpc/rpc-types-compat" }
268+
reth-rpc-layer = { path = "crates/rpc/rpc-layer" }
267269
reth-stages = { path = "crates/stages" }
268270
reth-stages-api = { path = "crates/stages-api" }
269271
reth-static-file = { path = "crates/static-file" }

crates/e2e-test-utils/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ reth-node-ethereum.workspace = true
1616
reth-tracing.workspace = true
1717
reth-db.workspace = true
1818
reth-rpc.workspace = true
19+
reth-rpc-layer.workspace = true
1920
reth-payload-builder = { workspace = true, features = ["test-utils"] }
2021
reth-provider.workspace = true
2122
reth-node-builder.workspace = true

crates/e2e-test-utils/src/engine_api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use reth::{
1313
};
1414
use reth_payload_builder::PayloadId;
1515
use reth_primitives::B256;
16-
use reth_rpc::AuthClientService;
16+
use reth_rpc_layer::AuthClientService;
1717
use std::marker::PhantomData;
1818

1919
/// Helper for engine api operations

crates/node-core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ reth-rpc.workspace = true
2323
reth-rpc-types.workspace = true
2424
reth-rpc-types-compat.workspace = true
2525
reth-rpc-api = { workspace = true, features = ["client"] }
26+
reth-rpc-layer.workspace = true
2627
reth-transaction-pool.workspace = true
2728
reth-tracing.workspace = true
2829
reth-config.workspace = true

crates/node-core/src/args/rpc_server.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ use reth_provider::{
2020
AccountReader, BlockReaderIdExt, CanonStateSubscriptions, ChainSpecProvider, ChangeSetReader,
2121
EvmEnvProvider, HeaderProvider, StateProviderFactory,
2222
};
23-
use reth_rpc::{
24-
eth::{cache::EthStateCacheConfig, gas_oracle::GasPriceOracleConfig, RPC_DEFAULT_GAS_CAP},
25-
JwtError, JwtSecret,
23+
use reth_rpc::eth::{
24+
cache::EthStateCacheConfig, gas_oracle::GasPriceOracleConfig, RPC_DEFAULT_GAS_CAP,
2625
};
2726
use reth_rpc_builder::{
2827
auth::{AuthServerConfig, AuthServerHandle},
@@ -32,6 +31,7 @@ use reth_rpc_builder::{
3231
RpcServerConfig, RpcServerHandle, ServerBuilder, TransportRpcModuleConfig,
3332
};
3433
use reth_rpc_engine_api::EngineApi;
34+
use reth_rpc_layer::{JwtError, JwtSecret};
3535
use reth_tasks::TaskSpawner;
3636
use reth_transaction_pool::TransactionPool;
3737
use std::{

crates/node-core/src/cli/config.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
33
use reth_network::protocol::IntoRlpxSubProtocol;
44
use reth_primitives::Bytes;
5-
use reth_rpc::{
6-
eth::{cache::EthStateCacheConfig, gas_oracle::GasPriceOracleConfig},
7-
JwtError, JwtSecret,
8-
};
5+
use reth_rpc::eth::{cache::EthStateCacheConfig, gas_oracle::GasPriceOracleConfig};
96
use reth_rpc_builder::{
107
auth::AuthServerConfig, error::RpcError, EthConfig, Identity, IpcServerBuilder,
118
RpcServerConfig, ServerBuilder, TransportRpcModuleConfig,
129
};
10+
use reth_rpc_layer::{JwtError, JwtSecret};
1311
use reth_transaction_pool::PoolConfig;
1412
use std::{borrow::Cow, path::PathBuf, time::Duration};
1513

crates/node-core/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use reth_primitives::{
1313
fs, BlockHashOrNumber, ChainSpec, HeadersDirection, SealedBlock, SealedHeader,
1414
};
1515
use reth_provider::BlockReader;
16-
use reth_rpc::{JwtError, JwtSecret};
16+
use reth_rpc_layer::{JwtError, JwtSecret};
1717
use std::{
1818
env::VarError,
1919
path::{Path, PathBuf},

crates/node/builder/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ reth-provider.workspace = true
2222
reth-db.workspace = true
2323
reth-rpc-engine-api.workspace = true
2424
reth-rpc.workspace = true
25+
reth-rpc-layer.workspace = true
2526
reth-node-api.workspace = true
2627
reth-node-core.workspace = true
2728
reth-network.workspace = true

crates/node/builder/src/launch/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use reth_node_core::{
1919
use reth_primitives::{BlockNumber, Chain, ChainSpec, Head, PruneModes, B256};
2020
use reth_provider::{providers::StaticFileProvider, ProviderFactory, StaticFileProviderFactory};
2121
use reth_prune::PrunerBuilder;
22-
use reth_rpc::JwtSecret;
22+
use reth_rpc_layer::JwtSecret;
2323
use reth_static_file::StaticFileProducer;
2424
use reth_tasks::TaskExecutor;
2525
use reth_tracing::tracing::{error, info, warn};

0 commit comments

Comments
 (0)