Why are some blocks not packaged with transactions? Did the miners forget?

Why are some blocks not packaged with transactions? Did the miners forget?

Author | Produced by Yan Wenchun

In the article "How Much Do Bitcoin Miners Make in a Day?", Plain Language Blockchain introduced that Bitcoin block rewards consist of two parts: system rewards (also called Coinbase rewards) and transaction fee rewards (also called miner fees). Miners can only get the transaction fee if they package the transaction into the mined block.

Let's make an analogy, this problem is very easy to understand:

The miner who mines the block is equivalent to the bus driver. In addition to the rewards given to the bus driver by the system, the bus driver can get a fare for each passenger he picks up. The bus driver has finally grabbed the right to start the bus, and will try his best to cram passengers into the bus until it is full (the capacity of the bus is limited).

Miners are rational. In order to maximize their profits, miners should fill each block with as many transactions as possible if there are enough transactions to be confirmed. Why are there no other transactions in some blocks except Coinbase rewards? There must be something wrong when things are abnormal. Let's "catch the monster" today.

01 The only martial arts that cannot be defeated is speed

In the article "If two miners mine a new block at the same time, who should get the block reward?", Plain Language Blockchain introduced that after a miner mines a block, the sooner the block is released, the more beneficial it is for the miner.

In the article "A classic story that will help you understand Bitcoin mining in 3 minutes", the Plain Language Blockchain introduced the structure of a block: a block is mainly composed of two parts: a block header and a block body. The size of a block header is only 80 bytes, and a fully loaded block is 1M in size, which is 12,500 times the size of a block header.

We know that the smaller the data, the faster it is transmitted and received. Therefore, in order to publish the block to the entire network faster, the miners who mine new blocks will publish the block header and block body information separately. The block header with only 80 bytes can be transmitted to other miners at a faster speed.

According to the above introduction, we know that when a new block is mined, miners will receive the block header information faster and then receive the block body information.

02 Mining against the clock

At this time, miners have two options:

After receiving the block header, immediately construct the block and start mining;
Continue to wait for receiving the block body and verify all transactions in the block before starting mining.

There is a time difference between receiving the block header and receiving and verifying all transactions in the block body. Let's assume that this time difference is 10 seconds. If you choose to wait for these 10 seconds, on the one hand, the mining machine is running idle, which consumes energy; on the other hand, mining is a competition, and "time is money". Miners will fight for these 10 seconds. If they find a suitable random number during this period, they can mine a new block and get a Bitcoin reward.

If you choose to mine within this time difference, you must give up packaging transactions. This is because miners have not verified the transactions in the previous block and cannot determine which transactions are packaged in the previous block. If the packaged transactions are repeated in the previous block, then even if the miner mines a new block, it will be judged invalid because of the repeated packaging of confirmed transactions. This is why some blockchains only have one Coinbase transaction (the transaction that the system rewards miners).

03 Conclusion

Let's summarize: the main reason why miners pack empty blocks is that in order to make full use of the mining machine, miners mine within the time difference between receiving the block header information of the new block and not having time to verify the transactions in the block. If a block is mined within this time window, the miners will choose to pack empty blocks and publish the blocks. Because miners pack transactions without knowing which transactions are packed in the previous block, the transactions may be the same as the transactions packed in the previous block, which will cause the blocks mined by the miners to be judged invalid (illegal), and there is a risk of picking up sesame seeds and losing watermelons.

After a miner mines a block, if it is clear that a transaction has not been included in the previous block, can the transaction be added to the currently mined block and then published? You are welcome to share your views in the comment section.

<<:  Bitmain lost another $500 million in the third quarter of 2018? Bitmain: Rumors are false

>>:  Why is the computing power of the mining machine backend different from the computing power displayed by the mining pool? In addition to network reasons, there are also...

Recommend

What kind of woman is a bad woman?

People all want to find a virtuous wife, and do n...

What is the fate of a woman with small eyes?

If a woman has relatively small eyes, what kind o...

Three types of women who bring bad luck to their husbands

A woman with three or four white eyes is unlucky ...

What kind of eyebrows will make your fortune worse?

Eyebrows are one of the five facial features and ...

What kind of woman is lucky?

I believe everyone hopes to be a blessed person. ...

The Zhihu girl and the 7 years she missed Bitcoin

We found the girl who was advised on Zhihu to buy...

The face of the woman with the most love history

The face of the woman with the most love history ...

How to read forehead

The forehead is a very important part in physiogn...