Files
dragonx/src
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
..
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01: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
2024-02-27 23:59:59 +01:00
2020-10-21 07:28:10 -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
2023-01-06 15:23:22 +00: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
lol
2021-01-23 22:18:57 -05:00
2020-10-21 07:28:10 -04:00
yep
2020-12-16 08:30:32 -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-21 19:15:56 -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
2018-12-31 21:41:05 -11:00
2024-02-27 23:59:59 +01:00
2026-08-25 21:52:51 +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
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
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-01-01 15:24:57 -05:00
2024-02-27 23:59:59 +01:00
2024-02-27 23:59:59 +01:00
2025-08-08 21:58:39 -04: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
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
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
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
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
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
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