mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: bounds for BundleApi (#13267)
This commit is contained in:
@ -18,7 +18,7 @@ use reth_node_core::{
|
|||||||
version::{CARGO_PKG_VERSION, CLIENT_CODE, NAME_CLIENT, VERGEN_GIT_SHA},
|
version::{CARGO_PKG_VERSION, CLIENT_CODE, NAME_CLIENT, VERGEN_GIT_SHA},
|
||||||
};
|
};
|
||||||
use reth_payload_builder::PayloadStore;
|
use reth_payload_builder::PayloadStore;
|
||||||
use reth_primitives::EthPrimitives;
|
use reth_primitives::{EthPrimitives, PooledTransactionsElement};
|
||||||
use reth_provider::providers::ProviderNodeTypes;
|
use reth_provider::providers::ProviderNodeTypes;
|
||||||
use reth_rpc::{
|
use reth_rpc::{
|
||||||
eth::{EthApiTypes, FullEthApiServer},
|
eth::{EthApiTypes, FullEthApiServer},
|
||||||
@ -33,6 +33,7 @@ use reth_rpc_builder::{
|
|||||||
use reth_rpc_engine_api::{capabilities::EngineCapabilities, EngineApi};
|
use reth_rpc_engine_api::{capabilities::EngineCapabilities, EngineApi};
|
||||||
use reth_tasks::TaskExecutor;
|
use reth_tasks::TaskExecutor;
|
||||||
use reth_tracing::tracing::{debug, info};
|
use reth_tracing::tracing::{debug, info};
|
||||||
|
use reth_transaction_pool::{PoolTransaction, TransactionPool};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use crate::EthApiBuilderCtx;
|
use crate::EthApiBuilderCtx;
|
||||||
@ -403,7 +404,9 @@ where
|
|||||||
|
|
||||||
impl<N, EthApi, EV> RpcAddOns<N, EthApi, EV>
|
impl<N, EthApi, EV> RpcAddOns<N, EthApi, EV>
|
||||||
where
|
where
|
||||||
N: FullNodeComponents,
|
N: FullNodeComponents<
|
||||||
|
Pool: TransactionPool<Transaction: PoolTransaction<Pooled = PooledTransactionsElement>>,
|
||||||
|
>,
|
||||||
EthApi: EthApiTypes
|
EthApi: EthApiTypes
|
||||||
+ FullEthApiServer<Provider = N::Provider, Pool = N::Pool, Network = N::Network>
|
+ FullEthApiServer<Provider = N::Provider, Pool = N::Pool, Network = N::Network>
|
||||||
+ AddDevSigners
|
+ AddDevSigners
|
||||||
@ -531,7 +534,10 @@ where
|
|||||||
|
|
||||||
impl<N, EthApi, EV> NodeAddOns<N> for RpcAddOns<N, EthApi, EV>
|
impl<N, EthApi, EV> NodeAddOns<N> for RpcAddOns<N, EthApi, EV>
|
||||||
where
|
where
|
||||||
N: FullNodeComponents<Types: ProviderNodeTypes<Primitives = EthPrimitives>>,
|
N: FullNodeComponents<
|
||||||
|
Types: ProviderNodeTypes<Primitives = EthPrimitives>,
|
||||||
|
Pool: TransactionPool<Transaction: PoolTransaction<Pooled = PooledTransactionsElement>>,
|
||||||
|
>,
|
||||||
EthApi: EthApiTypes
|
EthApi: EthApiTypes
|
||||||
+ FullEthApiServer<Provider = N::Provider, Pool = N::Pool, Network = N::Network>
|
+ FullEthApiServer<Provider = N::Provider, Pool = N::Pool, Network = N::Network>
|
||||||
+ AddDevSigners
|
+ AddDevSigners
|
||||||
|
|||||||
@ -244,6 +244,7 @@ where
|
|||||||
Storage = OpStorage,
|
Storage = OpStorage,
|
||||||
Engine = OpEngineTypes,
|
Engine = OpEngineTypes,
|
||||||
>,
|
>,
|
||||||
|
Pool: TransactionPool<Transaction: PoolTransaction<Pooled = PooledTransactionsElement>>,
|
||||||
>,
|
>,
|
||||||
OpEngineValidator: EngineValidator<<N::Types as NodeTypesWithEngine>::Engine>,
|
OpEngineValidator: EngineValidator<<N::Types as NodeTypesWithEngine>::Engine>,
|
||||||
{
|
{
|
||||||
@ -294,6 +295,7 @@ where
|
|||||||
Storage = OpStorage,
|
Storage = OpStorage,
|
||||||
Engine = OpEngineTypes,
|
Engine = OpEngineTypes,
|
||||||
>,
|
>,
|
||||||
|
Pool: TransactionPool<Transaction: PoolTransaction<Pooled = PooledTransactionsElement>>,
|
||||||
>,
|
>,
|
||||||
OpEngineValidator: EngineValidator<<N::Types as NodeTypesWithEngine>::Engine>,
|
OpEngineValidator: EngineValidator<<N::Types as NodeTypesWithEngine>::Engine>,
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
//! use reth_engine_primitives::PayloadValidator;
|
//! use reth_engine_primitives::PayloadValidator;
|
||||||
//! use reth_evm::{execute::BlockExecutorProvider, ConfigureEvm};
|
//! use reth_evm::{execute::BlockExecutorProvider, ConfigureEvm};
|
||||||
//! use reth_network_api::{NetworkInfo, Peers};
|
//! 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_provider::{AccountReader, CanonStateSubscriptions, ChangeSetReader, FullRpcProvider};
|
||||||
//! use reth_rpc::EthApi;
|
//! use reth_rpc::EthApi;
|
||||||
//! use reth_rpc_builder::{
|
//! use reth_rpc_builder::{
|
||||||
@ -55,8 +55,12 @@
|
|||||||
//! Header = reth_primitives::Header,
|
//! Header = reth_primitives::Header,
|
||||||
//! > + AccountReader
|
//! > + AccountReader
|
||||||
//! + ChangeSetReader,
|
//! + ChangeSetReader,
|
||||||
//! Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TransactionSigned>>
|
//! Pool: TransactionPool<
|
||||||
//! + Unpin
|
//! Transaction: PoolTransaction<
|
||||||
|
//! Consensus = TransactionSigned,
|
||||||
|
//! Pooled = PooledTransactionsElement,
|
||||||
|
//! >,
|
||||||
|
//! > + Unpin
|
||||||
//! + 'static,
|
//! + 'static,
|
||||||
//! Network: NetworkInfo + Peers + Clone + 'static,
|
//! Network: NetworkInfo + Peers + Clone + 'static,
|
||||||
//! Events:
|
//! Events:
|
||||||
@ -98,7 +102,7 @@
|
|||||||
//! use reth_engine_primitives::{EngineTypes, PayloadValidator};
|
//! use reth_engine_primitives::{EngineTypes, PayloadValidator};
|
||||||
//! use reth_evm::{execute::BlockExecutorProvider, ConfigureEvm};
|
//! use reth_evm::{execute::BlockExecutorProvider, ConfigureEvm};
|
||||||
//! use reth_network_api::{NetworkInfo, Peers};
|
//! 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_provider::{AccountReader, CanonStateSubscriptions, ChangeSetReader, FullRpcProvider};
|
||||||
//! use reth_rpc::EthApi;
|
//! use reth_rpc::EthApi;
|
||||||
//! use reth_rpc_api::EngineApiServer;
|
//! use reth_rpc_api::EngineApiServer;
|
||||||
@ -141,8 +145,12 @@
|
|||||||
//! Header = reth_primitives::Header,
|
//! Header = reth_primitives::Header,
|
||||||
//! > + AccountReader
|
//! > + AccountReader
|
||||||
//! + ChangeSetReader,
|
//! + ChangeSetReader,
|
||||||
//! Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TransactionSigned>>
|
//! Pool: TransactionPool<
|
||||||
//! + Unpin
|
//! Transaction: PoolTransaction<
|
||||||
|
//! Consensus = TransactionSigned,
|
||||||
|
//! Pooled = PooledTransactionsElement,
|
||||||
|
//! >,
|
||||||
|
//! > + Unpin
|
||||||
//! + 'static,
|
//! + 'static,
|
||||||
//! Network: NetworkInfo + Peers + Clone + 'static,
|
//! Network: NetworkInfo + Peers + Clone + 'static,
|
||||||
//! Events:
|
//! Events:
|
||||||
@ -222,7 +230,7 @@ use reth_consensus::FullConsensus;
|
|||||||
use reth_engine_primitives::{EngineTypes, PayloadValidator};
|
use reth_engine_primitives::{EngineTypes, PayloadValidator};
|
||||||
use reth_evm::{execute::BlockExecutorProvider, ConfigureEvm};
|
use reth_evm::{execute::BlockExecutorProvider, ConfigureEvm};
|
||||||
use reth_network_api::{noop::NoopNetwork, NetworkInfo, Peers};
|
use reth_network_api::{noop::NoopNetwork, NetworkInfo, Peers};
|
||||||
use reth_primitives::NodePrimitives;
|
use reth_primitives::{NodePrimitives, PooledTransactionsElement};
|
||||||
use reth_provider::{
|
use reth_provider::{
|
||||||
AccountReader, BlockReader, CanonStateSubscriptions, ChainSpecProvider, ChangeSetReader,
|
AccountReader, BlockReader, CanonStateSubscriptions, ChainSpecProvider, ChangeSetReader,
|
||||||
EvmEnvProvider, FullRpcProvider, ProviderBlock, ProviderHeader, ProviderReceipt,
|
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_eth_types::{EthConfig, EthStateCache, EthSubscriptionIdProvider};
|
||||||
use reth_rpc_layer::{AuthLayer, Claims, CompressionLayer, JwtAuthValidator, JwtSecret};
|
use reth_rpc_layer::{AuthLayer, Claims, CompressionLayer, JwtAuthValidator, JwtSecret};
|
||||||
use reth_tasks::{pool::BlockingTaskGuard, TaskSpawner, TokioTaskExecutor};
|
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 serde::{Deserialize, Serialize};
|
||||||
use tower::Layer;
|
use tower::Layer;
|
||||||
use tower_http::cors::CorsLayer;
|
use tower_http::cors::CorsLayer;
|
||||||
@ -315,6 +323,7 @@ where
|
|||||||
Receipt = <BlockExecutor::Primitives as NodePrimitives>::Receipt,
|
Receipt = <BlockExecutor::Primitives as NodePrimitives>::Receipt,
|
||||||
Header = <BlockExecutor::Primitives as NodePrimitives>::BlockHeader,
|
Header = <BlockExecutor::Primitives as NodePrimitives>::BlockHeader,
|
||||||
>,
|
>,
|
||||||
|
Pool: TransactionPool<Transaction: PoolTransaction<Pooled = PooledTransactionsElement>>,
|
||||||
>,
|
>,
|
||||||
BlockExecutor: BlockExecutorProvider,
|
BlockExecutor: BlockExecutorProvider,
|
||||||
{
|
{
|
||||||
@ -706,6 +715,7 @@ where
|
|||||||
Receipt = <Events::Primitives as NodePrimitives>::Receipt,
|
Receipt = <Events::Primitives as NodePrimitives>::Receipt,
|
||||||
Header = <Events::Primitives as NodePrimitives>::BlockHeader,
|
Header = <Events::Primitives as NodePrimitives>::BlockHeader,
|
||||||
>,
|
>,
|
||||||
|
Pool: TransactionPool<Transaction: PoolTransaction<Pooled = PooledTransactionsElement>>,
|
||||||
>,
|
>,
|
||||||
{
|
{
|
||||||
let Self {
|
let Self {
|
||||||
@ -831,6 +841,7 @@ where
|
|||||||
Block = <Events::Primitives as NodePrimitives>::Block,
|
Block = <Events::Primitives as NodePrimitives>::Block,
|
||||||
Header = <Events::Primitives as NodePrimitives>::BlockHeader,
|
Header = <Events::Primitives as NodePrimitives>::BlockHeader,
|
||||||
>,
|
>,
|
||||||
|
Pool: TransactionPool<Transaction: PoolTransaction<Pooled = PooledTransactionsElement>>,
|
||||||
>,
|
>,
|
||||||
Pool: TransactionPool<Transaction = <EthApi::Pool as TransactionPool>::Transaction>,
|
Pool: TransactionPool<Transaction = <EthApi::Pool as TransactionPool>::Transaction>,
|
||||||
{
|
{
|
||||||
@ -1371,6 +1382,7 @@ where
|
|||||||
Receipt = <BlockExecutor::Primitives as NodePrimitives>::Receipt,
|
Receipt = <BlockExecutor::Primitives as NodePrimitives>::Receipt,
|
||||||
Header = <BlockExecutor::Primitives as NodePrimitives>::BlockHeader,
|
Header = <BlockExecutor::Primitives as NodePrimitives>::BlockHeader,
|
||||||
>,
|
>,
|
||||||
|
Pool: TransactionPool<Transaction: PoolTransaction<Pooled = PooledTransactionsElement>>,
|
||||||
>,
|
>,
|
||||||
BlockExecutor: BlockExecutorProvider,
|
BlockExecutor: BlockExecutorProvider,
|
||||||
Consensus: reth_consensus::FullConsensus<BlockExecutor::Primitives> + Clone + 'static,
|
Consensus: reth_consensus::FullConsensus<BlockExecutor::Primitives> + Clone + 'static,
|
||||||
|
|||||||
@ -285,10 +285,14 @@ where
|
|||||||
#[async_trait::async_trait]
|
#[async_trait::async_trait]
|
||||||
impl<Eth> EthCallBundleApiServer for EthBundle<Eth>
|
impl<Eth> EthCallBundleApiServer for EthBundle<Eth>
|
||||||
where
|
where
|
||||||
Eth: EthTransactions + LoadPendingBlock + Call + 'static,
|
Eth: EthTransactions<
|
||||||
|
Pool: TransactionPool<Transaction: PoolTransaction<Pooled = PooledTransactionsElement>>,
|
||||||
|
> + LoadPendingBlock
|
||||||
|
+ Call
|
||||||
|
+ 'static,
|
||||||
{
|
{
|
||||||
async fn call_bundle(&self, request: EthCallBundle) -> RpcResult<EthCallBundleResponse> {
|
async fn call_bundle(&self, request: EthCallBundle) -> RpcResult<EthCallBundleResponse> {
|
||||||
Self::call_bundle(self, request).await.map_err(Into::into)
|
self.call_bundle(request).await.map_err(Into::into)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user