Proof of work – Mangrove

GlossaryBlockchain basics

Proof of work

Definition: Proof of work is evidence that a computer spent effort on a puzzle that is costly to solve and cheap to check; blockchains use it to pick who adds a block.

In Bitcoin, NIST says, the puzzle requires “that the hash digest of a block header be less than a target value” (NIST, Blockchain Technology Overview), where a hash is a fixed-length fingerprint of data and the header is a summary of the block. Computers make small changes to the header and hash it again until a result falls below the target. The Bitcoin whitepaper describes this as finding a hash that “begins with a number of zero bits” (Nakamoto). Adam Back, whose Hashcash design the whitepaper cites, wrote that “the fastest algorithm for computing partial collisions is brute force”, where a partial collision is a hash whose first bits match a set pattern. Each extra zero bit required doubles the average number of tries; the whitepaper says the average work “is exponential in the number of zero bits required and can be verified by executing a single hash.” This search is called mining; bitcoin.org says miners collect transaction fees and newly created bitcoins as a reward (bitcoin.org). The whitepaper says “it is CPU time and electricity that is expended”, CPU being a computer’s central processing unit.

Once the work is done, “the block cannot be changed without redoing the work”. The whitepaper says the system is secure “as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes”. NIST adds that the puzzle helps against a Sybil attack, where one attacker creates many identities, because influence depends on hardware, which costs money. For example, a miner with a small share of the network’s computing power who tried to rewrite an hour-old block would have to redo it and every later block while the rest of the network kept adding blocks. The whitepaper shows the chance of catching up “diminishes exponentially as subsequent blocks are added”. Ethereum also used proof of work until it moved to proof of stake, a separate entry, in 2022 (ethereum.org).

Cynthia Dwork and Moni Naor proposed requiring a user “to compute a moderately hard, but not intractable, function in order to gain access to the resource”, as a defense against junk mail, in Pricing via Processing or Combatting Junk Mail, presented at the CRYPTO ’92 cryptography conference. Adam Back proposed Hashcash in May 1997 to limit abuse of internet resources such as email; his 2002 paper, Hashcash – A Denial of Service Counter-Measure, says he had not then known of Dwork and Naor’s earlier work. Markus Jakobsson and Ari Juels wrote “We formalize the notion of a proof of work (POW)” in Proofs of Work and Bread Pudding Protocols (1999). Nakamoto’s 2008 whitepaper used “a proof-of-work system similar to Adam Back’s Hashcash” so that participants could “agree on a single history of the order in which they were received” without a trusted party.