原始文献 / 名言与原则 / 工作量证明

工作量证明

18 条名言。中文为本站译文,每条附日期与原文链接。

日期2008-10-31
来源Bitcoin: A Peer-to-Peer Electronic Cash System · 原文

我们考虑这样一种情形:攻击者试图生成一条比诚实链更快的替代链。即使成功了,系统也不会因此被随意篡改——比如凭空创造价值,或者夺取从不属于攻击者的钱。节点不会接受无效交易作为支付,诚实节点也绝不会接受包含它们的区块。攻击者唯一能做的,是试图更改自己的一笔交易,拿回他最近花掉的钱。

英文原文

We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.

日期2008-10-31
来源Bitcoin: A Peer-to-Peer Electronic Cash System · 原文

我们提出用点对点网络解决双重支付问题。网络通过把交易哈希进一条持续的、基于哈希的工作量证明链来为交易打上时间戳,形成一条不重做工作量证明就无法更改的记录。最长链不仅证明了所见证的事件序列,还证明它来自最大的 CPU 算力池。只要多数 CPU 算力由不合谋攻击网络的节点控制,它们就会生成最长链并超越攻击者。网络本身只需要极简的结构。

英文原文

We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they'll generate the longest chain and outpace attackers. The network itself requires minimal structure.

日期2008-10-31
来源Bitcoin: A Peer-to-Peer Electronic Cash System · 原文

在本文中,我们提出用点对点分布式时间戳服务器解决双重支付问题,以计算生成交易时间顺序的证明。只要诚实节点集体控制的 CPU 算力超过任何合谋的攻击者节点群体,系统就是安全的。

英文原文

In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.

日期2008-10-31
来源Bitcoin: A Peer-to-Peer Electronic Cash System · 原文

要在点对点的基础上实现分布式时间戳服务器,我们需要使用类似 Adam Back 的 Hashcash 那样的工作量证明系统,而不是报纸或 Usenet 帖子。工作量证明要扫描出一个值,使得它被哈希(如 SHA-256)后,哈希以若干个零比特开头。所需的平均工作量随零比特数指数增长,而验证只需执行一次哈希。

英文原文

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.

日期2008-10-31
来源Bitcoin: A Peer-to-Peer Electronic Cash System · 原文

在我们的时间戳网络中,工作量证明的实现方式是:不断递增区块中的 nonce,直到找到一个值,使该区块的哈希满足所需的零比特数。一旦付出的 CPU 努力让区块满足了工作量证明,不重做这份工作就无法更改该区块。随着后来的区块链接其后,要更改该区块就得重做它之后所有区块的工作。

英文原文

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.

日期2008-10-31
来源Bitcoin: A Peer-to-Peer Electronic Cash System · 原文

工作量证明还解决了多数决策中代表权确定的问题。如果多数基于"一 IP 一票",任何人只要能分配大量 IP 就能颠覆它。工作量证明本质上是"一 CPU 一票"。多数决策由最长链来代表——它投入了最大的工作量证明努力。如果多数 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.

日期2008-10-31
来源Bitcoin: A Peer-to-Peer Electronic Cash System · 原文

为了补偿硬件速度的提升和长期以来运行节点意愿的变化,工作量证明的难度由一个移动平均值决定,目标是每小时平均生成若干个区块。如果生成太快,难度就会上升。

英文原文

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.

日期2008-10-31
来源Bitcoin: A Peer-to-Peer Electronic Cash System · 原文

运行网络的步骤如下:

1. 新交易被广播到所有节点。
2. 每个节点把新交易收集进一个区块。
3. 每个节点为其区块寻找一个困难的工作量证明。
4. 当某个节点找到工作量证明,就把区块广播到所有节点。
5. 只有当区块中的所有交易都有效且尚未被花费,节点才接受该区块。
6. 节点通过在该链上创建下一个区块来表达对其的接受,使用已接受区块的哈希作为前一哈希。

英文原文

The steps to run the network are as follows:

1. New transactions are broadcast to all nodes.
2. Each node collects new transactions into a block.
3. Each node works on finding a difficult proof-of-work for its block.
4. When a node finds a proof-of-work, it broadcasts the block to all nodes.
5. Nodes accept the block only if all transactions in it are valid and not already spent.
6. Nodes express their acceptance of the block by working on creating the next block in the chain, using the hash of the accepted block as the previous hash.

日期2008-10-31
来源Bitcoin: A Peer-to-Peer Electronic Cash System · 原文

节点始终将最长链视为正确的链,并持续在其上扩展工作。如果两个节点同时广播了下一个区块的不同版本,一些节点可能先收到其中一个。在这种情况下,它们先在收到的第一个区块上工作,但把另一个分支保存下来,以防它后来变长。当下一个工作量证明被找到、其中一个分支变长时,僵局就会打破;那些在另一分支上工作的节点随后就会切换到更长的那条。

英文原文

Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.

日期2008-11-09
来源Cryptography Mailing List · Bitcoin P2P e-cash paper · 原文

工作量证明链本身就是不言自明的证据,证明它来自全球共享的视图。只有全网多数节点合在一起,才有足够的 CPU 算力生成如此困难的工作量证明链。任何用户在收到工作量证明链后,都能看到全网多数认可了什么。一旦一笔交易被哈希进链上往后数几个链接的位置,它就被牢牢地刻进了全球历史。

英文原文

The proof-of-work chain is itself self-evident proof that it came from the globally shared view. Only the majority of the network together has enough CPU power to generate such a difficult chain of proof-of-work. Any user, upon receiving the proof-of-work chain, can see what the majority of the network has approved. Once a transaction is hashed into a link that's a few links back in the chain, it is firmly etched into the global history.

日期2008-11-09
来源Cryptography Mailing List · Bitcoin P2P e-cash paper · 原文

必须严格规定:最长链始终被视为有效链。在场的节点可能记得某个分支先出现、后来被另一分支取代,但它们无法让不在场的人信服这一点。我们不能让节点出现派系分化:一部分人固执地认准自己先看到的分支,另一部分人先看到另一个分支,还有后来加入、从未见证过当时情形的人。CPU 算力的工作量证明投票必须拥有最终话语权。要让所有人保持一致,唯一的办法就是认定最长链始终是有效的链,无论发生什么。

英文原文

It is strictly necessary that the longest chain is always considered the valid one. Nodes that were present may remember that one branch was there first and got replaced by another, but there would be no way for them to convince those who were not present of this. We can't have subfactions of nodes that cling to one branch that they think was first, others that saw another branch first, and others that joined later and never saw what happened. The CPU power proof-of-work vote must have the final say. The only way for everyone to stay on the same page is to believe that the longest chain is always the valid one, no matter what.

日期2008-11-09
来源Cryptography Mailing List · Bitcoin P2P e-cash paper · 原文

工作量证明链是同步问题的解决方案,也是无需信任任何人就能知晓全球共享视图的方案。

英文原文

The proof-of-work chain is the solution to the synchronisation problem, and to knowing what the globally shared view is without having to trust anyone.

日期2008-11-09
来源Cryptography Mailing List · Bitcoin P2P e-cash paper · 原文

当某个节点找到工作量证明,新区块就会在全网传播,每个人都把它加到链上,开始在它之后工作下一个区块。那些手里拿着另一笔交易的节点会停止尝试把它收进区块,因为按照被接受的链,它现在已经无效。

英文原文

When a node finds a proof-of-work, the new block is propagated throughout the network and everyone adds it to the chain and starts working on the next block after it. Any nodes that had the other transaction will stop trying to include it in a block, since it's now invalid according to the accepted chain.

日期2008-11-13
来源Cryptography Mailing List · Bitcoin P2P e-cash paper · 原文

工作量证明链是拜占庭将军问题的解决方案。我试着在那个语境下重新表述一下。

若干位拜占庭将军每人有一台计算机,想通过暴力破解国王 Wi-Fi 的密码来攻击它——他们已得知密码是固定长度的。一旦他们刺激网络生成一个数据包,就必须在有限时间内破解密码、潜入并清除日志,否则就会被发现、惹上麻烦。只有多数人同时攻击,他们的 CPU 算力才够快,足以及时破解。

他们不太在乎攻击具体在什么时候,只希望达成一致。已经决定:任何想宣布时间的人都可以宣布,第一个被听到的时间就是官方攻击时间。问题在于网络不是瞬时的,如果两位将军在接近同一时间宣布了不同的攻击时间,有人会先听到这个,有人会先听到那个。他们用工作量证明链来解决这个问题。每位将军收到自己先听到的攻击时间后,就让计算机去解一道极难的工作量证明题——该题的哈希包含这个攻击时间。工作量证明难到预计要他们全体一起工作 10 分钟,才能有一人找到解。一旦某位将军找到工作量证明,他就把它广播到全网,大家把当前正在算的工作量证明改成包含这个工作量证明的哈希。如果有人在算另一个攻击时间,就切换到这个,因为它的工作量证明链现在更长了。

