QuarkChain GPU miner with OpenCL, CUDA and getWork mode support
Branch: master
Clone or download
Pull request Compare This branch is 9 commits ahead, 466 commits behind ethereum-mining:master.
jyouyj Update README.md
Test2.4 full shard ID
Latest commit ec0f5fb Feb 2, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Add a couple GitHub templates (ethereum-mining#1338) Jul 6, 2018
cmake Upgrade Cable to 0.2.12 Sep 3, 2018
docs API: miner_getstatdetail(). Several changes. Oct 3, 2018
ethminer revised for quarkchain Dec 10, 2018
libapicore API: miner_getstatdetail(). Several changes. Oct 3, 2018
libdevcore Faster exit with CUDA devices. Oct 1, 2018
libethash-cl Faster exit with CUDA devices. Oct 1, 2018
libethash-cuda Smooth CMakeLists.txt for CUDA. Oct 3, 2018
libethcore API: miner_getstatdetail(). Several changes. Oct 3, 2018
libhwmon NFC: Remove trailing whitespace and replace tab indent with space. Sep 2, 2018
libpoolprotocols Update EthGetworkClient.cpp Dec 10, 2018
scripts Update travis code format check Sep 24, 2018
.bumpversion.cfg ethminer 0.17.0-alpha.1 Oct 5, 2018
.clang-format Reduce clang-format to minimal size Feb 3, 2018
.gitattributes Introduce .gitattributes forcing LF line endings on some files Sep 3, 2018
.gitignore Power usage parameterized: -HWMON 0 works as before and -HWMON 1 show… Feb 17, 2018
.gitmodules Remove the unused `evmjit` submodule. Mar 31, 2018
.travis.yml Update travis code format check Sep 24, 2018
BuildInfo.h.in Simplify buildinfo generation May 10, 2017
CHANGELOG.md Merge branch 'release/0.16' Oct 5, 2018
CMakeLists.txt ethminer 0.17.0-alpha.1 Oct 5, 2018
CODEOWNERS Add CODEOWNERS for D-Bus Aug 26, 2017
LICENSE Clarify license Jan 30, 2018
README.md Update README.md Feb 1, 2019
appveyor.yml AppVeyor: build both CUDA 9.0 and 10.0 binaries. Oct 1, 2018
circle.yml Circle CI: Use 9.2-devel-ubuntu18.04 docker image May 22, 2018



QuarkChain miner with OpenCL, CUDA and getWork support

Ethminer is an Ethash GPU mining worker.

I forked the Ethminer and modified the code, which can support the QuarkChain Testnet 2.0 Ethash mining. With this modified ethminer, you can mine the shards (0 ~ 3), which relies on an Ethash Proof of Work. Noted that this version only support the getWork (Farm) mode. See FAQ for more details.


  • OpenCL mining
  • Nvidia CUDA mining
  • realistic benchmarking against arbitrary epoch/DAG/blocknumber
  • on-GPU DAG generation (no more DAG files on disk)
  • OpenCL devices picking
  • only support getWork mode

Building from source

Table of Contents


This project uses [CMake] package manager.


  1. [CMake] >= 3.5
  2. Git
  3. Perl, needed to build OpenSSL
  4. CUDA Toolkit >= 9.0 (optional, install if you want NVidia CUDA support)


  1. GCC version >= 4.8
  2. DBUS development libs if building with -DETHDBUS. E.g. on Ubuntu run:
sudo apt install libdbus-1-dev

OpenCL support on Linux

If you're planning to use OpenCL on Linux you have to install the OpenGL libraries. E.g. on Ubuntu run:

sudo apt-get install mesa-common-dev


  1. GCC version >= TBF


  1. Visual Studio 2017; Community Edition works fine. Make sure you install MSVC 2015 toolkit (v140).


  1. Make sure git submodules are up to date:

    git submodule update --init --recursive
  2. Create a build directory:

    mkdir build
    cd build
  3. Configure the project with CMake. Check out the additional configuration options.

    cmake ..

    Note: On Windows, it's possible to have issues with VS 2017 default compilers; in that case, use the VS 2017 installer to get the VS 2015 compilers and use:

    cmake .. -G "Visual Studio 15 2017 Win64" -T v140
  4. Build the project using [CMake Build Tool Mode]. This is a portable variant of make.

    cmake --build .

    Note: On Windows, it is possible to have compiler issues if you don't specify the build config. In that case use:

    cmake --build . --config Release
  5. (Optional, Linux only) Install the built executable:

    sudo make install

Windows-specific script

Complete sample Windows batch file - adapt it to your system. Assumes that:

  • it's placed one folder up from the ethminer source folder
  • you have CMake installed
  • you have Perl installed
@echo off

rem add MSVC in PATH
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"

rem add Perl in PATH; it's needed for OpenSSL build
set "PERL_PATH=C:\Perl\perl\bin"

rem switch to ethminer's source folder
cd "%~dp0\ethminer\"

if not exist "build\" mkdir "build\"

cmake -G "Visual Studio 15 2017 Win64" -H. -Bbuild -T v140 -DETHASHCL=ON -DETHASHCUDA=ON -DAPICORE=ON ..
cmake --build . --config Release --target package


CMake configuration options

Pass these options to CMake configuration command, e.g.

  • -DETHASHCL=ON - enable OpenCL mining, ON by default.
  • -DETHASHCUDA=ON - enable CUDA mining, ON by default.
  • -DAPICORE=ON - enable API Server, ON by default.
  • -DETHDBUS=ON - enable D-Bus support, OFF by default.
  • -DBINKERN=ON - install AMD binary kernels, ON by default.


The ethminer is a command line program. This means you launch it either from a Windows command prompt or Linux console, or create shortcuts to predefined command lines using a Linux Bash script or Windows batch/cmd file. For a full list of available command, please run:

ethminer --help

Run a cluster

I highly recommend you can use a multi-core CPU computer to run a QuarkChain full cluster.

Port Forwarding

If you use an extra computer to run a QuarkChain cluster, you need to open TCP for port 38391 for the GPU miners. Please follow the guidance of Port Forwarding.

Examples connecting to QuarkChain cluster

After you build from source, run the follow command line to start GPU mining for QuarkChain.

cd ethminer/build/ethminer

If you use the CUDA GPU, please use,

ethminer -U http://$CLUSTER_IP:38391 --shard-id $SHARD_ID --cuda-devices $GPU_ID
  • --shard-id defines one specify shard to mine. shard id 0 ~ 3 are Ethash.
  • --cuda-devices defines specify GPUs to mine.

Noted that if you want to mine multiple shards, please open multiple terminals.

You check the GPU id by using the


Testnet 2.4 GPU mining shardID

Chains Hash Algorithm ShardID
Shard 0 Ethash 1
Shard 1 Ethash 10001
Shard 2 Ethash 20001
Shard 3 Ethash 30001


QuarkChain GPU Mining AMI ami-042a6b2a7c48dea80 (Region: Oregon)


Licensed under the GNU General Public License, Version 3.


Can I still mine QuarkChain with my 1GB GPU?

Not really, your VRAM must be above the DAG size (Currently about 1.08 GB.) to get best performance. Without it severe hash loss will occur.

Can I CPU Mine?

No, this version is modified just for the Ethash GPU mining. For CPU miner, please refer to external miners.

Insufficient CUDA driver

Error: Insufficient CUDA driver: 9010

You have to upgrade your Nvidia drivers. On Linux, install nvidia-396 package or newer.