3

On Bitcoin-Wiki's page about Blocks, it says that "Bitcoin transactions are broadcast to the network by the sender, and all peers trying to solve blocks collect the transaction records and add them to the block they're working to solve.".

So, do all peers have the same transactions in their blocks at all times?

Murch
  • 75,206
  • 34
  • 186
  • 622
Pol
  • 33
  • 2

3 Answers3

3

Miners will naturally be inclined to include those transactions in their blocks that give them high transaction fees (though exceptions exist), because apart from the block reward from coinbase transaction, those are the only incentives for miners. So, whatever transactions have reached a miner through the network, her choices will be restricted among those transactions. At a particular time instance, different miners most likely have different snapshots of transactions available to them. So, the answer is no (with very very high probability).

Bitswazsky
  • 212
  • 1
  • 8
  • Thanks for the explanation. But now what happens to those transactions that don't get put in a block? Is there a limit on the number of transactions that can be placed in a block? Why wouldn't a miner want to include all the transactions received in a block? Sorry for asking so many questions, but I'm trying to build a simple Java cryto-currency that has the basics. – Pol Nov 11 '14 at 20:59
  • Txns that are not yet included in a block Have to wait until someone picks them. 2. Max block size is 1 MB and avg txn size is roughly 0.5 KB, so yeah, there is an upper limit. 3.Miner creates the block with txns of her choice, she is free to choose whatever she wants. Though the general trend is to chooce txns that ensures highest profit.
  • – Bitswazsky Nov 12 '14 at 07:50