diff --git a/src/base/crypto/Coin.cpp b/src/base/crypto/Coin.cpp index 19d2d680..2df68abe 100644 --- a/src/base/crypto/Coin.cpp +++ b/src/base/crypto/Coin.cpp @@ -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 ") }, }; diff --git a/src/base/crypto/Coin.h b/src/base/crypto/Coin.h index aedfa0c0..42c628e5 100644 --- a/src/base/crypto/Coin.h +++ b/src/base/crypto/Coin.h @@ -42,6 +42,7 @@ public: TOWNFORGE, YADA, SALVIUM, + PEYA, MAX }; diff --git a/src/base/tools/cryptonote/BlockTemplate.cpp b/src/base/tools/cryptonote/BlockTemplate.cpp index 8d5d5eab..a357e70e 100644 --- a/src/base/tools/cryptonote/BlockTemplate.cpp +++ b/src/base/tools/cryptonote/BlockTemplate.cpp @@ -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); diff --git a/src/base/tools/cryptonote/BlockTemplate.h b/src/base/tools/cryptonote/BlockTemplate.h index 13f8c090..fdbfa1d3 100644 --- a/src/base/tools/cryptonote/BlockTemplate.h +++ b/src/base/tools/cryptonote/BlockTemplate.h @@ -125,7 +125,8 @@ private: inline void setOffset(Offset offset, size_t value) { m_offsets[offset] = static_cast(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 &ar, uint8_t outputType, bool storeExtraData); Buffer m_blob; diff --git a/src/base/tools/cryptonote/WalletAddress.cpp b/src/base/tools/cryptonote/WalletAddress.cpp index 37faf492..2d2439db 100644 --- a/src/base/tools/cryptonote/WalletAddress.cpp +++ b/src/base/tools/cryptonote/WalletAddress.cpp @@ -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); diff --git a/src/version.h b/src/version.h index 94797be2..e39d6766 100644 --- a/src/version.h +++ b/src/version.h @@ -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"