Proof of Work
Creating the proof of work protocol for achieving consensus between devices on a distributed network is arguably the crowning achievement of Bitcoin founder Satoshi Nakamoto. In doing so, he laid the groundwork for the revolutionary technology that is blockchain.
Proof of work (abbreviated to PoW) is a consensus protocol introduced by Bitcoin and used widely by many other cryptocurrencies. This process is known as mining and as such the nodes on the network are known as “miners”. The “proof of work” comes in the form of an answer to a mathematical problem, one that requires considerable work to arrive at, but is easily verified to be correct once the answer has been reached.
The only way to solve these mathematical riddles is through nodes on the network, running a long and random process of presenting answers on a trial and error basis. Technically, this means that the problem could be solved on first attempt, although this is extremely unlikely, to the point where it is practically impossible. The answer needs to be a lower number than the hash of the block for it to be accepted, known as the ‘target hash’.
A target hash is a number that the header of a hashed block must be equal to or less than for a new block, along with the reward, to be awarded to a miner. The lower a target is, the more difficult it is to generate a block. A miner continues testing different unique values (known as nonces) until a suitable one is produced. The miner who manages to solve the riddle mines the next block, adding it to the chain and validating the transactions within it, and receiving the reward associated with the block.
The process involves ensuring every confirmed block in the chain rewards the miner in the cryptocurrency that they are mining through the transaction fees collected for sending currency across the network, as well as any predetermined reward. It ensures that miners are incentivized to continue maintaining a blockchain, as they are being rewarded for doing so.
These rewards are especially important due to the complexity of the riddles that are being solved since the process is extremely costly, both in the terms of time taken and the computing power required to do so. Keeping these miners incentivized is a key function of a protocol as they are in a sense the foundation that keep the system running. Systems such as proof of work are employed so transactions cannot be counterfeited, as the data required to do so is extremely difficult to produce, yet easily verified.
Different forms of mining explained
CPU Mining – Using a normal computer’s CPU to validate transactions in a proof of work consensus protocol.
GPU Mining – This is not dissimilar to CPU mining, however in this case a graphics card is used. Graphics cards are more powerful whilst relatively using less electricity.
FPGA Mining – Otherwise known as “Field-Programmable Gate Array mining”. An FPGA is a circuit tailored for a specific computing task, making them several times faster at mining than normal processors.
ASIC Mining – Is an “Application-specific integrated circuit”, a circuit customised for a particular use. ASICs easily outperform CPUs, GPUs and FPGAs in both speed and efficiency, they are generally only really used for Bitcoin mining.
Mining Pools – To increase the likelihood of successfully mining a block miners pool together their resources, sharing any potential rewards dependent on how much each miner contributed.
Cloud Mining – Some miners rent out their processing power to other miners for a allotted period of time.
The proof of work system is specifically designed to be difficult and require considerable computing power to ensure that too many Bitcoins are not mined too quickly, preserving a consistent supply and incentive for miners to maintain the network. Essentially, the security of the network is enforced physically by specialized hardware. As such, proof of work can be seen as not being an infinitely scalable protocol since the hardware and the electricity spent to power that hardware are limited in resources.
In regards to the issue of Byzantine Fault Tolerance, the proof of work protocol deals with the problem of Byzantine nodes through nonces and combining messages into blocks. Each block has its own distinct nonce. They are only used once in order to add another element of difficulty in generating valid hashes, specifically to prevent precomputation and ensure fairness. Despite having some merits, proof of work is regarded as a flawed consensus protocol, especially when considering how much energy is consumed in running the protocol. For instance, it has been reported that a single Bitcoin transaction, using proof of work, can consume as much electricity as an average Dutch household does in two weeks.
As a result, there has been a shift to more progressive consensus protocols such as the Delegated Proof of Stake consensus protocol that is currently used by Lisk.
For many people blockchain is more than a technology. It has the potential to usher in a new, fairer world, spanning finance, governance, supply chain management and much more. In this segment of the Lisk Academy we will examine some of the individual qualities that blockchain offers, detailing why they are needed now more than ever.