Let's say we have transaction X and transaction Y. The timestamp of X is chronologically earlier than that of Y. X's spender broadcasts X to the network and the same goes for Y's spender.

Let's say that miners receive Y first and they add it to the next block, which reaches the max number of stored transactions. Will X be included to the block after this one? Will it be discarded?

If X will be included to the block after this one, isn't it a problem that it happened before Y?

Thanks in advance for your answers!


If I undestend the your question, you referer to the lockTime inside the transaction and not the block timestamp.

The lockTime is a int value, and this value rappresent "When the transaction can be unlockd to an inputs" and not "When the transaction was published"

Lock time: Defines the first instant in which the transaction is considered valid and can be transmitted on the Bitcoin network, represented by an integer value between 0 and 500 million, assuming different meanings based on the value assigned, that is:

  • Lock time = 0: the transaction is propagated and executed at the instant of creation.
  • 0 < LockTime <= 500: the value is interpreted as a block height, ie the transaction will be valid only after the block with height equal to the lock time value has been published.
  • Lock time> 500 million: the value is interpreted as a unix timestamp and therefore the transaction will be valid only after the date represented by the lock time value.

If you mean if the transaction has a timestamp, the answer is two:

  • Within the structure the transaction does not have a timestamp, but rather a lock time.

  • The transaction could have an insertion moment in the block, which depends on the block, because it is he who holds the timestamp as a value.

A real use case:   My transaction has a block timestamp equal to 8/23/2019, 2:08:43 PM GMT + 2, this represents the time in which the miner started the cryptographic challenge, and it is the instant in which the miner has also taken into consideration my transaction including it in the block. My transaction has a lockTime of 0 because it is an immediate execution transaction.

No one excuses that my transaction before the block was published was ALSO inside some other block with a slightly different timestamp

If you want have turn a detailed explanation of what and how a transaction works, I recommend this reading on bitcoin book

  • So transactions don't have a timestamp? – evannemo Aug 23 '19 at 12:45
  • No, the block has the timestamp and it defines when the miner starts the cryptographic challenge – vincenzopalazzo Aug 23 '19 at 12:46
  • I thought the cryptographic challenge happened before the block was added and once it is done, the block is actually added. – evannemo Aug 23 '19 at 12:47
  • The transactions are published in the block timestamp because all the data structure exists from the moment of publication and in the centuries to come :) – vincenzopalazzo Aug 23 '19 at 12:48
  • You got me confused. ( :P ) – evannemo Aug 23 '19 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.