A stork brings them... or...

One of the basic principles on a dist. system is lack of a global clock.

So how are the timestamps assigned to blocks, by the machine that mines it? Couldn't it just insert a fake one?

On page 7 of the Ethereum whitepaper Vitalik says that the algorithm for checking that a block is valid contains the following check:

Check that the timestamp of the block is greater than that of the [median of the 11 previous blocks] and less than 2 hours into the future

So then this notion of time in BTC is quite fuzzy isn't it?

Is there anything I can read that will tell me the exact time bounds of the BTC system?

  • 3
    See the accepted answer to the question here: bitcoin.stackexchange.com/questions/915/… – Inaki Sep 22 '16 at 11:33
  • 1
    This information is from 2011, it still applies now in 2016? – s.matthew.english Sep 22 '16 at 16:44
  • 2
    It still applies. It's part of consensus code: of one node across different blocks than another that's going to be messy. This makes it hard to change. – Jannes Sep 23 '16 at 10:22
  • 1
    @Jannes thank you for the heads up. how about the timestamping on Ethereum, I guess it's somehow different- need to read the GHOST paper- do you know about litecoin? – s.matthew.english Sep 23 '16 at 12:45
  • 2
    @s.matthew.english Don't know anything about Ethereum. In general there's no other way to do rough timestamps in a decentralized trustless way (we wouldn't need miners at all). Requiring higher precission timestamps would have been possible, but it makes miners more vulnerable to attack/human error by making them depend on properly configured and working (not DOSsed or manipulated) NTP. I'm not sure about Litecoin, but I doubt they changed anything other than going from 10 minutes to 2.5 minutes block time. Which by itself doesn't make their timestamps any more accurate or more trustworthy. – Jannes Sep 27 '16 at 13:23
up vote 5 down vote accepted

A miner applies their own timestamp to a block.

Nodes add the first block they receive to the top their chain. They will not replace the current tip of their chain with a newly received block just because it has an earlier timestamp.

Therefore, you can think timestamp is a rough indicator of when the block was formed by the miner.


From bitcoin.it/wiki/Block_timestamp:

A timestamp is accepted as valid if it is greater than the median timestamp of previous 11 blocks, and less than the network-adjusted time + 2 hours.

So I suppose a miner can insert a "fake" timestamp, insomuch that it is between these two bounds. Nonetheless, a "fake" timestamp will not influence its position in the blockchain.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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