Private Blockchain Transactions – Why Miners Add Empty Blocks

miningprivate-blockchaintransactions

I have been working on a private blockchain and observed that a miner, when started, keeps on adding empty blocks with no transactions to the blockchain. Why is this happening? It doesn't make any sense to add empty blocks. This just results in the blockchain occupying more space. Is there a reason behind this? Although unlikely, will the same scenario occur in the Ethereum blockchain if there are no transactions?

P.S: Here's a useful snippet to start mining only when there are transactions.

Best Answer

This is in the ghost protocol. Look at the bitcoin consensus to begin. The miner uses the longest blockchain to know which is the real blockchain if there are forks. A private blockchain has the same rules/protocol as the real blockchain. Create empty blocks does not mean that we don't mine. Mining is security. A private blockchain doesn't mean no security. Only devs need no security :)

Related Topic