Author

Topic: Does the transaction order WITHIN blocks matter? (Read 985 times)

kjj
legendary
Activity: 1302
Merit: 1026
December 16, 2013, 11:22:51 PM
#2
1.  The node uses whatever criteria it wishes to use when building the block.  The reference client prefers fees first, but tends to also include a few free transactions of high priority.  Also, (approximately) no one uses the reference client to build blocks for mining.

2.  Depends what you mean.  Different orderings will give different merkle tree hashes, so the header calculated for a given ordering is only valid for that one ordering.  But as long as the block matches the header, all valid* orderings are acceptable to the network.

* There are validity rules specific to order:  The generation transaction must be first, and the first transaction must be generation.  If transaction B spends transaction A and both are in the same block, A must come before B.  Why are these in a footnote?  I consider the generation transaction to not be in the permutable set, and UTXO->A->B in a single block is rare and unusual.
newbie
Activity: 9
Merit: 0
Hi folks,

I've been reading up on the bitcoin protocol non-stop and have a couple of questions that I haven't been able to answer:

  • When a node assembles a new block to mine, how does it determine which transactions from the list of unconfirmed transactions to include in that block that it will mine?
  • When a node assembles a new block to mine, does the order of the transactions that it picks to be in the new block matter?  My guess is that it should but I couldn't find any literature confirming or denying that.  Can anyone explain?

Thank you!
Konstantin

Jump to: