0

i understand that blocks are created if there's a transaction, i've also seen many similar questions asked before about this, but i still wonder many answers stating that miners will mine empty blocks, this lead me to another set of questions haven't answered before.

  • what's inside those empty blocks? (i mean, what is "computationally expensive" from an empty item)
  • how can a system creates blocks that are empty and have no use (not for transactions use)
  • what happen if there are transactions example like sending btc to other address but nobody mining it (verifying it through mining), will the transactions ever get through to the destined address?

hope to find answers for this question, since i'm building a blockchain and it struck my logic multiple times

1

what's inside those empty blocks? (i mean, what is "computationally expensive" from an empty item)

Empty blocks still contain data. They aren't devoid of data, they simply do not have transactions other than the coin generation transaction (known as the coinbase transaction) in them. Since an empty block does not contain any transactions from the Bitcoin network, it is considered to be empty. Empty blocks are still computationally expensive because miners still have to produce a Proof of Work. They still have block headers which are 80 bytes and have all of the fields that non-empty blocks do. They still have a list of transactions; but that list just contains one transaction, the coinbase transaction, which pays the miner the block subsidy.

how can a system creates blocks that are empty and have no use (not for transactions use)

Empty blocks still have a use. They aren't completely useless. Firstly, they extend the blockchain adding additional work to the blockchain. The transactions that a block contains does not effect how much work needs to be done to mine the block, so empty blocks strengthen the security of the blockchain by adding to the cumulative work gone into the blockchain.

Empty blocks also introduce new coins to the Bitcoin system. They still pay miners for the work that they did, so new coins are generated and paid to the miner of that block. This is part of the coin generation transaction included in the block itself as the only transaction.

Additionally, when there are no transactions, the network still needs to move on. There still needs to be blocks mined, so empty blocks must be allowed in order for the blockchain to continue.

what happen if there are transactions example like sending btc to other address but nobody mining it (verifying it through mining), will the transactions ever get through to the destined address?

If nobody ever includes a transaction in a block, then the transaction is never considered to be final. It will still appear in users' wallets as unconfirmed and they will see the coins. They can even spend the outputs of that transaction, but creating transactions from unconfirmed transactions is not advised. Such a transaction would also be unconfirmed so long as the first unconfirmed transaction remains unconfirmed.

1

what's inside those empty blocks?

An empty block is a block with only the transaction that reward the miner mining it. Otherwise known as the coinbase transaction.

how can a system creates blocks that are empty and have no use

The protocol is designed to incentivize the inclusion of as many transactions as possible into a block by rewarding the miner with the transaction fees in addition to the block reward. Although it is not forced on a miner to do so. There is some speculation that this is due to certain pools purposely mining "empty blocks" as an annoyance, but there are reasons why there may be an advantage to do so, as it can give a higher probability of solving the block by saving time/operations (12.5 BTC is alot better than 0 BTC).

This can be advantageous because an empty block doesn't have to calculate the merkle-tree more than once (because there is always only 1 transaction, the coinbase). A typical miner may have to calculate the merkle-tree several times especially if the block they have been mining is solved. The miner will have to do operations to add transactions, recalculate the merkle-root, etc.

what happen if there are transactions example like sending btc to other address but nobody mining it

Because miners are rewarded with the fees, eventually a miner will pull the transaction out of the mempool and include it in a block. The miner will favor transaction with higher fees so they will typically be included first.

For more information, please read this and this.

-2

mining empty blocks although allowed, in my humble opinion, is a way of cheating the system, it allows you to working on solving block N+1, when the outcome of block N is not determined yet.

  • 2
    Nobody can work on block N+1 before block N is found, because the blockhash of N is part of block N+1. – Murch Nov 4 '18 at 2:32
  • is all this downvoting justified? my opinion was based on a bitcoin.com article news.bitcoin.com/reason-bitcoin-miners-empty-blocks – Fred Nov 4 '18 at 6:20
  • 1
    “However, a miner often can start mining a candidate for block N+1 even before he has seen what was included in block N. That’s because he only needs the hash of block N, and he often can get it very quickly by a certain trick.” In that case, the miner must start with an empty block N+1, even if there are transactions waiting in his queue: because, without knowing the contents of block N, he cannot check whether those transactions are valid or not. If he is lucky, he may solve that empty block N+1, even before he finishes downloading the body of block N. That is why there are empty blocks." – Fred Nov 4 '18 at 6:21
  • In the example from the article, the empty block is the N+1 block, not the block N. The outcome of N is determined already, but the miner working on N+1 hasn't fully verified N yet, so instead of guessing which transactions remain in his mempool, he's starting to work on an empty block until he has updated his mempool. Also, this is not the only reason for empty blocks. There are plenty empty blocks, simply because no one had sent a transaction in the early days. Later there were some, simply because "miners were free to do so". – Murch Nov 5 '18 at 6:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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