Add native Peya coin path to xmrig

This commit is contained in:
Codex Bot
2026-04-18 19:55:52 +02:00
parent 8ba606747c
commit 10127e20f1
6 changed files with 35 additions and 8 deletions
+1
View File
@@ -56,6 +56,7 @@ static const CoinInfo coinInfo[] = {
{ Algorithm::RX_0, "Townforge","Townforge", 30, 100000000, MAGENTA_BG_BOLD(WHITE_BOLD_S " townforge ") },
{ Algorithm::RX_YADA, "YDA", "YadaCoin", 120, 100000000, BLUE_BG_BOLD( WHITE_BOLD_S " yada ") },
{ Algorithm::RX_0, "SAL", "Salvium", 120, 100000000, BLUE_BG_BOLD( WHITE_BOLD_S " salvium ") },
{ Algorithm::RX_0, "PEY", "Peya", 120, 100000000, CYAN_BG_BOLD( WHITE_BOLD_S " peya ") },
};
+1
View File
@@ -42,6 +42,7 @@ public:
TOWNFORGE,
YADA,
SALVIUM,
PEYA,
MAX
};
+6 -6
View File
@@ -221,7 +221,7 @@ bool xmrig::BlockTemplate::parse(bool hashes)
setOffset(NONCE_OFFSET, ar.index());
ar.skip(kNonceSize);
if (m_coin == Coin::SALVIUM && m_version.first >= kSalviumProtocolHF) {
if (usesCarrotProtocolTx() && m_version.first >= kSalviumProtocolHF) {
m_hasProtocolTx = true;
}
@@ -274,7 +274,7 @@ bool xmrig::BlockTemplate::parse(bool hashes)
return false;
}
}
else if (m_coin == Coin::SALVIUM) {
else if (usesCarrotProtocolTx()) {
if (m_numOutputs < 1) {
return false;
}
@@ -292,7 +292,7 @@ bool xmrig::BlockTemplate::parse(bool hashes)
if (is_fcmp_pp && (m_outputType == 0)) {
// all good
}
else if (m_coin == Coin::SALVIUM) {
else if (usesCarrotProtocolTx()) {
if ((m_outputType != kTxOutToKey) && (m_outputType != kTxOutToTaggedKey) && (m_outputType != kTxOutToCarrotV1)) {
return false;
}
@@ -309,7 +309,7 @@ bool xmrig::BlockTemplate::parse(bool hashes)
ar(m_carrotViewTag);
ar(m_janusAnchor);
}
else if (m_coin == Coin::SALVIUM) {
else if (usesCarrotProtocolTx()) {
if (!parseSalviumOutput(ar, m_outputType, true)) {
return false;
}
@@ -370,7 +370,7 @@ bool xmrig::BlockTemplate::parse(bool hashes)
}
}
if (m_coin == Coin::SALVIUM && m_numOutputs > 1) {
if (usesCarrotProtocolTx() && m_numOutputs > 1) {
for (uint64_t k = 1; k < m_numOutputs; ++k) {
uint64_t amount2;
ar(amount2);
@@ -460,7 +460,7 @@ bool xmrig::BlockTemplate::parse(bool hashes)
}
}
if (m_coin == Coin::SALVIUM) {
if (usesCarrotProtocolTx()) {
uint8_t tx_type;
ar(tx_type);
+2 -1
View File
@@ -125,7 +125,8 @@ private:
inline void setOffset(Offset offset, size_t value) { m_offsets[offset] = static_cast<uint32_t>(value); }
bool parse(bool hashes);
inline uint64_t baseTransactionCount() const { return (m_coin == Coin::SALVIUM) ? (m_hasProtocolTx ? 2 : 1) : 1; }
inline bool usesCarrotProtocolTx() const { return (m_coin == Coin::SALVIUM) || (m_coin == Coin::PEYA); }
inline uint64_t baseTransactionCount() const { return usesCarrotProtocolTx() ? (m_hasProtocolTx ? 2 : 1) : 1; }
bool parseSalviumOutput(BlobReader<true> &ar, uint8_t outputType, bool storeExtraData);
Buffer m_blob;
@@ -285,6 +285,30 @@ const xmrig::WalletAddress::TagInfo &xmrig::WalletAddress::tagInfo(uint64_t tag)
{ 0x1a848c96, { Coin::SALVIUM, STAGENET, INTEGRATED, 39081, 39082 } },
{ 0x384cc96, { Coin::SALVIUM, STAGENET, SUBADDRESS, 39081, 39082 } },
{ 0x275984, { Coin::PEYA, MAINNET, PUBLIC, 17750, 17751 } },
{ 0x2b5984, { Coin::PEYA, MAINNET, INTEGRATED, 17750, 17751 } },
{ 0x301984, { Coin::PEYA, MAINNET, SUBADDRESS, 17750, 17751 } },
{ 0x9a988, { Coin::PEYA, TESTNET, PUBLIC, 27750, 27751 } },
{ 0xda988, { Coin::PEYA, TESTNET, INTEGRATED, 27750, 27751 } },
{ 0x122988, { Coin::PEYA, TESTNET, SUBADDRESS, 27750, 27751 } },
{ 0x30dc08, { Coin::PEYA, STAGENET, PUBLIC, 37750, 37751 } },
{ 0x34dc08, { Coin::PEYA, STAGENET, INTEGRATED, 37750, 37751 } },
{ 0x395c08, { Coin::PEYA, STAGENET, SUBADDRESS, 37750, 37751 } },
{ 0x3c7604, { Coin::PEYA, MAINNET, PUBLIC, 17750, 17751 } },
{ 0x7684, { Coin::PEYA, MAINNET, INTEGRATED, 17750, 17751 } },
{ 0x4f684, { Coin::PEYA, MAINNET, SUBADDRESS, 17750, 17751 } },
{ 0x2ceb88, { Coin::PEYA, TESTNET, PUBLIC, 27750, 27751 } },
{ 0x30eb88, { Coin::PEYA, TESTNET, INTEGRATED, 27750, 27751 } },
{ 0x356b88, { Coin::PEYA, TESTNET, SUBADDRESS, 27750, 27751 } },
{ 0x13de88, { Coin::PEYA, STAGENET, PUBLIC, 37750, 37751 } },
{ 0x17de88, { Coin::PEYA, STAGENET, INTEGRATED, 37750, 37751 } },
{ 0x1c9e88, { Coin::PEYA, STAGENET, SUBADDRESS, 37750, 37751 } },
};
const auto it = tags.find(tag);
+1 -1
View File
@@ -8,7 +8,7 @@
#ifndef XMRIG_VERSION_H
#define XMRIG_VERSION_H
#define APP_ID "xmrig-salvium"
#define APP_ID "xmrig-peya"
#define APP_NAME "XMRig"
#define APP_DESC "XMRig miner"
#define APP_VERSION "6.25.0"