Saltar al contenido principal
Buscar Buscador
Salir

Encuentra lo que estás buscando

Home Cursos y webinars Cryptoassets / Blockchain Validation in the blockchain Proof of Work (PoW) protocol: rewards in exchange for solving “cryptographic challenges”

Proof of Work (PoW) protocol: rewards in exchange for solving “cryptographic challenges”

Proof of Work (or PoW) protocol establishes that, in order to include a new block with transactions in a blockchain, a cryptographic challenge must be solved through a process of trial and error. 

Miners who participate in the validation of blockchain networks that operate with a PoW consensus mechanism are responsible for finding the solution to cryptographic challenges. To find a solution, they need one or more computers connected to each other, which provide them with the computational capacity to perform numerous mathematical operations until they find the correct result. The first miner to solve the cryptographic challenge is the one who validates the transaction block and, therefore, receives the corresponding reward. 

These cryptographic challenges are based on finding a parameter, known as a “nonce”, so that when it is included in a proposed block, the calculation of its “hash” function yields a desired result. This function converts any data, regardless of its size, into a fixed-length set of characters (numbers and letters), without it being possible to infer from these characters what data has been calculated. Therefore, it can only be found through trial and error. The content of the block (the transactions recorded in it) is the input, to which a different “nonce” is successively added and the hash function is calculated until the output that meets the established challenge is achieved.

When the challenge is solved, a block is created and added to the blockchain, thereby confirming the transactions included in it and generating new rewards for miners in the form of crypto assets. 

In this way, the process works as follows

  • A través de los diferentes nodos, se transmiten transacciones que se almacenan en una memoria (“mempool”). 

  • Cada minero agrupa una cantidad de estas transacciones en un bloque y comienza a calcular funciones hashes sobre este bloque cambiando el “nonce” hasta que el resultado cumple con el reto. El reto consiste en que dicho resultado contenga un número determinado de ceros a la izquierda, esto es, que sea menor a un número dado. 

  • Through different nodes, transactions are transmitted, which are stored in a memory (“mempool”).

  • Each miner groups a number of these transactions into a block and begins to calculate hash functions on this block, changing the “nonce” until the result meets the challenge. The challenge consists of this result containing a certain number of zeros on the left, that is, that it is less than a given number.

  • Miners “compete with each other” to solve this cryptographic challenge in their proposed block and thus validate the block.

  • When a miner manages to solve the challenge, they will share this solution with the rest of the network so that the other nodes can validate it, checking that it meets the required criteria.

  • If the cryptographic challenge is validated and the transactions in the block are verified as valid, the node receives a reward in the form of the crypto asset linked to the blockchain on which it is working. In addition, the miner also receives transaction fees paid by the nodes that propose to register transactions on the network.


Pros and cons of the Proof of Work (PoW) Protocol


On the advantage side, we cand find: 

  • Descentralisation: it allows anyone to participate in the creation and validation of blocks on the network. 

  • Security: it is more secure due to the large amount of computing power that would be needed to hack the blockchain and double-spend or alter the information contained in the transactions. The more validator nodes there are in a network, the more secure it will be. 

On the other hand, it has the following disadvantages: 

  • Energy consumption: As detailed above, miners must “compete with each other” to solve the cryptographic challenge and thus validate and create new blocks and obtain rewards doing so. To do this, the nodes are working continuously, consuming large amounts of electrical energy, which has become an environmental and sustainability problem. It is estimated that the annual energy consumption linked to the Bitcoin network is similar to the energy consumption of a country such as Argentina.

  • 51% attacks: 51% attacks occur when a group of miners gains control of 51% or more of the computing power in a network. This could give them the power to manipulate the blockchain. While 51% attacks are difficult and costly to carry out, especially as the network becomes more decentralised by adding new nodes, the possibility of them occurring is a major concern. 

  • Slow transactions: due to the consensus mechanism, he creation and validation of blocks can be a slow process, which can delay the validation of transactions on a blockchain. For example, the Bitcoin network validates a new block approximately every 10 minutes (and therefore transactions are not validated or final during that interval), which is significantly slower than some traditional payment systems such as credit cards or instant transfers.