英文部分摘自官方文档,做了一下翻译。
IPFS and many other distributed systems take advantage of a datastructure called directed acyclic graphs, or DAGs. Specifically, they use Merkle DAGs, which are DAGs where each node has a unique identifier that is a hash of the node’s contents. Sound familiar? This refers back to the CID concept that we covered in the previous section. Put another way: identifying a data object (like a Merkle DAG node) by the value of its hash is content addressing.
IPFS和许多其他分布式系统使用一种称为有向无环图(DAGs)的数据结构。具体地说,它们使用Merkle DAGs,图中的每个节点都有一个唯一标识符,该标识符是节点内容的散列。听起来很熟悉?这是指我们在前一节中介绍的CID概念。换句话说:根据数据对象的散列值来标识该数据对象(比如Merkle-DAG节点)就是内容寻址。
IPFS uses a Merkle DAG that is optimized for representing directories and files, but you can structure a Merkle DAG in many different ways. For example, Git uses a Merkle DAG that has many versions of your repo inside of it.
IPFS使用的Merkle DAG是为表示目录和文件而优化的,但是您可以用许多不同的方式构造Merkle-DAG。例如,Git使用Merkle-DAG,其中包含许多版本的repo。
To build a Merkle DAG representation of your content, IPFS often first splits it into blocks. Splitting it into blocks means that different parts of the file can come from different sources and be authenticated quickly. (If you’ve ever used BitTorrent, you may have noticed that when you download a file, BitTorrent can fetch it from multiple peers at once; this is the same idea.)