Skip to content

ADR 001: Specify Bloom filter parameters for large cache announcements #25

Closed

Description

@thiras

Category: Technical Feasibility

ADR 001: CacheAnnounce messages list blob hashes (capped at 500 entries) or a Bloom filter for large sets. But no parameters are specified for the Bloom filter:

  • Expected items: How many blobs does a typical large cache hold? 1,000? 100,000?
  • False positive rate: What rate is acceptable? 1%? 0.1%?
  • Resulting size: A Bloom filter for 10,000 items at 1% FP ≈ 12 KB. For 100,000 items ≈ 120 KB.
  • iroh-gossip message limit: Typically 64 KB. A 120 KB Bloom filter won't fit.

Also: with 500 hashes × 32 bytes = 16 KB per announcement, the hash list approach already uses significant space. What happens when a node has exactly 501 blobs — does it switch to Bloom filter mid-stream?

Recommendation

  • Specify Bloom filter parameters: expected max items, target FP rate, max serialized size
  • Define the switchover threshold from hash list to Bloom filter
  • Verify the resulting Bloom filter fits within iroh-gossip message size limits

ADRs affected

  • ADR 001 (Network Topology)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions