Bitcoin Forum
May 14, 2024, 05:33:32 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Timejacking & Bitcoin  (Read 5990 times)
osmosis
Sr. Member
****
Offline Offline

Activity: 300
Merit: 250



View Profile
September 22, 2011, 07:50:18 PM
 #21

I also patch my clients not to accept time corrections from the bitcoin network and think that the clock skew acceptance built in to the bitcoin network is insane.  Or at least silly and out dated.
It would be great if you contribute it back to core so that others can enable it as an option.

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.
Probably correct.

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.
gtk-gnutella has an amazing statics view in the user interface. It tracks 100's of variables. If similar data was just made available from the command line, I would write some munin plugins to graph the data.
2112
Legendary
*
Offline Offline

Activity: 2128
Merit: 1068



View Profile
September 22, 2011, 08:09:35 PM
 #22

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.
Probably correct.
I'm going to side with ArtForz and his idea of built-in SNTP for the Windows version of bitcoin. The native Windows NTP works well only in domains. For the regular Windows boxes that are just members of a workgroup there are multiple problems. Majority of those problems are caused by the various add-ons, but I don't know how many people run just bare Windows machines with software only from Microsoft.

The code to properly query the Windows Time Service would be more complex than just a simplest generic SNTP code.

Please comment, critique, criticize or ridicule BIP 2112: https://bitcointalk.org/index.php?topic=54382.0
Long-term mining prognosis: https://bitcointalk.org/index.php?topic=91101.0
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
September 22, 2011, 08:13:21 PM
 #23

I also patch my clients not to accept time corrections from the bitcoin network and think that the clock skew acceptance built in to the bitcoin network is insane.  Or at least silly and out dated.
It would be great if you contribute it back to core so that others can enable it as an option.

It is trivial, and probably wrong.  But in util.cpp, replace the GetAdjustedTime() function with:

Code:
int64 GetAdjustedTime()
{
    return GetTime();
}

When this came up on the mailing list the other day, I suggested that we scrap everything involving timekeeping in the client and protocol, and start over with the requirement and assumption that the local clock be correct.  It wasn't a popular proposal, but I'm pretty sure it is still the right thing to do.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
September 22, 2011, 08:18:15 PM
 #24

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.
Probably correct.
I'm going to side with ArtForz and his idea of built-in SNTP for the Windows version of bitcoin. The native Windows NTP works well only in domains. For the regular Windows boxes that are just members of a workgroup there are multiple problems. Majority of those problems are caused by the various add-ons, but I don't know how many people run just bare Windows machines with software only from Microsoft.

The code to properly query the Windows Time Service would be more complex than just a simplest generic SNTP code.

Tardis 2000.  If someone can't manage to get it installed and working, they have no business using bitcoin.

We should not write our own buggy implementation of NTP when other good options exist.  Notice that bitcoin does not include an antivirus scanner either, but the same arguments that would apply to including NTP would also apply equally well to virus protection.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
osmosis
Sr. Member
****
Offline Offline

Activity: 300
Merit: 250



View Profile
September 22, 2011, 08:27:01 PM
 #25

If someone can't manage to get it installed and working, they have no business using bitcoin.

In a free world we do not have any control over who does or does not run the software. What we are trying to do is protect the network. Accurate packet time stamping is an important aspect of p2p protocols. We can ban or throttle peers who send msgs who's time stamp is skewed from our own clients. Maybe this is already implemented.
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!