To mine, it is necessary to organize the transaction block, and then find the solution for the Proof of Work. Different miners compete for the same block, but only the first to find the solution to the equation will be able to register in the blockchain.
This mathematical calculation will result in the hash of the block. This process is an algorithm that encodes a variable amount of information into a fixed sequence of characters. In the case of Bitcoin, the function used is SHA256, which generates a 64-character hash.
If any small change is made to the information contained in the blocks, this generated hash will be completely different. Furthermore, every new block includes the hash of the previous block, ensuring the sequencing of information.
At this moment, each user, called a node, can validate if the work was performed correctly.
The Difficulty of Mining
Simply put, the Bitcoin protocol requires that the found hash be started with a certain number of zeros. Imagine a draw through common 6-sided dice. In this case, the winner would be required to start a sequence of consecutive rounds by drawing the number 1.
To increase the difficulty, the system simply requires a greater number of zeros (in the case of dice, number 1) at the beginning.
Mining a block is designed to be complex and costly, making it difficult to rewrite transaction history.
Mining is done using specific, very powerful hardware called ASIC. The machines are on all day, checking transactions, assembling the block, and trying to find the solution of the hash.
The difficulty of mining increases the greater the power of machines (hashrate) invested in the network. That is, the greater the competition, the greater the difficulty. At the beginning of the network, it was possible to mine with a simple notebook, or PC video cards.
As a writer, Richard is an advocate of blockchain technology and cryptocurrency in general. He writes about all things from cryptography to economics, with a focus on how it applies to cryptocurrencies. He is also passionate about writing about topics such as decentralization, open-sourced software development, and copyright law.