test net block time wrong

1

I can see http://tbtc.blockr.io/ time of block are showing "right now". When I click "all blocks" the time is two hours ahead of "now". I don't think it's blockr time zone problem, because

1) when I submit transaction, it will show correct time

2) my bitcoinj wallet also showing future time against

System.currentTimeMillis();

which is UTC time. (I use ntp and it happens on two different computers)

Anybody have an idea why this is happening?

enter image description here

Pavel Niedoba

Posted 2016-04-03T20:37:29.490

Reputation: 454

It might be that any times in the future get converted to right now. It might be good to put a screenshot, though, so that you can still see the issue even if the problem gets fixed.morsecoder 2016-04-03T23:21:00.997

well the screenshot shows last 11 blocks, considering they go faster in testnet, the last one should be half hour oldPavel Niedoba 2016-04-04T09:30:44.090

Answers

1

The timestamps on those blocks are indeed quite varied so I think that blockr.io is not using the timestamp field in the block as sole timing information, instead using something like min(relayed time, block timestamp) so that blocks that have a future timestamp are shown as "right now" because they use the relayed time. They probably are not only using the relayed time since in that case they'd be misdating all blocks after downtime.

TL;DR: do not trust the timestamp field in the block, it can be manipulated.

cdecker

Posted 2016-04-03T20:37:29.490

Reputation: 7 878

the question is more why there are future timestamps in test net ? Are you sure that even main net does not check the block time ?Pavel Niedoba 2016-04-11T13:07:49.060

Yes, it is not possible to synchronize clocks in a distributed system, so Bitcoin limits the checking to a rather large range of [-2 hours:+2 hours], which is what you're observing. From an observer the cases of the block creator putting a timestamp in the future and the observer's clock lagging is indistinguishable.cdecker 2016-04-11T13:48:28.017