Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: auzaar on March 13, 2014, 06:36:42 AM



Title: Are empty blocks without txns allowed ?
Post by: auzaar on March 13, 2014, 06:36:42 AM
Is this allowed?

https://blockchain.info/block-index/475455/0000000000000000052cb46227baeb2dc70ab51a554433262cf89378696903d9

Looks like a empty block mined with no transaction (except for the mining reward of 25 BTC)

Questions:
1. Why would a miner do this and not include any transaction missing the fees?
2. If everybody started doing this bitcoin will be mined but no transactions will occur, is it a flaw?


Title: Re: Are empty blocks without txns allowed ?
Post by: Foxpup on March 13, 2014, 07:13:24 AM
1. Why would a miner do this and not include any transaction missing the fees?
To reduce the size of the block, thereby reducing transmission time and the chance it will be orphaned, which would lose not only the transaction fees but also the block subsidy. As the block subsidy decreases, so does incentive to drop fee-paying transactions, so this will not be an issue in the long term. In the short term, raising transaction fees is an option if too many miners start doing this.

2. If everybody started doing this bitcoin will be mined but no transactions will occur, is it a flaw?
It's a flaw in the miner's business plan once people start paying greater transaction fees that the miner is missing out on. Competition will ensure that only miners who actually include transactions (and take the fees) will remain profitable.


Title: Re: Are empty blocks without txns allowed ?
Post by: ivroer on March 13, 2014, 07:15:22 AM
Is this allowed?

Yes, as you can see by now other miners have built on top of that block.

Quote
Questions:
1. Why would a miner do this and not include any transaction missing the fees?
2. If everybody started doing this bitcoin will be mined but no transactions will occur, is it a flaw?

1. Why? because they can.
What other reasons might cause a miner to mine a block like this.
  • There's no other unconfirmed transactions in their memory pool, unlikely
  • The mining software might be quickly issuing work based on the previous block header before syncing its mempool based on the transactions in that block. Basically trying to get a headstart on other miners with a small chance of quickly solving an "empty" block*

2. It shouldn't happen. Miners would be missing out on accumulating transaction fees, and would ruin the network making their rewards worthless.
"Empty" blocks are going to happen from time to time, they won't make up the majority of blocks while the Bitcoin network is still actively utilized.

*A mining pool operator might be able to shed light on this. I'm guessing that if there is a short period of time that a miner is working on an empty block, they are generating a valid merkle tree of unconfirmed transactions in the background and then start working on that instead of an empty block.



Title: Re: Are empty blocks without txns allowed ?
Post by: Parliament on March 13, 2014, 07:22:12 AM
This most likely happened because the miner did not receive any transactions between the last block and this one: block 290330 (https://blockchain.info/block-index/475454/0000000000000000840ba6b020622fe5d322cfa5195a19fadcd6a22eb8d173c9) is timestamped 06:29:04, while the block in question (https://blockchain.info/block-index/475455/0000000000000000052cb46227baeb2dc70ab51a554433262cf89378696903d9) is timestamped 06:30:18.

Someone got very lucky.


Title: Re: Are empty blocks without txns allowed ?
Post by: BitCoinDream on March 13, 2014, 07:24:11 AM
But miners will automatically get 25 BTC by mining these kind of a block ...right ?


Title: Re: Are empty blocks without txns allowed ?
Post by: spin on March 13, 2014, 01:54:56 PM
It has to be possible.  Almost all the initial blocks were empty as there weren't that many transactions to mine.

e.g.
https://blockchain.info/block/00000000b69bd8e4dc60580117617a466d5c76ada85fb7b87e9baea01f9d9984
https://blockchain.info/block/0000000099c744455f58e6c6e98b671e1bf7f37346bfd4cf5d0274ad8ee660cb
etc


Title: Re: Are empty blocks without txns allowed ?
Post by: piotr_n on March 13, 2014, 04:43:01 PM
Is this allowed?

https://blockchain.info/block-index/475455/0000000000000000052cb46227baeb2dc70ab51a554433262cf89378696903d9

no :)


Title: Re: Are empty blocks without txns allowed ?
Post by: Taras on March 13, 2014, 06:09:46 PM
 What if after all bitcoins are mined there is a block with no transactions, not even generation?


Title: Re: Are empty blocks without txns allowed ?
Post by: Hawkix on March 13, 2014, 06:42:20 PM
Each block improves security of blockchain. Even empty one.


Title: Re: Are empty blocks without txns allowed ?
Post by: Ix on March 14, 2014, 05:16:49 AM
What if after all bitcoins are mined there is a block with no transactions, not even generation?

Probably unlikely because they will be wasting some kind of PoW resource for no return at all. Miners probably won't start mining unless they have transactions to make it worth it. It could be being used to attack the network by delaying transactions, but this is a well-known attack vector--while it doesn't make economic sense, it can be done.


Title: Re: Are empty blocks without txns allowed ?
Post by: fsb4000 on March 14, 2014, 11:12:31 AM
Blocks with only 1 transaction: 84429  :'(
http://blockr.io/trivia/block


Title: Re: Are empty blocks without txns allowed ?
Post by: BitOnyx on March 14, 2014, 11:25:11 AM
IT happens but it is hard to say if it is allowed or not.


Title: Re: Are empty blocks without txns allowed ?
Post by: Foxpup on March 15, 2014, 03:34:35 AM
IT happens but it is hard to say if it is allowed or not.
What are you talking about? It's allowed. It's not hard to say that. Anything that's not allowed will be rejected by all nodes and those blocks will not become part of the blockchain.


Title: Re: Are empty blocks without txns allowed ?
Post by: Nancarrow on March 15, 2014, 10:36:48 AM
Back in 2012 or early 2013, I dunno, back when I still had a GPU farm to gaze at fondly, there was an extended period of time when someone was producing a large number of empty blocks - people called them the 'Mystery Miner' and speculated they were using a botnet and didn't want to waste time and/or increase detectability by listening out for transactions. I suppose they closed up shop when the ASICs came along. Anyway you could do a search on 'Mystery Miner', there was a lot of buzz at the time, though of course everyone in the know pointed out that it isn't a big problem, just delays valid transactions a little. Oh also there's a poster called MysteryMiner but I think they just chose the name for the lulz. Now, to take the ferry cost a nickel, and in those days, nickels had pictures of bumblebees on 'em...