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: support converting bloom filter between bytes and arrays of bigint #2258

Open
adklempner opened this issue Feb 11, 2025 · 0 comments · May be fixed by #2261
Open

sds: support converting bloom filter between bytes and arrays of bigint #2258

adklempner opened this issue Feb 11, 2025 · 0 comments · May be fixed by #2261
Assignees

Comments

@adklempner
Copy link
Member

adklempner commented Feb 11, 2025

The BloomFilter class stores its bit vectors as an array of bigint. When serializing into a SDS message, it needs to be byte-encoded. When receiving SDS messages, it needs to be decoded from bytes back to an array of bigint in order to run lookup operations.

The method for encoding and decoding must be interoperable with the nim implementation. e.g. if A (running SDS in browser) and B (running SDS in a nim service) both insert the same set of message IDs into the filter and attach it to a message sent to the other party, both must get positive results when looking up those message IDs in the attached bloom filters.

nim implementation for reference: https://github.com/waku-org/nim-sds/blob/89160b58d4929691df95296f15d8eaad8c50f1dc/src/protobuf.nim#L59

@chair28980 chair28980 added this to Waku Feb 11, 2025
@weboko weboko moved this to Triage in Waku Feb 11, 2025
@adklempner adklempner self-assigned this Feb 11, 2025
@adklempner adklempner moved this from Triage to In Progress in Waku Feb 11, 2025
@adklempner adklempner moved this from In Progress to Code Review / QA in Waku Feb 13, 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