Author

Topic: Do transactions need to be accurately timestamped? (Read 132 times)

legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
It's the blocks that are timestamped, but even they don't need to be accurately timestamped. That's because the full node implementations such as Bitcoin Core has a window within which a block is allowed to be received. It's usually between a few hours before and a few hours after the current system time (on the node), so as long as the timestamp is within that dynamic range, its block is accepted. Otherwise, it is rejected.
hero member
Activity: 789
Merit: 1909
Quote
Do transactions need to be accurately timestamped?
No, because Bitcoin is not about measuring time. It is about double-spending problem.

Which means, if you run for example regtest, then you can include a lot of mainnet transactions directly, even though they happened in a completely different network, on a completely different time. If regtest would have 21 million coins, it could be copy-pasted "as is", but because amounts are different, it is somewhat limited, because you cannot copy-paste for example a transaction with 500k BTC.

So yes, you can take some mainnet transaction from 2009, and include it into regtest, in 2023. Which means, the time is not really enforced, because if you can clone the coinbase transaction, and if you can clone the whole flow, then you can perform 1:1 testing, on exactly the same transaction hashes. But as I said, there are limitations, like coin amounts, that prevents users from using regtest as a mainnet mirror (but probably testnet3 or signet could still do that; and it is a proof, that time is not really enforced, and transactions are reorg-resistant).
member
Activity: 66
Merit: 5
Eloncoin.org - Mars, here we come!
A block header must be timestamped less than 2h into the future in order to be confirmed by the network. Is there a similar rule for transaction timestamps?
Transactions do not have timestamps, so the timestamp that blockchain.info displays is whatever time their node received the transaction. The time shown will also change to the time that it was included in a block. In general, it is not reliable to trust the timestamp given for an unconfirmed transaction on blockchain.info as it is entirely dependent on their node.

Information source
legendary
Activity: 3444
Merit: 10537
Bitcoin transactions are not timestamped, they are included in a block that has a timestamp.
The last 4 bytes of a transaction that is known as a locktime is there to indicate a time or a block height after which the transaction can be included in a block.
legendary
Activity: 3388
Merit: 4919
https://merel.mobi => buy facemasks with BTC/LTC
no, a transaction can have a lock_time, but even that is not mandatory. A lock_time is not equal to the current timestamp!

here's some extra documentation
https://en.bitcoin.it/wiki/Transaction

EDIT: typo... I meant to say that there's no obligation to add a lock_time (it can be zero), so i i forgot the word "not" in front of mandatory.... I'm not a native English speaker, so mistakes like this are bound to happen from time to time Smiley
newbie
Activity: 26
Merit: 64
A block header must be timestamped less than 2h into the future in order to be confirmed by the network. Is there a similar rule for transaction timestamps?
Jump to: