6.19.2 update

This commit is contained in:
FSOL-XDAG 2023-04-04 23:07:53 +02:00 committed by GitHub
parent 1df0b749df
commit 6fc90cefbc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 77 additions and 68 deletions

View file

@ -247,6 +247,7 @@ void xmrig::Job::copy(const Job &other)
m_minerTxExtraNonceOffset = other.m_minerTxExtraNonceOffset;
m_minerTxExtraNonceSize = other.m_minerTxExtraNonceSize;
m_minerTxMerkleTreeBranch = other.m_minerTxMerkleTreeBranch;
m_hasViewTag = other.m_hasViewTag;
# else
memcpy(m_ephPublicKey, other.m_ephPublicKey, sizeof(m_ephPublicKey));
memcpy(m_ephSecretKey, other.m_ephSecretKey, sizeof(m_ephSecretKey));
@ -302,6 +303,7 @@ void xmrig::Job::move(Job &&other)
m_minerTxExtraNonceOffset = other.m_minerTxExtraNonceOffset;
m_minerTxExtraNonceSize = other.m_minerTxExtraNonceSize;
m_minerTxMerkleTreeBranch = std::move(other.m_minerTxMerkleTreeBranch);
m_hasViewTag = other.m_hasViewTag;
# else
memcpy(m_ephPublicKey, other.m_ephPublicKey, sizeof(m_ephPublicKey));
memcpy(m_ephSecretKey, other.m_ephSecretKey, sizeof(m_ephSecretKey));
@ -325,7 +327,7 @@ void xmrig::Job::setSpendSecretKey(const uint8_t *key)
}
void xmrig::Job::setMinerTx(const uint8_t *begin, const uint8_t *end, size_t minerTxEphPubKeyOffset, size_t minerTxPubKeyOffset, size_t minerTxExtraNonceOffset, size_t minerTxExtraNonceSize, const Buffer &minerTxMerkleTreeBranch)
void xmrig::Job::setMinerTx(const uint8_t *begin, const uint8_t *end, size_t minerTxEphPubKeyOffset, size_t minerTxPubKeyOffset, size_t minerTxExtraNonceOffset, size_t minerTxExtraNonceSize, const Buffer &minerTxMerkleTreeBranch, bool hasViewTag)
{
m_minerTxPrefix.assign(begin, end);
m_minerTxEphPubKeyOffset = minerTxEphPubKeyOffset;
@ -333,6 +335,13 @@ void xmrig::Job::setMinerTx(const uint8_t *begin, const uint8_t *end, size_t min
m_minerTxExtraNonceOffset = minerTxExtraNonceOffset;
m_minerTxExtraNonceSize = minerTxExtraNonceSize;
m_minerTxMerkleTreeBranch = minerTxMerkleTreeBranch;
m_hasViewTag = hasViewTag;
}
void xmrig::Job::setViewTagInMinerTx(uint8_t view_tag)
{
memcpy(m_minerTxPrefix.data() + m_minerTxEphPubKeyOffset + 32, &view_tag, 1);
}
@ -342,7 +351,7 @@ void xmrig::Job::setExtraNonceInMinerTx(uint32_t extra_nonce)
}
void xmrig::Job::generateSignatureData(String &signatureData) const
void xmrig::Job::generateSignatureData(String &signatureData, uint8_t& view_tag) const
{
uint8_t* eph_public_key = m_minerTxPrefix.data() + m_minerTxEphPubKeyOffset;
uint8_t* txkey_pub = m_minerTxPrefix.data() + m_minerTxPubKeyOffset;
@ -353,14 +362,14 @@ void xmrig::Job::generateSignatureData(String &signatureData) const
uint8_t derivation[32];
generate_key_derivation(m_viewPublicKey, txkey_sec, derivation);
generate_key_derivation(m_viewPublicKey, txkey_sec, derivation, &view_tag);
derive_public_key(derivation, 0, m_spendPublicKey, eph_public_key);
uint8_t buf[32 * 3] = {};
memcpy(buf, txkey_pub, 32);
memcpy(buf + 32, eph_public_key, 32);
generate_key_derivation(txkey_pub, m_viewSecretKey, derivation);
generate_key_derivation(txkey_pub, m_viewSecretKey, derivation, nullptr);
derive_secret_key(derivation, 0, m_spendSecretKey, buf + 64);
signatureData = Cvt::toHex(buf, sizeof(buf));

View file

@ -22,7 +22,7 @@
#define APP_ID "xmrig-4-xdag"
#define APP_NAME "XMRig-4-XDAG"
#define APP_DESC "XMRig-4-XDAG miner"
#define APP_VERSION "6.19.1"
#define APP_VERSION "6.19.2"
#define APP_DOMAIN "xdag.io"
#define APP_SITE "www.xdag.io"
#define APP_COPYRIGHT "Copyright (C) 2016-2023 xmrig.com / xdag.io"
@ -30,7 +30,7 @@
#define APP_VER_MAJOR 6
#define APP_VER_MINOR 19
#define APP_VER_PATCH 1
#define APP_VER_PATCH 2
#ifdef _MSC_VER
# if (_MSC_VER >= 1930)