mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-23 03:59:41 +00:00
Rename "cn/xtlv9" to "cn/half".
This commit is contained in:
parent
1382857c83
commit
67863a427d
9 changed files with 35 additions and 31 deletions
|
@ -62,7 +62,8 @@ static AlgoData const algorithms[] = {
|
|||
{ "cryptonight/xao", "cn/xao", xmrig::CRYPTONIGHT, xmrig::VARIANT_XAO },
|
||||
{ "cryptonight/rto", "cn/rto", xmrig::CRYPTONIGHT, xmrig::VARIANT_RTO },
|
||||
{ "cryptonight/2", "cn/2", xmrig::CRYPTONIGHT, xmrig::VARIANT_2 },
|
||||
{ "cryptonight/xtlv9", "cn/xtlv9", xmrig::CRYPTONIGHT, xmrig::VARIANT_XTL2 },
|
||||
{ "cryptonight/half", "cn/half", xmrig::CRYPTONIGHT, xmrig::VARIANT_HALF },
|
||||
{ "cryptonight/xtlv9", "cn/xtlv9", xmrig::CRYPTONIGHT, xmrig::VARIANT_HALF },
|
||||
|
||||
# ifndef XMRIG_NO_AEON
|
||||
{ "cryptonight-lite", "cn-lite", xmrig::CRYPTONIGHT_LITE, xmrig::VARIANT_AUTO },
|
||||
|
@ -110,7 +111,7 @@ static const char *variants[] = {
|
|||
"xao",
|
||||
"rto",
|
||||
"2",
|
||||
"xtlv9"
|
||||
"half"
|
||||
};
|
||||
|
||||
|
||||
|
@ -174,9 +175,13 @@ void xmrig::Algorithm::parseVariant(const char *variant)
|
|||
for (size_t i = 0; i < ARRAY_SIZE(variants); i++) {
|
||||
if (strcasecmp(variant, variants[i]) == 0) {
|
||||
m_variant = static_cast<Variant>(i);
|
||||
break;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (strcasecmp(variant, "xtlv9") == 0) {
|
||||
m_variant = VARIANT_HALF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -342,8 +342,7 @@ bool Client::parseJob(const rapidjson::Value ¶ms, int *code)
|
|||
if (params.HasMember("algo")) {
|
||||
job.setAlgorithm(params["algo"].GetString());
|
||||
}
|
||||
|
||||
if (params.HasMember("variant")) {
|
||||
else if (params.HasMember("variant")) {
|
||||
const rapidjson::Value &variant = params["variant"];
|
||||
|
||||
if (variant.IsInt()) {
|
||||
|
|
|
@ -125,7 +125,10 @@ bool Job::setBlob(const char *blob)
|
|||
m_algorithm.setVariant(variant());
|
||||
}
|
||||
else if (m_algorithm.variant() == xmrig::VARIANT_XTL && m_blob[0] >= 9) {
|
||||
m_algorithm.setVariant(xmrig::VARIANT_XTL2);
|
||||
m_algorithm.setVariant(xmrig::VARIANT_HALF);
|
||||
}
|
||||
else if (m_algorithm.variant() == xmrig::VARIANT_MSR && m_blob[0] >= 8) {
|
||||
m_algorithm.setVariant(xmrig::VARIANT_HALF);
|
||||
}
|
||||
|
||||
# ifdef XMRIG_PROXY_PROJECT
|
||||
|
|
|
@ -412,7 +412,7 @@ void Pool::rebuild()
|
|||
addVariant(xmrig::VARIANT_2);
|
||||
addVariant(xmrig::VARIANT_1);
|
||||
addVariant(xmrig::VARIANT_0);
|
||||
addVariant(xmrig::VARIANT_XTL2);
|
||||
addVariant(xmrig::VARIANT_HALF);
|
||||
addVariant(xmrig::VARIANT_XTL);
|
||||
addVariant(xmrig::VARIANT_TUBE);
|
||||
addVariant(xmrig::VARIANT_MSR);
|
||||
|
|
|
@ -69,7 +69,7 @@ enum Variant {
|
|||
VARIANT_XAO = 6, // Modified CryptoNight variant 0 (Alloy only)
|
||||
VARIANT_RTO = 7, // Modified CryptoNight variant 1 (Arto only)
|
||||
VARIANT_2 = 8, // CryptoNight variant 2
|
||||
VARIANT_XTL2 = 9,
|
||||
VARIANT_HALF = 9, // CryptoNight variant 2 with half iterations (Masari/Stellite)
|
||||
VARIANT_MAX
|
||||
};
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
|
||||
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -38,9 +38,8 @@ namespace xmrig
|
|||
constexpr const size_t CRYPTONIGHT_MEMORY = 2 * 1024 * 1024;
|
||||
constexpr const uint32_t CRYPTONIGHT_MASK = 0x1FFFF0;
|
||||
constexpr const uint32_t CRYPTONIGHT_ITER = 0x80000;
|
||||
constexpr const uint32_t CRYPTONIGHT_MSR_ITER = 0x40000;
|
||||
constexpr const uint32_t CRYPTONIGHT_HALF_ITER = 0x40000;
|
||||
constexpr const uint32_t CRYPTONIGHT_XAO_ITER = 0x100000;
|
||||
constexpr const uint32_t CRYPTONIGHT_XTL2_ITER = 0x40000;
|
||||
|
||||
constexpr const size_t CRYPTONIGHT_LITE_MEMORY = 1 * 1024 * 1024;
|
||||
constexpr const uint32_t CRYPTONIGHT_LITE_MASK = 0xFFFF0;
|
||||
|
@ -110,8 +109,8 @@ template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT, VARIANT_0>()
|
|||
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT, VARIANT_1>() { return CRYPTONIGHT_ITER; }
|
||||
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT, VARIANT_2>() { return CRYPTONIGHT_ITER; }
|
||||
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT, VARIANT_XTL>() { return CRYPTONIGHT_ITER; }
|
||||
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT, VARIANT_XTL2>() { return CRYPTONIGHT_XTL2_ITER; }
|
||||
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT, VARIANT_MSR>() { return CRYPTONIGHT_MSR_ITER; }
|
||||
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT, VARIANT_HALF>() { return CRYPTONIGHT_HALF_ITER; }
|
||||
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT, VARIANT_MSR>() { return CRYPTONIGHT_HALF_ITER; }
|
||||
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT, VARIANT_XAO>() { return CRYPTONIGHT_XAO_ITER; }
|
||||
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT, VARIANT_RTO>() { return CRYPTONIGHT_ITER; }
|
||||
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT_LITE, VARIANT_0>() { return CRYPTONIGHT_LITE_ITER; }
|
||||
|
@ -125,14 +124,12 @@ inline uint32_t cn_select_iter(Algo algorithm, Variant variant)
|
|||
{
|
||||
switch (variant) {
|
||||
case VARIANT_MSR:
|
||||
return CRYPTONIGHT_MSR_ITER;
|
||||
case VARIANT_HALF:
|
||||
return CRYPTONIGHT_HALF_ITER;
|
||||
|
||||
case VARIANT_RTO:
|
||||
return CRYPTONIGHT_XAO_ITER;
|
||||
|
||||
case VARIANT_XTL2:
|
||||
return CRYPTONIGHT_XTL2_ITER;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -166,7 +163,7 @@ template<> inline constexpr Variant cn_base_variant<VARIANT_XHV>() { return VA
|
|||
template<> inline constexpr Variant cn_base_variant<VARIANT_XAO>() { return VARIANT_0; }
|
||||
template<> inline constexpr Variant cn_base_variant<VARIANT_RTO>() { return VARIANT_1; }
|
||||
template<> inline constexpr Variant cn_base_variant<VARIANT_2>() { return VARIANT_2; }
|
||||
template<> inline constexpr Variant cn_base_variant<VARIANT_XTL2>() { return VARIANT_2; }
|
||||
template<> inline constexpr Variant cn_base_variant<VARIANT_HALF>() { return VARIANT_2; }
|
||||
|
||||
|
||||
} /* namespace xmrig */
|
||||
|
|
|
@ -115,8 +115,8 @@ const static uint8_t test_output_xtl[160] = {
|
|||
};
|
||||
|
||||
|
||||
// "cn/xtl2"
|
||||
const static uint8_t test_output_xtl2[160] = {
|
||||
// "cn/half"
|
||||
const static uint8_t test_output_half[160] = {
|
||||
0x5D, 0x4F, 0xBC, 0x35, 0x60, 0x97, 0xEA, 0x64, 0x40, 0xB0, 0x88, 0x8E, 0xDE, 0xB6, 0x35, 0xDD,
|
||||
0xC8, 0x4A, 0x0E, 0x39, 0x7C, 0x86, 0x84, 0x56, 0x89, 0x5C, 0x3F, 0x29, 0xBE, 0x73, 0x12, 0xA7,
|
||||
0x02, 0xE6, 0x1D, 0x2B, 0xBC, 0x84, 0xB6, 0x71, 0x96, 0x71, 0xD5, 0x0C, 0xAC, 0x76, 0x0E, 0x6B,
|
||||
|
|
|
@ -152,16 +152,16 @@ xmrig::CpuThread::cn_hash_fun xmrig::CpuThread::fn(Algo algorithm, AlgoVariant a
|
|||
cryptonight_quad_hash<CRYPTONIGHT, true, VARIANT_2>,
|
||||
cryptonight_penta_hash<CRYPTONIGHT, true, VARIANT_2>,
|
||||
|
||||
cryptonight_single_hash<CRYPTONIGHT, false, VARIANT_XTL2>,
|
||||
cryptonight_double_hash<CRYPTONIGHT, false, VARIANT_XTL2>,
|
||||
cryptonight_single_hash<CRYPTONIGHT, true, VARIANT_XTL2>,
|
||||
cryptonight_double_hash<CRYPTONIGHT, true, VARIANT_XTL2>,
|
||||
cryptonight_triple_hash<CRYPTONIGHT, false, VARIANT_XTL2>,
|
||||
cryptonight_quad_hash<CRYPTONIGHT, false, VARIANT_XTL2>,
|
||||
cryptonight_penta_hash<CRYPTONIGHT, false, VARIANT_XTL2>,
|
||||
cryptonight_triple_hash<CRYPTONIGHT, true, VARIANT_XTL2>,
|
||||
cryptonight_quad_hash<CRYPTONIGHT, true, VARIANT_XTL2>,
|
||||
cryptonight_penta_hash<CRYPTONIGHT, true, VARIANT_XTL2>,
|
||||
cryptonight_single_hash<CRYPTONIGHT, false, VARIANT_HALF>,
|
||||
cryptonight_double_hash<CRYPTONIGHT, false, VARIANT_HALF>,
|
||||
cryptonight_single_hash<CRYPTONIGHT, true, VARIANT_HALF>,
|
||||
cryptonight_double_hash<CRYPTONIGHT, true, VARIANT_HALF>,
|
||||
cryptonight_triple_hash<CRYPTONIGHT, false, VARIANT_HALF>,
|
||||
cryptonight_quad_hash<CRYPTONIGHT, false, VARIANT_HALF>,
|
||||
cryptonight_penta_hash<CRYPTONIGHT, false, VARIANT_HALF>,
|
||||
cryptonight_triple_hash<CRYPTONIGHT, true, VARIANT_HALF>,
|
||||
cryptonight_quad_hash<CRYPTONIGHT, true, VARIANT_HALF>,
|
||||
cryptonight_penta_hash<CRYPTONIGHT, true, VARIANT_HALF>,
|
||||
|
||||
# ifndef XMRIG_NO_AEON
|
||||
cryptonight_single_hash<CRYPTONIGHT_LITE, false, VARIANT_0>,
|
||||
|
|
|
@ -61,7 +61,7 @@ bool MultiWorker<N>::selfTest()
|
|||
verify(VARIANT_MSR, test_output_msr) &&
|
||||
verify(VARIANT_XAO, test_output_xao) &&
|
||||
verify(VARIANT_RTO, test_output_rto) &&
|
||||
verify(VARIANT_XTL2, test_output_xtl2);
|
||||
verify(VARIANT_HALF, test_output_half);
|
||||
}
|
||||
|
||||
# ifndef XMRIG_NO_AEON
|
||||
|
|
Loading…
Reference in a new issue