You've probably heard the term proof-of-work many times. In this article you will learn what it is and what it is about.
Proof-of-Work - what it is?
Proof-of-Work or PoW is the original consensus algorithm in the Blockchain network.
In Blockchain this algorithm is used to confirm transactions and create new blocks in the chain. With PoW, miners compete with each other to complete transactions in the network and get a reward.
On the network, users send each other digital tokens. The decentralized book collects all transactions in blocks. However, care must be taken to confirm the transactions and the distribution of blocks.
This responsibility is born on special nodes called miners, and the process is called mining. The main principles are a complex mathematical puzzle and the ability to easily prove a solution. The mathematical puzzle is a problem that requires a lot of computational power to solve.
There are many of them, for example:
- a shortcut function (hash) or how to find the input knowing the output.
- Prime factorization, in other words, how to present a number as a multiplication of two other numbers.
- protocol puzzle. If a server suspects a DoS attack, it needs to calculate the hash function for some nodes in a certain order. In this case it is "how to find the hash function value".
The answer to a PoW problem or mathematical equation is called hash.
As the network develops, it faces more and more difficulties. Algorithms need more and more computing power. The complexity of the task is therefore a delicate issue. The exact work and speed of the Blockchain system depends on it.
But the problem should not be too complicated. If blocking takes a long time, transactions get stuck without execution, as a result of which the workflow is suspended for some time. If the problem cannot be solved in a certain period of time, generating a block will become a miracle. But if the problem is too easy, it is vulnerable to security gaps, DoS attacks and spam. The solution must be easily tested. Otherwise not all nodes are able to analyze if the calculations are correct. Then you will have to trust other nodes and this will violate one of the most important features of Blockchain - transparency. The miners solve the puzzle by creating a new block and confirm transactions.
How complicated the puzzle is, depends on the number of users, current power and network load. Each block hash contains the hash of the previous block, which increases security and prevents block breaches. If a miner manages to solve the puzzle, a new block is created. Transactions are placed in this block and are considered confirmed. Proof-of-Work is used in many cryptocurrencies.
The best known PoW application is Bitcoin. It was Bitcoin who laid the foundation for this kind of consensus. The puzzle is hashcash. This algorithm allows to change the complexity of the puzzle based on total network power. The average time to create a block is 10 minutes. Bitcoin-based cryptocurrencies, such as Litecoin, have a similar system.
Benefits of PoW
The main benefits are protection against DoS attacks and the low impact of participations on extraction possibilities.
Defence against DoS attacks
PoW imposes certain restrictions on network operations. They need a lot of calculations to be done. An effective attack requires a lot of computational power and a lot of time to perform calculations. Therefore an attack is possible, but useless because the costs are too high.
It doesn't matter how much money you have in your wallet. What matters is a lot of computing power to solve calculations and create new blocks. So the owners of huge amounts of money are not responsible for making decisions about the whole network.
The main disadvantages are the huge expenses, the "uselessness" of calculations and the 51% attack.
Mining requires highly specialized computer equipment to handle complex algorithms. The costs are unmanageable. Mining becomes available only for special exacavators. These specialized machines consume large amounts of energy to operate and this increases costs. The high costs threaten the centralisation of the system because it brings benefits. This is easy to see with Bitcoin.
Miners do a lot of work to generate blocks and consume a lot of energy. However, their calculations do not apply anywhere else. They guarantee network security, but cannot be used in business, science or any other field.
A 51% attack is a case where a user or a group of users controls the majority of production capacity. Attackers have enough power to control most events in the network. They can monopolize the generation of new blocks and receive rewards because they are able to prevent other miners from completing the blocks.