Proof of work is one of the methods used to secure a blockchain distributed ledger. It is the method used by Bitcoin to ensure that each block added to the Bitcoin blockchain has the consensus of the whole network. This consensus makes tampering with a blockchain distributed ledger practically impossible.
In the context of Bitcoin, the work of mining a block involved identifying a block that, when run through the SHA-256 hash function twice, produces a smaller number than the given difficulty target.
A really simple explanation of this process is that the hash of the previous block in the bitcoin blockchain is used as the reference point for the SHA-256 hash. When a new block of bitcoin transactions is submitted for the network to accept, all the miners on the network race to find an output that, when processed through SHA-256 twice, yields a number that fits a criteria that is pre-determined by the network. It is a random process (miners keep changing a number known as a “nonce” until they get the result) that requires a significant amount of computing power.
Bitcoin Proof of Work mining is basically a big race to find a “nonce” that satisfies the difficulty of the puzzle built on the answer from the last block in the blockchain.
All the other miners can check the answer by simply running it once, backwards, through two SHA-256 hash functions. Assuming there is no foul play, the block is accepted by the whole network and added to the blockchain and becomes the basis for the next block.
Why proof of work
Proof of work was originally conceptualized as a means of stopping denial-of-service attacks and spam emails. By requiring an email sender to do small but random computations (that are trivial for the receiving party to check and approve), a system could be created that would not significantly burden someone sending a few emails. However, an email spammer would find themselves bogged down by the computational requirements of sending out mass emails.
This concept did not see use until Hal Finney built a reusable Proof of Work system in 1999. Bitcoin’s anonymous inventor Satoshi Nakamoto refined the system in his 2008 white paper and implemented it in 2009. Finney was one of Nakamoto’s early collaborators on the Bitcoin code.
In the Bitcoin network, proof of work is also used as a means of introducing more Bitcoins into circulation. This is done through Bitcoin mining rewards, which act as not just a payment for miners, but also as a way to increase the value of Bitcoin by controlling supply.
Proof of work is not the only way to secure a blockchain. Other systems include Proof of Stake and Proof of Burn. Proof of work is generally more resource intensive than proof of stake and proof of burn, but it is much more secure for small networks, and incentivizes participation in a token economy rather than incentivizing control of a network.