From afdca29d1a8a0b819f616771b33c583b29633e9c Mon Sep 17 00:00:00 2001 From: Wolfgang Welz Date: Fri, 27 Dec 2024 13:49:34 +0100 Subject: [PATCH] re-enable foldhash on zkvm --- Cargo.toml | 2 +- crates/primitives/src/map/mod.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 64a394541..492e22943 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -75,7 +75,7 @@ sha3 = { version = "0.10.8", default-features = false } # maps hashbrown = { version = "0.15", default-features = false } indexmap = { version = "2.5", default-features = false } -foldhash = { version = "0.1", default-features = false } +foldhash = { version = "0.1.4", default-features = false } rustc-hash = { version = "2.1", default-features = false } # misc diff --git a/crates/primitives/src/map/mod.rs b/crates/primitives/src/map/mod.rs index 08fb32f1a..4481df6f1 100644 --- a/crates/primitives/src/map/mod.rs +++ b/crates/primitives/src/map/mod.rs @@ -82,8 +82,7 @@ cfg_if! { // Default hasher. cfg_if! { - // TODO: Use `foldhash` in zkVM when it's supported. https://github.com/orlp/foldhash/issues/13 - if #[cfg(all(feature = "map-foldhash", not(target_os = "zkvm")))] { + if #[cfg(feature = "map-foldhash")] { type DefaultHashBuilderInner = foldhash::fast::RandomState; } else if #[cfg(feature = "map-fxhash")] { type DefaultHashBuilderInner = FxBuildHasher;