DanS
2232868d9f
stratum: RandomX pool mining support + reference miner (stratummine)
...
The stratum server was hardcoded for legacy Equihash (1347-byte solution,
sol.begin()+3 offset, CheckEquihashSolution) and was off-by-default with a
"do not use on RandomX" warning. DragonX is RandomX, so external pool mining
was impossible. This wires RandomX end-to-end.
Server (stratum.cpp), branched on ASSETCHAINS_ALGO == ASSETCHAINS_RANDOMX:
* GetWorkUnit sets StratumWork.nHeight and, for RandomX, sends the per-height
RandomX key via a new mining.set_randomx_key message (a miner cannot derive
it without the chain). The legacy mining.notify format is unchanged.
* SubmitBlock/stratum_mining_submit accept a 32-byte solution (== the RandomX
hash, used as nSolution verbatim) and validate it with CheckRandomXSolution
instead of CheckEquihashSolution. Target check (GetHash() < target) and the
nNonce = extranonce1||extranonce2 assembly are shared with the equihash path.
* -stratumtarget=<hex> overrides the pool share target (default diff-1); lets a
solo/low-difficulty test miner accept easy shares.
* GetWorkUnit's IsInitialBlockDownload guard is bypassed under -testnode=1 so an
isolated low-work test chain can serve work.
Reference miner: `stratummine "host" port ("address" timeout)` RPC (rpc/mining.cpp,
POSIX-only). A minimal stratum client that subscribes/authorizes, receives work +
the RandomX key, varies nNonce, hashes with RandomX via GetRandomXInput (byte-
identical to CheckRandomXSolution) and submits a 32-byte solution. Off-the-shelf
Equihash/Monero miners can't speak DragonX's 256-bit-nNonce Zcash header, so this
is the reference implementation. Added to the rpc client arg-conversion table.
Validated: loopback (chain 0->4, accepted every time, verifychain=true) AND a real
2-box LAN run (Linux miner -> Mac stratum server, 3 blocks accepted, verifychain=true).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-08-27 20:24:13 -05:00
..
2026-08-27 15:19:22 -05:00
2026-03-19 09:30:50 -05:00
2026-08-27 11:35:38 -05:00
2026-07-06 01:57:18 -05:00
2026-08-23 06:39:38 +02:00
2026-07-08 05:48:39 +02:00
2026-03-19 09:30:50 -05:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-03-03 17:28:49 -06:00
2023-12-04 05:10:48 +00:00
2026-08-27 20:24:13 -05:00
2024-03-15 15:16:04 -04:00
2024-10-01 10:49:13 -04:00
2020-10-21 07:28:10 -04:00
2024-02-27 23:59:59 +01:00
2025-12-30 16:38:42 -05:00
2024-02-27 23:59:59 +01:00
2020-10-21 07:28:10 -04:00
2024-02-27 23:59:59 +01:00
2026-08-27 16:28:46 -05:00
2024-02-27 23:59:59 +01:00
2026-03-04 18:42:42 -06:00
2024-02-27 23:59:59 +01:00
2023-01-06 15:23:22 +00:00
2024-02-27 23:59:59 +01:00
2026-08-27 16:51:16 -05:00
2026-08-27 16:51:16 -05:00
2026-07-21 14:13:31 -05:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-08-27 15:55:00 -05:00
2026-08-27 15:55:00 -05:00
2026-08-25 19:18:30 +02:00
2026-08-25 19:18:30 +02:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2021-01-23 22:18:57 -05:00
2026-07-07 06:35:46 +02:00
2020-10-21 07:28:10 -04:00
2020-12-16 08:30:32 -05:00
2026-03-04 18:42:42 -06:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-08-21 19:15:56 -05:00
2026-08-27 12:24:04 -05:00
2026-08-25 18:36:03 -05:00
2026-03-04 18:42:42 -06:00
2024-02-27 23:59:59 +01:00
2026-08-25 18:36:03 -05:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2018-12-31 21:41:05 -11:00
2024-02-27 23:59:59 +01:00
2026-08-21 19:15:56 -05:00
2026-08-25 21:52:51 +02:00
2024-02-27 23:59:59 +01:00
2026-08-27 15:02:01 -05:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-08-27 15:55:00 -05:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-08-27 11:35:38 -05:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-01-01 15:24:57 -05:00
2024-02-27 23:59:59 +01:00
2026-08-27 15:55:00 -05:00
2024-02-27 23:59:59 +01:00
2025-08-08 21:58:39 -04:00
2026-03-04 18:42:42 -06:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-01-01 15:24:57 -05:00
2024-02-27 23:59:59 +01:00
2026-08-27 15:55:00 -05:00
2026-08-27 15:02:01 -05:00
2026-08-27 15:02:01 -05:00
2026-08-27 13:20:51 -05:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-08-27 15:19:22 -05:00
2024-03-15 13:33:18 -04:00
2024-03-15 13:33:18 -04:00
2024-02-27 23:59:59 +01:00
2026-08-27 15:02:01 -05:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-08-27 20:24:13 -05:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-07-06 01:57:18 -05:00
2026-08-23 06:23:09 +02:00
2026-08-23 06:23:09 +02:00
2024-02-27 23:59:59 +01:00
2026-08-27 14:14:41 -05:00
2026-07-14 11:21:28 -05:00
2026-08-27 03:56:23 -05:00
2026-07-06 01:57:18 -05:00
2024-02-27 23:59:59 +01:00
2026-06-28 16:58:31 -05:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-03-04 18:42:42 -06:00
2024-02-27 23:59:59 +01:00
2026-08-27 16:05:10 -05:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2021-08-09 17:40:35 -04:00
2026-08-27 19:08:36 -05:00
2026-08-27 15:19:22 -05:00
2026-03-05 05:22:44 -06:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-08-27 16:51:16 -05:00
2026-07-09 01:26:30 +02:00
2024-02-27 23:59:59 +01:00
2026-06-29 21:22:54 -05:00
2026-06-29 21:22:54 -05:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-04-18 06:41:25 -07:00
2024-03-15 15:14:26 -04:00
2026-03-04 18:42:42 -06:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-08-27 20:24:13 -05:00
2024-02-28 11:39:22 -05:00
2024-02-27 23:59:59 +01:00
2024-09-27 22:40:46 +02:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-10-22 08:50:39 -04:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-03-19 09:30:50 -05:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-08-27 15:19:22 -05:00
2026-07-09 06:59:25 +02:00
2026-07-09 09:01:06 +02:00
2026-07-09 09:01:06 +02:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-08-27 15:19:22 -05:00
2024-06-09 11:22:21 -04:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2026-07-08 05:48:39 +02:00
2024-02-27 23:59:59 +01:00
2026-03-04 18:42:42 -06:00
2026-03-04 18:42:42 -06:00
2024-02-27 23:59:59 +01:00