Skip to content

OpenCL Bitcoin miner based on getblocktemplate protocol

License

Notifications You must be signed in to change notification settings

slamko/cl.miner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bitcoin miner on OpenCL built upon “getblocktemplate” protocol

This is mainly an educational project, though contrary to many educational bitcoin miners on github this one is able (hopefully) to actually mine bitcoins (at least in test mode), as most of the mining projects in the net focus mainly on the algorithm without implementing Bitcoin’s RPC protocol (which is not that easy to do from scratch). Also it is kinda rare to find a repo using getblocktemplate protocol as older projects stick to legacy getwork. Finaly there are a lot of CPU miners examples so this one may be somewhat more interesting (though obviously it does not offer here “the most optimized GPU algorithm”).

Quickstart

cl.miner requires the folowing libraries to build:

  • OpenCL
  • libcurl
  • jansson

If your are on Linux, running make should be sufficient to build an executable.

Usage:

miner [options]

Options:
-u <bitcoind_url>
-n <username>
-p <password>
-a <btc_address>

All of the options are optional. By default it will connect to localhost:18443 with username *username* and password *password*.
If you don't specify the bitcoin address it is going to leave the ouput of a coinbase transaction blank.

Currently it may not build/work on other Unix or Posix systems.

All in all

This may serve as a reference/ example implementation for:

  • getblocktemplate protocol
  • GPU accelerated mining
  • OpenCL examples somewhat more interesting than basic vector addition.

Releases

No releases published

Packages

No packages published