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
This project uses [CMake] package manager.
- [CMake] >= 3.5
- Git
- 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
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.
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
-
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
-
(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
Pass these options to CMake configuration command, e.g.
cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF
-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
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.
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 --farm-recheck $TIME
--shard-id
defines one specify shard to mine. shard id 1, 10001, 20001, 30001, 40001, 50001 are Ethash.--cuda-devices
defines specify GPUs to mine.--farm-recheck
defines check interval in milliseconds for changed work. For example 500.
Noted that if you want to mine multiple shards, please open multiple terminals.
You check the GPU id by using the
nvidia-smi
Chains | Hash Algorithm | ShardID |
---|---|---|
Shard 0 | Ethash | 1 |
Shard 1 | Ethash | 10001 |
Shard 2 | Ethash | 20001 |
Shard 3 | Ethash | 30001 |
Shard 4 | Ethash | 40001 |
Shard 5 | Ethash | 50001 |
QuarkChain GPU Mining AMI ami-042a6b2a7c48dea80 (Region: Oregon)
Licensed under the GNU General Public License, Version 3.
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.
No, this version is modified just for the Ethash GPU mining. For CPU miner, please refer to external miners.
Error: Insufficient CUDA driver: 9010
You have to upgrade your Nvidia drivers. On Linux, install nvidia-396
package or newer.