Skip to content

Commit

Permalink
re-enable foldhash on zkvm
Browse files Browse the repository at this point in the history
  • Loading branch information
Wollac committed Dec 27, 2024
1 parent bd25eb3 commit afdca29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions crates/primitives/src/map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit afdca29

Please sign in to comment.