Does the IPFS chunking change the CID for the same file chunked differently?

I was reading about chunking in the IPFS Docs here - http://docs.ipfs.io.ipns.localhost:8080/concepts/file-systems/#mutable-file-system-mfs

There seem to be a couple of ways to chunk a file. Won’t this affect the CID of the file/root node?

From what I understand the beauty of IPFS is that uploading the same file to IPFS by different people, always results in the same CID. Does this hold true if the files were chunked differently?

Apologies for the tongue twister title :slight_smile:

Yes chunking affects the CID of the file/root node.
Furthermore, you can have multiple CIDs for one same node using different hash algorithms, for example.
So uploading the same file to IPFS by different people, always results in the same CID is a not really true, but in the general case it is true

3 Likes

@fusetim +1

uploading the same file to IPFS by different people, always results in the same CID

The correct version of this sentence would be :

Uploading the same file to IPFS by different people, always results in the same CID as long as they use the same hashing algorithm, the same chunker, with the same chunker parameters, the same DAG creation logic, and the chunker is deterministic (currently all are).

Given that most peoples are using the default arguments, as long as you don’t change them you should end up with the same hash.

2 Likes