VerthashMiner is a high performance GPU miner for the Verthash algorithm.
Developer: CryptoGraphics
Stratum, WorkIO and GBT implementations are partly based on cpuminer-multi and lyclMiner
This open source release was made possible thanks to Vertcoin project and its community.
- AMD GPU GCN 1.0 or later.
- NVIDIA GPU with compute capability 3.0 or later.
(Some compute versions may require different miner builds for the CUDA backend. e.g 8.0 requires CUDA 11.0, which removes support for 3.0.)
Additionally miner requires GPU with 2GB VRAM or higher. (depends on the WorkSize
parameter).
- AMD: OpenCL 1.2+ from AMD Radeon Software driver on Windows. AMDGPU-Pro and ROCm on Linux.
- NVIDIA: Both OpenCL 1.2+ and CUDA are supported through the proprietary driver.
Mesa Gallium Compute and macOS are not supported.
- Binary releases: https://github.com/CryptoGraphics/VerthashMiner/releases
- Clone with
git clone https://github.com/CryptoGraphics/VerthashMiner.git
- Follow Building VerthashMiner.
Miner can be configured through the command line, configuration file and a mix of both. All options are documented inside.
Most parameters are optional and will be auto-configured to their default values, while some of them are mandatory.
Both solo(getblocktemplate) and pooled mining(Stratum) are supported.
Note: Verthash algorithm requires a special file verthash.dat
, which can be obtained from external sources or generated by the miner using the following command(available in v0.6.2 or later):
./VerthashMiner --gen-verthash-data verthash.dat
This file is static and can be safely copied from one computer to another.
VerthashMiner includes a verification stage(enabled by default) to ensure, that verthash.dat
is valid.
Run ./VerthashMiner
to get a full list of possible options.
Solo mining using GBT(getblocktemplate):
./VerthashMiner -u user -p password -o http://127.0.0.1:port --coinbase-addr core_wallet_address --verthash-data your_path/verthash.dat --all-cl-devices --all-cu-devices
Pooled mining using Stratum:
./VerthashMiner -u user -p password -o stratum+tcp://example.com:port --verthash-data your_path/verthash.dat --all-cl-devices --all-cu-devices
All miner settings can also be managed through the configuration file. Similar to lyclMiner
-
Generating a configuration file.
-
Config file can be generated using the following command inside cmd/terminal:
./VerthashMiner --g your_config_file.conf
-
Alternative (Windows).
Create a fileGenerateConfig.bat
in the same folder asVerthashMiner.exe
with the following content:
VerthashMiner -g your_config_file.conf
-
Additional notes:
- Configuration file is generated specifically for your GPU and driver setup.
- Configuration file must be re-generated every time you add/remove a new Device to/from the PCIe slot.
- If you want to use NVIDIA GPUs with OpenCL backend when CUDA is available, then configuration file must be generated with
--no-restrict-cuda
option.
example(command line):./VerthashMiner -g your_config_file.conf --no-restrict-cuda
or bat file:VerthashMiner -g your_config_file.conf --no-restrict-cuda
-
-
Configuring a miner. Open
your_config_file.conf
using any text editor and edit"Url"
,"Username"
,"Password"
and"CoinbaseAddress"
(Solo mining only) fields inside a"Connection"
block. Additional notes:- It is recommended to adjust
WorkSize
parameter for eachDevice
to get better performance. - Every single option inside the Configuration file is self documented along with examples.
- It is recommended to adjust
-
Use
VerthashMiner -c your_config_file.conf
to start mining.- Alternative (Windows).
Create a fileRun.bat
in the same folder asVerthashMiner.exe
with the following content:
VerthashMiner -c your_config_file.conf
- Additional notes:
- To use NVIDIA GPUs with OpenCL backend when CUDA is available:
VerthashMiner -c your_config_file.conf --no-restrict-cuda
. Note that in this caseyour_config_file.conf
must be generated with--no-restrict-cuda
too.
- To use NVIDIA GPUs with OpenCL backend when CUDA is available:
- Alternative (Windows).
For example you may want to configure the miner using a configuration file partly or completely.
Command line options have higher priority than the file and it is possible to overwrite almost every option.
VerthashMiner -c your_config_file.conf -u user -p password
In this case miner will use a configuration file while Username and Password options will be overwritten by command line.
CUDA and OpenCL devices are configured separately.
By default, all devices are being used. However it is possible to select specific ones using a PCIeBusId
option.
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Device config:
#
# Available platforms:
#
# 1. Platform name: Advanced Micro Devices, Inc.
# Index: 0
#
# 2. Platform name: NVIDIA Corporation
# Index: 1
#
# Available devices:
#
# 1. Device: gfx900
# PCIe bus ID: 1
# Available platforms indices: 0
#
# 2. Device: Ellesmere
# PCIe bus ID: 3
# Available platforms indices: 0
#
# 3. Device: Ellesmere
# PCIe bus ID: 5
# Available platforms indices: 0
#
# 4. Device: GeForce RTX 2080 Ti
# PCIe bus ID: 7
# Available platforms indices: 1
#
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
<CL_Device0 PCIeBusId = "1" PlatformIndex = "0" BinaryFormat = "auto" AsmProgram = "none" WorkSize = "131072">
<CL_Device1 PCIeBusId = "3" PlatformIndex = "0" BinaryFormat = "auto" AsmProgram = "none" WorkSize = "131072">
<CL_Device2 PCIeBusId = "5" PlatformIndex = "0" BinaryFormat = "auto" AsmProgram = "none" WorkSize = "131072">
<CL_Device3 PCIeBusId = "7" PlatformIndex = "1" BinaryFormat = "auto" AsmProgram = "none" WorkSize = "131072">
For example: We want to use devices only with PCIeBusId
3 and 7.
Comment/backup the original list.
/*
<CL_Device0 PCIeBusId = "1" PlatformIndex = "0" BinaryFormat = "auto" AsmProgram = "none" WorkSize = "131072">
<CL_Device1 PCIeBusId = "3" PlatformIndex = "0" BinaryFormat = "auto" AsmProgram = "none" WorkSize = "131072">
<CL_Device2 PCIeBusId = "5" PlatformIndex = "0" BinaryFormat = "auto" AsmProgram = "none" WorkSize = "131072">
<CL_Device3 PCIeBusId = "7" PlatformIndex = "1" BinaryFormat = "auto" AsmProgram = "none" WorkSize = "131072">
*/
Copy selected device configurations and rename blocks, so they will start from 0. e.g <CL_Device0>
, <CL_Device1>
...
<CL_Device0 PCIeBusId = "3" PlatformIndex = "0" BinaryFormat = "auto" AsmProgram = "none" WorkSize = "131072">
<CL_Device1 PCIeBusId = "7" PlatformIndex = "1" BinaryFormat = "auto" AsmProgram = "none" WorkSize = "131072">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# CUDA Device config:
#
# Available devices:
#
# DeviceIndex: 0
# Name: GeForce RTX 2080 Ti
#
# DeviceIndex: 1
# Name: GeForce GTX 1080
#
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
<CU_Device0 DeviceIndex = "0" WorkSize = "131072">
<CU_Device1 DeviceIndex = "1" WorkSize = "131072">
- Connection password
- If the pool doesn't require this parameter, leave it as
x
- If the pool doesn't require this parameter, leave it as
- Comments can be in C format, e.g.
/* some stuff */
, with a//
at the start of the line, or in shell format (#
).
This option affects OpenCL device configuration only.
There can be a case when all OpenCL devices return the same PCIeBusId and it will be impossible to distinguish between them.
If there will be duplicate PCIeBusIds on the same platform, then miner will automatically switch to the raw device list format
All possible Device/Platform configurations will be listed. A DeviceIndex
option will used instead of PCIeBusId
and PlatformIndex
.
If Device has more than one platform available, all duplicates must be handled manually.
Note: The order in which devices are listed is platform implementation defined. Prefer to use PCIeBusId version whenever possible.
-
DeviceIndex
Specifies a Device/Platform combination from the list. -
Generating a configuration file with raw device list
VerthashMiner -G your_config_file.conf
Make sure that OpenCL drivers are installed. See Supported platforms. lyclMiner uses CMake to build platform specific projects.
- OpenCL
- Jansson(https://github.com/akheron/jansson)
- CURL(https://curl.haxx.se/libcurl/)
- OpenSSL(optional on Windows)
- CUDA(optional) Otherwise OpenCL will be used. Both versions are optimized and performance will be the same. With CUDA you can avoid 100% CPU usage during mining using NVIDIA GPUs.
- Make sure that all dependencies are installed
- Install the latest version of CMake. 3.18 or above is required. https://cmake.org/
- Open CMake and in
Where is the source code
select miner root directory withCMakeLists.txt
- Choose the path "Where to build the binaries" for cache.
- Press
Configure
and selectGenerator
. Note, that CUDA is not supported when using MinGW compiler on Windows platform. Recommended generators:Visual Studio
(select installed version) on Windows andUnix Makefiles
on Linux. - Make sure that
Optional platform for generator
isx64
and pressFinish
- Build system will configure everything automatically and use precompiled dependencies on Windows if possible. You can always specify your own.
- Modify
CMAKE_INSTALL_PREFIX
option and set the miner install path. - Some build systems have
CMAKE_BUILD_TYPE
option set to empty. Make sure it is set toRelease
for the final use. - Use
Generate
and navigate toWhere to build the binaries
directory. - Compile miner(depends on the selected compiler and generator)
- Navigate to
Where to build the binaries
directory - On Linux and Windows MinGW
- Open Terminal/Windows PowerShell in this directory.
- Linux:
make
, Windows MinGW:mingw32-make
- Wait for the compilation to finish
- Linux:
make install
, Windows MinGW:mingw32-make install
- On Windows(Microsoft Visual Studio)
- Open
VerthashMiner.sln
using Microsoft Visual Studio - Right click on the
ALL_BUILD
solution inside the Solution Explorer window and selectBuild
- Wait for the compilation to finish
- Right click on the
INSTALL
solution inside the Solution Explorer window and selectBuild
- Open
- Miner binaries will be stored inside the
CMAKE_INSTALL_PREFIX
directory.
LONGPOLL pushed new work
spam may happen during GMT solo mining if network was stale for a long time. (e.g. testnet)
In this case miner should be run with either--no-longpoll
orLongPoll
option set tofalse
inside the configuration file.- To enable file logger use
--log-file
command option. - All miner "devices" are virtual. By default miner assigns 1 virtual GPU per physical one. Thus 1 thread per GPU.
It is possible to emulate any devices you want by putting duplicates in the list. You can even use multiple CUDA and OpenCL devices at the same time while having only 1 physical NVIDIA GPU.
There are 3 ways to do it:
-
Using Command Line.
Instead of--all-cl-devices
and/or--all-cu-devices
use:
--cl-devices ...
(-d) and--cu-devices ...(-D)
respectively.
To get all physical devices available to the miner use:
-l
or--device-list
To create 2 virtual devices for one physical device, specify the same device twice.
--cl-devices 0:w131072,0:w131072
131072 is a work size(default value). You can try specify your own(e.g 32768, 65536, 262144, 524288 etc) and check performance/power consumption. -
and 3. Using a Configuration File.
OpenCL devices have 2 configuration file formatsPCIeBusID
andRaw device list
. CUDA devices have only 1(Raw device list
).
Duplicate device configuration block.
For example: There will be only 1<CL_Device0 ...>
block with 1 physical GPU. Duplicate it and rename a new one to<CL_Device1 ...>
.
-
- When using 2 or more devices for a single physical GPU, their hash-rate will probably be the same.
You can try to specify a differentWorkSize
for each of them and compare multipleWorkSize
values at the same time. Not sure about accuracy though. It may vary between different GPUs, drivers, OS and other apps running in the background.