Pages:
Author

Topic: Warning : Check your system clock (help me) - page 2. (Read 16977 times)

newbie
Activity: 53
Merit: 0
September 09, 2010, 11:34:57 AM
#11
I'd go for a small server that returns a unix timestamp, the client fetches it, computes the clock drift (difference in time) and all the protocol related times are based on that drift. The clocks would still drift a little (they'd do it anyway on the system clock) and we would not get perfect synchronization (impossible in distributed systems), but it would solve our current problems.

The code is about 5 lines and some simple math (sums) when calculating the timestamps.

Why a server when so many are already out there?

I'd agree that we don't want bitcoin client bloat, and definitely NO WAY the bitcoin client should be setting the system time.

But maybe it is worth it in the error case for the bitcoin client to put a message in the log and attempt to use a network time instead of system time.

As for the servers out there, the bitcoin client already has http, right?  Well, most http servers now provide the date in their headers.  For example, in python:
Code:
import os, re, urllib
info = urllib.urlopen('http://www.yahoo.com/').info()
regx = r'Date:\s+[A-Z][a-z]{2}, (\d{1,2}) ([A-Z][a-z]{2}) (\d{1,4}) (\d\d:\d\d:\d\d)'
d, M, Y, T = re.search(regx,str(info)).groups()
m = 1+"JanFebMarAprMayJunJulAugSepOctNovDec".index(M)/3
print '%04d.%02d.%02d-%s' % (int(Y), m, int(d), T)

(that output format happens to work with "date -us" if you did want to set some system time)

of course it would be better to check a couple of sites rather than relying on just yahoo to keep their http server time set properly.  Smiley
donator
Activity: 826
Merit: 1060
September 07, 2010, 06:14:20 AM
#10
Thanks.
Thank you Satoshi for sneaking that possessive apostrophe into "computer's date"!
founder
Activity: 364
Merit: 7423
September 06, 2010, 04:41:06 PM
#9
Any suggestions for better text to put for this error message so the next person will be less likely to be confused?
"Please check that your computer's date and time are correct. If your clock is wrong Bitcoin will not work properly."
Thanks.
legendary
Activity: 1658
Merit: 1001
September 06, 2010, 12:25:18 PM
#8
I dont think the bitcoin client should start bloating itsself with additional NTP client functionality.


Hell no, NTP does a good job. Don't have other services changing the clock (also counts for bitcoin). Right tool for the right job!
hero member
Activity: 489
Merit: 505
September 06, 2010, 07:54:07 AM
#7
I'd go for a small server that returns a unix timestamp, the client fetches it, computes the clock drift (difference in time) and all the protocol related times are based on that drift. The clocks would still drift a little (they'd do it anyway on the system clock) and we would not get perfect synchronization (impossible in distributed systems), but it would solve our current problems.

The code is about 5 lines and some simple math (sums) when calculating the timestamps.
sr. member
Activity: 294
Merit: 252
Firstbits: 1duzy
September 06, 2010, 07:51:37 AM
#6
Any suggestions for better text to put for this error message so the next person will be less likely to be confused?

"Please check that your computers date and time are correct. If your clock is wrong Bitcoin will not work properly."



sr. member
Activity: 294
Merit: 252
Firstbits: 1duzy
September 06, 2010, 07:48:08 AM
#5
I dont think the bitcoin client should start bloating itsself with additional NTP client functionality.
legendary
Activity: 1658
Merit: 1001
September 06, 2010, 12:19:29 AM
#4
I've thought about NTP, but this is more secure.

IMHO there is no reason for a modern system to not run a NTP client/daemon.
founder
Activity: 364
Merit: 7423
September 05, 2010, 06:36:20 PM
#3
Any suggestions for better text to put for this error message so the next person will be less likely to be confused?

It's trying to tell them their clock is wrong and they need to correct it.

It's relying on 3 time sources:
1) the system clock
2) the other nodes, if within an hour of the system clock
if those disagree, then
3) the user (asking the user to fix the system clock)

I've thought about NTP, but this is more secure.
legendary
Activity: 1708
Merit: 1010
If your system clock is too far off, blocks that you create would be rejected, and your client will reject any blocks that it views have been created with a future date.
newbie
Activity: 1
Merit: 0
Warning :Check your system data and time , you may not be able to generate or receive the most recent blocks !

What does it mean ?    Huh   I'm just with 2 connections and 500 blocks.
Pages:
Jump to: