Drop `ahash` dependency in favor of core's `SipHasher`
authorMatt Corallo <git@bluematt.me>
Mon, 12 Feb 2024 22:40:49 +0000 (22:40 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 16 Feb 2024 20:34:41 +0000 (20:34 +0000)
commit3096061bef7e04444dd6c0b4f2331d06a6d8969c
tree336cb74a8e716c5afaeb71844870e223cdc5ba26
parent65108a022f6321df1e1ae35bf56114642d7cf89e
Drop `ahash` dependency in favor of core's `SipHasher`

https://github.com/tkaitchuck/aHash/pull/196 bumped the MSRV of
`ahash` in a patch release, which makes it rather difficult for us
to have it as a dependency.

Further, it seems that `ahash` hasn't been particularly robust in
the past, notably
https://github.com/tkaitchuck/aHash/issues/163 and
https://github.com/tkaitchuck/aHash/issues/166.

Luckily, `core` provides `SipHasher` even on no-std (sadly its
SipHash-2-4 unlike the SipHash-1-3 used by the `DefaultHasher` in
`std`). Thus, we drop the `ahash` dependency entirely here and
simply wrap `SipHasher` for our `no-std` HashMaps.
12 files changed:
.github/workflows/build.yml
bench/Cargo.toml
ci/check-cfg-flags.py
fuzz/Cargo.toml
fuzz/src/chanmon_consistency.rs
fuzz/src/full_stack.rs
fuzz/src/indexedmap.rs
fuzz/src/router.rs
lightning/Cargo.toml
lightning/src/lib.rs
lightning/src/util/hash_tables.rs [new file with mode: 0644]
lightning/src/util/mod.rs