Proof of work

From Wikipedia, the free encyclopedia

Proof of work (PoW) is a form of cryptographic zero-knowledge proof in which one party (the prover) proves to others (the verifiers) that a certain amount of a specific computational effort has been expended. Verifiers can subsequently confirm this expenditure with minimal effort on their part. The concept was invented by Cynthia Dwork and Moni Naor in 1993 as a way to deter denial-of-service attacks and other service abuses such as spam on a network by requiring some work from a service requester, usually meaning processing time by a computer. The term "proof of work" was first coined and formalized in a 1999 paper by Markus Jakobsson and Ari Juels.[1][2] Proof of work was later popularized by Bitcoin as a foundation for consensus in permissionless blockchains and cryptocurrencies, in which miners compete to append blocks and mint new currency, each miner experiencing a success probability proportional to their computational effort expended. PoW and PoS (proof of stake) are the two best known Sybil deterrence mechanisms. In the context of cryptocurrencies they are the most common mechanisms.[3]

A key feature of proof-of-work schemes is their asymmetry: the work – the computation – must be moderately hard (yet feasible) on the prover or requester side but easy to check for the verifier or service provider. This idea is also known as a CPU cost function, client puzzle, computational puzzle, or CPU pricing function. Another common feature are built-in incentive-structures that reward allocating computational capacity to the network with value in the form of money.

The purpose of proof-of-work algorithms are not proving that certain work was carried out or that a computational puzzle was "solved", but deterring manipulation of data via the specific solution of establishing large energy and hardware-control requirements for the ability to do so.

Background[]

One popular system, used in Hashcash, uses partial hash inversions to prove that computation was done, as a goodwill token to send an e-mail. For instance, the following header represents about 252 hash computations to send a message to calvin@comics.net on January 19, 2038:

X-Hashcash: 1:52:380119:calvin@comics.net:::9B760005E92F0DAE

It is verified with a single computation by checking that the SHA-1 hash of the stamp (omit the header name X-Hashcash: including the colon and any amount of whitespace following it up to the digit '1') begins with 52 binary zeros, that is 13 hexadecimal zeros:[1]

0000000000000756af69e2ffbdb930261873cd71

Whether PoW systems can actually solve a particular denial-of-service issue such as the spam problem is subject to debate;[4][5] the system must make sending spam emails obtrusively unproductive for the spammer, but should also not prevent legitimate users from sending their messages. In other words, a genuine user should not encounter any difficulties when sending an email, but an email spammer would have to expend a considerable amount of computing power to send out many emails at once. Proof-of-work systems are being used by other, more complex cryptographic systems such as bitcoin, which uses a system similar to Hashcash.[4]

Variants[]

There are two classes of proof-of-work protocols.

  • Challenge–response protocols assume a direct interactive link between the requester (client) and the provider (server). The provider chooses a challenge, say an item in a set with a property, the requester finds the relevant response in the set, which is sent back and checked by the provider. As the challenge is chosen on the spot by the provider, its difficulty can be adapted to its current load. The work on the requester side may be bounded if the challenge-response protocol has a known solution (chosen by the provider), or is known to exist within a bounded search space.
Proof of Work challenge response.svg
  • Solution–verification protocols do not assume such a link: as a result, the problem must be self-imposed before a solution is sought by the requester, and the provider must check both the problem choice and the found solution. Most such schemes are unbounded probabilistic iterative procedures such as Hashcash.
Proof of Work solution verification.svg

Known-solution protocols tend to have slightly lower variance than unbounded probabilistic protocols because the variance of a rectangular distribution is lower than the variance of a Poisson distribution (with the same mean).[further explanation needed] A generic technique for reducing variance is to use multiple independent sub-challenges, as the average of multiple samples will have a lower variance.

There are also fixed-cost functions such as the time-lock puzzle.

