Skip to main content

As we explained in our introduction to introducción a Blockchain, a blockchain is a distributed database that registers blocks of information and links them together chronologically, storing information in each block that is cryptographically linked to the one before it.

What do miners do?

All the data that makes up the blockchain is shared and constantly verified. In this system, miners are the ones who store a copy and validate the blockchain. Every time a new block is added, they must solve complex mathematical puzzles that require high computing power, usually by referencing data from the previous block.

Although these puzzles can be generated randomly, miners add blocks to the chain through a competitive system. The first one to solve the puzzle adds their block to the main chain, and the others continue mining from that block onward.

In blockchain networks, miners compete in a race to solve mathematical problems and validate blocks of transactions. On the one hand, they perform the essential role of verifying and confirming that the information being added to the blockchain is valid and has not been altered. On the other hand, they are rewarded for their work, either with newly created tokens or transaction fees.

It’s important to understand that the role of the miner is to verify the validity of blocks by solving puzzles. If a miner solves 51% of the blocks in a chain, they could falsify the information. That’s why it’s crucial that each block includes the Hash of the previous one—this makes it easy to compare its contents with previous blocks.

Why do people become miners?

To ensure the continued security of these systems, there must be an incentive to keep people participating. That’s where mining rewards come in.

In the Bitcoin system, a new block is generated approximately every 10 minutes. Every time a new block is added, a number of bitcoins are also issued and given to the miner who found the correct solution. However, this issuance decreases over time in a process called halving, which occurs every four years.

At first, miners could use regular computers or even video game graphics cards. But over time, as competition and network difficulty increased, more advanced equipment became necessary—capable of solving puzzles within 24 hours or even less, depending on the week, network, or block.

What is stored in a block?

A block is a unit of information containing a list of transactions that are verified and validated before being added to the blockchain. This process corresponds to what is known as mining, and it ensures that all information is recorded and stored on the network in an immutable way.

Each block is linked to the previous one via its Hash, which contains a unique alphanumeric code generated by an algorithm. This ensures the integrity of the data, as any change to the block’s content would alter the Hash and invalidate the entire chain.

When we talk about Hash, we are referring to the cryptographic hash function, or summary function, which is an algorithm that takes input data and returns a fixed-length string of bits. In other words, it receives part of a message, such as a transaction between two people, and returns a limited series of numbers and letters that represent that operation. This algorithm has an interesting feature: it is extremely difficult to reverse-engineer the code back into the original message, and it is practically impossible for two different messages to produce the same Hash.

Hashcash is an additional security system, used as a proof-of-work mechanism. It involves requiring the Hash to start with 20 zeros on the left. This means that if the sender directly inserts those numbers at the beginning of the algorithm, it proves that the Hash is not being calculated automatically. The more zeros required at the start of the algorithm, the greater the difficulty in finding a Hash that meets the required conditions, thereby adjusting the speed at which new blocks are added to the chain.

To achieve the Hash function we’re looking for, we need to discover the “nonce”, a number selected arbitrarily, used only once, whose sole purpose is to introduce a change in the content that is going to be hashear. This allows us to make as many attempts as needed, always generating a different Hash. As mentioned earlier, the requirement is that this number produces a Hash starting with a specific number of zeros, meaning the resulting number must be lower than a predefined target. Both the nonce and the difficulty level are included in the block header and allow other miners to verify whether the calculated Hash is valid. Alongside this element, the block also contains theMerkle Root”.

How the mining system has evolved

Nowadays, there is specific hardware for cryptocurrency mining and powerful machines that run it, requiring significant financial investments. As a result, mining pools have developed combinations of resources from various miners with the goal of achieving more power and greater rewards.

More than 70% of mining farms are located in China, due to low electricity rates. Some of these farms account for significant portions of global mining power (AntPool, DiscusFish, BTCC). A local setup with a few devices isn’t enough, thousands of dedicated computers are needed to run one of these farms effectively.

Not all farms are located in China. Mining activity is also important in Singapore, due to low energy costs, and in Iceland, where Bitcoin is mined using geothermal energy and benefits from low ambient temperatures and fast internet connections.

There are also other types of mining pools such as network mining, where individual miners group together to contribute their computing power and receive rewards based on their contribution.

Today, entering the mining sector involves high initial costs. The profitability of these investments requires constant reinvestment in new hardware, as the rapid pace at which devices become obsolete makes their lifespan very short; not to mention the electricity consumption and heat or noise they generate, which can lead to continuous maintenance challenges.

Even so, the cost still seems acceptable considering the security that decentralization provides, based on consensus across multiple blocks. Thanks to this, a robust and secure system is maintained, and it’s expected that mining rewards will continue decreasing as fewer and fewer new blocks are mined.

Mining, within the blockchain system, is what allows new cryptocurrencies to be issued and transaction traffic to be validated. This is one of the features that has made blockchain technology so attractive: transparency, immutability, and decentralization.