Empty block mining is getting less common, but technical limitations are preventing it from going away completely. Enter Stratum V2.
As interest in Bitcoin rises and transaction volume increases along with it, there are few things more frustrating than seeing an empty block (i.e. a block without any transactions) added to the blockchain. Empty block mining has become less and less common over the years, but unfortunately there are still 3-4 empty blocks mined per week on average.
In this article, we’ll explain:
More than 15% of the blocks in the Bitcoin blockchain do not contain any transactions, except of course the coinbase transaction rewarding the miner with newly issued coins. However, that stat is rather deceiving without context.
You see, only about 0.4% of the blocks mined in the past year have been empty, and that number has been decreasing year after year. There are several reasons for that, but the biggest reason is that the economic incentive to include transactions in blocks has gotten stronger over time.
In the early days of Bitcoin mining when block rewards were 50 or 25 BTC and transaction volume was low, transaction fees were a relatively insignificant amount to miners. Starting in 2016, however, the block reward decreased to 12.5 BTC while transaction fees started to steadily increase in value. This meant that a higher proportion of mining revenue came from transaction fees, disincentivizing empty block mining.
But this raises the question: if miners are losing significant amounts of revenue when mining empty blocks, why does it still happen at all?
So, the empty block frequency has dropped to 0.4% in the past year but that’s still 0.4% too high, right?
Unfortunately, even the strong economic incentive to mine full blocks is not enough to eliminate the problem completely. The reason that mining pools including Slush Pool still sometimes mine empty blocks comes down to technical limitations.
Anytime a new block is found, it gets broadcasted by the node of the miner (or mining pool) that found it and propagates to all the other nodes in the network. The moment that other mining nodes see that a valid block was found, they should stop using their hash power on that block and start searching for the next one.
In pooled mining, the process of starting work on a new block requires the mining pool to send a block template with the prevhash of the block just found to the miner. Once a block template is received, the miner can begin trying to find a nonce that solves the next block. Every second of search time counts, so it’s important that pools give their miners new block templates to work on as quickly as possible.
To maximize the time that miners can be searching for the next block, mining pools initially send empty block templates without transactions. This is because sending a full block template is a larger data transfer than an empty one, so it would entail some added latency and thus delay the miners’ search for a valid nonce.
After just 1 or 2 seconds, the pool can send out an updated block template with transactions included. However, this doesn’t invalidate the previous block template sent by the pool, so miners may keep working on that empty block template for a while before switching to the full one. Therefore, when miners happen to get extremely lucky and find a block within a few seconds of the previous block, it will often be empty.
What it means: As long as the block reward makes up a meaningful portion of mining revenue, this incentive to send empty blocks at the beginning of new mining rounds will remain. At least, it will with the original stratum protocol.
To summarize what we’ve gone through so far:
In order to eliminate the incentive for empty block mining to occur completely, we have to eliminate the added latency that comes with sending full block templates for miners to begin working on just after a new block has been found.
The solution in Stratum V2 is actually quite simple. Whereas in V1 the data transfer that allows miners to begin working on a new block contains the block template with the prevhash together, V2 separates these two components.
As a result, mining pools will be able to dig deeper into the mempool (for transactions that are unlikely to be included in the current block) and construct full block templates before the current block is found. Then they can send those block templates to miners ahead of time when the latency doesn’t matter, so that only the prevhash message needs to be sent to actually start the new mining round.
In this way, the few seconds head start gained by sending empty blocks is made obsolete. With Stratum V2, there is no longer an incentive for pools to send empty blocks at the beginning of mining rounds.
Empty block mining is not the common occurrence it used to be, but it's nonetheless frustrating everytime a block is mined without any transactions being confirmed, particularly because this is lost revenue for miners and these would otherwise be opportunities to clear lower-fee transactions from the mempool. Separating the block template from the prevhash message is a simple solution to this problem, and a clear benefit of Stratum V2.
In the big picture, eliminating empty block mining is just one small part of what makes Stratum V2 better for the future of the mining industry. If you’re curious to learn more about problems in the mining industry and the solutions offered in Stratum V2, check out our articles:
Bitcoin mining software company: Slush Pool, Braiins OS+ & Stratum V2.
By miners, for miners.
Industry leaders in transparency and innovation, with more than 1.25 million BTC mined since 2010.
Increase hashrate on S9s to 17+ TH/s, improve efficiency as much as 20%, and get 50% lower pool fees on Slush Pool
Cutting-edge firmware with an implementation of Stratum V2 and mining software written from scratch in Rust language.
Quality improvements including reduced data loads, empty block elimination, hashrate hijacking prevention, and more.