Proof of work, or proof of work as it is also known, or even POW, is an essential factor in cryptocurrency mining. In other articles, we’ve already seen how mining so much of Bitcoin how much of Ether (ETH). Although the process is different, both cryptocurrencies have a great similarity: their consensus mechanism. Both Bitcoin and Ethereum use the type of mining known as Proof of Work (Proof of Work, or POW in the acronym in English).
But what is this consensus in mining? How it works mining via Proof of Work? And what makes it one of the most insurance to mine cryptocurrencies? These are four questions that we intend to answer in this text, in addition to explaining the following factors:
- Which is paper Proof of Work in safety Bitcoin?
- What are the main points of this consensus mechanism;
- How they are made and checked at transactions on the blockchain;
- How the Proof of Work works.
Proof of Work and the security of cryptocurrencies
The mechanism of Proof of Work as we know it today was developed by Satoshi Nakamoto along with Bitcoin. He was inspired by another similar mechanism developed in 1997 by the British cryptographer Adam Back. The initial use of this first example of POW was to combat the mass shipment of emails, the famous spam.
In the Back system, each time an e-mail was sent, the sender should make a small computational verification before shipping. This check was quick and simple for whom sent just a message. However, as more messages were sent, the greater the difficulty verification. Thus, the program (which Back called Hashcash) made sending bulk messages more difficult.
The type of POW used in Bitcoin exists to basically fulfill two functions. The first is to allow the consensus on the Bitcoin network, while the second is to ensure its safety. Consensus is used in transaction approval, while the security provided by POW avoids the problem of double-worn.
Blockchain transactions and the consensus mechanism
THE blockchain of Bitcoin today it is one of the most used networks in the world. Currently, there are more than 250 thousand transactions processed per day. However, these operations do not occur instantly: to be carried out, a transaction must be completed. approved on blockchain, in a process that takes on average 10 minutes.
And this is where what could be a big problem begins. First, in order to be confirmed, these transactions need to be approved by members from the Web. You complete knots (full nodes) are some of those members. They take care of validation of each of these 250 thousand daily transactions.
However, there are about 10.5 thousand knots spread across the planet. And, as the Bitcoin network is decentralized, there is no person or company that coordinate the work of these nodes. Instead, this consensus is achieved through the mechanism of POW, which manages to be successful even with such a diverse group.
Each of these nodes has a different exact copy of the blockchain of Bitcoin. These copies are stored on computers and are updated In real time. How blockchain is public, anyone can check the transactions that were carried out. And in the case of nodes, you can also do the validation transactions.
Crypto Hash Mempool and Hash
Whenever a transaction is carried out, the nodes initiate a Communication. Through it, information about the transaction carried out is transferred. The other nodes make the verification and, with that, confirm if that transaction actually occurred.
If the transaction is approved, it is directed to the mempool, a kind of row waiting for transactions. When your turn comes, the transaction will be approved and inserted in a block. Each transaction has a identifier composed of numbers and letters, which confirms the authenticity that operation. This identifier is called hash.
You blocks also have their hash, which identifies the transaction set placed inside it. Every new block inserted into the blockchain carries two hashes: your own and that of previous block to him. Through these hashes, we and miners they can identify that those transactions belong to the original sequence from the Web.
How POW works on network security
It is possible for someone to try frauds on the network. One of the most common is fraud double-worn, where the same user tries spend twice the same Bitcoin. This, incidentally, was a problem in digital currencies that was solved by Satoshi Nakamoto. And this happens through the mining difficulty.
In POW mining, the user needs to prove that he spent a certain amount amount of energy to create a block. This energy comes in the form of computational power, which requires a large amount of electricity. That's why machines that mine Bitcoin consume large amounts of energy and need to stay connected 24 hours.
In a way, POW mining is a mixture of treasure hunt with game of lottery. Each mining company uses its processing power (hash rate) for meet The hash of the block before the others. When this happens, the machine signals for the rest of the network that the code was found.
After signaling, the other machines begin to check the block that was presented. They use precisely the hash of the previous block as one of the evidences that that block is part of the network. The hash of the block found is just proof that the miner dedicated work (hence the name of the algorithm) and computational power to discover that block
If the hash presented no hit the previous block, the mined block is discarded, turning into a orphan block. This block becomes isolated network, as it is rejected as a block false. And the miner who tried to "discover it" will have spent energy and computational power in vain.
THE nonce it is a random number generated in the mining process. This number is added at the end of each mined block, along with the block hash. The role of the miner is look for the value of this nonce, which will be added to the block along with the other information. Thus, a block is formed by the following components:
- Nonce number;
- Block hash;
- Set of transactions approved by network nodes.
Both the process of hash creation how much of nonce discovery they function as a “search for treasure”. In fact, mining machines use trial and error to make that discovery. How much more calculations a machine can do it, the more likely it is to find the information and mine the block.
Validation and reward
After finding the POW solution, the miner in practice created a new block. That done, he send the block for we network, which will check your shelf life based on the information already cited. Each block does this verification individually, noting the nonce, hash, transactions, etc.
Although the verification is individual, the nodes work in set through your blockchain connection. Should any of them find an indication of fraud, a warning is passed on to the network. If the fraud is confirmed, the miner lose right to your reward, as well as losing the computational power spent. Then, the nodes look for another block.
If the nodes confirm the authenticity of the mined block, it will be added following the blockchain. That done, the first transaction of the block will create the Bitcoins that will be sent to the miner as reward for the work done. This transaction is called coinbase. The reward given to miners varies over time due to the process of halving of Bitcoin.
POW and Bitcoin security
We saw that POW provides security by avoiding double-worn on Bitcoin. And that security tends to increase with the network size grow up. The larger the network, the greater the security provided to investors.
The size of the Bitcoin blockchain grow up for each block added. Each block adds about 1MB of space to the blockchain, with one block being mined every 10 minutes. Currently, about 330 gigabytes (330,000 MB) of space to store the entire blockchain.
With this dimension, the risk of fraud is rare. After all, a miner who wanted to defraud the system would have to defraud not only the current block, but all previous blocks to him. And I would have to do that before From we check, via POW, that the block sent by him is, in fact, false.
In addition, Bitcoin has another peculiarity: the network of bigger size the network will always be considered valid. At the moment, the Bitcoin blockchain has more than 670 thousand blocks mined, all of them following a clear string and activates 24 hours a day, 7 days a week.
By way of comparison, committing Bitcoin fraud would be like trying to defraud a supercomputer. However, unlike traditional supercomputers, Bitcoin's processing power no is on a single machine. Nor is there a way to to switch off this supercomputer.
He is spread around the world, with thousands of “tax”Who are attentive to every detail and every attempt at fraud. An isolated fraudster should gather at least the half plus one of all the power of the network. However, Bitcoin does have a gigantic and decentralized power, making this attack practically unviable from both a technical and financial point of view.
So the more blocks the blockchain has, the greater the effort – and the computational power – that the miner will need to be able to defraud the system. That way, while miners honest form the majority of the network, and the nodes maintain the surveillance in transactions, they will always be able avoid for an attack on Bitcoin to be successful. And they have been successful for the past 12 years.
Also read: Blockchain: know what it is and how this technology works
Also read: Learn what smart contracts are and how they work
Also read: What is Ethereum mining and the machines used in the process?