6

I came to know that there are people who mine a new block without any transaction. I understand that this is just to get the block reward.

Reference https://www.blockchain.com/btc/block/0000000000000000004e9b0f16eccf2462eaea0023e842e9c5f17ea6d404b74c

Question .

  1. What is the problem if they include the transactions in it.
  2. Why does the Bitcoin client protocol allow empty blocks?
2

3 Answers 3

4

Generally, if you'd like to know why a miner mined an empty block, you would have to ask them. They could do so for any reason, really.


For a more specific example of a technical example of why a miner may mine an empty block:

As a miner, you'll want to include transactions that pay fees in your blocks, in order to maximize your profits when a valid block is found.

But also, you need to ensure you are always working on valid blocks, because any time spent mining on what may be an invalid block is likely just a waste of your resources.

With this in mind, consider what happens when you hear about a new block on the network. You can validate the header of the block quite quickly, and begin mining on it, in order to not waste resources mining at the height of (chaintip - 1). The catch is that downloading and validating every transaction in the block takes a tiny bit of time, and until that validation is finished, you will not have a clear picture of which transactions are included, and not. So until you have finished validating the new block, the safest play is to begin mining an empty block on the new chaintip. Otherwise if you include an already-confirmed transaction, your block will be invalid! Once your node has a clear picture of which transactions were included in the new block, you can resume mining on a full block, in order to maximize profits.

In reality, the time between hearing about a new block, and updating your mempool accordingly is quite small, but nonetheless on occasion a block is found during this time.

I do not know if that is what happened with this block, but it serves as an example of a technical reason why an empty block may be published to the network.

1
  • Is that under miner control.. Miner can choose the transaction or the protocol chooses the transaction. If protocol chooses the transaction then why the protocol is designed to choose 0 transaction and facilitates creating empty block If miner chooses the transaction then what motivates him to not include any transaction in the block. If assume the effort for mining block with transaction and Block without transaction is same.
    – iappmaker
    Commented Jan 5, 2019 at 2:39
0

Miners are free to choose transactions to be included. Most possible scenarios were:

  1. There were no transactions at that time.
  2. Transactions had low fees.

The transaction fee was designed to prevent spamming and encourage people to run mining nodes to keep the blockchain works. If transaction fee is too low, miners can just ignore all transactions and process the block get the reward, saving time and power.

0

What is the problem if they include the transactions in it.

A block which includes transactions takes a longer time to distribute to other miners and nodes. This longer time makes it more likely that someone else will find a block while this block is propagating through the network. If this happens, the miners who found the first block will not get their mining reward.

Furthermore, a miner that includes transactions also need to perform some SHA256 calculations to build the Merkle tree of the transactions. Building this tree and calculating the root hash is time not spent mining.

As chytrik mentions below, both of these drawbacks are quite small compared to how much time is spent attempting to find a valid block hash, i.e. mining.

Why does the Bitcoin client protocol allow empty blocks?

Because demanding that transactions are included in a block would not insure that miners are actually mining other people's transactions since the miners could just make the transactions themselves. Thus, demanding that miners include transactions does not guarantee that they are actually doing productive work for the network.

3
  • 1
    I don't agree with the first part of your answer: the implementation of the FIBRE network has dropped blocked propagation times to incredibly low numbers (bitcoinfibre.org/stats_ng.html). I would guess that the increased revenue from including txs in a block would far outweigh the exceedingly small potential for a full block being orphaned. After all, if what you wrote were true, then we should expect a rational miner to create only empty blocks.
    – chytrik
    Commented Jan 4, 2019 at 9:39
  • iappmaker asked for the reasons not to include transactions. The reason to include transaction is of course to get the transaction fees that are included. These two considerations must be weighed against each other and most miners come to the conclusion that it is worth it to include the transactions. But iappmaker asked about drawbacks of including transaction, he didn't ask me to weigh the drawbacks/benefits against each other. Commented Jan 4, 2019 at 10:51
  • 1
    I understand that, but the drawbacks of 'network latency for a full block' are almost non-existent, I would be surprised if any miner gave that reason real consideration. re: "Building this tree and calculating the root hash is time not spent mining." this is not quite correct, computing the merkle root would be done in parallel, not by the mining hardware itself. Rather, the time spent computing the merkle root could be time spent mining on an empty block: see the answer I've posted for info related to this.
    – chytrik
    Commented Jan 5, 2019 at 1:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.