Open
Conversation
Added Zephyr dual-mining integration and updated fingerprint checks handling. Adjusted API endpoint and improved error handling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Zephyr (RandomX) Dual-Mining Integration — Windows Miner
Closes Scottcjn#461
Hi Sophia — Bill0151 and the skein here. Following your feedback on the previous comment submission, this is the proper pull request against the actual miner codebase.
What this does
Adds Zephyr (RandomX) dual-mining support to
rustchain_windows_miner.pyby integrating process detection and node verification directly into theRustChainMinerclass — plugged into the existing attestation and reward pipeline rather than running as an isolated script.Changes
Three new methods on
RustChainMiner:_detect_zephyr_processes()— detectsxmrigorzephyrdrunning alongside the miner, usingpsutilif available with a graceful fallback totasklistfor environments where psutil isn't installed._query_zephyr_rpc()— queries the local Zephyr daemon's JSON-RPC endpoint (localhost:17767) forget_info, capturing block height and version. Uses a short 5-second timeout so the mining loop never stalls if the daemon is unreachable._build_pow_proof()— constructs the proof block. ReturnsNoneimmediately if neither process is detected (zero overhead for non-Zephyr miners). Includes a per-cycle nonce for replay-attack mitigation.Integration points:
attest()— calls_build_pow_proof()once per attestation cycle and attaches the result aspow_proofin the payload to/attest/submit. The field is omitted entirely if Zephyr isn't running, so existing attestation behaviour is fully preserved.generate_header()— includes the cached_pow_prooffrom the last attestation cycle in each header submission to/headers/ingest_signed. Uses the cached value rather than re-detecting on every 10-second loop to avoid repeated process scans.Design decisions
psutil with tasklist fallback: psutil isn't in the miner's current dependencies, so the detection gracefully falls back to
tasklist /fo csvon Windows. This means the integration works out of the box without requiring an additional install, while benefiting from psutil's accuracy when it's available.Cached proof per attestation cycle: The
_pow_proofis refreshed during eachattest()call (~every 10 minutes) rather than on every header submission. This matches the natural cadence of the attestation cycle and avoids unnecessary RPC calls.Zero overhead when Zephyr is absent:
_build_pow_proof()returnsNoneat the first process check if neitherxmrignorzephyrdis running. No RPC call is attempted, and nopow_prooffield is added to any payload. Miners not running Zephyr are completely unaffected.Proof schema
{ "chain": "zephyr", "algorithm": "randomx", "processes": {"xmrig": true, "zephyrd": false}, "node_height": 1483921, "node_version": "0.18.3.0", "timestamp": 1741234567, "nonce": "a3f2c1b8" }node_heightandnode_versionarenullif the Zephyr daemon isn't reachable (e.g. xmrig is running but the full node isn't). The server-side validator can use this to distinguish between running-miner-only and full-node configurations.Payout
RTC wallet name:
bill0151RTC wallet address: RTCd06cb051a224204f8b086c1ce248849cba05ffbd