diff --git a/crates/node/builder/src/rpc.rs b/crates/node/builder/src/rpc.rs index c8e08078bb98..32123b194e6b 100644 --- a/crates/node/builder/src/rpc.rs +++ b/crates/node/builder/src/rpc.rs @@ -18,7 +18,7 @@ use reth_node_core::{ version::{CARGO_PKG_VERSION, CLIENT_CODE, NAME_CLIENT, VERGEN_GIT_SHA}, }; use reth_payload_builder::PayloadStore; -use reth_primitives::EthPrimitives; +use reth_primitives::{EthPrimitives, PooledTransactionsElement}; use reth_provider::providers::ProviderNodeTypes; use reth_rpc::{ eth::{EthApiTypes, FullEthApiServer}, @@ -33,6 +33,7 @@ use reth_rpc_builder::{ use reth_rpc_engine_api::{capabilities::EngineCapabilities, EngineApi}; use reth_tasks::TaskExecutor; use reth_tracing::tracing::{debug, info}; +use reth_transaction_pool::{PoolTransaction, TransactionPool}; use std::sync::Arc; use crate::EthApiBuilderCtx; @@ -403,7 +404,9 @@ where impl RpcAddOns where - N: FullNodeComponents, + N: FullNodeComponents< + Pool: TransactionPool>, + >, EthApi: EthApiTypes + FullEthApiServer + AddDevSigners @@ -531,7 +534,10 @@ where impl NodeAddOns for RpcAddOns where - N: FullNodeComponents>, + N: FullNodeComponents< + Types: ProviderNodeTypes, + Pool: TransactionPool>, + >, EthApi: EthApiTypes + FullEthApiServer + AddDevSigners diff --git a/crates/optimism/node/src/node.rs b/crates/optimism/node/src/node.rs index 54ff36dabac0..e9e7e23bc9cd 100644 --- a/crates/optimism/node/src/node.rs +++ b/crates/optimism/node/src/node.rs @@ -244,6 +244,7 @@ where Storage = OpStorage, Engine = OpEngineTypes, >, + Pool: TransactionPool>, >, OpEngineValidator: EngineValidator<::Engine>, { @@ -294,6 +295,7 @@ where Storage = OpStorage, Engine = OpEngineTypes, >, + Pool: TransactionPool>, >, OpEngineValidator: EngineValidator<::Engine>, { diff --git a/crates/rpc/rpc-builder/src/lib.rs b/crates/rpc/rpc-builder/src/lib.rs index ce29b77f09d6..877e80897861 100644 --- a/crates/rpc/rpc-builder/src/lib.rs +++ b/crates/rpc/rpc-builder/src/lib.rs @@ -19,7 +19,7 @@ //! use reth_engine_primitives::PayloadValidator; //! use reth_evm::{execute::BlockExecutorProvider, ConfigureEvm}; //! use reth_network_api::{NetworkInfo, Peers}; -//! use reth_primitives::{Header, TransactionSigned}; +//! use reth_primitives::{Header, PooledTransactionsElement, TransactionSigned}; //! use reth_provider::{AccountReader, CanonStateSubscriptions, ChangeSetReader, FullRpcProvider}; //! use reth_rpc::EthApi; //! use reth_rpc_builder::{ @@ -55,8 +55,12 @@ //! Header = reth_primitives::Header, //! > + AccountReader //! + ChangeSetReader, -//! Pool: TransactionPool> -//! + Unpin +//! Pool: TransactionPool< +//! Transaction: PoolTransaction< +//! Consensus = TransactionSigned, +//! Pooled = PooledTransactionsElement, +//! >, +//! > + Unpin //! + 'static, //! Network: NetworkInfo + Peers + Clone + 'static, //! Events: @@ -98,7 +102,7 @@ //! use reth_engine_primitives::{EngineTypes, PayloadValidator}; //! use reth_evm::{execute::BlockExecutorProvider, ConfigureEvm}; //! use reth_network_api::{NetworkInfo, Peers}; -//! use reth_primitives::{Header, TransactionSigned}; +//! use reth_primitives::{Header, PooledTransactionsElement, TransactionSigned}; //! use reth_provider::{AccountReader, CanonStateSubscriptions, ChangeSetReader, FullRpcProvider}; //! use reth_rpc::EthApi; //! use reth_rpc_api::EngineApiServer; @@ -141,8 +145,12 @@ //! Header = reth_primitives::Header, //! > + AccountReader //! + ChangeSetReader, -//! Pool: TransactionPool> -//! + Unpin +//! Pool: TransactionPool< +//! Transaction: PoolTransaction< +//! Consensus = TransactionSigned, +//! Pooled = PooledTransactionsElement, +//! >, +//! > + Unpin //! + 'static, //! Network: NetworkInfo + Peers + Clone + 'static, //! Events: @@ -222,7 +230,7 @@ use reth_consensus::FullConsensus; use reth_engine_primitives::{EngineTypes, PayloadValidator}; use reth_evm::{execute::BlockExecutorProvider, ConfigureEvm}; use reth_network_api::{noop::NoopNetwork, NetworkInfo, Peers}; -use reth_primitives::NodePrimitives; +use reth_primitives::{NodePrimitives, PooledTransactionsElement}; use reth_provider::{ AccountReader, BlockReader, CanonStateSubscriptions, ChainSpecProvider, ChangeSetReader, EvmEnvProvider, FullRpcProvider, ProviderBlock, ProviderHeader, ProviderReceipt, @@ -240,7 +248,7 @@ use reth_rpc_eth_api::{ use reth_rpc_eth_types::{EthConfig, EthStateCache, EthSubscriptionIdProvider}; use reth_rpc_layer::{AuthLayer, Claims, CompressionLayer, JwtAuthValidator, JwtSecret}; use reth_tasks::{pool::BlockingTaskGuard, TaskSpawner, TokioTaskExecutor}; -use reth_transaction_pool::{noop::NoopTransactionPool, TransactionPool}; +use reth_transaction_pool::{noop::NoopTransactionPool, PoolTransaction, TransactionPool}; use serde::{Deserialize, Serialize}; use tower::Layer; use tower_http::cors::CorsLayer; @@ -315,6 +323,7 @@ where Receipt = ::Receipt, Header = ::BlockHeader, >, + Pool: TransactionPool>, >, BlockExecutor: BlockExecutorProvider, { @@ -706,6 +715,7 @@ where Receipt = ::Receipt, Header = ::BlockHeader, >, + Pool: TransactionPool>, >, { let Self { @@ -831,6 +841,7 @@ where Block = ::Block, Header = ::BlockHeader, >, + Pool: TransactionPool>, >, Pool: TransactionPool::Transaction>, { @@ -1371,6 +1382,7 @@ where Receipt = ::Receipt, Header = ::BlockHeader, >, + Pool: TransactionPool>, >, BlockExecutor: BlockExecutorProvider, Consensus: reth_consensus::FullConsensus + Clone + 'static, diff --git a/crates/rpc/rpc/src/eth/bundle.rs b/crates/rpc/rpc/src/eth/bundle.rs index 478d1de1c51f..b12e021335ed 100644 --- a/crates/rpc/rpc/src/eth/bundle.rs +++ b/crates/rpc/rpc/src/eth/bundle.rs @@ -285,10 +285,14 @@ where #[async_trait::async_trait] impl EthCallBundleApiServer for EthBundle where - Eth: EthTransactions + LoadPendingBlock + Call + 'static, + Eth: EthTransactions< + Pool: TransactionPool>, + > + LoadPendingBlock + + Call + + 'static, { async fn call_bundle(&self, request: EthCallBundle) -> RpcResult { - Self::call_bundle(self, request).await.map_err(Into::into) + self.call_bundle(request).await.map_err(Into::into) } }