# What is the motivation for miners to include all recent transactions in a block?

I think I understand the basic operation of the Bitcoin protocol.

Blocks are the "long-term memory" of the network used to prevent double spending (and the way the network agrees in first place). Proof of work is sort of brute-forcing the nonce so that the hash has at least the desired number of zeros. When a dishonest node generates a new block other nodes will refuse it should it contain transactions that were not seen by them, so the network will "converge".

I guess the transactions need to be included in that PoW (or else it would be simple to alter them afterwards). So every time a new transaction is seen it will require the miner to start brute-forcing "from scratch"? I read some sort of tree is formed, so it actually doesn't mean the input to the hash function gets longer, but still every transaction will change the "root value", won't it?

Why would a miner even bother to include all transactions that occurred on the network (given that transaction fees are minimal)? There is no lower limit on the tx number per block (perhaps in that time there were really no transactions). It would be simpler for them to just include perhaps one and then use their (CPU) time to solve the puzzle and earn the reward.

There must be some sort of thing in the Bitcoin design which I don't get yet...

• I've probably fallen for the "gambler's fallacy". The probability that the next calculation will win is the same no matter whether I change just the nonce or something else changes in the block. On average is takes that many tries to get a correct solution. Jun 10, 2013 at 7:47
• I agree with your first question, and don't think the gambler falacie applies here: the nonce has 4bytes so if I already checked 2^16 numbers without success accepting a new tx will make me start from zero again and have 1^32 tries, while not accepting a new tx will double my chances of finding it first. @david: still will be better for a miner not to accept the tx to be the faster minerr in the network. So.... I think the question is still open, at least I can't fund an answer. Anyone knows the answer?
– user6045
Jul 22, 2013 at 6:19
• Your answer is based on many misconceptions. For one thing, 2^31 is half of 2^32, not 2^16. For another thing, a typical miner will try all 2^32 possible nonces in a second or so. Lastly, your chances of finding a working nonce are completely independent of how many prior successes or failures you've had. It may be that no nonce in the 2^32 possible nonces work. It may be that ten of them work. Each nonce is an independent trial. Typical miners won't interrupt a set of 2^32 nonces just because of a new transaction, but a few seconds later, their next run will use the new transaction. Jul 22, 2013 at 7:11