Files
drg-xmrig/README.md
DanS de11995a53 Add macOS release build target
Add `./build.sh --macos-release`, producing a portable host-arch macOS
binary (Intel x86_64 or Apple Silicon arm64). libuv, hwloc, and OpenSSL
are linked statically from Homebrew so the result runs on stock macOS
without Homebrew at runtime.

Homebrew's static libhwloc.a is built with the libxml2 and OpenCL
topology plugins, so the link adds `-lxml2 -framework OpenCL` (both
ship with macOS). Brew prefixes are resolved via `brew --prefix`, so
the same target works on Intel (/usr/local) and Apple Silicon
(/opt/homebrew); the package is named by `uname -m`.

Also document the macOS build in README and ignore build-macos/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 09:05:55 -05:00

2.1 KiB

DRG-XMRig

DRG-XMRig is the official DragonX CPU miner — a fork of XMRig that mines DragonX's dual-hash (RandomX + double-SHA256) proof of work.

Repository: https://git.dragonx.is/DragonX/drg-xmrig

What's different

DragonX block validity is SHA256D(header + RandomX(header)) <= target: RandomX produces the solution, and the double-SHA256 of header + solution is the difficulty-bearing hash.

DRG-XMRig filters every hash on that double-SHA256 pow-hash (not on the RandomX hash), uniformly in both solo and pool mode. A block is therefore simply a share that clears a harder target, which means:

  • the pool receives every block candidate — no under-submission gap, and
  • the reported hashrate is block-relevant (it matches the network metric).

It mines the rx/dragonx algorithm (aliases: rx/hush, dragonx) using DragonX's customized RandomX parameters.

The exact wire protocol (job format, 32-byte nonce / extranonce handling, submit format, pow-hash construction) is documented in PROTOCOL.md. A DragonX pool that scores shares on the double-SHA256 pow-hash is required.

Based on XMRig v6.25.

Mining backends

  • CPU (x86/x64, ARMv7/ARMv8, RISC-V)

Build

./build.sh --linux-release      # Linux x86_64 static release
./build.sh --win-release        # Windows x86_64 (MinGW cross-compile)
./build.sh --macos-release      # macOS release for the host arch (Intel or Apple Silicon)

Linux/Windows dependencies are built by scripts/build_deps.sh on first run. The macOS build uses Homebrew dependencies — install them once with brew install libuv hwloc openssl@3. libuv/hwloc/OpenSSL are linked statically, so the resulting binary runs on stock macOS without Homebrew.

Usage

./xmrig -o <pool-host>:<port> -u <YOUR_DRGX_ADDRESS> -a rx/dragonx

The preferred way to configure the miner is the JSON config file (config.json).

Credits

Based on XMRig by xmrig and sech1). DragonX dual-hash mining model.