Add rx/mars algorithm: RandomX on Bitcoin-style 80-byte headers#3803
Open
novalis78 wants to merge 2 commits into
Open
Add rx/mars algorithm: RandomX on Bitcoin-style 80-byte headers#3803novalis78 wants to merge 2 commits into
novalis78 wants to merge 2 commits into
Conversation
Marscoin uses a Bitcoin-derived consensus with an 80-byte block header (version + prev_hash + merkle_root + timestamp + bits + nonce) where the nonce sits at offset 76. This differs from CryptoNote-family coins which use variable-length blobs with the nonce at offset 39. This change adds a new algorithm variant RX_MARS that uses the same reference RandomX configuration as rx/0 but tells Job::nonceOffset() to return 76 instead of 39. Changes: - src/base/crypto/Algorithm.h: declare RX_MARS = 0x7215126d + kRX_MARS - src/base/crypto/Algorithm.cpp: register rx/mars name, aliases (randomx/mars, rx/marscoin), and include in RandomX order list - src/base/net/stratum/Job.cpp: return 76 from nonceOffset() for RX_MARS No changes to RandomX core, VM, or OpenCL backends. The RxAlgo default path (RandomX_MoneroConfig) is used. Usage: ./xmrig -a rx/mars -o stratum+tcp://pool:port -u WORKER -p x
novalis78
added a commit
to marscoin/marsforge
that referenced
this pull request
Apr 19, 2026
Updates the mining instructions to: - Explain why stock xmrig doesn't work (nonce offset mismatch) - Link to our fork at marscoin/xmrig branch marscoin-rx - Link to upstream PR xmrig/xmrig#3803 - Provide git clone + cmake + make build instructions - Update run command to use -a rx/mars Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Builds xmrig on Linux x86_64, macOS (ARM + Intel), and Windows x64 when a version tag is pushed. Publishes as a GitHub Release with SHA-256 checksums for each archive. Triggers on tag push (v*) or manual workflow dispatch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Marscoin uses a Bitcoin-derived consensus with an 80-byte block header (version + prev_hash + merkle_root + timestamp + bits + nonce) where the nonce sits at offset 76. This differs from CryptoNote-family coins which use variable-length blobs with the nonce at offset 39.
This change adds a new algorithm variant RX_MARS that uses the same reference RandomX configuration as rx/0 but tells Job::nonceOffset() to return 76 instead of 39.
Changes:
No changes to RandomX core, VM, or OpenCL backends. The RxAlgo default path (RandomX_MoneroConfig) is used.
Usage: ./xmrig -a rx/mars -o stratum+tcp://pool:port -u WORKER -p x