mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
perf: add ParallelBridgeBuffered trait to replace par_bridge (#21674)
This commit is contained in:
@@ -18,7 +18,7 @@ asm-keccak = ["alloy-primitives/asm-keccak", "revm/asm-keccak"]
|
||||
[dependencies]
|
||||
reth-chainspec.workspace = true
|
||||
reth-ethereum-primitives.workspace = true
|
||||
reth-primitives-traits.workspace = true
|
||||
reth-primitives-traits = { workspace = true, features = ["rayon"] }
|
||||
reth-consensus.workspace = true
|
||||
reth-db = { workspace = true, features = ["mdbx", "test-utils", "disable-lock"] }
|
||||
reth-db-api.workspace = true
|
||||
|
||||
@@ -5,7 +5,7 @@ use crate::{
|
||||
Case, Error, Suite,
|
||||
};
|
||||
use alloy_rlp::{Decodable, Encodable};
|
||||
use rayon::iter::{ParallelBridge, ParallelIterator};
|
||||
use rayon::iter::ParallelIterator;
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_consensus::{Consensus, HeaderValidator};
|
||||
use reth_db_common::init::{insert_genesis_hashes, insert_genesis_history, insert_genesis_state};
|
||||
@@ -13,7 +13,9 @@ use reth_ethereum_consensus::{validate_block_post_execution, EthBeaconConsensus}
|
||||
use reth_ethereum_primitives::{Block, TransactionSigned};
|
||||
use reth_evm::{execute::Executor, ConfigureEvm};
|
||||
use reth_evm_ethereum::EthEvmConfig;
|
||||
use reth_primitives_traits::{Block as BlockTrait, RecoveredBlock, SealedBlock};
|
||||
use reth_primitives_traits::{
|
||||
Block as BlockTrait, ParallelBridgeBuffered, RecoveredBlock, SealedBlock,
|
||||
};
|
||||
use reth_provider::{
|
||||
test_utils::create_test_provider_factory_with_chain_spec, BlockWriter, DatabaseProviderFactory,
|
||||
ExecutionOutcome, HeaderProvider, HistoryWriter, OriginalValuesKnown, StateProofProvider,
|
||||
@@ -180,7 +182,7 @@ impl Case for BlockchainTestCase {
|
||||
self.tests
|
||||
.iter()
|
||||
.filter(|(_, case)| !Self::excluded_fork(case.network))
|
||||
.par_bridge()
|
||||
.par_bridge_buffered()
|
||||
.try_for_each(|(name, case)| Self::run_single_case(name, case).map(|_| ()))?;
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user