-
Notifications
You must be signed in to change notification settings - Fork 97
Advanced Caching: Bloom Filter for Known-Bad Address Lookup #243
Copy link
Copy link
Open
Description
Description:
Use a Bloom filter for constant-time lookups of known-bad Stellar addresses in the blocklist.
Requirements and Context:
Checking a DB table for every incoming address lookup under high TPS is too slow. A Bloom filter reduces this to O(1) with near-zero memory.
Acceptance Criteria:
- Bloom filter built from the blocklist on server startup
- Updated incrementally when new addresses are added to the blocklist
- False positive rate < 0.1% (configured via filter size)
- Benchmarks comparing filter vs DB lookup latency
Deliverables:
- Implementation of the above criteria
- Tests or proof of correct behaviour
NOTE: This issue will NOT be reviewed or approved without evidence (screenshot, log, or test output) demonstrating the feature works as described.
Suggested Execution:
- Use the bloom-filters npm package
- Pre-populate from the DB blocklist on startup
- Subscribe to blocklist update events to rebuild the filter
Guidelines:
- Follow the existing project coding conventions
- All new environment variables must be documented in
.env.example - Phase: Phase 14: Performance
Example Commit Message:
perf: bloom filter for constant-time blocklist address lookup
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels