Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Zaguru12 on June 28, 2022, 10:02:13 AM



Title: Can timestamp be use for arrangement of blocks?
Post by: Zaguru12 on June 28, 2022, 10:02:13 AM
Timestamp is a data in block which shows the exact time the transaction takes place. The reference timestamp is the coordinated universal time (UTC) or the London time.

I did some reading and would like the forum to help me with the questions below. Perdon me if they have been answered before.

1. In the arrangement of transactions in a block does the height takes proceeding or it can be arranged according to its timestamp?

2. Is there a possibility to timestamp a transactionto been spent later?

3. Since it takes time for transaction to be confirmed does this transaction take the timestamp of when It was confirmed or the initial time it was first issued?


Title: Re: Can timestamp be use for arrangement of blocks?
Post by: o_e_l_e_o on June 28, 2022, 10:21:26 AM
Timestamp is a data in block which shows the exact time the transaction takes place.
It is far from exact. The timestamp of a block can range from the median timestamp (plus one second) of the last 11 blocks in the past, to 2 hours in the future based on the adjusted network time. This gives (on average) a 3 hour window in which a block's timestamp can fall and still be valid.

1. In the arrangement of transactions in a block does the height takes proceeding or it can be arranged according to its timestamp?
The height is the only way to correctly order blocks. It is not uncommon for a block to have a timestamp earlier than the block before it.

2. Is there a possibility to timestamp a transactionto been spent later?
Transactions don't have timestamps; blocks do. You can timelock a transaction so it cannot be spent until later, however, but this is different from a timestamp.

3. Since it takes time for transaction to be confirmed does this transaction take the timestamp of when It was confirmed or the initial time it was first issued?
As above, transactions do not have timestamps. The only timestamp you can reliably apply to a transaction is the timestamp of the block in which it was mined. Some block explorers will display the time at which they first saw the transaction, but that does not tell you when the transaction was signed nor when it was broadcasted to the network - it only tells you about the local behavior of the specific node that said block explorer is relying on.


Title: Re: Can timestamp be use for arrangement of blocks?
Post by: ABCbits on June 28, 2022, 12:21:26 PM
Some block explorers will display the time at which they first saw the transaction, but that does not tell you when the transaction was signed nor when it was broadcasted to the network - it only tells you about the local behavior of the specific node that said block explorer is relying on.

Additionally, block explorer use block timestamp to fill transaction's "timestamp" if the transaction was mined before they run the explorer for first time.


Title: Re: Can timestamp be use for arrangement of blocks?
Post by: o_e_l_e_o on June 28, 2022, 03:25:16 PM
Additionally, block explorer use block timestamp to fill transaction's "timestamp" if the transaction was mined before they run the explorer for first time.
Yeah, good point. Also worth pointing out that most explorers which do assign a timestamp to unconfirmed transactions will change that timestamp once the transaction confirms to the timestamp of the block in which it is mined.

The most accurate way for you to timestamp when a transaction was first seen or first mined is to run your own well connected node and record the timestamp of every transaction it sees and every block it receives against a well calibrated local clock. Won't be perfect, but it's the best you'll get in a decentralized network. You'd also need to figure out why exactly you'd want to do any of that, though.


Title: Re: Can timestamp be use for arrangement of blocks?
Post by: NotATether on June 28, 2022, 04:39:22 PM
The blocks can only be arranged as they are linked together dynamically on the blockchain. Any other arrangement is invalid, because each block contains the hash of the previous block.


Title: Re: Can timestamp be use for arrangement of blocks?
Post by: Zaguru12 on June 28, 2022, 09:25:11 PM
Thanks mates for the answers and corrections I will take them into account and have a further reading on timestamp. Thanks a lot