Post
Topic
Board Development & Technical Discussion
Re: Timejacking & Bitcoin
by
bcforum
on 22/09/2011, 14:17:16 UTC
With regards to the suggestions of integrating NTP into the bitcoin client, I think it is a bad idea.  The bitcoin client is simply not an appropriate place to put timekeeping software.

If I were emperor, I would make the client turn red if it thinks the local clock is off by more than 5 seconds from what the peers report, and refuse to run if off by more than 30 seconds.

Code:
Added time data, samples 405, offset +0 (+0 minutes)
-86493  -86018  -3606  -277  -168  -121  -100  -98  -87  -80  -79  -75  -74  -60  -56  -54  -53  -52  -36  -36  -36  -32  -31  -31  -30  -29  -27  -26  -26  -26  -24  -24  -23  -22  -19  -18  -18  -16  -16  -16  -15  -14  -14  -14  -14  -13  -13  -13  -12  -12  -11  -11  -11  -11  -11  -11  -10  -10  -10  -10  -9  -9  -9  -8  -8  -8  -8  -8  -8  -7  -7  -7  -7  -6  -6  -6  -6  -6  -6  -6  -6  -6  -6  -6  -6  -5  -5  -5  -5  -5  -5  -5  -5  -5  -5  -5  -5  -5  -5  -5  -5  -5  -5  -4  -4  -4  -4  -4  -4  -4  -4  -4  -4  -4  -4  -4  -4  -4  -4  -4  -4  -4  -4  -4  -4  -4  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -3  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -2  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +0  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +1  +2  +2  +2  +2  +2  +2  +2  +2  +2  +2  +2  +3  +3  +3  +3  +3  +3  +3  +3  +3  +4  +4  +4  +4  +4  +4  +4  +4  +4  +4  +5  +5  +5  +5  +5  +5  +5  +6  +6  +6  +7  +7  +7  +7  +7  +8  +8  +8  +9  +9  +9  +9  +9  +11  +11  +13  +14  +14  +15  +19  +20  +20  +22  +23  +26  +26  +37  +43  +44  +45  +50  +59  +85  +87  +93  +96  +124  +126  +169  +189  +284  +311  +3596  +3687  +7217  +83428  +5654326511063269263  +5790349588594885090 

Some of these systems need a color worse than red, but I think 5 seconds is too tight. 1 minute would throw a blanket of most of them, and a popup message to the rest pointing them to instruction on how to fix their clock would suffice for the rest.
It's interesting to note three are 1 hour, one is 2 hours, and three are ~24 hours off. I wonder if that is deliberate (run your computer in a different timezone so you now when to skype your grandkids), or a curious mistake.