What does the ‘mathematical puzzle’ of blockchain entail? =

You’ve probably heard of the “mathematical puzzle” that miners must solve in order to validate a block and add it to the blockchain. However, there is never really a deep discussion of what kind of mathematical puzzle that is. And it’s actually not that hard to understand at all. That is why we are going to explain to you what the mathematical puzzle of blockchain is .

When you know how the mathematical puzzle works, you will probably also better understand why there are people who claim that there is no future in Bitcoin, because it would not be decentralized and scalable enough. But to understand that, let’s first see what such a block looks like when miners start validating it.

View quickly

 

  • View quickly
  • A block full of transactions
  • Solve the math puzzle
  • Solving the mathematical Blockchain puzzle takes a lot of time
  • Difficulty adjustment
  • The centralization of Bitcoin
  • Conclusion

A block full of transactions

In this story we take the Bitcoin blockchain as an example, to keep it simple. The consensus algorithm of the Bitcoin blockchain is Proof of Work, and the miner who solves the mathematical puzzle first is the winner. The winning miner will then receive Bitcoin as a reward.

But for that, the miner has to do a lot of work. A new block is added to the Bitcoin network about every 10 minutes, and it contains an average of 2100 transactions. However, the number of transactions fluctuates per block, as you can see below.

IMG

All these transactions are aggregated into one block, and then this block is hashed. The binary form of the hash again consists of bits; those are zeros and ones.

Solve the math puzzle

Each block is in fact a set of data that is hashed. But in the case of the Bitcoin blockchain, which uses Proof of Work, the hash alone is not enough. A hash must always start with a certain number of zeros or ones. In this case it is a 32-bit number. Usually we look at a hash as a hexadecimal string, but in this case it’s better to look at it in its binary form. That means it’s a long string of ones and zeroes. It could look like this: 1 1 0 0 1 0 1 0 0 0 1 (but much longer).

A good hash ensures that whatever data is entered, the outcome is always essentially random. Of course there is some logic behind it in the form of an algorithm, but the outcome of a hash in binary form is very close to total randomness. And that is exactly what is used in the difficult puzzle that miners have to solve.

The moment miners start solving the Blockchain math puzzle, they will very quickly put random bits together until the combination of bits matches the bits of the actual block.

Suppose the binary hash of a block looks like this:

0 0 1 0 1 1 0 1 0 1 1 0 1 1 0 1

When the hash that the miner has made already starts with a 1, the miner is out of luck. His hash will not be approved by the network. He will therefore have to start again, but in that case he has often lost because he is a lot behind in terms of time.

If the miner’s hash starts with a 0, he’s in luck. Then the miner can move on to the next bit. Here he will again have to guess whether the second bit is a 0 or 1. Is it right? Then the miner can move on to the next bit. This goes on and on.

So on the first try there are two chances; it is either a 1 or a 0. To get the second bit right, there are already 4 chances again because the first attempt is also counted. In total, Bitcoin’s hash should have about 50 to 60 ones and zeroes before the actual hash.

In fact, it is a kind of lottery. There is no logic behind the choice between a 0 or 1. Every miner has to guess which bit it is, and that is in fact the actual puzzle that people always talk about.

Solving the mathematical Blockchain puzzle takes a lot of time

Actually, it is not difficult per se, but it is difficult in the sense that it takes a very long time. Now you may ask yourself why it has to take so long, but it was even done on purpose.

So it takes an awful lot of attempts to find out what the right hash is. In fact, even if the whole world is mining, it would still take 10 minutes to find the right hash. That is exactly what the algorithm is made for. The creators of the Bitcoin blockchain want it to just take about 10 minutes for a block to be validated.

They don’t want you to be able to validate a block twice as fast when you have twice as many computers. Or if you have ten computers, a block is validated ten times faster.

Difficulty adjustment

To ensure that it always takes 10 minutes before a block is validated, there is the so-called difficulty adjustment .

Validating a block may take hundreds of thousands of attempts when done with one computer. But when you do it with two computers, you only need half the time. Then it goes a lot faster. But after a while the algorithm will adjust itself to the speed at which blocks are validated. So it takes the same time with two computers as in the beginning with one computer. Someone who still uses one computer will even take 20 minutes. And that’s way too long to be able to participate.

This has led to people collaborating in so-called mining pools. In a mining pool, miners combine their computer power in order to participate and not be inferior to the speed at which blocks must be validated. That takes a lot of energy. After all, it takes hundreds, whether or not hundreds or thousands of computers, to be able to validate a block. Real mining farms are therefore created. These are large server rooms that are only used to validate blocks.

Another major disadvantage is that this phenomenon causes blockchain to become less decentralized. Blockchain was conceived to serve as a decentralized platform.

The centralization of Bitcoin

The difficulty adjustment of Bitcoin ensures that this blockchain is no longer so decentralized. And it’s also not as scalable as it once was. There are therefore plenty of people who do not see a future in Bitcoin for that reason. Actually, that is also understandable when you know why Bitcoin becomes a lot more central due to the adjustment difficulty.

The difficulty adjustment therefore creates large mining pools. These mining pools are so large that it is not possible to intervene as an individual. You will have to join a large mining pool if you want to participate in the Bitcoin blockchain. And that while blockchain is for everyone. It should be possible for everyone to participate in a blockchain network. The scalability is therefore completely lost due to the technique used by Bitcoin.

In addition, the mining pools get too much power. There are only a few mining pools that validate the blocks. Otherwise, the blocks are not validated by others. It is simply impossible for others to validate blocks, because they simply do not have enough computer power to do this.

Ultimately, this ensures that there are a lot of separate parties that participate in the blockchain. How decentralized is Bitcoin if there are only 10 mining pools that validate all blocks?

Conclusion

So the mathematical puzzle that miners have to solve to validate a block is actually not that difficult to understand. It is also not difficult for miners to solve the puzzle.

To solve the mathematical puzzle, miners must find the correct combination of zeros and ones that match the binary hash of the new block. Because miners have been using more and more computer power in recent years to find the right hash, they were able to do this faster and faster. That was precisely the reason why the creators of the Bitcoin network came up with difficulty adjustment, with which they wanted to ensure that it would always take an average of 10 minutes before a block could be added to the blockchain.

The difficulty then lies mainly in the time it takes to solve the puzzle. And in the computer power that is required for this, when it comes to the Bitcoin blockchain. That is precisely the reason why many people think that Bitcoin is not scalable and decentralized enough to see a future in it.

Many other blockchains therefore decided to use other techniques to provide the scalability and decentralization that people have envisioned. They do this, among other things, by using a different consensus algorithm. Consider, for example, Proof of Stake, or Proof of Participation.

Chart source: www.blockchain.com

 

 

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

© 2024 Cryptocoin Budisma.net