What changed, and why it matters
This commit updates the XMRig mining software to recognize a new Monero block format that will be used after the upcoming FCMP++ network upgrade. It adds parsing support for two new pieces of data (a 'carrot view tag' and a 'janus anchor') and allows a new output type used by that upgrade. There is no direct evidence in the commit that this fixes a security vulnerability; it appears to be a routine compatibility update so solo miners can continue working after the hardfork.
Treat as a routine hardfork-compatibility update. If deploying, verify the new parsing matches the Monero FCMP++ specification and run normal integration tests against a post-hardfork testnet or daemon. No urgent security response is indicated by the diff alone.
Security signals we found
New block-template parsing fields added for a cryptocurrency hardfork
Output-type validation expanded only for Monero version >= 18 (FCMP++)
No explicit security bug, CVE, or vulnerability description in commit or supplied references
Evidence from the diff
The patch modifies BlockTemplate parsing in XMRig. For Monero blocks with version >= 18 (the FCMP++ hardfork), it now accepts output type 0 (txout_to_carrot_v1) in addition to the existing txout_to_key (2) and txout_to_tagged_key (3) types, and it reads two new fields: a 3-byte m_carrotViewTag and a 16-byte m_janusAnchor. The .gitignore change adds .vscode and is unrelated. No validation logic is weakened in a clearly dangerous way; the change is gated to the specific new coin/version combination and the new output type is required for that case.
Changed components
src/base/tools/cryptonote/BlockTemplate.cppsrc/base/tools/cryptonote/BlockTemplate.hInspect captured patch +15 / −2
diff --git a/.gitignore b/.gitignore
index 3db117d..a537f9f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ scripts/deps
/CMakeLists.txt.user
/.idea
/src/backend/opencl/cl/cn/cryptonight_gen.cl
+.vscode
diff --git a/src/base/tools/cryptonote/BlockTemplate.cpp b/src/base/tools/cryptonote/BlockTemplate.cpp
index 310fedf..27557e0 100644
--- a/src/base/tools/cryptonote/BlockTemplate.cpp
+++ b/src/base/tools/cryptonote/BlockTemplate.cpp
@@ -241,8 +241,13 @@ bool xmrig::BlockTemplate::parse(bool hashes)
ar(m_amount);
ar(m_outputType);
- // output type must be txout_to_key (2) or txout_to_tagged_key (3)
- if ((m_outputType != 2) && (m_outputType != 3)) {
+ const bool is_fcmp_pp = (m_coin == Coin::MONERO) && (m_version.first >= 18);
+
+ // output type must be txout_to_key (2) or txout_to_tagged_key (3) for versions < 18, and txout_to_carrot_v1 (0) for version FCMP++
+ if (is_fcmp_pp && (m_outputType == 0)) {
+ // all good
+ }
+ else if ((m_outputType != 2) && (m_outputType != 3)) {
return false;
}
@@ -250,6 +255,11 @@ bool xmrig::BlockTemplate::parse(bool hashes)
ar(m_ephPublicKey, kKeySize);
+ if (is_fcmp_pp) {
+ ar(m_carrotViewTag);
+ ar(m_janusAnchor);
+ }
+
if (m_coin == Coin::ZEPHYR) {
if (m_outputType != 2) {
return false;
diff --git a/src/base/tools/cryptonote/BlockTemplate.h b/src/base/tools/cryptonote/BlockTemplate.h
index c731aad..a4e75f3 100644
--- a/src/base/tools/cryptonote/BlockTemplate.h
+++ b/src/base/tools/cryptonote/BlockTemplate.h
@@ -148,6 +148,8 @@ private:
Buffer m_hashes;
Buffer m_minerTxMerkleTreeBranch;
uint8_t m_rootHash[kHashSize]{};
+ uint8_t m_carrotViewTag[3]{};
+ uint8_t m_janusAnchor[16]{};
};
Why this scored 19/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.