Pages:
Author

Topic: New demonstration CPU miner available - page 26. (Read 386323 times)

legendary
Activity: 1596
Merit: 1100
November 26, 2010, 06:03:51 PM
#14
You should try it with tcatm's 4-way SSE2 SHA in sha256.cpp.  It compiles fine as a C file, just rename sha256.cpp to sha256.c.  I was able to get it to work in simple tests on Windows, but not when linked in with Bitcoin.  It may have a better chance of working as part of a C program instead of C++.

I'll take a look.  VIA Padlock support may also be similarly easy to integrate.
founder
Activity: 364
Merit: 7423
November 26, 2010, 05:02:41 PM
#13
You should try it with tcatm's 4-way SSE2 SHA in sha256.cpp.  It compiles fine as a C file, just rename sha256.cpp to sha256.c.  I was able to get it to work in simple tests on Windows, but not when linked in with Bitcoin.  It may have a better chance of working as part of a C program instead of C++.

Currently it's only enabled in the Linux build, so if you get it to work you could make it available to Windows users.  It's about 100% speedup on AMD CPUs.
legendary
Activity: 1596
Merit: 1100
November 26, 2010, 04:45:54 PM
#12
Should I use a particular version of jansson? I installed it from git, and get the following compile error:

Code:
util.c: In function ‘json_rpc_call’:
util.c:133:2: warning: passing argument 2 of ‘json_loads’ makes integer from pointer without a cast
/usr/local/include/jansson.h:188:9: note: expected ‘size_t’ but argument is of type ‘struct json_error_t *’
util.c:133:2: error: too few arguments to function ‘json_loads’
/usr/local/include/jansson.h:188:9: note: declared here

It's been tested with jansson 1.2 and 1.3 release versions.

EDIT:  If you lack jansson, current cpuminer.git will build an in-tree version.  Thus, you may opt to fix the problem by... removing jansson from your system.
legendary
Activity: 1596
Merit: 1100
November 26, 2010, 04:32:51 PM
#11
Attached is a Windows executable build with mingw32.  I'd be interested to know if it works.

run "minerd.exe --help" or "minerd.exe -h" to show command line options.

minerd.exe SHA-1 sum: 722fa3b956de3ed3438ed3294fe191f0d55c1514
minerd.exe MD5 sum: 9f75f8da7a5d02da1d45d46d4a032489
legendary
Activity: 1596
Merit: 1100
November 26, 2010, 02:47:02 PM
#10
FWIW, the default bitcoin miner also does this -- it just doesn't print out when it "finds some zeroes", only when a real proof of work is found.

Thus, my CPU miner always shows when it stops working on a solution, and starts working on a new solution.  Just giving you a bit more information on the whole process.
legendary
Activity: 1596
Merit: 1100
November 26, 2010, 01:10:29 PM
#9
Nice work.

But :
Quote
DBG: found zeroes in hash:
6c1e0d9af9b06eab5aae7fbe058760708c1c7869870142b91b9c0ae300000000
PROOF OF WORK FOUND?  submitting...
PROOF OF WORK RESULT: false (booooo)
[...]
DBG: found zeroes in hash:
c155613cbd70edad88bf56b06cbd788329a2a741b27ee78f25abdb2e00000000
PROOF OF WORK FOUND?  submitting...
PROOF OF WORK RESULT: false (booooo)

I don't know if this is a bug or not.
The miner has been compiled with cygwin, I don't know if it matters.

Not a bug.  The miner finds a hash with "several" zeroes in it, but then relies on bitcoin to do the full 256-bit hash < target value comparison.  It's normal that some hashes will be found by the CPU miner, then rejected by bitcoin.  We call those almost-solutions Smiley
sr. member
Activity: 520
Merit: 253
555
November 26, 2010, 08:41:39 AM
#8
Should I use a particular version of jansson? I installed it from git, and get the following compile error:

