8

Have any observations been made to conclude the accuracy of Bitcoin network time?

It would be interesting to know if NIST or any other authority has tracked the phenomenon.

  • 1
    You could track it yourself via bitcoind's -blocknotify. Seems easy to setup, fun and interesting! – kaoD Jan 13 '14 at 11:27
11

From this blog post describing the timejacking attack:

Each node internally maintains a counter that represents the network time. This is based on the median time of a node's peers which is sent in the version message when peers connect. The network time counter reverts to the system time however if the median time differs by more than 70 minutes from the system time. A very reasonable way to estimate the median network time.

So block timestamps are based on "network time" which is in turn one of:

  • The median time advertised by peers (if between ±70 minutes from system time)
  • System time

The network time is used to validate new blocks. As a precaution, nodes reject any block timestamp that is greater than 2 hours from the current network time. Block timestamps that are earlier than the median time of the past 11 blocks are also rejected. This validation puts upper and lower bounds on the acceptable range of block timestamps.

So block timestamps are:

  • < 2 hours from "network time".
  • > median of last 11 blocks.

I have to refresh my error propagation lessons, but I guess this leads to an accuracy at around ±3 hours.

Of course this is just an upper bound on error, but the actual question remains: what is the real blockchain accuracy? (which is a very interesting question.) The only way to be sure is actually tracking it and comparing with a known perfect timestamp. I don't know if anyone has ever done that before and couldn't find any references.

0

It is not accurate, times in bitcoin's network are medians of other nodes.

  • 2
    But there must be some margin of error, right? The question is not "is it accurate?" but "how accurate is it?". It'd be interesting to track abs(real_stamp - block_stamp) over time. – kaoD Jan 13 '14 at 11:25
0

Essentially when a node finds a block, it broadcasts it with whatever timestamp it wants, so it doesn't mean it's accurate at all. Of course nodes are programmed not to do this, but it doesn't mean they can't. Other nodes are programmed to accept blocks with timestamps that make sense: for example if I receive a block with a timestamp set to a period way into the future I'll probably dismiss it.

So it's not completely accurate but it's accurate enough because the majority of nodes are using the bitcoind node, which is programmed with a specific timestamp logic in mind to generate the timestamp based upon the median time of a node's peers which is sent in the version message when peers connect.

  • 1
    But how accurate is "accurate enough"? – kaoD Jan 13 '14 at 11:30
  • Well since a block is more or less broadcast every 10 mins I would give it worst case a 10 minute margin error. – Luca Matteis Jan 13 '14 at 11:31

Your Answer

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