summaryrefslogtreecommitdiff
path: root/07/62db49f44d20bb128f51e8667b6153d264367c
blob: 2ae79272044a5dc0d3b06e1452fe14b439668282 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
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 <solar@heliacal.net>) 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 <bitcoin-development@lists.sourceforge.net>;
	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 <solar@heliacal.net>
In-Reply-To: <4E845B09.8040400@justmoon.de>
Date: Thu, 29 Sep 2011 12:49:46 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <A5A4F15F-4934-43A8-938B-8ECF8A2238E6@heliacal.net>
References: <4E80D591.2080100@nilsschneider.net>
	<CAJNQ0stW-7HMw-O_C9Go8ViRrxBNtEpsbhSRyc3aOzm6OvR6dA@mail.gmail.com>
	<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: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=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<nils@nilsschneider.net
>>> <mailto:nils@nilsschneider.net>>  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
>>>     <mailto: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