Commit Graph

86 Commits

Author SHA1 Message Date
84e7d1453c drg-xmrig: fork of xmrig-hac with unified pow-hash share model
Port miner113's RX_DRAGONX mining model into the RX_HUSH path so DragonX
mining is identical in solo and pool mode:

- CpuWorker: filter EVERY hash on SHA256D(header + RandomX solution) (the
  block-bearing pow-hash) instead of the RandomX hash; submit the full
  32-byte nonce + rx_hash. Removes the fragile pool-mode dual-check that
  was dropping ~half of block candidates.
- Job: 32-byte nonce for RX_HUSH in pool mode too (was solo-only).
- JobResult: populate nonceBytes() on the standard 4-byte path.
- Client: submit a variable-width nonce (32-byte for DragonX) with a
  dynamically laid-out temp buffer.

Effect: shares and blocks use one metric, so the pool receives every block
candidate (no under-submission gap) and the hashrate is block-relevant.

Rebrand to drg-xmrig (version.h, build.sh, package.json, README) + add
PROTOCOL.md wire spec.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 16:49:22 -05:00
f9d6bcad5e extranonce 2026-05-20 11:14:46 -05:00
7d22bc2bb5 Add dual SHA256D block check for pool mining mode
Pool sends block_target (full 256-bit network target) with each job.
Miner checks SHA256D(header + RandomX solution) for every hash against
the block target, enabling block detection at full hashrate instead of
only on submitted shares.
2026-03-09 23:52:34 -05:00
95d3ff2c4a Fixing miner issues
- Switch from full-block to header-only (140-byte) RandomX input
- Add 32-byte SoloNonce system for solo mining mode
- Compute proper difficulty target from compact bits field
- Add SHA256D dual-hash PoW check in CpuWorker for solo mining
- Raise RandomX dataset/scratchpad limits to 4GB/4MB
- Use standard RandomX share filtering in pool (stratum) mode
2026-03-05 06:00:55 -06:00
SChernykh
08d1b6583c Linux: added support for transparent huge pages 2025-12-11 11:23:18 +01:00
SChernykh
1cdab71613 Always reset nonce on RandomX dataset change
Also never get a new job when mining is paused
2024-08-14 16:41:03 +02:00
SChernykh
8063524252 Fixed broken RandomX light mode mining
RandomX VMs didn't get updated properly in light mode.
2023-01-21 16:02:47 +01:00
SChernykh
5e680fa82a RandomX: added MSR mod for Zen 4
+0.8% faster on Ryzen 9 7950X
2022-10-01 18:33:04 +02:00
SChernykh
637c7c9209 Removed deprecated AstroBWTv1 and v2 2022-06-12 11:47:36 +02:00
SChernykh
0d0ff4fe71 Removed old AstroBWT algorithm
It's not used anywhere now.
2022-04-15 10:59:31 +02:00
SChernykh
a260502f78 Dero HE fork support (astrobwt/v2 algorithm) 2022-03-05 00:31:18 +01:00
SChernykh
3cdfe6b30e Fixed unaligned memory accesses 2022-01-26 17:18:18 +01:00
SChernykh
1105f1130c RandomX: don't restart mining threads when the seed changes
It helps to not loose huge pages when the seed changes (every 2048 blocks, ~2.8 days).
2021-12-25 13:39:15 +01:00
SChernykh
e45b4fb916 GhostRidere: set correct priority for helper threads
Fixes #2825
2021-12-20 12:05:17 +01:00
SChernykh
9b8be354df Added VAES support for Cryptonight variants 2021-11-28 20:49:54 +01:00
SChernykh
fa9b5c7b6e GhostRider algorithm (Raptoreum) support 2021-11-23 08:14:01 +01:00
SChernykh
a7bf92068d Fix: use cn-heavy optimization only for Vermeer CPUs
Fixes #2680
2021-11-11 07:57:05 +01:00
Tony Butler
06feb6eabd Fix compile warning when WITH_RANDOMX=OFF 2021-09-19 18:12:46 -06:00
XMRig
22f68bda8d Code cleanup based on Clang-Tidy. 2021-08-25 18:45:15 +07:00
SChernykh
872ff363dd Fix: don't send miner signature during regular mining 2021-07-01 19:31:55 +02:00
SChernykh
7ef8a295e5 Update signing algorithm 2021-06-21 23:49:13 +02:00
SChernykh
abba1abc10 Added support for solo mining with miner signatures (Wownero) 2021-06-16 18:07:36 +02:00
SChernykh
b3d14f51b9 Added support for Uplexa (cn/upx2 algorithm) 2021-04-17 14:53:42 +02:00
SChernykh
23d2826dc4 Fix GCC compilation 2021-03-04 10:45:39 +01:00
SChernykh
42fe175a7c Fix crash in cn-heavy on Zen3 with manual thread count 2021-03-04 10:02:35 +01:00
SChernykh
83ccef753a Fixed crash when GPU mining cn-heavy on Zen3 system 2021-02-18 14:49:37 +01:00
SChernykh
3e9755c8c8 Optimized cn-heavy for Zen3
- Uses scratchpad interleaving to access only the closest L3 slice from each CPU core.
- Also activates MSR mod for cn-heavy because CPU prefetchers get confused with interleaving
- 7-8% speedup on Zen3
2021-02-07 22:05:11 +01:00
XMRig
9a120b979b Added GpuWorker class. 2020-12-04 22:25:28 +07:00
XMRig
e3e3770382 Fixed, benchmark validation on NUMA hardware produced incorrect results in some conditions. 2020-11-25 09:35:11 +07:00
XMRig
de76bd9f11 Use static RandomX seed for benchmark. 2020-11-20 08:15:04 +07:00
XMRig
6221652024 Submit top benchmark diff. 2020-11-17 07:33:20 +07:00
XMRig
bdbc470910 Benchmark refactoring, zero delay submit and unified HTTP layer. 2020-11-16 16:22:34 +07:00
XMRig
e45bfa1ace Removed non thread safe access to config. 2020-11-16 07:58:28 +07:00
SChernykh
76c406ce63 Make single thread bench cheat-resistant
Each hash is dependent on the previous hash to make multi-threaded cheating impossible.
2020-11-15 20:38:27 +01:00
XMRig
14892cf040 Removed m_bench field from Job class. 2020-10-16 20:29:11 +07:00
XMRig
ebaf8ccec4 Added CMake option WITH_BENCHMARK. 2020-10-16 02:18:07 +07:00
SChernykh
a046437d5f Added benchmark and stress test
Easy to use and zero configuration embedded benchmark/stress test.
2020-10-14 19:45:05 +02:00
xmrig
0656390ce1 Merge pull request #1890 from SChernykh/dev
Added argon2/chukwav2 algorithm
2020-10-13 14:54:34 +07:00
SChernykh
f8a0aa06c8 Added argon2/chukwav2 algorithm
New Turtlecoin algorithm. Source: https://github.com/turtlecoin/turtlecoin/blob/development/src/crypto/hash.h#L57
2020-10-12 08:26:57 +02:00
cohcho
e29ffe7668 CPU: use raw counter 2020-10-10 13:28:14 +00:00
SChernykh
2af99c3d83 More precise hashrate calculation
- Use only steady timestamp counters to guarantee correctness
- CPU backend: directly measure total hashrate using raw hash counters from each thread; update data more often on ARM CPUs because they're slower
- GPU backends: directly measure total hashrate too, but use interpolator with 4 second lag to fix variance from batches of hashes

