Skip to main content

Module bloom

Module bloom 

Source
Expand description

Bloom Filter Implementation

1KB Bloom filters for reachability in FIPS routing. Each node maintains filters that summarize which destinations are reachable through each peer, enabling efficient routing decisions without global network knowledge.

§v1 Parameters

  • Size: 1 KB (8,192 bits) - sized for actual ~400-800 entry occupancy
  • Hash functions: k=5 - optimal at ~1,200 entries, good for 800-1,600
  • Bandwidth: 1 KB/announce (75% reduction from original 4KB design)

These parameters are right-sized for typical network occupancy of ~250-800 entries per node.

Structs§

BloomFilter
A Bloom filter for probabilistic set membership.
BloomState
State for managing Bloom filter announcements.

Enums§

BloomError
Errors related to Bloom filter operations.

Constants§

DEFAULT_FILTER_SIZE_BITS
Default filter size in bits (1KB = 8,192 bits).
DEFAULT_FILTER_SIZE_BYTES
Default filter size in bytes (1KB).
DEFAULT_HASH_COUNT
Default number of hash functions.
SIZE_CLASS_BYTES
Filter sizes by size_class: bytes = 512 << size_class
V1_SIZE_CLASS
Size class for v1 protocol (1 KB filters).