Skip to content

Commit a201676

Browse files
authored
chore: relax eth network builder (paradigmxyz#16714)
1 parent 48deef7 commit a201676

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

crates/ethereum/node/src/node.rs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@
33
pub use crate::{payload::EthereumPayloadBuilder, EthereumEngineValidator};
44
use crate::{EthEngineTypes, EthEvmConfig};
55
use alloy_eips::{eip7840::BlobParams, merge::EPOCH_SLOTS};
6-
use reth_chainspec::{ChainSpec, EthChainSpec, EthereumHardforks};
6+
use reth_chainspec::{ChainSpec, EthChainSpec, EthereumHardforks, Hardforks};
77
use reth_consensus::{ConsensusError, FullConsensus};
88
use reth_ethereum_consensus::EthBeaconConsensus;
99
use reth_ethereum_engine_primitives::{
1010
EthBuiltPayload, EthPayloadAttributes, EthPayloadBuilderAttributes,
1111
};
12-
use reth_ethereum_primitives::{EthPrimitives, PooledTransactionVariant, TransactionSigned};
12+
use reth_ethereum_primitives::{EthPrimitives, TransactionSigned};
1313
use reth_evm::{ConfigureEvm, EvmFactory, EvmFactoryFor, NextBlockEnvAttributes};
14-
use reth_network::{EthNetworkPrimitives, NetworkHandle, PeersInfo};
15-
use reth_node_api::{AddOnsContext, FullNodeComponents, NodeAddOns, NodePrimitives, TxTy};
14+
use reth_network::{primitives::BasicNetworkPrimitives, NetworkHandle, PeersInfo};
15+
use reth_node_api::{
16+
AddOnsContext, FullNodeComponents, NodeAddOns, NodePrimitives, PrimitivesTy, TxTy,
17+
};
1618
use reth_node_builder::{
1719
components::{
1820
BasicPayloadServiceBuilder, ComponentsBuilder, ConsensusBuilder, ExecutorBuilder,
@@ -34,8 +36,8 @@ use reth_rpc_eth_types::{error::FromEvmError, EthApiError};
3436
use reth_rpc_server_types::RethRpcModule;
3537
use reth_tracing::tracing::{debug, info};
3638
use reth_transaction_pool::{
37-
blobstore::DiskFileBlobStore, EthTransactionPool, PoolTransaction, TransactionPool,
38-
TransactionValidationTaskExecutor,
39+
blobstore::DiskFileBlobStore, EthTransactionPool, PoolPooledTx, PoolTransaction,
40+
TransactionPool, TransactionValidationTaskExecutor,
3941
};
4042
use reth_trie_db::MerklePatriciaTrie;
4143
use revm::context::TxEnv;
@@ -368,16 +370,13 @@ pub struct EthereumNetworkBuilder {
368370

369371
impl<Node, Pool> NetworkBuilder<Node, Pool> for EthereumNetworkBuilder
370372
where
371-
Node: FullNodeTypes<Types: NodeTypes<ChainSpec = ChainSpec, Primitives = EthPrimitives>>,
372-
Pool: TransactionPool<
373-
Transaction: PoolTransaction<
374-
Consensus = TxTy<Node::Types>,
375-
Pooled = PooledTransactionVariant,
376-
>,
377-
> + Unpin
373+
Node: FullNodeTypes<Types: NodeTypes<ChainSpec: Hardforks>>,
374+
Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TxTy<Node::Types>>>
375+
+ Unpin
378376
+ 'static,
379377
{
380-
type Network = NetworkHandle<EthNetworkPrimitives>;
378+
type Network =
379+
NetworkHandle<BasicNetworkPrimitives<PrimitivesTy<Node::Types>, PoolPooledTx<Pool>>>;
381380

382381
async fn build_network(
383382
self,

0 commit comments

Comments
 (0)