6. 读解比特币白皮书4

2019-11-23 14:47:4110:51 105
所属专辑:读解区块链
声音简介

4. 工作证明 (Proof-of-Work)

To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof-of-work system similar to Adam Back's Hashcash, rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash.

  为了实现一个基于点对点的分布式时间戳服务器,我们需要使用类似亚当·伯克的哈希现金那样的一个工作证明系统,而不是报纸或者新闻组帖子那样的东西。所谓的工作证明,就是去寻找一个数值;这个数值要满足以下条件:为它提取散列数值之后 —— 例如使用 SHA-256 计算散列数值 —— 这个散列数值必须以一定数量的 0 开头。每增加一个 0 的要求,将使得工作量指数级增加,并且,这个工作量的验证却只需通过计算一个哈希。

For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block's hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.

  在我们的时间戳网络中,我们是这样实现工作证明的:不断在区块之中增加一个随机数(Nonce),直到一个满足条件的数值被找到;这个条件就是,这个区块的哈希以指定数量的 0 开头。一旦 CPU 的耗费算力所获的的结果满足工作证明,那么这个区块将不再能被更改,除非重新完成之前的所有工作量。随着新的区块不断被添加进来,改变当前区块即意味着说要重新完成所有其后区块的工作。

The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added.

  工作证明同时解决了如何决定谁能代表大多数做决定的问题。如果所谓的“大多数”是基于“一个IP地址一票”的方式决定的话,那么任何一个可以搞定很多 IP 地址的人就可以被认为是“大多数”。工作证明本质上来看,是“一个CPU一票”。所谓的“大多数决定”是由最长链所代表的,因为被投入最多工作的链就是它。如果大多数 CPU 算力被诚实的节点所控制,那么诚实链成长最为迅速,其速度会远超其他竞争链。为了更改一个已经产生的区块,攻击者将不得不重新完成那个区块以及所有其后区块的的工作证明,而后还要追上并超过诚实节点的工作。后文展示为什么一个被拖延了的攻击者能够追上的可能性将随着区块的不断增加而指数级降低。

To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they're generated too fast, the difficulty increases.

  为了应对硬件算力综合的不断增加,以及随着时间推进可能产生的节点参与数量变化,工作证明难度由此决定:基于平均每小时产生的区块数量的一个移动平均值。如果区块生成得过快,那么难度将会增加。



用户评论

表情0/300
喵,没有找到相关结果~
暂时没有评论,下载喜马拉雅与主播互动
音频列表
猜你喜欢
比特币白皮书 中文版

比特币白皮书是2008由中本聪发布,是区块链的始祖,bitcoins区块链的《圣经》。区块链是比特币实现的技术,比特币是区块链的第一个应用。

by:比特币门徒

话说比特币

比特大陆联合创始人毕业于北京大学,获经济学和心理学双学位。创业前,曾从事私募股权母基金投资分析师和投资经理的工作。2011年,参与比特币社区,是中国比特币社区重...

by:努力拼搏999

九神|囤比特币

九神已于2020年远离我们,但他的作品放到今日看,依然并不过时。因为他的底层逻辑没有变化,比特币最大的属性就是价值存储,总数有限,安全,可分割。这些属性不变,它...

by:PineH

冥界比特币大亨

都说未来比特币能改变世界,我用它改变冥界。

by:万物声WWS_企鹅

囤比特币|九神语录

ahr999指数作者,九神语录。做标准囤币党,HODL

by:黄帝内经威

囤比特币-ahr999九神

ahr永不过时的经典之作,每日币读8习墨推荐,coinstart创始人Web3.0持续创业者,经历过2个周期的老韭菜,关注我:用我的经验为你在币圈导航

by:8分钟每日币听

一个比特币的人生

这是一个关于区块链的长篇小说,主人公从揪心的当代,穿越回2013年,购买了人生第一枚比特币,从此人生开始不同......古人说:塞翁失马...

by:穿越星魂