For faster navigation, this Iframe is preloading the Wikiwand page for 工作量证明.

工作量证明

工作量证明(Proof-of-Work,PoW)是一种对应服务与资源滥用、或是拒绝服务攻击的经济对策。

一般要求用户进行一些耗时适当的复杂运算,并且答案能被服务方快速验算,以此耗用的时间、装置与能源做为担保成本,以确保服务与资源是被真正的需求所使用。此概念最早由Cynthia Dwork英语Cynthia DworkMoni Naor英语Moni Naor于1993年的学术论文提出[1],而工作量证明一词则是在1999年由Markus Jakobsson英语Markus Jakobsson与Ari Juels.[2]所发表。现时此技术成为了加密货币的主流共识机制之一,如比特币所采用的技术。

技术原理

[编辑]

工作量证明最常用的技术原理是散列函数。由于输入散列函数的任意值,会对应到一个结果,而只要变动一个位元,就会引起雪崩效应,所以几乎无法从反推回,因此借由指定查找的特征,让用户进行大量的穷举运算,就可以达成工作量证明。

我们若指定16进制值的前四值,求,这样统计上平均约要运行216散列运算,才会得到答案,但验算只要进行一次就可以了。如果想要增加难度,那就增加指定的位数即可。以SHA256函数举例,假设我们要处理资料Hello World,并找出前四值为0000的,如果从Hello World0开始加上一个十进制ASCII进行穷举猜测,到Hello World107105时才会得到符合条件的

0000BFE6AF4232F78B0C8EBA37A6BA6C17B9B8671473B0B82305880BE077EDD9

验算时只要将Hello World107105代入SHA256函数一次即可。

加密货币的应用

[编辑]

由于加密货币多由区块链所建构,而区块链本来就要依赖散列函数来做为资料正确无误的担保,所以在加密货币上使用工作量证明,是非常简明的设计。由分散在各处的电脑,竞赛谁能最早找出,搭配原本要打包的资料的穷举猜测值(nonce),谁就等同获得该区块的打包权(记账权)。此猜测值被找出后,与资料、散列值一起打包成块后广播,经多数节点确认与承认,打包者就能获得打包该区块所提供的奖励。[3]一般采用工作量证明的加密货币,好比比特币,会设置成随着参与竞赛的算力增减,而调整找寻猜测值的难度,以维持合理的运作速度。

  • 优点
    • 架构简明扼要、有效可靠。
    • 由于要获得多数节点承认,那攻击者必须投入超过总体一半的运算量(51%攻击),才能保证篡改结果。这使得攻击成功的成本变得非常高昂,难以实现。
    • 某种程度上是公平的,你投入越多的算力,你获得打包权的几率也等比增加。
  • 缺点
    • 非常浪费能源。投入在一种加密货币上的能源,可能会超过一个小型国家的总使用量。[4]
    • 由于加密货币在世界上已成为一种投资标的,所以技术人员开发出了由ASIC组成的特制计算装置(矿机),垄断算力。这与加密货币的去中心化思想背道而驰。
      • 也因此,后期开发的加密货币有针对抗ASIC的算法设计,例如以太坊采用的Ethash(Dagger-Hashimoto)算法。
      • 后期开发的加密货币陆续使用了POS机制(例如以太坊)或DPOS机制(例如位元股﹑EOS)。

目前使用 PoW 机制的虚拟货币,市值排名前十的为[5]

[编辑]
  1. BTC 比特币
  2. DOGE 狗狗币
  3. LTC 莱特币
  4. XMR 门罗币
  5. ETC 以太坊经典
  6. BCH 比特币现金
  7. CFX
  8. BSV
  9. ZEC
  10. RVN

参考

[编辑]
  1. ^ Dwork, Cynthia; Naor, Moni. Pricing via Processing, Or, Combatting Junk Mail, Advances in Cryptology. CRYPTO’92: Lecture Notes in Computer Science No. 740 (Springer). 1993: 139–147 [2017-09-22]. (原始内容存档于2017-11-26). 
  2. ^ Jakobsson, Markus; Juels, Ari. Proofs of Work and Bread Pudding Protocols. Communications and Multimedia Security (Kluwer Academic Publishers). 1999: 258–272 [2017-09-22]. (原始内容存档于2017-04-17). 
  3. ^ 揭秘比特币和区块链(二):什么是工作量证明?. [2017-09-22]. (原始内容存档于2018-11-07). 
  4. ^ 全球瘋挖礦,挖幣總耗電量竟與一個國家用電量一樣高!. [2017-09-22]. (原始内容存档于2020-10-01). 
  5. ^ PoW 工作量證明是什麼意思?和 PoS 比較如何?PoW 已經過時了嗎?. CoinDada. 2023-07-30 [2023-08-15]. (原始内容存档于2023-08-15). 

参阅

[编辑]

外部链接

[编辑]
{{bottomLinkPreText}} {{bottomLinkText}}
工作量证明
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?