Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sds: Implement insert and lookup operations for BloomFilter #2227

Open
adklempner opened this issue Jan 27, 2025 · 0 comments · May be fixed by #2253
Open

sds: Implement insert and lookup operations for BloomFilter #2227

adklempner opened this issue Jan 27, 2025 · 0 comments · May be fixed by #2253
Assignees

Comments

@adklempner
Copy link
Member

  1. Implement insert method in BloomFilter that:

    • Accepts string or Uint8Array input
    • Generates k hash values for the input
    • Sets corresponding bits in the backing array
    • Handles bit array bounds correctly
    • Is efficient for repeated insertions
  2. Implement lookup method in BloomFilter that:

    • Accepts string or Uint8Array input
    • Generates same k hash values as insert
    • Checks all corresponding bits in backing array
    • Returns false if any required bit is not set
    • Returns true if all required bits are set

The implementation should match the behavior of the nim-sds reference implementation.

@chair28980 chair28980 added this to Waku Jan 27, 2025
@weboko weboko moved this to To Do in Waku Jan 30, 2025
@adklempner adklempner self-assigned this Feb 4, 2025
@adklempner adklempner moved this from To Do to In Progress in Waku Feb 4, 2025
@adklempner adklempner moved this from In Progress to Code Review / QA in Waku Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Code Review / QA
Development

Successfully merging a pull request may close this issue.

1 participant