Skip to main content

Module bloom

Module bloom 

Source

Structs§

Bloom
Two 128-bit bloom filters (k=2 hashes) bundled into one wire type.

Functions§

bit_indices 🔒
Pick two bit positions in 0..128 from siphash-1-3(item). The two halves of the 64-bit output give the two bloom hashes. Fixed zero keys: the bloom is a public, deterministic identifier every peer must compute the same way - this is not a hash table where seed randomization helps.

Type Aliases§

BloomRef
Shared handle to the local bloom. Readers snapshot via *b.read(); writers (attach_protocol, swarm joins, …) update in place. Cheap to clone (Arc) and lock-free for short reads (parking_lot RwLock).