(
self,
ctx: &BuilderContext<Node>,
evm_config: Evm,
)
| 971 | type Pool = BaseTransactionPool<Node::Provider, DiskFileBlobStore, Evm, T, BaseOrdering<T>>; |
| 972 | |
| 973 | async fn build_pool( |
| 974 | self, |
| 975 | ctx: &BuilderContext<Node>, |
| 976 | evm_config: Evm, |
| 977 | ) -> eyre::Result<Self::Pool> { |
| 978 | let Self { |
| 979 | pool_config_overrides, |
| 980 | ordering, |
| 981 | max_inflight_delegated_slots, |
| 982 | guard_limits, |
| 983 | validity_pool_limits, |
| 984 | additional_trusted_delegation_targets, |
| 985 | .. |
| 986 | } = self; |
| 987 | |
| 988 | let blob_store = reth_node_builder::components::create_blob_store(ctx)?; |
| 989 | let validator = |
| 990 | TransactionValidationTaskExecutor::eth_builder(ctx.provider().clone(), evm_config) |
| 991 | .no_eip4844() |
| 992 | .with_max_tx_input_bytes(ctx.config().txpool.max_tx_input_bytes) |
| 993 | .kzg_settings(ctx.kzg_settings()?) |
| 994 | .set_tx_fee_cap(ctx.config().rpc.rpc_tx_fee_cap) |
| 995 | .with_max_tx_gas_limit(ctx.config().txpool.max_tx_gas_limit) |
| 996 | .with_minimum_priority_fee(ctx.config().txpool.minimum_priority_fee) |
| 997 | .with_additional_tasks( |
| 998 | pool_config_overrides |
| 999 | .additional_validation_tasks |
| 1000 | .unwrap_or_else(|| ctx.config().txpool.additional_validation_tasks), |
| 1001 | ) |
| 1002 | .build_with_tasks(ctx.task_executor().clone(), blob_store.clone()) |
| 1003 | .map(|validator| { |
| 1004 | BaseTransactionValidator::new(validator) |
| 1005 | // In --dev mode we can't require gas fees because we're unable to decode |
| 1006 | // the L1 block info |
| 1007 | .require_l1_data_gas_fee(!ctx.config().dev.dev) |
| 1008 | .with_additional_trusted_delegation_targets( |
| 1009 | additional_trusted_delegation_targets.clone(), |
| 1010 | ) |
| 1011 | }); |
| 1012 | |
| 1013 | let mut final_pool_config = pool_config_overrides.apply(ctx.pool_config()); |
| 1014 | final_pool_config.max_inflight_delegated_slot_limit = max_inflight_delegated_slots; |
| 1015 | |
| 1016 | let transaction_pool = reth_transaction_pool::Pool::new( |
| 1017 | validator, |
| 1018 | ordering.clone(), |
| 1019 | blob_store, |
| 1020 | final_pool_config.clone(), |
| 1021 | ); |
| 1022 | let transaction_pool = BaseTransactionPool::new(transaction_pool, ordering) |
| 1023 | .with_guard_limits(guard_limits) |
| 1024 | .with_validity_pool_limits(validity_pool_limits); |
| 1025 | spawn_maintenance_tasks(ctx, transaction_pool.clone(), &final_pool_config)?; |
| 1026 | let state_diff_events = BroadcastStream::new(ctx.provider().subscribe_to_canonical_state()); |
| 1027 | ctx.task_executor().spawn_critical_task( |
| 1028 | "mempool-invalidation", |
| 1029 | maintain_state_diff_invalidation(transaction_pool.clone(), state_diff_events), |
| 1030 | ); |
nothing calls this directly
no test coverage detected