diff --git a/Cargo.lock b/Cargo.lock index 087ecef86878..3c6e3ed92f49 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9660,7 +9660,6 @@ dependencies = [ "reth-trie-common", "reth-trie-db", "thiserror 2.0.7", - "tokio", "tracing", ] diff --git a/crates/trie/parallel/Cargo.toml b/crates/trie/parallel/Cargo.toml index 1b3e2d59be10..489d59fc92fe 100644 --- a/crates/trie/parallel/Cargo.toml +++ b/crates/trie/parallel/Cargo.toml @@ -46,13 +46,8 @@ reth-trie = { workspace = true, features = ["test-utils"] } # misc rand.workspace = true -tokio = { workspace = true, default-features = false, features = [ - "sync", - "rt", - "macros", -] } rayon.workspace = true -criterion = { workspace = true, features = ["async_tokio"] } +criterion.workspace = true proptest.workspace = true proptest-arbitrary-interop.workspace = true diff --git a/crates/trie/parallel/benches/root.rs b/crates/trie/parallel/benches/root.rs index a9300efa9b0d..37da18039050 100644 --- a/crates/trie/parallel/benches/root.rs +++ b/crates/trie/parallel/benches/root.rs @@ -19,8 +19,6 @@ pub fn calculate_state_root(c: &mut Criterion) { let mut group = c.benchmark_group("Calculate State Root"); group.sample_size(20); - let runtime = tokio::runtime::Runtime::new().unwrap(); - for size in [1_000, 3_000, 5_000, 10_000] { let (db_state, updated_state) = generate_test_data(size); let provider_factory = create_test_provider_factory(); @@ -37,14 +35,14 @@ pub fn calculate_state_root(c: &mut Criterion) { // state root group.bench_function(BenchmarkId::new("sync root", size), |b| { - b.to_async(&runtime).iter_with_setup( + b.iter_with_setup( || { let sorted_state = updated_state.clone().into_sorted(); let prefix_sets = updated_state.construct_prefix_sets().freeze(); let provider = provider_factory.provider().unwrap(); (provider, sorted_state, prefix_sets) }, - |(provider, sorted_state, prefix_sets)| async move { + |(provider, sorted_state, prefix_sets)| { let hashed_cursor_factory = HashedPostStateCursorFactory::new( DatabaseHashedCursorFactory::new(provider.tx_ref()), &sorted_state, @@ -59,14 +57,14 @@ pub fn calculate_state_root(c: &mut Criterion) { // parallel root group.bench_function(BenchmarkId::new("parallel root", size), |b| { - b.to_async(&runtime).iter_with_setup( + b.iter_with_setup( || { ParallelStateRoot::new( view.clone(), TrieInput::from_state(updated_state.clone()), ) }, - |calculator| async { calculator.incremental_root() }, + |calculator| calculator.incremental_root(), ); }); } diff --git a/crates/trie/parallel/src/root.rs b/crates/trie/parallel/src/root.rs index 1ae1a6026c8f..9ee8ed71e3c4 100644 --- a/crates/trie/parallel/src/root.rs +++ b/crates/trie/parallel/src/root.rs @@ -259,8 +259,8 @@ mod tests { use reth_provider::{test_utils::create_test_provider_factory, HashingWriter}; use reth_trie::{test_utils, HashedPostState, HashedStorage}; - #[tokio::test] - async fn random_parallel_root() { + #[test] + fn random_parallel_root() { let factory = create_test_provider_factory(); let consistent_view = ConsistentDbView::new(factory.clone(), None);