# Why are there so many empty blocks?

Within the first 4 million blocks, I found that a significant fraction of them are empty. If miners are rewarded for writing transactions, wouldn't be in their best interests to at least partially fill the block?

The plot was created by calling web3.eth.getBlockTransactionCount(n) and plotting an exponentially weighted moving average with a span of 5760.

In short: empty blocks propagate around the network more quickly than blocks that aren't empty.

If two mining nodes find the proof-of-work solution to the blocks they're mining at the same time, only one of those blocks will ultimately be accepted by the network. The other will become an uncle.

The block that is able to propagate around the network more quickly will be the one to be accepted by the community and hence the one to get the block reward.

There's clearly some game theory going on here. Under what conditions is it better to mine empty blocks and forego the transaction fees? I'm not a miner, but probably when the network is under most stress, and the blocks being submitted by other miners are fullest. That way your empty block is going to propagate much more quickly relative to the others. But I'm sure there's a balance here before you start losing out on transaction fees.

It'd be interesting to compare your graph against another showing how full the blocks are for each block number, and see if they correlate.

• That makes sense, but why after 4M blocks are the essentially no more empty blocks? The 100% rate continues all the way up to the most current block at ~5M. I'd be happy to plot how full the blocks are, but I'm not sure how to measure that -- how much "space" does each transaction take up? – Hooked Feb 18 '18 at 21:57
• Good question. I don't know. Perhaps the variables in the game they've been playing changed in some way? To calculate the fullness of a block, you'd look at how much gas was used (gasUsed) against the gas limit (gasLimit). (Etherscan also shows the gas used as a percentage, for reference.) Note that the gas limit isn't static, and has changed at various points. (Which could correlate to changes in the number of empty blocks? Higher gas limit, higher potential transaction fees? Interesting question.) – Richard Horrocks Feb 18 '18 at 22:03
• Might be worth giving these a quick look over: etherscan.io/charts – Richard Horrocks Feb 18 '18 at 22:05
• Hmm. Around block #3950000 the gas limit was raised from 4.7M to 6.7M... (end of June last year). – Richard Horrocks Feb 18 '18 at 22:11
• @RichardHorrocks: Re: conditions to mine empty blocks and forego the transaction fees, vbuterin describes work he did to determine fair pricing for different operations on the EVM: blog.ethereum.org/2016/10/31/…. Miners can use this/simulate to decide whether they should include transactions. I believe (via thought expt) that miners with slower-than-avg disks and CPUs ought to avoid including tx. Pre-state-bloat-attack, a HDD was ok for storing the blkchain, but I think it would have put a miner in a disadvantage to use an HDD and process txes. – lungj Feb 25 '18 at 21:19