简体   繁体   中英

Does IPFS use a linked list system like blockchain networks do?

I'm in the process of developing a blockchain-based application for a client that wishes to store files securely. For this purpose I am using IPFS to store the files and the blockchain(more specifically an ethereum network) to store the hashes for the files. As is the case in most such applications.

However, the client is insistent on storing the files directly on the blockchain because of the linked list feature that ensures that the hash of every block on the blockchain is dependent on the previous block and as such every single hash depends on each other.

Does IPFS have a similar feature in it's data structure? I realize that the Merkle Tree system ensure that any tampering with any of the data chunks that the root hash references will change the root hash and as such allows verification of shared files. However, is there any feature that makes the hashes of files dependent on each other?

Perhaps if the files were in some sort of directory structure?

IPFS blocks form a DAG - Directed Acyclic Graph. A blockchain is a specific kind of DAG where each node has only one child. As you say, the root block of a file contains an array of the hashes of the component blocks. Similarly, a directory object contains a dictionary that maps filenames to the hashes of those root blocks. So, if you add a directory to ipfs, you will have a single hash that validates the entire contents of the directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM