天天看點

比特币創世論文《Bitcoin: A Peer-to-Peer Electronic Cash System》研讀之五:工作量證明原文翻譯細節解讀

原文翻譯

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 [6], 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.

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.

比特币創世論文《Bitcoin: A Peer-to-Peer Electronic Cash System》研讀之五:工作量證明原文翻譯細節解讀

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.

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.

4.工作量證明

為了實作基于點對點[1]網絡的分布式時間戳[2]伺服器,我們需要使用一種和Adam Back's Hashcash[3]相似的工作量證明[4]系統,比起報紙或Usenet[5]網。工作量證明牽扯到在生成哈希時掃描一個值,以SHA-256[6]為例,這個哈希值以一系列的零比特開始。平均工作量随着開頭零的個數要求的增加而越來越大并可以通過執行一次hash來驗證。

對于我們的時間戳網絡來說,我們通過在區塊中增加一個臨時值直到一個可以讓這個區塊的哈希值達到要求的值被找到來實作工作量證明。一旦CPU算力被花費來使其滿足工作量證明,除非重做工作量證明這個區塊就不能被修改。當之後的區塊加入進來,修改區塊的工作量将包含重算之後所有的工作量證明。

工作量證明也解決了在主要決策中确定代表性的問題如果多數派的确定是靠IP位址一IP一票,它就會被可以産生多個IP的節點操縱。工作量證明是必要的一CPU一票的機制。最長鍊就是主要決策的代表,其中包含最多的工作量,如果大多數CPU算力被非惡意節點所控制,那麼誠實的鍊就會比所有與它競争的鍊都生長的更快并超過他們。為了修改一個之前的區塊,攻擊者必須重算這個區塊以及這個區塊之後所有區塊的工作量證明,然後趕上并超過非惡意節點。我們待會兒會落後的攻擊者趕上的可能性随着區塊的增加呈指數級減少[7]。

為了比對硬體速度的增加,和運算節點的變化,工作量證明的難度被變化的每小時平均生成區塊數所決定,如果它們産生的過快,就會增加難度。

細節解讀

[1]什麼是點對點

請參考我的另一篇博文:比特币創世論文《Bitcoin: A Peer-to-Peer Electronic Cash System》研讀之一:摘要

https://blog.csdn.net/qq_27467365/article/details/81569962

[1]What is 'peer-to-peer'

Please refer to my other blog post《Study of《Bitcoin: A Peer-to-Peer Electronic Cash System》1》:

https://blog.csdn.net/qq_27467365/article/details/8156996

[2]什麼是 時間戳

請參考我的另一篇博文:比特币創世論文《Bitcoin: A Peer-to-Peer Electronic Cash System》研讀之四:時間戳伺服器

https://blog.csdn.net/qq_27467365/article/details/81589805

[2]What is 'timestamps'

Please refer to my other blog post《Study of《Bitcoin: A Peer-to-Peer Electronic Cash System》4》:timestamps

https://blog.csdn.net/qq_27467365/article/details/81589805

[3]什麼是”Adam Back's Hashcash“

Hashcash是一種用于限制電子郵件垃圾郵件和拒絕服務攻擊的工作量證明系統,最近因其在比特币(和其他加密貨币)中的使用而聞名,作為挖掘算法的一部分。 Hashcash由Adam Back于1997年提出。

[3]What is 'Adam Back's Hashcash'

Hashcash is a proof-of-work system used to limit email spam and denial-of-service attacks and more recently has become known for its use in bitcoin (and other cryptocurrencies) as part of the mining algorithm. Hashcash was proposed in 1997 by Adam Back.

Adam Back's Hashcash的維基百科位址:https://en.wikipedia.org/wiki/Hashcash

[4] 什麼是 工作量證明

請參考我的另一篇博文:比特币創世論文《Bitcoin: A Peer-to-Peer Electronic Cash System》研讀之一:摘要

https://blog.csdn.net/qq_27467365/article/details/81569962

[4]What is 'proof-of-work'

Please refer to my other blog post《Study of《Bitcoin: A Peer-to-Peer Electronic Cash System》1》

https://blog.csdn.net/qq_27467365/article/details/8156996

[5]什麼是 “Usenet“

請參考我的另一篇博文:比特币創世論文《Bitcoin: A Peer-to-Peer Electronic Cash System》研讀之四:時間戳伺服器

https://blog.csdn.net/qq_27467365/article/details/81589805

[5]What is”Usenet“

Please refer to my other blog post《Study of《Bitcoin: A Peer-to-Peer Electronic Cash System》4》:timestamps

https://blog.csdn.net/qq_27467365/article/details/81589805

[6]什麼是“SHA-256“

[6]What is”SHA-256”

[7]為什麼指數級減少?

[7]

《Bitcoin: A Peer-to-Peer Electronic Cash System》論文原文位址如下:https://bitcoin.org/bitcoin.pdf

版權所有聲明

版權所有歸屬作者,未經允許不得轉載、複制或用作它途。否則作者将具有追究法律責任的權利。

Copyright Clarify

Copyright ownership belongs to the author, shall not be reproduced, copied, or used in other ways without permission. Otherwise, the author will have the right to pursue legal responsibilities.