两小时后,某个攻击时间应该已经被一条包含 12 个工作量证明的链哈希过。每位将军只需验证工作量证明链的难度,就能估算出它耗费了多少并行 CPU 算力/小时,并看出要在规定时间内产出这么多工作量证明,必定需要多数计算机参与。他们一定都见过它,因为工作量证明就是他们为之工作过的证明。如果工作量证明链展现的 CPU 算力足以破解密码,他们就可以放心地在约定的时间发动攻击。

工作量证明链就是你们问到的所有同步问题、分布式数据库问题和全局视图问题的解法。

英文原文

The proof-of-work chain is a solution to the Byzantine Generals' Problem. I'll try to rephrase it in that context.
A number of Byzantine Generals each have a computer and want to attack the King's wi-fi by brute forcing the password, which they've learned is a certain number of characters in length. Once they stimulate the network to generate a packet, they must crack the password within a limited time to break in and erase the logs, otherwise they will be discovered and get in trouble. They only have enough CPU power to crack it fast enough if a majority of them attack at the same time.
They don't particularly care when the attack will be, just that they all agree. It has been decided that anyone who feels like it will announce a time, and whatever time is heard first will be the official attack time. The problem is that the network is not instantaneous, and if two generals announce different attack times at close to the same time, some may hear one first and others hear the other first. They use a proof-of-work chain to solve the problem. Once each general receives whatever attack time he hears first, he sets his computer to solve an extremely difficult proof-of-work problem that includes the attack time in its hash. The proof-of-work is so difficult, it's expected to take 10 minutes of them all working at once before one of them finds a solution. Once one of the generals finds a proof-of-work, he broadcasts it to the network, and everyone changes their current proof-of-work computation to include that proof-of-work in the hash they're working on. If anyone was working on a different attack time, they switch to this one, because its proof-of-work chain is now longer.
After two hours, one attack time should be hashed by a chain of 12 proofs-of-work. Every general, just by verifying the difficulty of the proof-of-work chain, can estimate how much parallel CPU power per hour was expended on it and see that it must have required the majority of the computers to produce that much proof-of-work in the allotted time. They had to all have seen it because the proof-of-work is proof that they worked on it. If the CPU power exhibited by the proof-of-work chain is sufficient to crack the password, they can safely attack at the agreed time.
The proof-of-work chain is how all the synchronisation, distributed database and global view problems you've asked about are solved.

日期2008-11-17
来源Cryptography Mailing List · Bitcoin P2P e-cash paper · 原文

确立一个人真实身份的凭证,是提供 CPU 算力的能力。

英文原文

The credential that establishes someone as real is the ability to supply CPU power.

日期2008-11-17
来源Cryptography Mailing List · Bitcoin P2P e-cash paper · 原文

工作量证明是 Hashcash 风格的 SHA-256 碰撞寻找。它是一个无记忆过程:你每秒做数百万次哈希,每次都有很小的概率找到解。最快的 3 或 4 个节点的主导地位,只与其占总 CPU 算力的份额成正比。任何人在任何时刻找到解的概率,都与其 CPU 算力成正比。

英文原文

The proof-of-work is a Hashcash style SHA-256 collision finding. It's a memoryless process where you do millions of hashes a second, with a small chance of finding one each time. The 3 or 4 fastest nodes' dominance would only be proportional to their share of the total CPU power. Anyone's chance of finding a solution at any time is proportional to their CPU power.

日期2010-08-07
来源BitcoinTalk · Re: Bitcoin minting is thermodynamically perverse · 原文

工作量证明有个很好的特性:它可以通过不可信的中间人转交。我们不必担心通信的保管链条。无论是谁告诉你一条最长链都无关紧要,工作量证明自己会说话。

英文原文

Proof-of-work has the nice property that it can be relayed through untrusted middlemen. We don't have to worry about a chain of custody of communication. It doesn't matter who tells you a longest chain, the proof-of-work speaks for itself.

日期2010-08-16
来源BitcoinTalk · Re: checkpointing the block chain · 原文

软件没有办法自动判断哪条链更好,除了看谁的工作量证明最大。在设计中,它必须切换到更长的链,无论要回溯多远。

英文原文

There is no way for the software to automatically know if one chain is better than another except by the greatest proof-of-work. In the design it was necessary for it to switch to a longer chain no matter how far back it has to go.