Moreover, the underlying functions used by these schemes may be:

  • CPU-bound where the computation runs at the speed of the processor, which greatly varies in time, as well as from high-end server to low-end portable devices.[6]
  • Memory-bound[7][8][9][10] where the computation speed is bound by main memory accesses (either latency or bandwidth), the performance of which is expected to be less sensitive to hardware evolution.
  • Network-bound[11] if the client must perform few computations, but must collect some tokens from remote servers before querying the final service provider. In this sense, the work is not actually performed by the requester, but it incurs delays anyway because of the latency to get the required tokens.

Finally, some PoW systems offer shortcut computations that allow participants who know a secret, typically a private key, to generate cheap PoWs. The rationale is that mailing-list holders may generate stamps for every recipient without incurring a high cost. Whether such a feature is desirable depends on the usage scenario.

List of proof-of-work functions[]

Here is a list of known proof-of-work functions:

Reusable proof-of-work[]

Computer scientist Hal Finney built on the proof-of-work idea, yielding a system that exploited reusable proof of work (RPoW).[19] The idea of making proofs of work reusable for some practical purpose had already been established in 1999.[1] Finney's purpose for RPoW was as token money. Just as a gold coin's value is thought to be underpinned by the value of the raw gold needed to make it, the value of an RPoW token is guaranteed by the value of the real-world resources required to 'mint' a PoW token. In Finney's version of RPoW, the PoW token is a piece of Hashcash.

A website can demand a PoW token in exchange for service. Requiring a PoW token from users would inhibit frivolous or excessive use of the service, sparing the service's underlying resources, such as bandwidth to the Internet, computation, disk space, electricity, and administrative overhead.

Finney's RPoW system differed from a PoW system in permitting the random exchange of tokens without repeating the work required to generate them. After someone had "spent" a PoW token at a website, the website's operator could exchange that "spent" PoW token for a new, unspent RPoW token, which could then be spent at some third-party website similarly equipped to accept RPoW tokens. This would save the resources otherwise needed to 'mint' a PoW token. The anti-counterfeit property of the RPoW token was guaranteed by remote attestation. The RPoW server that exchanges a used PoW or RPoW token for a new one of equal value uses remote attestation to allow any interested party to verify what software is running on the RPoW server. Since the source code for Finney's RPoW software was published (under a BSD-like license), any sufficiently knowledgeable programmer could, by inspecting the code, verify that the software (and, by extension, the RPoW server) never issued a new token except in exchange for a spent token of equal value.

Until 2009, Finney's system was the only RPoW system to have been implemented; it never saw economically significant use.

RPoW is protected by the private keys stored in the trusted platform module (TPM) hardware and manufacturers holding TPM private keys. Stealing a TPM manufacturer's key or obtaining the key by examining the TPM chip itself would subvert that assurance.

Bitcoin-type proof of work[]

In 2009, the Bitcoin network went online. Bitcoin is a proof-of-work cryptocurrency that, like Finney's RPoW, is also based on the Hashcash PoW. But in Bitcoin, double-spend protection is provided by a decentralized P2P protocol for tracking transfers of coins, rather than the hardware trusted computing function used by RPoW. Bitcoin has better trustworthiness because it is protected by computation. Bitcoins are "mined" using the Hashcash proof-of-work function by individual miners and verified by the decentralized nodes in the P2P bitcoin network.

The difficulty is periodically adjusted to keep the block time around a target time.

Energy consumption[]

Bitcoin electricity consumption as of 2021[20]

Since the creation of Bitcoin, proof-of-work has been the predominant design of peer-to-peer cryptocurrency. Studies have estimated the total energy consumption of cryptocurrency mining.[21] The PoW mechanism requires a vast amount of computing resources, which consume a significant amount of electricity. Bitcoin's total energy consumption is equivalent to that of a small country.[3] This energy consumption was found to cause large amounts of carbon emissions, interfering with contemporary inter-national climate change mitigation commitments. According to a 2021 study, mining for Bitcoin within China alone can be expected to soon exceed total annual emissions of European countries like Italy.[22][23]

History modification[]

Each block that is added to the blockchain, starting with the block containing a given transaction, is called a confirmation of that transaction. Ideally, merchants and services that receive payment in the cryptocurrency should wait for at least one confirmation to be distributed over the network, before assuming that the payment was done. The more confirmations that the merchant waits for, the more difficult it is for an attacker to successfully reverse the transaction in a blockchain—unless the attacker controls more than half the total network power, in which case it is called a 51% attack.[24]

ASICs and mining pools[]

Within the Bitcoin community there are groups working together in mining pools.[25] Some miners use application-specific integrated circuits (ASICs) for PoW.[26] This trend toward mining pools and specialized ASICs has made mining some cryptocurrencies economically infeasible for most players without access to the latest ASICs, nearby sources of inexpensive energy, or other special advantages.[27]

Some PoWs claim to be ASIC-resistant,[28] i.e. to limit the efficiency gain that an ASIC can have over commodity hardware, like a GPU, to be well under an order of magnitude. ASIC resistance has the advantage of keeping mining economically feasible on commodity hardware, but also contributes to the corresponding risk that an attacker can briefly rent access to a large amount of unspecialized commodity processing power to launch a 51% attack against a cryptocurrency.[29]

See also[]

Notes[]

  • ^ On most Unix systems this can be verified with echo -n 1:52:380119:calvin@comics.net:::9B760005E92F0DAE | openssl sha1

References[]

  1. ^ Jump up to: a b c Jakobsson, Markus; Juels, Ari (1999). "Proofs of Work and Bread Pudding Protocols". Secure Information Networks: Communications and Multimedia Security. Kluwer Academic Publishers: 258–272. doi:10.1007/978-0-387-35568-9_18.
  2. ^ Jump up to: a b c d Dwork, Cynthia; Naor, Moni (1993). "Pricing via Processing, Or, Combatting Junk Mail, Advances in Cryptology". CRYPTO'92: Lecture Notes in Computer Science No. 740. Springer: 139–147. doi:10.1007/3-540-48071-4_10.
  3. ^ Jump up to: a b "Cryptocurrencies and blockchain" (PDF). European Parliament. July 2018. Retrieved 29 October 2020. the two best-known – and in the context of cryptocurrencies also most commonly used
  4. ^ Jump up to: a b Laurie, Ben; Clayton, Richard (May 2004). "Proof-of-work proves not to work". Workshop on the Economics of Information Security 2004.
  5. ^ Liu, Debin; Camp, L. Jean (June 2006). "Proof of Work can work - Fifth Workshop on the Economics of Information Security".
  6. ^ How powerful was the Apollo 11 computer?, a specific comparison that shows how different classes of devices have different processing power.
  7. ^ Jump up to: a b Abadi, Martín; Burrows, Mike; Manasse, Mark; Wobber, Ted (2005). "Moderately hard, memory-bound functions". 5 (2): 299–327. Cite journal requires |journal= (help)
  8. ^ Jump up to: a b Dwork, Cynthia; Goldberg, Andrew; Naor, Moni (2003). "On memory-bound functions for fighting spam". Advances in Cryptology: CRYPTO 2003. Lecture Notes in Computer Science. Springer. 2729: 426–444. doi:10.1007/978-3-540-45146-4_25. ISBN 978-3-540-40674-7.
  9. ^ Jump up to: a b Coelho, Fabien (2005). "Exponential memory-bound functions for proof of work protocols". Cryptology ePrint Archive, Report.
  10. ^ Jump up to: a b Tromp, John (2015). "Cuckoo Cycle; a memory bound graph-theoretic proof-of-work" (PDF). Financial Cryptography and Data Security: BITCOIN 2015. Lecture Notes in Computer Science. Springer. 8976: 49–62. doi:10.1007/978-3-662-48051-9_4. ISBN 978-3-662-48050-2.
  11. ^ Jump up to: a b Abliz, Mehmud; Znati, Taieb (December 2009). "A Guided Tour Puzzle for Denial of Service Prevention". Proceedings of the Annual Computer Security Applications Conference (ACSAC) 2009. Honolulu, HI: 279–288. CiteSeerX 10.1.1.597.6304. doi:10.1109/ACSAC.2009.33. ISBN 978-1-4244-5327-6. S2CID 14434713.
  12. ^ Back, Adam. "HashCash". A popular PoW system. First announced in March 1997.
  13. ^ Gabber, Eran; Jakobsson, Markus; Matias, Yossi; Mayer, Alain J. (1998). "Curbing junk e-mail via secure classification" (PDF). Financial Cryptography: 198–213.
  14. ^ Wang, Xiao-Feng; Reiter, Michael (May 2003). "Defending against denial-of-service attacks with puzzle auctions" (PDF). IEEE Symposium on Security and Privacy '03.
  15. ^ Franklin, Matthew K.; Malkhi, Dahlia (1997). "Auditable metering with lightweight security". Financial Cryptography '97. Lecture Notes in Computer Science. 1318: 151–160. doi:10.1007/3-540-63594-7_75. ISBN 978-3-540-63594-9. Updated version May 4, 1998.
  16. ^ Juels, Ari; Brainard, John (1999). "Client puzzles: A cryptographic defense against connection depletion attacks". NDSS 99.
  17. ^ Waters, Brent; Juels, Ari; Halderman, John A.; Felten, Edward W. (2004). "New client puzzle outsourcing techniques for DoS resistance" (PDF). 11th ACM Conference on Computer and Communications Security.
  18. ^ Coelho, Fabien (2007). "An (almost) constant-effort solution-verification proof-of-work protocol based on Merkle trees". Cryptology ePrint Archive, Report.
  19. ^ "Reusable Proofs of Work". Archived from the original on December 22, 2007.
  20. ^ "Cambridge Bitcoin Electricity Consumption Index (CBECI)". www.cbeci.org. Retrieved 2020-02-20.
  21. ^ "Cambridge Bitcoin Electricity Consumption Index". Cambridge Center For Alternative Finance. Retrieved 30 September 2020.
  22. ^ Lu, Donna. "Bitcoin mining emissions in China will hit 130 million tonnes by 2024". New Scientist. Retrieved 9 May 2021.
  23. ^ Jiang, Shangrong; Li, Yuze; Lu, Quanying; Hong, Yongmiao; Guan, Dabo; Xiong, Yu; Wang, Shouyang (6 April 2021). "Policy assessments for the carbon emission flows and sustainability of Bitcoin blockchain operation in China". Nature Communications. 12 (1): 1938. Bibcode:2021NatCo..12.1938J. doi:10.1038/s41467-021-22256-3. ISSN 2041-1723. PMC 8024295. PMID 33824331. CC-BY icon.svg Available under CC BY 4.0.
  24. ^ Michael J. Casey; Paul Vigna (16 June 2014). "Short-Term Fixes To Avert "51% Attack"". Money Beat. Wall Street Journal. Retrieved 30 June 2014.
  25. ^ Overview of the Bitcoin mining pools on blockchain.info
  26. ^ What is an ASIC miner on digitaltrends.com
  27. ^ Vorick, David (13 May 2018). "The State of Cryptocurrency Mining".
  28. ^ tevador/RandomX: Proof of work algorithm based on random code execution on Github
  29. ^ Savva Shanaev, Arina Shuraeva, Mikhail Vasenin and Maksim Kuznetsov (2019). "Cryptocurrency Value and 51% Attacks: Evidence from Event Studies". The Journal of Alternative Investments. 22 (3): 65–77. doi:10.3905/jai.2019.1.081. S2CID 211422987.CS1 maint: uses authors parameter (link)

External links[]

  • Finney's system at the Wayback Machine (archived December 22, 2007)
  • bit gold Bit gold. Describes a complete money system (including generation, storage, assay, and transfer) based on proof of work functions and the machine architecture problem raised by the use of these functions.
  • Merkle Proof Standardised Format for Simplified Payment Verification (SPV).
Retrieved from ""