From c32e8acd22d461ae4dc5b8e3a8b7ca37c64e96e4 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 6 May 2025 14:17:16 +0200 Subject: [PATCH] chore: rm reth-provider from rpc-builder (#16087) --- Cargo.lock | 2 ++ crates/rpc/rpc-builder/Cargo.toml | 3 ++- crates/rpc/rpc-builder/src/lib.rs | 11 ++++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 474d73bb15..ef00ed72ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9577,6 +9577,7 @@ dependencies = [ "jsonrpsee", "metrics", "pin-project", + "reth-chain-state", "reth-chainspec", "reth-consensus", "reth-engine-primitives", @@ -9601,6 +9602,7 @@ dependencies = [ "reth-rpc-layer", "reth-rpc-server-types", "reth-rpc-types-compat", + "reth-storage-api", "reth-tasks", "reth-tracing", "reth-transaction-pool", diff --git a/crates/rpc/rpc-builder/Cargo.toml b/crates/rpc/rpc-builder/Cargo.toml index e1bf07b1cc..92ef9cfbc1 100644 --- a/crates/rpc/rpc-builder/Cargo.toml +++ b/crates/rpc/rpc-builder/Cargo.toml @@ -19,7 +19,6 @@ reth-chainspec.workspace = true reth-consensus.workspace = true reth-network-api.workspace = true reth-node-core.workspace = true -reth-provider.workspace = true reth-rpc.workspace = true reth-rpc-api.workspace = true reth-rpc-eth-api.workspace = true @@ -28,6 +27,8 @@ reth-rpc-eth-types.workspace = true reth-rpc-server-types.workspace = true reth-tasks = { workspace = true, features = ["rayon"] } reth-transaction-pool.workspace = true +reth-storage-api.workspace = true +reth-chain-state.workspace = true reth-evm.workspace = true # rpc/net diff --git a/crates/rpc/rpc-builder/src/lib.rs b/crates/rpc/rpc-builder/src/lib.rs index 0398039ddc..18716fd30e 100644 --- a/crates/rpc/rpc-builder/src/lib.rs +++ b/crates/rpc/rpc-builder/src/lib.rs @@ -32,15 +32,11 @@ use jsonrpsee::{ }, Methods, RpcModule, }; -use reth_chainspec::EthereumHardforks; +use reth_chainspec::{ChainSpecProvider, EthereumHardforks}; use reth_consensus::{ConsensusError, FullConsensus}; use reth_evm::ConfigureEvm; use reth_network_api::{noop::NoopNetwork, NetworkInfo, Peers}; use reth_primitives_traits::NodePrimitives; -use reth_provider::{ - AccountReader, BlockReader, BlockReaderIdExt, CanonStateSubscriptions, ChainSpecProvider, - ChangeSetReader, FullRpcProvider, ProviderBlock, StateProviderFactory, -}; use reth_rpc::{ AdminApi, DebugApi, EngineEthApi, EthApi, EthApiBuilder, EthBundle, MinerApi, NetApi, OtterscanApi, RPCApi, RethApi, TraceApi, TxPoolApi, ValidationApiConfig, Web3Api, @@ -52,6 +48,10 @@ use reth_rpc_eth_api::{ }; use reth_rpc_eth_types::{EthConfig, EthSubscriptionIdProvider}; use reth_rpc_layer::{AuthLayer, Claims, CompressionLayer, JwtAuthValidator, JwtSecret}; +use reth_storage_api::{ + AccountReader, BlockReader, BlockReaderIdExt, ChangeSetReader, FullRpcProvider, ProviderBlock, + StateProviderFactory, +}; use reth_tasks::{pool::BlockingTaskGuard, TaskSpawner, TokioTaskExecutor}; use reth_transaction_pool::{noop::NoopTransactionPool, PoolTransaction, TransactionPool}; use serde::{Deserialize, Serialize}; @@ -94,6 +94,7 @@ pub use eth::EthHandlers; // Rpc server metrics mod metrics; pub use metrics::{MeteredRequestFuture, RpcRequestMetricsService}; +use reth_chain_state::CanonStateSubscriptions; use reth_rpc::eth::sim_bundle::EthSimBundle; // Rpc rate limiter