Total hashrate is now measured directly (realtime for CPU, 4 seconds lag for GPU), so it might differ a bit from the sum of all thread hashrates because data points are taken at different moments in time.

Overhead is reduced a lot since it doesn't have to go through all threads to calculate max total hashrate on every timer tick (2 times a second).
2020-10-10 11:18:01 +02:00
cohcho
e2184317af RandomX: align args
tempHash/output must be 16-byte aligned for randomx_calculate_hash{,_first,_next}
2020-10-07 14:47:18 +00:00
SChernykh
3d78f30171 Try to allocate scratchpad from dataset's 1 GB huge pages, if normal huge pages are not available 2020-07-31 13:37:22 +02:00
SChernykh
2ab164caf2 Conceal (CCX) support 2020-06-07 01:01:45 +02:00
SChernykh
f24da62db0 KawPow WIP 2020-05-27 16:19:57 +02:00
SChernykh
c43a848415 Fix code style 2020-04-09 14:31:42 +02:00
SChernykh
fe96036607 RandomX JIT refactoring
- Smaller memory footprint
- A bit faster overall
2020-04-09 14:24:54 +02:00
SChernykh
5449dfbc91 Use node number instead of affinity 2020-04-07 18:46:22 +02:00
SChernykh
e5d43089df Pooled allocation of RandomX VMs
+0.5% speedup on Zen2 when the whole L3 cache is used (16 threads on 3700X/3800X, 32 threads on 3950X).
2020-04-07 18:31:35 +02:00
XMRig
2b80ccd135 Added command line option --astrobwt-avx2 2020-03-12 00:04:07 +07:00