Bitcoin Forum
September 27, 2018, 10:35:00 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Does the transaction order WITHIN blocks matter?  (Read 867 times)
konstantin718
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
December 17, 2013, 04:01:18 AM
 #1

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

1538087700
Hero Member
*
Offline Offline

Posts: 1538087700

View Profile Personal Message (Offline)

Ignore
1538087700
Reply with quote  #2

1538087700
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1538087700
Hero Member
*
Offline Offline

Posts: 1538087700

View Profile Personal Message (Offline)

Ignore
1538087700
Reply with quote  #2

1538087700
Report to moderator
1538087700
Hero Member
*
Offline Offline

Posts: 1538087700

View Profile Personal Message (Offline)

Ignore
1538087700
Reply with quote  #2

1538087700
Report to moderator
1538087700
Hero Member
*
Offline Offline

Posts: 1538087700

View Profile Personal Message (Offline)

Ignore
1538087700
Reply with quote  #2

1538087700
Report to moderator
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1001



View Profile
December 17, 2013, 04:22:51 AM
 #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.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!