IPFS中的有向无环图--Merkle DAG

英文部分摘自官方文档,做了一下翻译。

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.)

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值