Proof of Work or Proof of Work, is the best-known and oldest consensus protocol that consists of the parts of a network successfully performing a computationally expensive job to access the resources of said network.
El protocol Work test, serves to avoid certain unwanted behaviors in a network and its name comes from English Proof of Work (PoW).
This protocol works under the concept of requiring a job from the client, which is then verified by the network. Normally the requested work consists of carrying out complex computational operations.
These operations are then verified by the network. Once they are approved, the client is given access to use its resources. With this, it seeks prevent malicious clients from consuming all resources uncontrollably. A situation that may end up denying the service provided to other network clients.
A very simple example to understand is the famous captcha that is put when you want to register on a website. The web puts this challenge that the visitor has to solve. If you do, you will have access to the service. In this way, an attacker is prevented from creating millions of records and collapsing the web page. However, the challenge in communication between computers cannot be so complex. It must be solvable, although with a relative complexity.
The main characteristic of this strategy is its asymmetry. Customer work is moderately difficult to perform, but network verification is straightforward. This means that the proof of work takes a long time to produce and is computationally expensive. But verifying it is simple, as the test designs patterns that facilitate verification.
It was precisely this characteristic that caught the attention of Satoshi Nakamoto when designing Bitcoin. That is why the system was implemented. HashCash (a PoW system) in its renowned cryptocurrency.
PoW algorithms - A bit of history
In 1992, the penetration of Internet it was important enough. With its arrival, the use of emails began to spread. But this positive situation brought with it new problems. E-mail systems repeatedly suffered attacks from spam. These attacks generally disabled servers and left many people without services. A solution to this problem was necessary.
In 1993, academics Cynthia dwork y Moni naorThey recognized the problem and tried to solve it. This is how the essay originated "Pricing by Processing or Fighting Spam". In which they presented ways to prevent spammers from sending mass messages.
The idea presented was to include a computational cost to be able to use email services. For it, Dwork and Naor designed a series of tests that required computational cost work. Between them; the calculation of some square roots or the intensive use of functions hash. Once this work was done, the user had to add the information to the email to be verified. If it was correct the mail was sent, if not, the mail was rejected. This simple system deterred spammers from continuing to carry out their attacks.
However, it would still be some time before the system could be fully implemented.
The creation of HashCash
Later in 1997, the protocol came to light HashCash created by the kryptonarchist Adam Back. As in the previous essay, the term Proof of Work it was never used in the HashCash ad. But Back did use a very important term in blockchain technology, that of "Double Spending Protection", Which David Chaum he had already advanced in his previous works.
With HashCash, Back intended to curb massive spamming. The idea was to impose a non-monetary cost on the delivery of each email. A cost that would be associated with calculating problems using the computer. The principle is simple: the problem was calculated, attached to the email information and sent. The server received the mail, verified the information, and accepted or rejected it if it passed the test.
But the computational cost also had a real cost. The cost of electricity caused by the intensive calculation was one cent of a dollar for each mail sent. Whoever sends a few emails a day wouldn't notice anything, but a spammer would. Sending millions of mail would greatly increase that person's electric bill. In this way, spammers are discouraged from carrying out their malicious activity.
The birth of the term Proof of Work
It was finally in 1999, when Markus Jacobsson y Ari juels they wrote a document titled "Proof of Work and Bread Pudding Protocols". And so the term was coined "Work test". Jakobsson and Juels claim that a proof-of-work system is:
This is a protocol in which a voucher demonstrates to a verifier that he has expended a certain level of computational effort in a specific time interval. Although not defined as such or formally discussed, proof of work has been proposed as a mechanism for various security objectives, including measuring server access, building digital time capsules, and protecting against sending mail. spam and other denial of service attacks.
Markus Jakobsson and Ari Juels
Proof of Work and Bread Pudding Protocols (1999) - Page 2
In addition, this work delves into the capacity of the Work Tests of add layers of security. Which serve to guarantee critical services where security is very important.
Proof of Work Comes to Bitcoin
Satoshi Nakamoto published the technical document of Bitcoin on October 31, 2008. In it, Nakamoto was clear that proof of work was a key element of the Bitcoin protocol. In the whitepaper summary of Bitcoin We can read the following:
We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by grouping them into a hash-based proof of work chain, forming a record that cannot be changed without redoing the proof of work.
Satoshi NakamotoBitcoin: A Peer-to-Peer Electronic Cash System (2008) – Abstract
In this way, Nakamoto made use of Adam Back's work, since Bitcoin uses the HashCash protocol. With this, it ended up revolutionizing the world, presenting a completely innovative technology, the blockchain. This technology allowed him to create his famous cryptocurrency, and it has evolved to this day.
Using the Proof of Work protocol, with each new block created, a mathematical puzzle must be solved that can only be solved by trial and error. These puzzles are solved by the miners, making millions of attempts. Solving the riddle will result in the creation of the block, the confirmation of the transactions involved in that block and the generation of new bitcoins that the miner will receive as a reward along with the implicit commissions in each of the transactions.
The mathematical problem consists of finding the parameters that give a certain result.. The special thing about that result is that it is a hash, so it is impossible to get the initial parameters from the hash, they can only be generated by trial and error.
How does the PoW protocol work?
The Proof of Work works in a fairly simple way. In fact, the process that is carried out can be divided into the following major stages:
- Stage 1: The client or node establishes a connection to the network. At this point, the network assigns you a computationally expensive task. This task must be resolved in order to receive an economic incentive.
- Stage 2: Riddle solving begins. This involves the use of a lot of computing power to solve the delivered puzzle. This process is what is called mining is..
- Stage 3: Once the computational task is resolved, the client shares this with the network for verification. At this point, it is quickly verified that the task meets the requirements. Doing so provides access to network resources. Otherwise, access and the presented solution of the problem are rejected. It is at this point, where the verification of protection against double spending is carried out. Protection that prevents a task already assigned and verified by the network from occurring more than once.
- Stage 4: With the confirmation that the task has been completed, the client accesses the network resources. Thanks to this, you receive a profit for the computational work done.
It is these four stages that allow and model the operation of the Proof of Work. The ease of this model allows it to be transferred to different software to take advantage of its potential. But it is in the blockchains where we observe a greater utility, providing exceptional security levels despite the low complexity of the protocol. And at the same time, allowing millions of people to participate concurrently in the network.
PoW protocol features
- It is a very secure protocol. The Proof of Work guarantees high levels of security, if the network is made up of thousands of miners. In fact, the more miners the more secure the network is. This makes it ideal for use in forming huge distributed networks.
- It is simple and very easy to implement algorithmically. One of the main advantages of PoW is that it is very easy to implement. This facility translates into the easy maintenance of the software that makes use of it. In addition to allowing audits in a much simpler way in order to maintain network security.
- Easily adaptable to hardware needs, being able to design resistance to certain equipment (ASIC, GPU, FPGA, CPU). Another advantage of the protocol is its adaptability to technology. It can be made easier or more difficult, in order to adapt it to technological advances. Allowing the evolution of the hardware not to leave behind the difficulty of mining. That therefore ends up centralizing mining power in those who have newer and more powerful hardware.
- Excellent resistance to Denial of Service attacks. The main reason for the creation of PoW protocols was; avoid denial of services. A task that is perfectly accomplished and that has greatly improved the current protocol schemes.
- The system consumes a large amount of electrical energy. PoW's intensive computational work requires large amounts of electrical energy. Estimates place that consumption amounts to 24 Terawatts of energy per year and will continue to rise as more power is needed to carry out this intensive work.
Also, you can review more features of this protocol and review the similarities and differences it has with respect to the Proof of Stake protocol in the PoW PoS comparison that you will find in this complete article.