/cl.miner

OpenCL Bitcoin miner based on getblocktemplate protocol

Primary LanguageCGNU General Public License v3.0GPL-3.0

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.