Proof of Work Explained Simply : Learn Blockchain

Proof of Work (PoW) is a consensus algorithm used in the original Bitcoin implementation. In a Blockchain system new transactions are periodically added by packaging these transactions in a block. This block is then added to the Blockchain. Please read What is Blockchain Technology if you don’t already know.

Background

Users send each other digital tokens (e.g. Bitcoins). All such transactions are stored in a public ledger which implemented on Blockchain. But before transactions are added to the ledger they need to be confirmed. There are special nodes in the network called peers or more popularly miners who are responsible for confirming transactions and adding them to blocks. A block generally contains multiple transactions.

How It Works?

When a new block needs to be added to the Blockchain, every peer in the network tries to solve a puzzle. Whoever solves the puzzle first is given a reward and the block is added to the Blockchain. The puzzle is nothing but finding a SHA-256 hash of given block data in such a manner that the hash value must start with certain number of zeroes. This is known as target hash. A random number (called nonce) is attached to the original data and the peer keeps trying different nonces until it finds target hash. Current target in Bitcoin is 17 zeroes. Setting a higher target value will make it more difficult to find a required hash. This requirement of certain number of leading zeroes in the hash is known as target. Finding target hash requires enormous computing power but verifying it is easy. Suppose peer A finds target hash and sends it to peer B, peer B can easily verify it because nonce value is also known.

Why is Proof of Work Needed?

In the absence of Proof of Work, the Blockchain system can be spammed with illegitimate transactions. It is from Proof of Work that Bitcoin gets its value. A peer who successfully adds a block, gets 25 Bitcoins! There is another popular alternative to Proof of Work known as Proof of Stake. More on it later.