## Addendum

* Note 1: Using 'modulo' was actually not correct. We just need a hashing function to map any NostrId into N buckets where number of buckets is the number of Relays. Regardless of this mistake the above algo will still work.

* https://stats.stackexchange.com/questions/26344/how-to-uniformly-project-a-hash-to-a-fixed-number-of-buckets

Candidate replacement for modulo to use a bucket instead:

* https://en.wikipedia.org/wiki/MurmurHash

Candidate Impl (getBucket)

https://gist.github.com/raycmorgan/588423#file-murmurhash2-js-L68

Reply to this note

Please Login to reply.

Discussion

No replies yet.