libp2p / js-libp2p

The JavaScript Implementation of libp2p networking stack.
https://libp2p.io
Other
2.27k stars 436 forks source link

feat: add cuckoo filter #2510

Closed achingbrain closed 2 months ago

achingbrain commented 2 months ago

Add a filter type that lets us efficiently remove items as well as add them.

It would be better to use the bloom-filters module at this point but it's published as a big blob of CJS that adds 50KB+ to browser bundles for very simple use cases so it's not suitable.

We can revisit if https://github.com/Callidon/bloom-filters/issues/70 is ever resolved.

Change checklist