Prepare XMRig-HAC fork for public release
- Add DragonX coin and rx/hush algorithm support - Update branding to XMRig-HAC / dragonx.is - Update repository URLs to git.hush.is - Replace example wallet addresses with placeholders - Update .gitignore for build directories - Document fork changes in README and CHANGELOG
This commit is contained in:
6
.github/ISSUE_TEMPLATE/bug_report.md
vendored
6
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -17,9 +17,9 @@ Steps to reproduce the behavior.
|
|||||||
A clear and concise description of what you expected to happen.
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
**Required data**
|
**Required data**
|
||||||
- XMRig version
|
- XMRig-HAC version
|
||||||
- Either the exact link to a release you downloaded from https://github.com/xmrig/xmrig/releases
|
- Either the exact link to a release you downloaded from https://git.hush.is/dragonx/xmrig-hac/releases
|
||||||
- Or the exact command lines that you used to build XMRig
|
- Or the exact command lines that you used to build XMRig-HAC
|
||||||
- Miner log as text or screenshot
|
- Miner log as text or screenshot
|
||||||
- Config file or command line (without wallets)
|
- Config file or command line (without wallets)
|
||||||
- OS: [e.g. Windows]
|
- OS: [e.g. Windows]
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,6 @@
|
|||||||
/build
|
/build
|
||||||
|
/build-windows
|
||||||
|
/deps-windows
|
||||||
scripts/build
|
scripts/build
|
||||||
scripts/deps
|
scripts/deps
|
||||||
/CMakeLists.txt.user
|
/CMakeLists.txt.user
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
# XMRig-HAC Fork
|
||||||
|
- Added **DragonX** coin support
|
||||||
|
- Added **rx/hush** algorithm (RandomX-HUSH variant for HUSH/DragonX)
|
||||||
|
- Customized RandomX configuration for HUSH/DragonX mining
|
||||||
|
- Based on XMRig v6.25.0
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
# v6.25.0
|
# v6.25.0
|
||||||
- [#3680](https://github.com/xmrig/xmrig/pull/3680) Added `armv8l` to the list of 32-bit ARM targets.
|
- [#3680](https://github.com/xmrig/xmrig/pull/3680) Added `armv8l` to the list of 32-bit ARM targets.
|
||||||
- [#3708](https://github.com/xmrig/xmrig/pull/3708) Minor Aarch64 JIT changes (better instruction selection, don't emit instructions that add 0, etc).
|
- [#3708](https://github.com/xmrig/xmrig/pull/3708) Minor Aarch64 JIT changes (better instruction selection, don't emit instructions that add 0, etc).
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ if (XMRIG_OS_WIN)
|
|||||||
src/crypto/common/VirtualMemory_win.cpp
|
src/crypto/common/VirtualMemory_win.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(EXTRA_LIBS ws2_32 psapi iphlpapi userenv dbghelp)
|
set(EXTRA_LIBS ws2_32 psapi iphlpapi userenv dbghelp bcrypt)
|
||||||
elseif (XMRIG_OS_APPLE)
|
elseif (XMRIG_OS_APPLE)
|
||||||
list(APPEND SOURCES_OS
|
list(APPEND SOURCES_OS
|
||||||
src/App_unix.cpp
|
src/App_unix.cpp
|
||||||
|
|||||||
33
README.md
33
README.md
@@ -1,13 +1,17 @@
|
|||||||
# XMRig
|
# XMRig-HAC
|
||||||
|
|
||||||
[](https://github.com/xmrig/xmrig/releases)
|
XMRig-HAC is a fork of [XMRig](https://github.com/xmrig/xmrig) with added support for **DragonX** coin mining using the **rx/hush** (RandomX-HUSH) algorithm.
|
||||||
[](https://github.com/xmrig/xmrig/releases)
|
|
||||||
[](https://github.com/xmrig/xmrig/releases)
|
|
||||||
[](https://github.com/xmrig/xmrig/blob/master/LICENSE)
|
|
||||||
[](https://github.com/xmrig/xmrig/stargazers)
|
|
||||||
[](https://github.com/xmrig/xmrig/network)
|
|
||||||
|
|
||||||
XMRig is a high performance, open source, cross platform RandomX, KawPow, CryptoNight and [GhostRider](https://github.com/xmrig/xmrig/tree/master/src/crypto/ghostrider#readme) unified CPU/GPU miner and [RandomX benchmark](https://xmrig.com/benchmark). Official binaries are available for Windows, Linux, macOS and FreeBSD.
|
**Repository:** [git.hush.is/dragonx/xmrig-hac](https://git.hush.is/dragonx/xmrig-hac)
|
||||||
|
|
||||||
|
## Fork Changes
|
||||||
|
|
||||||
|
This fork adds:
|
||||||
|
- **DragonX** coin support
|
||||||
|
- **rx/hush** algorithm (RandomX-HUSH variant)
|
||||||
|
- Customized RandomX configuration for HUSH/DragonX
|
||||||
|
|
||||||
|
Based on XMRig v6.25.0.
|
||||||
|
|
||||||
## Mining backends
|
## Mining backends
|
||||||
- **CPU** (x86/x64/ARMv7/ARMv8/RISC-V)
|
- **CPU** (x86/x64/ARMv7/ARMv8/RISC-V)
|
||||||
@@ -15,7 +19,7 @@ XMRig is a high performance, open source, cross platform RandomX, KawPow, Crypto
|
|||||||
- **CUDA** for NVIDIA GPUs via external [CUDA plugin](https://github.com/xmrig/xmrig-cuda).
|
- **CUDA** for NVIDIA GPUs via external [CUDA plugin](https://github.com/xmrig/xmrig-cuda).
|
||||||
|
|
||||||
## Download
|
## Download
|
||||||
* **[Binary releases](https://github.com/xmrig/xmrig/releases)**
|
* **[Binary releases](https://git.hush.is/dragonx/xmrig-hac/releases)**
|
||||||
* **[Build from source](https://xmrig.com/docs/miner/build)**
|
* **[Build from source](https://xmrig.com/docs/miner/build)**
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@@ -24,15 +28,8 @@ The preferred way to configure the miner is the [JSON config file](https://xmrig
|
|||||||
* **[Wizard](https://xmrig.com/wizard)** helps you create initial configuration for the miner.
|
* **[Wizard](https://xmrig.com/wizard)** helps you create initial configuration for the miner.
|
||||||
* **[Workers](http://workers.xmrig.info)** helps manage your miners via HTTP API.
|
* **[Workers](http://workers.xmrig.info)** helps manage your miners via HTTP API.
|
||||||
|
|
||||||
## Donations
|
## Credits
|
||||||
* Default donation 1% (1 minute in 100 minutes) can be increased via option `donate-level` or disabled in source code.
|
|
||||||
* XMR: `48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD`
|
|
||||||
|
|
||||||
## Developers
|
This fork is based on [XMRig](https://github.com/xmrig/xmrig) by:
|
||||||
* **[xmrig](https://github.com/xmrig)**
|
* **[xmrig](https://github.com/xmrig)**
|
||||||
* **[sech1](https://github.com/SChernykh)**
|
* **[sech1](https://github.com/SChernykh)**
|
||||||
|
|
||||||
## Contacts
|
|
||||||
* support@xmrig.com
|
|
||||||
* [reddit](https://www.reddit.com/user/XMRig/)
|
|
||||||
* [twitter](https://twitter.com/xmrig_dev)
|
|
||||||
|
|||||||
@@ -14,8 +14,20 @@ if (WITH_TLS)
|
|||||||
set(OPENSSL_USE_STATIC_LIBS TRUE)
|
set(OPENSSL_USE_STATIC_LIBS TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# For cross-compilation, allow manual specification of OpenSSL paths
|
||||||
|
if (CMAKE_CROSSCOMPILING AND XMRIG_DEPS)
|
||||||
|
set(OPENSSL_INCLUDE_DIR "${XMRIG_DEPS}/include" CACHE PATH "OpenSSL include dir")
|
||||||
|
set(OPENSSL_CRYPTO_LIBRARY "${XMRIG_DEPS}/lib/libcrypto.a" CACHE FILEPATH "OpenSSL crypto lib")
|
||||||
|
set(OPENSSL_SSL_LIBRARY "${XMRIG_DEPS}/lib/libssl.a" CACHE FILEPATH "OpenSSL ssl lib")
|
||||||
|
if (EXISTS "${OPENSSL_CRYPTO_LIBRARY}" AND EXISTS "${OPENSSL_SSL_LIBRARY}" AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/ssl.h")
|
||||||
|
set(OPENSSL_FOUND TRUE)
|
||||||
|
set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(OpenSSL)
|
if (NOT OPENSSL_FOUND)
|
||||||
|
find_package(OpenSSL)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (OPENSSL_FOUND)
|
if (OPENSSL_FOUND)
|
||||||
set(TLS_SOURCES
|
set(TLS_SOURCES
|
||||||
|
|||||||
19
cmake/mingw-w64-toolchain.cmake
Normal file
19
cmake/mingw-w64-toolchain.cmake
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# CMake Toolchain file for cross-compiling to Windows using MinGW-w64
|
||||||
|
set(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||||
|
|
||||||
|
# Specify the cross compiler
|
||||||
|
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc-posix)
|
||||||
|
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++-posix)
|
||||||
|
set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
|
||||||
|
|
||||||
|
# Target environment on the build host system
|
||||||
|
set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
|
||||||
|
|
||||||
|
# Adjust the default behaviour of the FIND_XXX() commands:
|
||||||
|
# search headers and libraries in the target environment
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
|
||||||
|
# Search programs in the host environment
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"pools": [
|
"pools": [
|
||||||
{
|
{
|
||||||
"url": "pool.monero.hashvault.pro:3333",
|
"url": "pool.monero.hashvault.pro:3333",
|
||||||
"user": "48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD",
|
"user": "YOUR_WALLET_ADDRESS",
|
||||||
"pass": "x",
|
"pass": "x",
|
||||||
"keepalive": false,
|
"keepalive": false,
|
||||||
"nicehash": false,
|
"nicehash": false,
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "pool.supportxmr.com:3333",
|
"url": "pool.supportxmr.com:3333",
|
||||||
"user": "48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD",
|
"user": "YOUR_WALLET_ADDRESS",
|
||||||
"pass": "x",
|
"pass": "x",
|
||||||
"keepalive": false,
|
"keepalive": false,
|
||||||
"nicehash": false,
|
"nicehash": false,
|
||||||
|
|||||||
@@ -11,13 +11,13 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/xmrig/xmrig.git"
|
"url": "git+https://git.hush.is/dragonx/xmrig-hac.git"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "GPLv3",
|
"license": "GPLv3",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/xmrig/xmrig/issues"
|
"url": "https://git.hush.is/dragonx/xmrig-hac/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/xmrig/xmrig#readme"
|
"homepage": "https://git.hush.is/dragonx/xmrig-hac#readme"
|
||||||
}
|
}
|
||||||
|
|||||||
112
scripts/build_windows.sh
Executable file
112
scripts/build_windows.sh
Executable file
@@ -0,0 +1,112 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# XMRig Windows Cross-Compilation Build Script
|
||||||
|
# Builds xmrig for Windows using MinGW-w64 on Linux
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
XMRIG_DIR="$(dirname "$SCRIPT_DIR")"
|
||||||
|
BUILD_DIR="$XMRIG_DIR/build-windows"
|
||||||
|
DEPS_DIR="$XMRIG_DIR/deps-windows"
|
||||||
|
OPENSSL_VERSION="1.1.1w"
|
||||||
|
|
||||||
|
echo "=== XMRig Windows Build ==="
|
||||||
|
echo "Source: $XMRIG_DIR"
|
||||||
|
echo "Build: $BUILD_DIR"
|
||||||
|
echo "Deps: $DEPS_DIR"
|
||||||
|
|
||||||
|
# Check for MinGW-w64
|
||||||
|
if ! command -v x86_64-w64-mingw32-gcc-posix &> /dev/null; then
|
||||||
|
echo "Error: MinGW-w64 not found. Install with:"
|
||||||
|
echo " sudo apt install mingw-w64"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create directories
|
||||||
|
mkdir -p "$BUILD_DIR"
|
||||||
|
mkdir -p "$DEPS_DIR/include"
|
||||||
|
mkdir -p "$DEPS_DIR/lib"
|
||||||
|
|
||||||
|
# Build OpenSSL if needed
|
||||||
|
if [ ! -f "$DEPS_DIR/lib/libssl.a" ]; then
|
||||||
|
echo "=== Building OpenSSL $OPENSSL_VERSION ==="
|
||||||
|
cd "$DEPS_DIR"
|
||||||
|
|
||||||
|
if [ ! -f "openssl-${OPENSSL_VERSION}.tar.gz" ]; then
|
||||||
|
wget "https://openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "openssl-${OPENSSL_VERSION}" ]; then
|
||||||
|
tar -xzf "openssl-${OPENSSL_VERSION}.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "openssl-${OPENSSL_VERSION}"
|
||||||
|
|
||||||
|
# Configure for Windows cross-compilation
|
||||||
|
./Configure mingw64 \
|
||||||
|
--cross-compile-prefix=x86_64-w64-mingw32- \
|
||||||
|
no-shared \
|
||||||
|
no-asm \
|
||||||
|
no-zlib \
|
||||||
|
no-comp \
|
||||||
|
--prefix="$DEPS_DIR"
|
||||||
|
|
||||||
|
make -j$(nproc)
|
||||||
|
make install_sw
|
||||||
|
cd "$DEPS_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build libuv if needed
|
||||||
|
if [ ! -f "$DEPS_DIR/lib/libuv.a" ]; then
|
||||||
|
echo "=== Building libuv dependency ==="
|
||||||
|
cd "$DEPS_DIR"
|
||||||
|
|
||||||
|
if [ ! -d "libuv-v1.51.0" ]; then
|
||||||
|
if [ ! -f "libuv.tar.gz" ]; then
|
||||||
|
curl -L -o libuv.tar.gz https://github.com/libuv/libuv/archive/refs/tags/v1.51.0.tar.gz
|
||||||
|
fi
|
||||||
|
tar -xzf libuv.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd libuv-v1.51.0
|
||||||
|
mkdir -p build && cd build
|
||||||
|
cmake .. \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE="$XMRIG_DIR/cmake/mingw-w64-toolchain.cmake" \
|
||||||
|
-DCMAKE_INSTALL_PREFIX="$DEPS_DIR" \
|
||||||
|
-DLIBUV_BUILD_SHARED=OFF \
|
||||||
|
-DBUILD_TESTING=OFF
|
||||||
|
make -j$(nproc)
|
||||||
|
make install
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$BUILD_DIR"
|
||||||
|
|
||||||
|
echo "=== Configuring XMRig ==="
|
||||||
|
cmake "$XMRIG_DIR" \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE="$XMRIG_DIR/cmake/mingw-w64-toolchain.cmake" \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DBUILD_STATIC=ON \
|
||||||
|
-DWITH_TLS=ON \
|
||||||
|
-DWITH_HWLOC=OFF \
|
||||||
|
-DWITH_OPENCL=OFF \
|
||||||
|
-DWITH_CUDA=OFF \
|
||||||
|
-DXMRIG_DEPS="$DEPS_DIR" \
|
||||||
|
-DOPENSSL_ROOT_DIR:PATH="$DEPS_DIR" \
|
||||||
|
-DOPENSSL_INCLUDE_DIR:PATH="$DEPS_DIR/include" \
|
||||||
|
-DOPENSSL_CRYPTO_LIBRARY:FILEPATH="$DEPS_DIR/lib/libcrypto.a" \
|
||||||
|
-DOPENSSL_SSL_LIBRARY:FILEPATH="$DEPS_DIR/lib/libssl.a" \
|
||||||
|
-DOPENSSL_LIBRARIES="$DEPS_DIR/lib/libssl.a;$DEPS_DIR/lib/libcrypto.a" \
|
||||||
|
-DUV_INCLUDE_DIR="$DEPS_DIR/include" \
|
||||||
|
-DUV_LIBRARY="$DEPS_DIR/lib/libuv.a"
|
||||||
|
|
||||||
|
echo "=== Building XMRig ==="
|
||||||
|
make -j$(nproc)
|
||||||
|
|
||||||
|
# Strip the executable
|
||||||
|
x86_64-w64-mingw32-strip xmrig.exe 2>/dev/null || true
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== Build Complete ==="
|
||||||
|
ls -la *.exe 2>/dev/null || echo "Executable not found"
|
||||||
|
echo ""
|
||||||
|
echo "Copy the .exe and WinRing0x64.sys to Windows to run"
|
||||||
@@ -16,5 +16,5 @@
|
|||||||
:: Smaller pools also often have smaller fees/payout limits.
|
:: Smaller pools also often have smaller fees/payout limits.
|
||||||
|
|
||||||
cd /d "%~dp0"
|
cd /d "%~dp0"
|
||||||
xmrig.exe -o xmrpool.eu:3333 -u 48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD -p x
|
xmrig.exe -o xmrpool.eu:3333 -u YOUR_WALLET_ADDRESS -p x
|
||||||
pause
|
pause
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
:: But you will only get a payout when you find a block which can take more than a year for a single low-end PC.
|
:: But you will only get a payout when you find a block which can take more than a year for a single low-end PC.
|
||||||
|
|
||||||
cd /d "%~dp0"
|
cd /d "%~dp0"
|
||||||
xmrig.exe -o YOUR_NODE_IP:18081 -a rx/0 -u 48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD --daemon
|
xmrig.exe -o YOUR_NODE_IP:18081 -a rx/0 -u YOUR_WALLET_ADDRESS --daemon
|
||||||
pause
|
pause
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ const char *Algorithm::kRX_ARQ = "rx/arq";
|
|||||||
const char *Algorithm::kRX_GRAFT = "rx/graft";
|
const char *Algorithm::kRX_GRAFT = "rx/graft";
|
||||||
const char *Algorithm::kRX_SFX = "rx/sfx";
|
const char *Algorithm::kRX_SFX = "rx/sfx";
|
||||||
const char *Algorithm::kRX_YADA = "rx/yada";
|
const char *Algorithm::kRX_YADA = "rx/yada";
|
||||||
|
const char *Algorithm::kRX_HUSH = "rx/hush";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XMRIG_ALGO_ARGON2
|
#ifdef XMRIG_ALGO_ARGON2
|
||||||
@@ -148,6 +149,7 @@ static const std::map<uint32_t, const char *> kAlgorithmNames = {
|
|||||||
ALGO_NAME(RX_GRAFT),
|
ALGO_NAME(RX_GRAFT),
|
||||||
ALGO_NAME(RX_SFX),
|
ALGO_NAME(RX_SFX),
|
||||||
ALGO_NAME(RX_YADA),
|
ALGO_NAME(RX_YADA),
|
||||||
|
ALGO_NAME(RX_HUSH),
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef XMRIG_ALGO_ARGON2
|
# ifdef XMRIG_ALGO_ARGON2
|
||||||
@@ -263,6 +265,10 @@ static const std::map<const char *, Algorithm::Id, aliasCompare> kAlgorithmAlias
|
|||||||
ALGO_ALIAS(RX_SFX, "randomsfx"),
|
ALGO_ALIAS(RX_SFX, "randomsfx"),
|
||||||
ALGO_ALIAS_AUTO(RX_YADA), ALGO_ALIAS(RX_YADA, "randomx/yada"),
|
ALGO_ALIAS_AUTO(RX_YADA), ALGO_ALIAS(RX_YADA, "randomx/yada"),
|
||||||
ALGO_ALIAS(RX_YADA, "randomyada"),
|
ALGO_ALIAS(RX_YADA, "randomyada"),
|
||||||
|
ALGO_ALIAS_AUTO(RX_HUSH), ALGO_ALIAS(RX_HUSH, "randomx/hush"),
|
||||||
|
ALGO_ALIAS(RX_HUSH, "randomhush"),
|
||||||
|
ALGO_ALIAS(RX_HUSH, "rx/dragonx"),
|
||||||
|
ALGO_ALIAS(RX_HUSH, "dragonx"),
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef XMRIG_ALGO_ARGON2
|
# ifdef XMRIG_ALGO_ARGON2
|
||||||
@@ -350,7 +356,7 @@ std::vector<xmrig::Algorithm> xmrig::Algorithm::all(const std::function<bool(con
|
|||||||
CN_HEAVY_0, CN_HEAVY_TUBE, CN_HEAVY_XHV,
|
CN_HEAVY_0, CN_HEAVY_TUBE, CN_HEAVY_XHV,
|
||||||
CN_PICO_0, CN_PICO_TLO,
|
CN_PICO_0, CN_PICO_TLO,
|
||||||
CN_UPX2,
|
CN_UPX2,
|
||||||
RX_0, RX_WOW, RX_ARQ, RX_GRAFT, RX_SFX, RX_YADA,
|
RX_0, RX_WOW, RX_ARQ, RX_GRAFT, RX_SFX, RX_YADA, RX_HUSH,
|
||||||
AR2_CHUKWA, AR2_CHUKWA_V2, AR2_WRKZ,
|
AR2_CHUKWA, AR2_CHUKWA_V2, AR2_WRKZ,
|
||||||
KAWPOW_RVN,
|
KAWPOW_RVN,
|
||||||
GHOSTRIDER_RTM
|
GHOSTRIDER_RTM
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ public:
|
|||||||
RX_GRAFT = 0x72151267, // "rx/graft" RandomGRAFT (Graft).
|
RX_GRAFT = 0x72151267, // "rx/graft" RandomGRAFT (Graft).
|
||||||
RX_SFX = 0x72151273, // "rx/sfx" RandomSFX (Safex Cash).
|
RX_SFX = 0x72151273, // "rx/sfx" RandomSFX (Safex Cash).
|
||||||
RX_YADA = 0x72151279, // "rx/yada" RandomYada (YadaCoin).
|
RX_YADA = 0x72151279, // "rx/yada" RandomYada (YadaCoin).
|
||||||
|
RX_HUSH = 0x72151268, // "rx/hush" RandomX-HUSH (HUSH/DragonX).
|
||||||
AR2_CHUKWA = 0x61130000, // "argon2/chukwa" Argon2id (Chukwa).
|
AR2_CHUKWA = 0x61130000, // "argon2/chukwa" Argon2id (Chukwa).
|
||||||
AR2_CHUKWA_V2 = 0x61140000, // "argon2/chukwav2" Argon2id (Chukwa v2).
|
AR2_CHUKWA_V2 = 0x61140000, // "argon2/chukwav2" Argon2id (Chukwa v2).
|
||||||
AR2_WRKZ = 0x61120000, // "argon2/wrkz" Argon2id (WRKZ)
|
AR2_WRKZ = 0x61120000, // "argon2/wrkz" Argon2id (WRKZ)
|
||||||
@@ -144,6 +145,7 @@ public:
|
|||||||
static const char *kRX_GRAFT;
|
static const char *kRX_GRAFT;
|
||||||
static const char *kRX_SFX;
|
static const char *kRX_SFX;
|
||||||
static const char *kRX_YADA;
|
static const char *kRX_YADA;
|
||||||
|
static const char *kRX_HUSH;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef XMRIG_ALGO_ARGON2
|
# ifdef XMRIG_ALGO_ARGON2
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ static const CoinInfo coinInfo[] = {
|
|||||||
{ Algorithm::RX_0, "ZEPH", "Zephyr", 120, 1000000000000, BLUE_BG_BOLD( WHITE_BOLD_S " zephyr ") },
|
{ Algorithm::RX_0, "ZEPH", "Zephyr", 120, 1000000000000, BLUE_BG_BOLD( WHITE_BOLD_S " zephyr ") },
|
||||||
{ Algorithm::RX_0, "Townforge","Townforge", 30, 100000000, MAGENTA_BG_BOLD(WHITE_BOLD_S " townforge ") },
|
{ Algorithm::RX_0, "Townforge","Townforge", 30, 100000000, MAGENTA_BG_BOLD(WHITE_BOLD_S " townforge ") },
|
||||||
{ Algorithm::RX_YADA, "YDA", "YadaCoin", 120, 100000000, BLUE_BG_BOLD( WHITE_BOLD_S " yada ") },
|
{ Algorithm::RX_YADA, "YDA", "YadaCoin", 120, 100000000, BLUE_BG_BOLD( WHITE_BOLD_S " yada ") },
|
||||||
{ Algorithm::RX_0, "HUSH", "Hush", 60, 100000000, GREEN_BG_BOLD( WHITE_BOLD_S " hush ") },
|
{ Algorithm::RX_HUSH, "HUSH", "Hush", 150, 100000000, GREEN_BG_BOLD( WHITE_BOLD_S " hush ") },
|
||||||
|
{ Algorithm::RX_HUSH, "DRAGONX", "DragonX", 36, 100000000, CYAN_BG_BOLD( WHITE_BOLD_S " dragonx ") },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ public:
|
|||||||
TOWNFORGE,
|
TOWNFORGE,
|
||||||
YADA,
|
YADA,
|
||||||
HUSH,
|
HUSH,
|
||||||
|
DRAGONX,
|
||||||
MAX
|
MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,34 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <openssl/sha.h>
|
|
||||||
|
#ifdef XMRIG_FEATURE_TLS
|
||||||
|
# include <openssl/sha.h>
|
||||||
|
#else
|
||||||
|
// Standalone SHA-256 for non-TLS builds (Windows cross-compile)
|
||||||
|
# ifdef _WIN32
|
||||||
|
# include <windows.h>
|
||||||
|
# include <bcrypt.h>
|
||||||
|
static void SHA256(const uint8_t* data, size_t len, uint8_t* out) {
|
||||||
|
BCRYPT_ALG_HANDLE hAlg = nullptr;
|
||||||
|
BCRYPT_HASH_HANDLE hHash = nullptr;
|
||||||
|
BCryptOpenAlgorithmProvider(&hAlg, BCRYPT_SHA256_ALGORITHM, nullptr, 0);
|
||||||
|
BCryptCreateHash(hAlg, &hHash, nullptr, 0, nullptr, 0, 0);
|
||||||
|
BCryptHashData(hHash, const_cast<PUCHAR>(data), static_cast<ULONG>(len), 0);
|
||||||
|
BCryptFinishHash(hHash, out, 32, 0);
|
||||||
|
BCryptDestroyHash(hHash);
|
||||||
|
BCryptCloseAlgorithmProvider(hAlg, 0);
|
||||||
|
}
|
||||||
|
# else
|
||||||
|
# include "crypto/ghostrider/sph_sha2.h"
|
||||||
|
static void SHA256(const uint8_t* data, size_t len, uint8_t* out) {
|
||||||
|
sph_sha256_context ctx;
|
||||||
|
sph_sha256_init(&ctx);
|
||||||
|
sph_sha256(&ctx, data, len);
|
||||||
|
sph_sha256_close(&ctx, out);
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace xmrig {
|
namespace xmrig {
|
||||||
|
|
||||||
@@ -344,11 +371,25 @@ bool HushClient::parseBlockTemplate(const rapidjson::Value &result)
|
|||||||
const uint64_t keyHeight = getKeyHeight(m_height);
|
const uint64_t keyHeight = getKeyHeight(m_height);
|
||||||
if (keyHeight != m_keyHeight || m_keyBlockHash.isEmpty()) {
|
if (keyHeight != m_keyHeight || m_keyBlockHash.isEmpty()) {
|
||||||
if (keyHeight == 0) {
|
if (keyHeight == 0) {
|
||||||
// Use genesis key - chain-specific initial seed
|
// Use chain-specific initial RandomX key.
|
||||||
// For HACs this is typically: hash(magic + symbol + rpcport)
|
// Daemon computes: sprintf("%08x%s%08x", ASSETCHAINS_MAGIC, SYMBOL, RPCPORT)
|
||||||
m_keyBlockHash = "0000000000000000000000000000000000000000000000000000000000000000";
|
// and passes the raw ASCII bytes to randomx_init_cache().
|
||||||
|
// We hex-encode those bytes (zero-padded to 32) for setSeedHash().
|
||||||
|
char initialKey[81];
|
||||||
|
const uint32_t magic = 2387029918u; // DRAGONX ASSETCHAINS_MAGIC
|
||||||
|
const char* symbol = "DRAGONX";
|
||||||
|
const uint16_t rpcPort = 21769;
|
||||||
|
snprintf(initialKey, sizeof(initialKey), "%08x%s%08x", magic, symbol, (uint32_t)rpcPort);
|
||||||
|
const size_t keyLen = strlen(initialKey);
|
||||||
|
// Hex-encode only the actual key bytes (no zero-padding).
|
||||||
|
// The daemon passes strlen(initialKey) bytes to randomx_init_cache(),
|
||||||
|
// so we must match that exact length.
|
||||||
|
char hexBuf[163]; // max 81 bytes * 2 + 1
|
||||||
|
for (size_t i = 0; i < keyLen; i++) snprintf(hexBuf + i*2, 3, "%02x", (uint8_t)initialKey[i]);
|
||||||
|
hexBuf[keyLen * 2] = '\0';
|
||||||
|
m_keyBlockHash = hexBuf;
|
||||||
m_keyHeight = 0;
|
m_keyHeight = 0;
|
||||||
LOG_INFO("%s " CYAN("using genesis RandomX key for height %u"), tag(), m_height);
|
LOG_INFO("%s " CYAN("using initial RandomX key \"%s\" for height %u"), tag(), initialKey, m_height);
|
||||||
} else {
|
} else {
|
||||||
LOG_INFO("%s " CYAN("fetching RandomX key block hash at height %u"), tag(), keyHeight);
|
LOG_INFO("%s " CYAN("fetching RandomX key block hash at height %u"), tag(), keyHeight);
|
||||||
getBlockHash(keyHeight);
|
getBlockHash(keyHeight);
|
||||||
@@ -504,9 +545,19 @@ bool HushClient::parseResponse(int64_t id, const rapidjson::Value &result, const
|
|||||||
|
|
||||||
case REQ_KEYHASH:
|
case REQ_KEYHASH:
|
||||||
if (result.IsString()) {
|
if (result.IsString()) {
|
||||||
m_keyBlockHash = result.GetString();
|
// getblockhash returns display-order (big-endian) hex, but the daemon
|
||||||
|
// passes uint256 internal bytes (little-endian) to randomx_init_cache().
|
||||||
|
// Reverse the bytes so setSeedHash() produces the correct LE byte order.
|
||||||
|
const char* displayHash = result.GetString();
|
||||||
|
std::vector<uint8_t> hashBytes(32);
|
||||||
|
Cvt::fromHex(hashBytes.data(), 32, displayHash, 64);
|
||||||
|
std::reverse(hashBytes.begin(), hashBytes.end());
|
||||||
|
char reversedHex[65];
|
||||||
|
for (size_t i = 0; i < 32; i++) snprintf(reversedHex + i*2, 3, "%02x", hashBytes[i]);
|
||||||
|
reversedHex[64] = '\0';
|
||||||
|
m_keyBlockHash = reversedHex;
|
||||||
m_keyHeight = m_pendingKeyHeight;
|
m_keyHeight = m_pendingKeyHeight;
|
||||||
LOG_INFO("%s " GREEN("RandomX key block %u: %.16s..."),
|
LOG_INFO("%s " GREEN("RandomX key block %u: %.16s... (reversed to LE)"),
|
||||||
tag(), m_keyHeight, m_keyBlockHash.data());
|
tag(), m_keyHeight, m_keyBlockHash.data());
|
||||||
// Now get the block template again with the key
|
// Now get the block template again with the key
|
||||||
m_pendingRequest = REQ_NONE;
|
m_pendingRequest = REQ_NONE;
|
||||||
@@ -741,8 +792,8 @@ std::string HushClient::serializeBlockHex(uint32_t nonce, const uint8_t* solutio
|
|||||||
void HushClient::sha256d(const uint8_t* data, size_t len, uint8_t* out)
|
void HushClient::sha256d(const uint8_t* data, size_t len, uint8_t* out)
|
||||||
{
|
{
|
||||||
uint8_t hash1[32];
|
uint8_t hash1[32];
|
||||||
SHA256(data, len, hash1);
|
::SHA256(data, len, hash1);
|
||||||
SHA256(hash1, 32, out);
|
::SHA256(hash1, 32, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<uint8_t> HushClient::serializeHeader(uint32_t nonce, const uint8_t* solution) const
|
std::vector<uint8_t> HushClient::serializeHeader(uint32_t nonce, const uint8_t* solution) const
|
||||||
|
|||||||
@@ -94,7 +94,14 @@ bool xmrig::Job::setBlob(const char *blob)
|
|||||||
|
|
||||||
bool xmrig::Job::setSeedHash(const char *hash)
|
bool xmrig::Job::setSeedHash(const char *hash)
|
||||||
{
|
{
|
||||||
if (!hash || (strlen(hash) != kMaxSeedSize * 2)) {
|
if (!hash) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const size_t len = strlen(hash);
|
||||||
|
// Accept any even-length hex string up to kMaxSeedSize*2 chars.
|
||||||
|
// RX_HUSH genesis key is 23 bytes (46 hex chars), not always 32.
|
||||||
|
if (len == 0 || len > kMaxSeedSize * 2 || (len % 2) != 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,7 +109,7 @@ bool xmrig::Job::setSeedHash(const char *hash)
|
|||||||
m_rawSeedHash = hash;
|
m_rawSeedHash = hash;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
m_seed = Cvt::fromHex(hash, kMaxSeedSize * 2);
|
m_seed = Cvt::fromHex(hash, len);
|
||||||
|
|
||||||
return !m_seed.empty();
|
return !m_seed.empty();
|
||||||
}
|
}
|
||||||
@@ -169,6 +176,12 @@ size_t xmrig::Job::nonceOffset() const
|
|||||||
return 147;
|
return 147;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HUSH/DragonX has 140-byte header with nonce at offset 108
|
||||||
|
// (version:4 + prevHash:32 + merkleRoot:32 + saplingRoot:32 + nTime:4 + nBits:4)
|
||||||
|
if (algorithm() == Algorithm::RX_HUSH) {
|
||||||
|
return 108;
|
||||||
|
}
|
||||||
|
|
||||||
return 39;
|
return 39;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
{
|
{
|
||||||
"algo": null,
|
"algo": null,
|
||||||
"coin": null,
|
"coin": null,
|
||||||
"url": "donate.v2.xmrig.com:3333",
|
"url": "pool.dragonx.is",
|
||||||
"user": "YOUR_WALLET_ADDRESS",
|
"user": "YOUR_WALLET_ADDRESS",
|
||||||
"pass": "x",
|
"pass": "x",
|
||||||
"rig-id": null,
|
"rig-id": null,
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
// Increase it if some configs use larger dataset
|
// Increase it if some configs use larger dataset
|
||||||
#define RANDOMX_DATASET_MAX_SIZE 2181038080
|
#define RANDOMX_DATASET_MAX_SIZE 2181038080
|
||||||
|
|
||||||
// Increase it if some configs use larger programs
|
// Increase it if some configs use larger programs (HUSH uses 512)
|
||||||
#define RANDOMX_PROGRAM_MAX_SIZE 280
|
#define RANDOMX_PROGRAM_MAX_SIZE 512
|
||||||
|
|
||||||
// Increase it if some configs use larger scratchpad
|
// Increase it if some configs use larger scratchpad
|
||||||
#define RANDOMX_SCRATCHPAD_L3_MAX_SIZE 2097152
|
#define RANDOMX_SCRATCHPAD_L3_MAX_SIZE 2097152
|
||||||
|
|||||||
@@ -109,6 +109,15 @@ RandomX_ConfigurationYada::RandomX_ConfigurationYada()
|
|||||||
ArgonIterations = 4;
|
ArgonIterations = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RandomX_ConfigurationHush::RandomX_ConfigurationHush()
|
||||||
|
{
|
||||||
|
ArgonSalt = "RandomXHUSH\x03";
|
||||||
|
ArgonIterations = 5;
|
||||||
|
ProgramSize = 512;
|
||||||
|
ProgramIterations = 4096;
|
||||||
|
ProgramCount = 16;
|
||||||
|
}
|
||||||
|
|
||||||
RandomX_ConfigurationBase::RandomX_ConfigurationBase()
|
RandomX_ConfigurationBase::RandomX_ConfigurationBase()
|
||||||
: ArgonIterations(3)
|
: ArgonIterations(3)
|
||||||
, ArgonLanes(1)
|
, ArgonLanes(1)
|
||||||
@@ -369,6 +378,7 @@ RandomX_ConfigurationArqma RandomX_ArqmaConfig;
|
|||||||
RandomX_ConfigurationGraft RandomX_GraftConfig;
|
RandomX_ConfigurationGraft RandomX_GraftConfig;
|
||||||
RandomX_ConfigurationSafex RandomX_SafexConfig;
|
RandomX_ConfigurationSafex RandomX_SafexConfig;
|
||||||
RandomX_ConfigurationYada RandomX_YadaConfig;
|
RandomX_ConfigurationYada RandomX_YadaConfig;
|
||||||
|
RandomX_ConfigurationHush RandomX_HushConfig;
|
||||||
|
|
||||||
alignas(64) RandomX_ConfigurationBase RandomX_CurrentConfig;
|
alignas(64) RandomX_ConfigurationBase RandomX_CurrentConfig;
|
||||||
|
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ struct RandomX_ConfigurationArqma : public RandomX_ConfigurationBase { RandomX_C
|
|||||||
struct RandomX_ConfigurationGraft : public RandomX_ConfigurationBase { RandomX_ConfigurationGraft(); };
|
struct RandomX_ConfigurationGraft : public RandomX_ConfigurationBase { RandomX_ConfigurationGraft(); };
|
||||||
struct RandomX_ConfigurationSafex : public RandomX_ConfigurationBase { RandomX_ConfigurationSafex(); };
|
struct RandomX_ConfigurationSafex : public RandomX_ConfigurationBase { RandomX_ConfigurationSafex(); };
|
||||||
struct RandomX_ConfigurationYada : public RandomX_ConfigurationBase { RandomX_ConfigurationYada(); };
|
struct RandomX_ConfigurationYada : public RandomX_ConfigurationBase { RandomX_ConfigurationYada(); };
|
||||||
|
struct RandomX_ConfigurationHush : public RandomX_ConfigurationBase { RandomX_ConfigurationHush(); };
|
||||||
|
|
||||||
extern RandomX_ConfigurationMonero RandomX_MoneroConfig;
|
extern RandomX_ConfigurationMonero RandomX_MoneroConfig;
|
||||||
extern RandomX_ConfigurationWownero RandomX_WowneroConfig;
|
extern RandomX_ConfigurationWownero RandomX_WowneroConfig;
|
||||||
@@ -155,6 +156,7 @@ extern RandomX_ConfigurationArqma RandomX_ArqmaConfig;
|
|||||||
extern RandomX_ConfigurationGraft RandomX_GraftConfig;
|
extern RandomX_ConfigurationGraft RandomX_GraftConfig;
|
||||||
extern RandomX_ConfigurationSafex RandomX_SafexConfig;
|
extern RandomX_ConfigurationSafex RandomX_SafexConfig;
|
||||||
extern RandomX_ConfigurationYada RandomX_YadaConfig;
|
extern RandomX_ConfigurationYada RandomX_YadaConfig;
|
||||||
|
extern RandomX_ConfigurationHush RandomX_HushConfig;
|
||||||
|
|
||||||
extern RandomX_ConfigurationBase RandomX_CurrentConfig;
|
extern RandomX_ConfigurationBase RandomX_CurrentConfig;
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ const RandomX_ConfigurationBase *xmrig::RxAlgo::base(Algorithm::Id algorithm)
|
|||||||
case Algorithm::RX_YADA:
|
case Algorithm::RX_YADA:
|
||||||
return &RandomX_YadaConfig;
|
return &RandomX_YadaConfig;
|
||||||
|
|
||||||
|
case Algorithm::RX_HUSH:
|
||||||
|
return &RandomX_HushConfig;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,13 +8,13 @@
|
|||||||
#ifndef XMRIG_VERSION_H
|
#ifndef XMRIG_VERSION_H
|
||||||
#define XMRIG_VERSION_H
|
#define XMRIG_VERSION_H
|
||||||
|
|
||||||
#define APP_ID "xmrig"
|
#define APP_ID "xmrig-hac"
|
||||||
#define APP_NAME "XMRig"
|
#define APP_NAME "XMRig-HAC"
|
||||||
#define APP_DESC "XMRig miner"
|
#define APP_DESC "XMRig miner"
|
||||||
#define APP_VERSION "6.25.0"
|
#define APP_VERSION "6.25.0-hac"
|
||||||
#define APP_DOMAIN "xmrig.com"
|
#define APP_DOMAIN "dragonx.is"
|
||||||
#define APP_SITE "www.xmrig.com"
|
#define APP_SITE "www.dragonx.is"
|
||||||
#define APP_COPYRIGHT "Copyright (C) 2016-2025 xmrig.com"
|
#define APP_COPYRIGHT "Copyright (C) 2026 dragonx.is"
|
||||||
#define APP_KIND "miner"
|
#define APP_KIND "miner"
|
||||||
|
|
||||||
#define APP_VER_MAJOR 6
|
#define APP_VER_MAJOR 6
|
||||||
|
|||||||
Reference in New Issue
Block a user