Control over mining empty blocks.

+1 vote
Based on your newest software release can you elaborate a little on how you allow control over the mining of empty blocks for minimizing disk usage in blockchains with periods of low activity. Is this feature implemented automatically or do we have some way to control this feature. When a chain has low or no activity at all does the system pause or stop and how would it start again?
asked Feb 1, 2017 by dtarsio

1 Answer

+1 vote

There is a blockchain parameter mine-empty-blocks which determines whether or not nodes should mine blocks if there are no pending unconfirmed transactions. Note for a number of reasons this is not implemented as a consensus rule, so an individual node can override this behavior if it wishes to, and other nodes won't reject the empty blocks.

answered Feb 2, 2017 by MultiChain
a) Just to have a reference point: what space does mining a single empty block consume?
b) If let's say 1 of 10 nodes override this behavior it would still work because of the consensus algorithm wouldn't it?
c) Does it decrease ledger security in any way?
a) The block itself is 270 bytes or so (header + coinbase transaction containing miner signature), but including all the indexing and other metadata stored by the node, it takes around 2.5KB on disk (though we expect to reduce this during the beta phase somewhat).

b) Yes, this is not implemented as a consensus rule, so the block would be accepted by all nodes even if it is empty.

c) It depends. At all times, the last few blocks are in a state where they have only been confirmed by a small number of miners, since each block is only signed by a single miner. So this reduces the number of miners that would need to collaborate maliciously in order to rewrite the recent history. If your chain goes long periods of time without mining, then its last few blocks will remain in that state of reduced security.
This is great news! I've been looking for this feature for a while. Is this implemented in v27? Please advise.
It will be in alpha 28.
For c)
A great feature would then be:
If there is nothing to do still keep mining, but with a lower frequency.
For example mine every 30 Seconds, but if there is no new Tx only mine every 5 Minutes. This could be a good balance between security and space.
We're implementing something similar, where you can control how many "rounds" of mining take place while the blocks are empty. So the transactions in the last block will be secured by multiple miners, but after that point mining will stop.
In the end we called the parameter mine-empty-rounds, and it's in alpha 28.
When you say mining will stop?  Do u mean the miners on the block chain will stop mining?

concerning the miners.
So seperate nodes keep mining based on that one parameter.. but how do i tell that one miner to keep rolling and update everyone. That frequency of update would cause updates across everyone in the block chain even if this option is turned on and set?

it doesn't affect the main balance?

Just curious.  thank u.
Each node has a mineemptyrounds runtime parameter that can override the default behavior defined in the blockchain parameters.
...