From 33359279a52f1a736b1af484071f7e4fc710a72e Mon Sep 17 00:00:00 2001 From: Codex Bot Date: Mon, 30 Mar 2026 08:26:25 +0200 Subject: [PATCH] Handle Zephyr pricing record sizes in daemon parser --- src/base/tools/cryptonote/BlockTemplate.cpp | 22 +++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/base/tools/cryptonote/BlockTemplate.cpp b/src/base/tools/cryptonote/BlockTemplate.cpp index d60b8a45..1477cbfd 100644 --- a/src/base/tools/cryptonote/BlockTemplate.cpp +++ b/src/base/tools/cryptonote/BlockTemplate.cpp @@ -35,6 +35,23 @@ namespace constexpr uint8_t kTxOutToKey = 2; constexpr uint8_t kTxOutToTaggedKey = 3; constexpr uint8_t kTxOutToCarrotV1 = 4; + + size_t zephyrPricingRecordSize(const uint8_t majorVersion) + { + if (majorVersion >= 6) { + return 144; + } + + if (majorVersion >= 4) { + return 136; + } + + if (majorVersion >= 3) { + return 120; + } + + return 24; + } } void xmrig::BlockTemplate::calculateMinerTxHash(const uint8_t *prefix_begin, const uint8_t *prefix_end, uint8_t *hash) @@ -215,8 +232,9 @@ bool xmrig::BlockTemplate::parse(bool hashes) } if (m_coin == Coin::ZEPHYR) { - uint8_t pricing_record[120]; - ar(pricing_record); + if (!ar.skip(zephyrPricingRecordSize(m_version.first))) { + return false; + } } // Miner transaction begin