Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XGTvX-0005lx-G8 for Bitcoin-development@lists.sourceforge.net; Sun, 10 Aug 2014 14:16:51 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of mcelrath.org designates 50.31.3.130 as permitted sender) client-ip=50.31.3.130; envelope-from=bob_bitcoin@mcelrath.org; helo=mcelrath.org; Received: from moya.mcelrath.org ([50.31.3.130] helo=mcelrath.org) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1XGTvW-0003lJ-ER for Bitcoin-development@lists.sourceforge.net; Sun, 10 Aug 2014 14:16:51 +0000 Received: from mcelrath.org (localhost [127.0.0.1]) by mcelrath.org (8.14.3/8.14.3/Debian-9.4) with ESMTP id s7AE7K3I030618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 10 Aug 2014 14:07:20 GMT Received: (from mcelrath@localhost) by mcelrath.org (8.14.3/8.14.3/Submit) id s7AE7Kfx030617; Sun, 10 Aug 2014 14:07:20 GMT X-Authentication-Warning: mcelrath.org: mcelrath set sender to bob_bitcoin@mcelrath.org using -f Date: Sun, 10 Aug 2014 14:07:19 +0000 From: Bob McElrath To: "mbde@bitwatch.co" Message-ID: <20140810140719.GA20493@mcelrath.org> References: <53E776D1.1010503@bitwatch.co> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1UWUbFP1cBYEclgG" Content-Disposition: inline In-Reply-To: <53E776D1.1010503@bitwatch.co> User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -2.2 (--) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Headers-End: 1XGTvW-0003lJ-ER Cc: Bitcoin-development@lists.sourceforge.net Subject: Re: [Bitcoin-development] Synchronization: 19.5 % orphaned blocks at height 197'324 X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 14:16:51 -0000 --1UWUbFP1cBYEclgG Content-Type: multipart/mixed; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I had the same problem (repeatedly) which came down a hardware problem. Bitcoin more than other applications is very sensitive to single bit flips in memory or during computation. (In the end I under-clocked my CPU and RAM to fix the problem) Attached is a small python script which will run sha256 on random data repeatedly and will print a message if a mismatch is found. For me it took many hours of running before a sha256 mismatch, but one is enough to fork the blockchain. mbde@bitwatch.co [mbde@bitwatch.co] wrote: > Hello all, > > I'm currently synchronizing a new node and right now, at a progress of a > height of 197'324 blocks, I count in my debug.log an aweful amount of > 38'447 orphaned blocks which is about 19.5 %. > > It has been I while since I watched the synchronization process closely, > but this number seems pretty high to me. > > I'm wondering about the following: would it be possible for a malicious > party to generate chains of blocks with low difficulity which are not > part of the main chain to slow down the sync process? > > > Build and version information: > https://github.com/jmcorgan/bitcoin/tree/026686c7de76dfde6fcacfc3d667fb3418a946a7 > (sipa/jmcorgan address index) > Rebased with: > https://github.com/bitcoin/bitcoin/tree/94e1b9e05b96e4fe639e5b07b7a53ea216170962 > (almost up-to-date mainline) > > Compressed debug.log attached: > https://www.dropbox.com/s/uvtd91xiwmdmun7/debug.7z?m= > (filesize: 7.67 MB, uncompressed: 41.3 MB) > > ------------------------------------------------------------------------------ > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development -- Cheers, Bob McElrath "The individual has always had to struggle to keep from being overwhelmed by the tribe. If you try it, you will be lonely often, and sometimes frightened. But no price is too high to pay for the privilege of owning yourself." -- Friedrich Nietzsche --/04w6evG8XlLl3ft Content-Type: text/x-python; charset=us-ascii Content-Disposition: attachment; filename="sha256check.py" Content-Transfer-Encoding: quoted-printable #!/usr/bin/python # Repeatedly run a sha256 on random data. Keeps a rolling buffer of the la= st # hashes and re-checks them. Prints an error ONLY if a mismatch is # found. If a mismatch is found, you have a hardware problem. =66rom hashlib import sha256 =66rom collections import deque import random buflen =3D 100000 hashbuf =3D deque(maxlen=3Dbuflen) for i in range(buflen): hashbuf.append([str(i), sha256(str(i)).hexdigest()]) while True: k, khash =3D hashbuf.popleft() pophash =3D sha256(k).hexdigest() if pophash !=3D khash: print "ERROR: sha256(%s) =3D %s does not match:"%(k, khash) print " sha256(%s) =3D %s"%(k, pophash) k =3D str(random.getrandbits(1000)) khash =3D sha256(k).hexdigest() hashbuf.append([k, khash]) --/04w6evG8XlLl3ft-- --1UWUbFP1cBYEclgG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAlPnfJcACgkQjwioWRGe9K3dTACeJOxJ4iScKcqE51LH6QynE06+ dVAAnR4ebLRpvFyZW9q03ESqyA/1AE69 =s2y4 -----END PGP SIGNATURE----- --1UWUbFP1cBYEclgG--