<oembed><type>rich</type><version>1.0</version><author_name>npub1t9txg5aevth45pu9hcz075tj3ch25fydn8c38wew90qjjdjv3rqq3r6cf0</author_name><author_url>https://nostr.ae/npub1t9txg5aevth45pu9hcz075tj3ch25fydn8c38wew90qjjdjv3rqq3r6cf0</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2011-09-13&#xA;🗒️ Summary of this message: Bitcoin&#39;s timejacking and related exploits can be fixed by overlapping block timestamps and using NTP, but new block timestamp rules are needed.&#xA;📝 Original message:Gavin Andresen wrote:&#xA;&gt; Background:&#xA;&gt;&#xA;&gt; Timejacking:&#xA;&gt;    http://culubas.blogspot.com/2011/05/timejacking-bitcoin_802.html&#xA;&gt;&#xA;&gt; And a recent related exploit launched against the low-difficulty&#xA;&gt; alternative chains:&#xA;&gt;    https://bitcointalk.org/index.php?topic=43692.msg521772#msg521772&#xA;&gt;&#xA;&gt;&#xA;&gt; Seems to me there are two fundamental problems:&#xA;&gt;&#xA;&gt; 1) Bitcoin should be overlapping the ranges of block timestamps that&#xA;&gt; it uses to calculate difficulty adjustments.&#xA;&gt;&#xA;&gt; 2) Bitcoin&#39;s &#34;what time is it&#34; code is kind of a hack.&#xA;&gt;&#xA;&gt;&#xA;&gt; Fixing (1) would mean a potential block-chain split; before&#xA;&gt; considering doing that I&#39;d like to consider second-best solutions.&#xA;&gt;&#xA;&gt; Fixing (2) is easier; incorporating a ntp library and/or simply&#xA;&gt; removing the bitcoin mining code from the client but requiring pools&#xA;&gt; and miners to have accurate-to-within-a-minute system clocks (or their&#xA;&gt; blocks will be &#34;discouraged&#34;) seems reasonable to me. If you want to&#xA;&gt; produce blocks that the rest of the network will accept, run ntp on&#xA;&gt; your system.&#xA;&gt;&#xA;&gt; I THINK that fixing (2) will make (1) a non-issue-- if miners can&#39;t&#xA;&gt; mess around with block times very much then it will be very difficult&#xA;&gt; for them to manipulate the difficulty for their benefit.&#xA;&gt;&#xA;The first thing I always do when I grab the source for my colo server is &#xA;patch util.cpp so that GetAdjustedTime() returns GetTime() with no &#xA;adjustment.  But I&#39;m the kind of guy that buys special GPS receivers &#xA;because stratum 2 isn&#39;t low enough and occasionally checks ebay for &#xA;caesium fountains.&#xA;&#xA;NTP has been around for long enough now that there is no reason for the &#xA;client to screw with the clock.  If the client sees different times on &#xA;the network, it should issue a warning, and if it is off too far, it &#xA;should give an error and fail to run (and/or peers should reject it).&#xA;&#xA;But that doesn&#39;t solve the whole problem, because the block timestamp &#xA;checking is based on the assumption that the node is looking at the &#xA;bitcoin clock rather than the, ahem, real clock.  If we change the idea &#xA;of network time to NTP, we will then need to write (and test!) new block &#xA;timestamp rules to account for the new assumptions.&#xA;&#xA;I&#39;m not sure that just fixing item 2 is going to stop the attacks found &#xA;by ArtForz, et al.  Some of the attacks Art pointed out are particularly &#xA;bad because they change the incentive structure of the system, at least &#xA;in the short term.  We need to flip that back around ASAP.&#xA;&#xA;Also, this is going to cause problems for at least one pool operator.</html></oembed>