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
- CMake configuration options
This project uses [CMake] package manager.
- [CMake] >= 3.5
- Perl, needed to build OpenSSL
- CUDA Toolkit >= 9.0 (optional, install if you want NVidia CUDA support)
- GCC version >= 4.8
- 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
- GCC version >= TBF
- Visual Studio 2017; Community Edition works fine. Make sure you install MSVC 2015 toolkit (v140).
Make sure git submodules are up to date:
git submodule update --init --recursive
Create a build directory:
mkdir build cd build
Configure the project with CMake. Check out the additional configuration options.
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
Build the project using [CMake Build Tool Mode]. This is a portable variant of
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
(Optional, Linux only) Install the built executable:
sudo make install
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 setlocal 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" set "PATH=%PERL_PATH%;%PATH%" 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 endlocal pause
CMake configuration options
Pass these options to CMake configuration command, e.g.
cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF
-DETHASHCL=ON- enable OpenCL mining,
-DETHASHCUDA=ON- enable CUDA mining,
-DAPICORE=ON- enable API Server,
-DETHDBUS=ON- enable D-Bus support,
-DBINKERN=ON- install AMD binary kernels,
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:
Run a cluster
I highly recommend you can use a multi-core CPU computer to run a QuarkChain full cluster.
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.
If you use the CUDA GPU, please use,
ethminer -U http://$CLUSTER_IP:38391 --shard-id $SHARD_ID --cuda-devices $GPU_ID
--shard-iddefines one specify shard to mine. shard id 0 ~ 3 are Ethash.
--cuda-devicesdefines 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
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.