Re: Warning : Check your system ( Help me )

September 06, 2010, 12:54:07 PM

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.

Re: Warning : Check your system ( Help me )

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:

Re: Warning : Check your system ( Help me )

September 19, 2010, 08:14:08 PM

I think we all agree that setting the system time is a no go, but why can't we just use an offset internally and just circumvent the whole issue? We already have ways to synchronize (approximately) the clients, so why not make use of that?

Re: Warning : Check your system ( Help me )

We already have ways to synchronize (approximately) the clients, so why not make use of that?

We use an internal offset based on the median of other nodes' times, but for security reasons we don't let them offset us by more than an hour. If they indicate we're off by more than an hour, then we resort to alerting the user to fix their clock.