Code:
util.c: In function ‘json_rpc_call’:
util.c:133:2: warning: passing argument 2 of ‘json_loads’ makes integer from pointer without a cast
/usr/local/include/jansson.h:188:9: note: expected ‘size_t’ but argument is of type ‘struct json_error_t *’
util.c:133:2: error: too few arguments to function ‘json_loads’
/usr/local/include/jansson.h:188:9: note: declared here
legendary
Activity: 1386
Merit: 1097
November 25, 2010, 11:47:30 AM
#7
I believe that IE has cryptographic extensions that you can use from javascript. Maybe that will speed it up?


 Do you have any link or reference? I found only 3rd party ActiveX component here http://www.chilkatsoft.com/js-sha512-hash.asp.
hero member
Activity: 812
Merit: 1022
No Maps for These Territories
November 25, 2010, 09:59:26 AM
#6
Will be available if I finish that. It is just for curiosity because it will be slow as hell. Also network overhead will be significant.
I believe that IE has cryptographic extensions that you can use from javascript. Maybe that will speed it up?
legendary
Activity: 1386
Merit: 1097
November 25, 2010, 09:53:20 AM
#5
Is your JavaScript code available?

I wish the getwork RPC command could be allowed for non-authenticated users from other hosts.  It isn't revealing any secret information, is it?

Will be available if I finish that. It is just for curiosity because it will be slow as hell. Also network overhead will be significant.

I expect simple PHP proxy will do good work for hiding credentials to client. something like yourdomain.com/getwork.php which call rpc to localhost and return json encoded data.
hero member
Activity: 812
Merit: 1022
No Maps for These Territories
November 25, 2010, 08:34:05 AM
#4
Nice idea on the independent C miner.

On the JS one: Oh no, soon all kinds of websites will be sneakily generating bitcons on the background while you browse them, hogging your CPU even more Tongue
legendary
Activity: 1437
Merit: 1002
https://bitmynt.no
November 25, 2010, 08:28:45 AM
#3
In the beginning, this is intended largely to demonstrate a 'getwork' miner.  It is written in straight C, with minimal dependencies (libcurl, libcrypto, jansson).
Cool, I like simplicity of your code. I want to try similar implementation in javascript. Partially because of curiosity and partialy because (inspired by hashcash) it can generate few hashes by fighting comments spam :-).

I just made few tests. In four javascript threads I get ~4khash/s, which is EXTREMELY slow. Probably because javascript is interpreted and without any JIT yet. Would be great if javascript supports GPU. Flash will support GPU soon, so we will see Wink.
Is your JavaScript code available?

I wish the getwork RPC command could be allowed for non-authenticated users from other hosts.  It isn't revealing any secret information, is it?
legendary
Activity: 1386
Merit: 1097
November 24, 2010, 09:14:17 PM
#2
In the beginning, this is intended largely to demonstrate a 'getwork' miner.  It is written in straight C, with minimal dependencies (libcurl, libcrypto, jansson).

Cool, I like simplicity of your code. I want to try similar implementation in javascript. Partially because of curiosity and partialy because (inspired by hashcash) it can generate few hashes by fighting comments spam :-).

I just made few tests. In four javascript threads I get ~4khash/s, which is EXTREMELY slow. Probably because javascript is interpreted and without any JIT yet. Would be great if javascript supports GPU. Flash will support GPU soon, so we will see Wink.
legendary
Activity: 1596
Merit: 1100
November 24, 2010, 07:45:23 PM
#1
A new CPU miner is now available, making use of the new 'getwork' RPC command.

In the beginning, this is intended largely to demonstrate a 'getwork' miner.  It is written in straight C, with minimal dependencies (libcurl, jansson).

It has successfully generated blocks on testnet, mainnet and almost all pools.

Linux/BSD release tarball: http://yyz.us/bitcoin/cpuminer-1.0.2.tar.gz
Windows installer: http://yyz.us/bitcoin/cpuminer-installer-1.0.2.zip
git repository: git://github.com/jgarzik/cpuminer.git

Contributions welcomed!  (GPL v2 license)

UPDATE:  This has largely been superceded by Con Kolivas's cgminer fork.  See cgminer's official forum thread for updates and details.

Pages:
Jump to: