Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1R9G3q-0007pm-Id for bitcoin-development@lists.sourceforge.net; Thu, 29 Sep 2011 12:49:58 +0000 X-ACL-Warn: Received: from pelican.heliacal.net ([173.246.103.92] helo=pelican) by sog-mx-4.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1R9G3l-0008L7-Ul for bitcoin-development@lists.sourceforge.net; Thu, 29 Sep 2011 12:49:58 +0000 Received: from [IPv6:2001:470:d9e0:deaf:55c7:ae04:9d92:6b8f] (unknown [IPv6:2001:470:d9e0:deaf:55c7:ae04:9d92:6b8f]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by pelican (Postfix) with ESMTPSA id 12233190F0 for ; Thu, 29 Sep 2011 12:49:47 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1244.3) From: solar In-Reply-To: <4E845B09.8040400@justmoon.de> Date: Thu, 29 Sep 2011 12:49:46 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4E80D591.2080100@nilsschneider.net> <4E845935.8060601@nilsschneider.net> <4E845B09.8040400@justmoon.de> To: bitcoin-development@lists.sourceforge.net X-Mailer: Apple Mail (2.1244.3) X-Helo-Check: bad, Not FQDN (pelican) X-Spam-Score: -0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 FSL_HELO_NON_FQDN_1 FSL_HELO_NON_FQDN_1 0.5 VA_HELO_CHECK Host Used Invalid or Forged HELO/EHLO -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.0 HELO_NO_DOMAIN Relay reports its domain incorrectly X-Headers-End: 1R9G3l-0008L7-Ul Subject: Re: [Bitcoin-development] Deprecating "midstate" in getwork? 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: Thu, 29 Sep 2011 12:49:58 -0000 It's just simple SHA2, you can implement the whole thing easily without = dragging in a huge lib like OpenSSL. I guess I haven't looked at it = recently but the original CPU miner was just implemented locally in = bitcoin and didn't use any libs. It's just that because it's block based, there is no need to ever = recalculate the first half since the brute forcing value is in the = second half of the block.. This was the original prototype for the OpenCL miner without eliminating = redundant calculations and it shows the block1 and block2 calculations = clearly. http://heliacal.net/~solar/bitcoin/sha256.cl Laszlo On Sep 29, 2011, at 11:48 AM, Stefan Thomas wrote: > BitcoinJS uses OpenSSL to calculate midstate: >=20 > = https://github.com/bitcoinjs/node-bitcoin-p2p/blob/master/native.cc#L380 >=20 >=20 > On 9/29/2011 1:40 PM, Nils Schneider wrote: >> Yes, that's possible and what >> https://github.com/bitcoin/bitcoin/pull/535 does. However, = deprecating >> midstate (and hash1) would allow for much cleaner code. >>=20 >> A pull request for marking midstate (and hash1) as deprecated can be >> found at https://github.com/bitcoin/bitcoin/pull/538 >>=20 >> On 29.09.2011 12:23, John Smith wrote: >>> Nils, >>>=20 >>> Sounds good. I'm also doubtful of depending on two crypto libraries = when >>> OpenSSL does perfectly well. >>>=20 >>> However, losing compatibility with miners is not very nice. Is there >>> really not a way to compute midstate with OpenSSL? >>>=20 >>> JS >>>=20 >>> On Mon, Sep 26, 2011 at 7:42 PM, Nils = Schneider>> > wrote: >>>=20 >>> Hey, >>>=20 >>> I'd like to simplify the internal reference miner and remove all >>> dependencies on cryptopp (it's the only place we use cryptopp = instead of >>> OpenSSL). >>>=20 >>> Unfortunately, cryptopp is also used to calculate getwork = "midstate". >>> This field is redundant and the miner could easily calculate it = from the >>> blockheader so I'd like to remove it. >>>=20 >>> Any thoughts? Where should such a change should be announced so = all >>> miners can be upgraded? >>>=20 >>> = --------------------------------------------------------------------------= ---- >>> All the data continuously generated in your IT infrastructure = contains a >>> definitive record of customers, application performance, = security >>> threats, fraudulent activity and more. Splunk takes this data = and makes >>> sense of it. Business sense. IT sense. Common sense. >>> http://p.sf.net/sfu/splunk-d2dcopy1 >>> _______________________________________________ >>> Bitcoin-development mailing list >>> Bitcoin-development@lists.sourceforge.net >>> >>> https://lists.sourceforge.net/lists/listinfo/bitcoin-development >>>=20 >>>=20 >>=20 >> = --------------------------------------------------------------------------= ---- >> All the data continuously generated in your IT infrastructure = contains a >> definitive record of customers, application performance, security >> threats, fraudulent activity and more. Splunk takes this data and = makes >> sense of it. Business sense. IT sense. Common sense. >> http://p.sf.net/sfu/splunk-d2dcopy1 >> _______________________________________________ >> Bitcoin-development mailing list >> Bitcoin-development@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/bitcoin-development >>=20 >=20 >=20 > = --------------------------------------------------------------------------= ---- > All the data continuously generated in your IT infrastructure contains = a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and = makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development