Can you create multiple transactions per block in chronological order?

0

Say I buy a coffee mug, a box of tea bags, and a half liter of honey in the span of five minutes using Bitcoin.

Since the Bitcoin network creates a block every ten minutes or so, these transactions will be within one single block.

Once the block containing the transactions is created can I use a blockchain explorer to view the transactions in chronological order?

user1973385

Posted 2018-08-17T18:53:54.183

Reputation: 95

Answers

1

Yes. The transactions will be in the correct order chronologically, or else block validation would fail because there would be missing inputs to the transactions out of order. See Is there a fixed order for all transactions in the block chain?

Another way to do this is to see which previous outputs each transaction references. If they are in the same block, they will reference each other and you can determine order that way. See also Can multiple transactions transferring the same bitcoin be done in one block?. You cannot use a timestamp, because the block is what is timestamped, so all transactions in the block have the same timestamp.

JBaczuk

Posted 2018-08-17T18:53:54.183

Reputation: 6 172

Great answer! Brownie points; will this work sending multiple transactions to yourself (same Bitcoin address)?user1973385 2018-08-17T19:30:00.193

Yes, it happens with change transactions and dust sweeping.JBaczuk 2018-08-17T19:47:09.977

You're the best.user1973385 2018-08-17T20:09:01.490

fyi: Those transactions do not necessarly need to be in the order in the blockchain as the order you created them! It is possible that there is a TX from A->B and a TX B->C and in the bitcoin blockchain the transactions are stored in the order B->C, A->B (within the same block).Erhard Dinhobl 2018-08-19T18:15:48.497

What about this: "the protocol enforces that the transactions will be written out in the block in the correct order." https://bitcoin.stackexchange.com/questions/23035/order-of-transactions-within-a-block/23070#comment35633_23070

JBaczuk 2018-08-19T19:10:10.473