Skip to main content

Module bloom

Module bloom 

Source

Structs§

Bloom
128-bit bloom filter (k=2 hashes) of items a peer supports.
BloomRef
Shared handle to the local bloom state. Writers add items in place, readers take a snapshot. Cheap to clone (Arc).
LocalBloom
What the local node advertises and how it filters peers.

Functions§

item_mask 🔒
Bit mask for item: 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.