-
Notifications
You must be signed in to change notification settings - Fork 57
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
What's going on with murmur3? #135
Comments
I guess 1b82edf96afa4 is relevant, but I'm still sort of confused. Something with "128" in the name returning 4 bytes is... unexpected. |
Yeah, this seems wrong. I'm not sure what's going on here. |
I believe we should be using Sum64 (which is also not 128 but it's what go-unixfs uses). Honestly, we should never use this hash function for anything. |
I did a bit of poking around and here's what I've got. murmur3
UnixFS Sharding
Plan I think we should go with:
Note: I'll put up some code on the endianness + test vectors when I get a chance. Need another pair of eyes to make sure I'm doing it correctly, and also need some context on UnixFS usage to make sure I'm understanding how the murmur3 hashes are being used. |
This code looks an awful lot like it's doing a murmur3-32, and returning four bytes:
go-multihash/sum.go
Lines 146 to 154 in 6f1ea18
And this code looks an awful lot like it's registering the above code as murmur3-128, which I suspect ought to return more than four bytes:
go-multihash/sum.go
Line 202 in 6f1ea18
Should I be worried?
And if this is a bug, how comfortable are we about fixing it vs potentially breaking things that rely on the current behavior?
The text was updated successfully, but these errors were encountered: