-
Notifications
You must be signed in to change notification settings - Fork 419
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
Hash changes if we change our metadata #1152
Comments
Summary: Explain that we process data and add some of our own (metadata) to better organize and transmit it, and even if that is also immutable we may change our minds (very rarely) as to what the best organization is. And you'll see a different hash reflecting it. A good location may be the bottom of Hashing, right before SHA hashes WON'T match CID. |
I think this is part of a bigger "import parameters that impact the final CID" story described in #1176 |
Reviving this as a subtask in #1674 |
This appears to be addressed in https://docs.ipfs.tech/concepts/content-addressing/#cids-are-not-file-hashes. So, I am closing this issue |
Spawned from ipfs/kubo#8974.
tl;dr The CID is not the hash of your file, do not rely on it. The normal learning path can leave you with a wrong impression of an apparent stability between user data and CID/hash representing it.
Brief outline:
I think this happens to a lot of people (myself included). The simplest example of a "neutral" block of my data is what I first think of when immutability appears, and at some point we silently jump from that single block to a file without mentioning UnixFS, which is ugly and I get why is not in the foreground, but you normally translate that neutral/single/your block as your file, and therefore the immutability of data as also the immutability of its tag (CID). Not sure when but at some point we need to break it to you, maybe not even mentioning UnixFS but just the generic metadata, that we process your data and add some of our own to better organize and transmit it, and even if that is also immutable we may change our minds (very rarely) as to what the best organization is. And you'll see a different hash reflecting it. Kind of sucks, but that's life, and it's still much better than httping all the time. (We can omit this last remark 😬.)
The text was updated successfully, but these errors were encountered: