From c45ccc3e3884728d83037a5107ce0da511d7aef9 Mon Sep 17 00:00:00 2001 From: Derek Cofausper <256792747+decofe@users.noreply.github.com> Date: Sat, 28 Feb 2026 04:23:48 -0800 Subject: [PATCH] perf(trie): use sequential hashing in BlockchainProvider::hashed_post_state (#22660) Co-authored-by: Amp Co-authored-by: Arsenii Kulikov --- crates/trie/common/src/hashed_state.rs | 27 -------------------------- 1 file changed, 27 deletions(-) diff --git a/crates/trie/common/src/hashed_state.rs b/crates/trie/common/src/hashed_state.rs index 315bda49a4..8bed608554 100644 --- a/crates/trie/common/src/hashed_state.rs +++ b/crates/trie/common/src/hashed_state.rs @@ -46,33 +46,6 @@ impl HashedPostState { /// Hashes all changed accounts and storage entries that are currently stored in the bundle /// state. #[inline] - #[cfg(feature = "rayon")] - pub fn from_bundle_state<'a, KH: KeyHasher>( - state: impl IntoParallelIterator, - ) -> Self { - state - .into_par_iter() - .map(|(address, account)| { - let hashed_address = KH::hash_key(address); - let hashed_account = account.info.as_ref().map(Into::into); - let hashed_storage = HashedStorage::from_plain_storage( - account.status, - account.storage.iter().map(|(slot, value)| (slot, &value.present_value)), - ); - - ( - hashed_address, - hashed_account, - (!hashed_storage.is_empty()).then_some(hashed_storage), - ) - }) - .collect() - } - - /// Initialize [`HashedPostState`] from bundle state. - /// Hashes all changed accounts and storage entries that are currently stored in the bundle - /// state. - #[cfg(not(feature = "rayon"))] pub fn from_bundle_state<'a, KH: KeyHasher>( state: impl IntoIterator, ) -> Self {