Bitcoin Forum
May 06, 2024, 01:28:40 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 »  All
  Print  
Author Topic: hashkill - testing bitcoin miner plugin  (Read 90663 times)
gat3way (OP)
Sr. Member
****
Offline Offline

Activity: 256
Merit: 250


View Profile
April 29, 2011, 11:29:33 PM
Last edit: June 07, 2011, 10:25:32 AM by gat3way
 #1

Hello,

I am developing an opensource linux CPU/GPU hash cracker and recently got introduced to bitcoin world and decided to write a bitcoin miner as part of my program (as I can reuse most of my sha256 code).

My bitcoin plugin is in alpha stage, but it already does some pretty handy stuff, e.g:

* Does BFI_INT patching
* Is extremely optimized using some optimization tricks I borrowed from my sha256 plugin (40 GPRs, less than 2890 ALU ops and over 97% ALUPacking on 6870 - it's VLIW5)
* Supports multi-gpu configurations (no need to run separate instances for each device)
* Supports NVidia and ATI (4xxx support is broken though for some reason I have yet not identified)
* Supports long polling
* Does not quit on connection failure, instead it retries after 20 seconds
* Has a relatively smart getwork asking mechanism that does not generate much network traffic and is suitable for pools like bitcoinpool.com where efficiency is important
* Integrated support for getting stats from pools (currently only bitcoinpool.com, deepbit.net and mining.bitcoin.cz)
* Is simple to use
* Preserves high performance without sacrificing desktop responsiveness

It is in alpha stage and at that point I prefer not to release the source of the plugin (except the kernels that look ugly Smiley ). Nevertheless, I have compiled a x86_64 binary, statically linked (so that you don't have to deal with dependency issues):

64bit:
http://www.gat3way.eu/poc/hashkill-0.2.4-x86_64.tgz

32-bit:
http://www.gat3way.eu/poc/hashkill-0.2.4-x86.tgz

Installation is simple - just run sudo ./install.sh (it requires superuser privileges in order to copy the plugins and kernels to /usr/share/)

Usage is also simple, just run:

hashkill-gpu -p bitcoin user:password:host:port [-a addopts]

e.g

hashkill-gpu -p bitcoin gat3way:mypassword:bitcoinpool.com:8334 -a gat3way

tested with bitcoinpool.com, deepbit.net and mining.bitcoinpool.cz

the -a option provides a way to get stats from the pool, you need to provide your API key or your username (bitcoinpool.com). If you do that, you get stats on curreent reward by pressing the enter key while mining.


You can try it if interested. BTW it is very fast, probably among the fastest miners out there. I did some tests with the latest versions of poclbm, phoenix and hashkill on my 6870 card (stock clocks) and the results are:

Quote
hashkill: 271M/s
poclbm (-f1 -w128 -v) : 263M/s
phoenix (BFI_INT VECTORS AGGRESSION=11 FASTLOOP): 256M/s

There is a screenshot:

1715002120
Hero Member
*
Offline Offline

Posts: 1715002120

View Profile Personal Message (Offline)

Ignore
1715002120
Reply with quote  #2

1715002120
Report to moderator
1715002120
Hero Member
*
Offline Offline

Posts: 1715002120

View Profile Personal Message (Offline)

Ignore
1715002120
Reply with quote  #2

1715002120
Report to moderator
1715002120
Hero Member
*
Offline Offline

Posts: 1715002120

View Profile Personal Message (Offline)

Ignore
1715002120
Reply with quote  #2

1715002120
Report to moderator
You can see the statistics of your reports to moderators on the "Report to moderator" pages.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Tyran
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
April 30, 2011, 12:31:16 AM
 #2

This kernel should be about 10% faster than the phoenix/poclbm one according to AMD's kernel analyzer, but I'm currently on windows so I can't use your binary and I can't figure out what the inputs are to try it with a different miner :p
ghost
Newbie
*
Offline Offline

Activity: 34
Merit: 0


View Profile
April 30, 2011, 12:40:35 AM
 #3

No 32-bit binary?
JWU42
Legendary
*
Offline Offline

Activity: 1666
Merit: 1000


View Profile
April 30, 2011, 12:54:28 AM
 #4

Code:
jw@Krypton:~/BTC/hashkill-0.2.4-x86_64$ hashkill-gpu
hashkill-gpu: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory

LD_LIBRARY_PATH is set in .bashrc and have no issues running poclbm or phoenix FWIW

fpgaminer
Hero Member
*****
Offline Offline

Activity: 560
Merit: 517



View Profile WWW
April 30, 2011, 01:04:51 AM
Last edit: April 30, 2011, 01:45:42 AM by fpgaminer
 #5

Quote
phoenix (BFI_INT VECTORS AGGRESSION=11 FASTLOOP): 256M/s
You're not using phoenix correctly. FASTLOOP only works correctly for AGGRESSION < 8. Remove the FASTLOOP argument and retest.

EDIT: You also don't specify the worksize for phoenix. Not sure what that card needs (I'm guessing 128 by the poclbm command you posted).

Zamicol
Newbie
*
Offline Offline

Activity: 56
Merit: 0



View Profile
April 30, 2011, 05:56:24 AM
 #6

Code:
jw@Krypton:~/BTC/hashkill-0.2.4-x86_64$ hashkill-gpu
hashkill-gpu: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory

LD_LIBRARY_PATH is set in .bashrc and have no issues running poclbm or phoenix FWIW



I'm having the same issue. 
zoro
Full Member
***
Offline Offline

Activity: 226
Merit: 100


View Profile
April 30, 2011, 06:16:38 AM
 #7

ca we have it in windows plz? Smiley

"killer app" of BTC = MasterCoin https://bitcointalk.org/index.php?topic=265488.0Mastercoin(A new protocol layer on top of Bitcoin)
xyzzy
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
April 30, 2011, 07:14:19 AM
 #8

Code:
jw@Krypton:~/BTC/hashkill-0.2.4-x86_64$ hashkill-gpu
hashkill-gpu: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory

LD_LIBRARY_PATH is set in .bashrc and have no issues running poclbm or phoenix FWIW


Code:
cd /opt/ati-stream-sdk-v2.1-lnx64/lib/x86_64/lib; sudo ln -s libOpenCL.so libOpenCL.so.1

I get a bit farther than that, but have a different problem:

Quote
crunch@crunch:~/hashkill-0.2.4-x86_64$ uname -a
Linux crunch 2.6.35-28-generic #49-Ubuntu SMP Tue Mar 1 14:39:03 UTC 2011 x86_64 GNU/Linux
crunch@crunch:~/hashkill-0.2.4-x86_64$ ./hashkill-gpu -p bitcoin xxxx:xxx:deepbit.net:8332

[hashkill] Version 0.2.4
[hashkill] Plugin 'bitcoin' loaded successfully
[hashkill] Found GPU device: Advanced Micro Devices, Inc. - Juniper
[hashkill] Found GPU device: Advanced Micro Devices, Inc. - Cypress
[hashkill] Found GPU device: Advanced Micro Devices, Inc. - Cypress
[hashkill] This plugin supports GPU acceleration.
[hashkill] Initialized hash indexes
[hashkill] Initialized thread mutexes
[hashkill] Spawned worker threads
[hashkill] Successfully connected and authorized at deepbit.net:8332
[hashkill] Compiling OpenCL kernel source (amd_bitcoin.cl)[error] (ocl_bitcoin.c:923) clBuildProgram error (-11)
[hashkill] Attack took 12 seconds.
[hashkill] Bye bye Smiley
stakhanov
Full Member
***
Offline Offline

Activity: 175
Merit: 101


View Profile
April 30, 2011, 07:47:50 AM
Last edit: April 30, 2011, 09:16:27 AM by stakhanov
 #9

[hashkill] Attack took 12 seconds.
[hashkill] Bye bye Smiley


ಠ_ಠ
Jaime Frontero
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
April 30, 2011, 07:57:53 AM
 #10


[hashkill] Attack took 12 seconds.
[hashkill] Bye bye Smiley

ಠ_ಠ
[/quote]

oh my... Shocked
gat3way (OP)
Sr. Member
****
Offline Offline

Activity: 256
Merit: 250


View Profile
April 30, 2011, 09:13:06 AM
 #11

Hello,

The dependance on OpenCL.so.1 is my mistake, I have built it against SDK 2.4 and should fix that. A quick workaround would be to create a symlink libOpenCL.so -> libOpenCL.so.1. Also, it may not work with SDK < 2.3 cause I set some environment variables introduced in 2.3 to speed up host-device transfers a bit and properly support multi-GPU without 100% CPU load

Quote
[hashkill] Attack took 12 seconds.
[hashkill] Bye bye

Yeah, this comes from the fact that the tool is a hash cracker anyway Smiley the bitcoin functionality is a testing one and yet has not been integrated properly yet so in this case we're reusing the generic deinitialization routine used for the hash cracking code. As I said, it's still an alpha, there are many things that need to be done before it reaches release quality Smiley


As for 32-bit version, there are some issues with cross-compilation at that moment that I am working on currently. Should be ready in 1-2 days.

As for windows version - not planned, sorry.
commlinx
Full Member
***
Offline Offline

Activity: 294
Merit: 100



View Profile
April 30, 2011, 09:13:57 AM
 #12

I suspect that message is generic because he's reused hash cracker code and it's part of the standard exit code to say how long the "attack" on the hash took, and it exited because of the error instead of requesting more work. Otherwise putting that error would't be a very smart piece of social engineering, would have been much better to report a higher than normal hash rate and then fake a crash reporting it back to the server to get more people to try.
marcus_of_augustus
Legendary
*
Offline Offline

Activity: 3920
Merit: 2348


Eadem mutata resurgo


View Profile
April 30, 2011, 09:32:51 AM
 #13


Quote
I am developing an opensource linux CPU/GPU hash cracker ....

Quote
at that point I prefer not to release the source of the plugin

So is it open source is isn't it?

I'm not going near this until more eyes have been over it ... like more than yours. Hope it is for real, sounds too good to be true in some ways.

gat3way (OP)
Sr. Member
****
Offline Offline

Activity: 256
Merit: 250


View Profile
April 30, 2011, 09:37:15 AM
 #14

The source of the plugin will be available once it reaches "production" quality, right now I would be a bit embarassed to put it in public, cause it's ugly Smiley I need some more test feedback though as I don't have the variety of hardware to test...
bitcoincomes
Newbie
*
Offline Offline

Activity: 15
Merit: 0



View Profile WWW
April 30, 2011, 09:40:02 AM
 #15

I am also getting the error:

Code:
[hashkill] Compiling OpenCL kernel source (amd_bitcoin.cl)[error] (ocl_bitcoin.c:923) clBuildProgram error (-11)

I am running ubuntu 10.10 with SDK 2.1

Thanks.
gat3way (OP)
Sr. Member
****
Offline Offline

Activity: 256
Merit: 250


View Profile
April 30, 2011, 09:46:26 AM
Last edit: April 30, 2011, 10:03:05 AM by gat3way
 #16

Please try it with SDK 2.3 (or later, but since 2.4 updates the ICD files, I would recommend 2.3). It is relatively safe and compatible with 2.1 - you just download and unpack it and point LD_LIBRARY_PATH to SDK2.3's library path.

Anyway, peak performance would be achieved with 2.4 as the compiler aggressively optimizes some parts of the code, lowering the number of ALU instructions needed.

SDK 2.1 is too old...it has no OpenCL 1.1 support and is not thread-safe. It has also other problems, e.g rotate() not generating BIT_ALIGN_INT instructions and stuff.

P.S retested phoenix with WORKSIZE=128 and without FASTLOOP. It is indeed faster, in fact as fast as poclbm (263M/s). hashkill is still faster at 271M/s Smiley
nster
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
April 30, 2011, 10:41:28 AM
 #17

how hard would it be to make a windows version?  I'm sure people would contribute a few btc for it if it really is faster than poclbm

167q1CHgVjzLCwQwQvJ3tRMUCrjfqvSznd Donations are welcome Smiley Please be kind if I helped
gat3way (OP)
Sr. Member
****
Offline Offline

Activity: 256
Merit: 250


View Profile
April 30, 2011, 11:06:55 AM
 #18

Well it would require code changes as well as changes in the autoconf/automake part to build properly on windows/cygwin cause right now it depends a lot on some linux specific stuff (like procfs and/or some linux-specific API functions). However, windows version is not in my near plans. It is more likely that an MacOSX port will be done first as I had such requests for the hash cracker and it would be relatively easy. Porting to windows would be much more difficult though.
Convery
Sr. Member
****
Offline Offline

Activity: 966
Merit: 254



View Profile
April 30, 2011, 11:15:17 AM
 #19

Porting to windows would be much more difficult though.

I'm sure that someone can do that for you when you release the source to a stable version :3


             ▄          ▄▄▄▄    ▄
            ███      ▄██████▀  ▀█▀
            ███     ▄██▀
            ███     ███        ▄█▄   ▄█▄ ▄█████▄▄         ▄▄██████▄      ▄█▄ ▄█████▄▄         ▄▄█████▄▄        ▄▄█████▄▄
    ▄▄▄▄▄▄  ███     ███        ███   ██████▀▀▀▀███▄     ▄███▀▀▀▀▀███▄    ██████▀▀▀▀███▄     ▄███▀▀▀▀▀███▄    ▄███▀▀▀▀▀███▄
  ▄████████▄███  ▄█████████▄   ███   ████▀      ▀███   ▄██▀       ▀██▄   ████▀      ▀███   ▄██▀       ▀█▀   ▄██▀       ▀██▄
▄███▀    ▀█████   ▀▀███▀▀▀▀    ███   ███         ███   ███         ███   ███         ███   ███              ███████████████
███   ▄▄   ▀███     ███        ███   ███         ███   ███         ███   ███         ███   ███              ███▀▀▀▀▀▀▀▀▀▀▀
███   ▀▀   ▄███     ███        ███   ███         ███   ███         ███   ███         ███   ███         ▄    ███         ▄
▀███▄    ▄█████     ███        ███   ███         ███    ███▄▄   ▄▄████   ███         ███    ███▄▄    ▄███    ███▄▄   ▄▄███
  ▀████████▀███     ███        ███   ███         ███     ▀████████▀███   ███         ███     ▀█████████▀      ▀█████████▀
    ▀▀▀▀▀▀   ▀       ▀          ▀     ▀           ▀         ▀▀▀▀▀   ▀     ▀           ▀         ▀▀▀▀▀            ▀▀▀▀▀

       ▄▄▄▄▄▄▄
   ▄▄▀▀       ▀▀▄▄
  █               █ ▄
 █   █▀▄ ▀█▀ ▀█▀   █ ▀▄
 █   █▀▄  █   █    █  ▀▄
  █  ▀▀   ▀   ▀   █    █
▄▀ ▄▄           ▄▀    ▄▀
 ▀▀  ▀▀▄▄▄▄▄▄▄▀▀      ▀▄
        ▀▄▄      ▄▄▀▀▄▄▀
           ▀▀▀▀▀▀

                      ▄▄▄
  ▄█▄              ▄███████▄
  ▀████▄▄         ██████▀██████▀
    ▀▀▀████▄▄     ███████████▀
    ▀██▄███████▄▄███████████
     ▄▄▄▀██████████████████
      ▀████████████████████
▀█▄▄     ▀████████████████
  ▀████████████████▀█████
    ▀████████████▀▄▄███▀
       ▀▀██████████▀▀
           ▀▀▀▀▀

               ▄▄   ▄▄
              ▄▀ ▀▀█  █
             ▄▀     ▀▀
         ▄▄▄▄█▄
     ▄█▀▀▀▀▀▀▀▀▀▀█▄
 ▄▀▄▀              ▀▄▀▄
█  █   ▄█▄    ▄█▄   █  █
 ▀█    ▀█▀    ▀█▀    █▀
  █                  █
   █   ▀▄      ▄▀   █
    ▀▄   ▀▀▀▀▀▀   ▄▀
      ▀▀▄▄▄▄▄▄▄▄▀▀
New Age of DEFI
A Non-Code Platform for
Decentralized Trading Instruments

   ▄▄███████████████▄▄
 ▄█████████████████████▄
▄██████████████▀▀███████▄
████████████▀▀    ███████
█████████▀▀   ▄   ███████
██████▀▀     █    ███████
████▀       █     ███████
█████▄▄   ▄█      ███████
████████ ██▄      ███████
▀████████ ▀▄███▄▄███████▀
 ▀█████████████████████▀
   ▀▀███████████████▀▀

     ▄              ▄
   ▄███▄          ▄███▄
   █████▄  ▄▄▄▄  ▄█████
  ▄████████████████████▄
 ▄██████████████████████▄
 ████████████████████████
██████▀▀          ▀▀██████
█████▀   ▄      ▄   ▀█████
 ████   ███    ███   ████
  ████   ▀      ▀   ████
   ▀████▄▄▄▄▄▄▄▄▄▄████▀
     ▀▀████████████▀▀

   ▄▄████████████████▄▄
 ▄█████▀▀▀██████▀▀▀█████▄
▄████▀  ▀▀▀    ▀▀▀  ▀████▄
████▀                ▀████
███▀                  ▀███
███       ▄    ▄       ███
██▀      ███  ███      ▀██
██       ▀█▀  ▀█▀       ██
██▄     ▄        ▄     ▄██
▀██▄     ▀▀▄▄▄▄▀▀     ███▀
 ▀███▄▄▄▄▄▄████▄▄▄▄▄▄███▀
   ▀▀████████████████▀▀
Pieter Wuille
Legendary
*
Offline Offline

Activity: 1072
Merit: 1174


View Profile WWW
April 30, 2011, 11:38:21 AM
 #20

Code:
[hashkill] Version 0.2.4
[hashkill] Plugin 'bitcoin' loaded successfully
[hashkill] Found GPU device: Advanced Micro Devices, Inc. - Cypress
[hashkill] Found GPU device: Advanced Micro Devices, Inc. - Cypress
[hashkill] Found GPU device: Advanced Micro Devices, Inc. - Cypress
[hashkill] Found GPU device: Advanced Micro Devices, Inc. - Cypress
[hashkill] This plugin supports GPU acceleration.
[hashkill] Initialized hash indexes
[hashkill] Initialized thread mutexes
[hashkill] Spawned worker threads
[hashkill] Successfully connected and authorized at mining.bitcoin.cz:8332
[hashkill] Compiling OpenCL kernel source (amd_bitcoin.cl)
[hashkill] Binary size: 457180
[hashkill] Doing BFI_INT magic...

Mining statistics...
Speed: -1478477178 MPlaintexts/sec [cur: 62%] [proc: 20] [subm: 30] [stale: 0] [eff: 150%]     

I do Bitcoin stuff.
Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!