diff --git a/CHANGELOG.md b/CHANGELOG.md index 38bd55f17..933ec62c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# v6.5.2 +- [#1935](https://github.com/xmrig/xmrig/pull/1935) Separate MSR mod for Zen/Zen2 and Zen3. +- [#1937](https://github.com/xmrig/xmrig/issues/1937) Print path to existing WinRing0 service without verbose option. +- [#1939](https://github.com/xmrig/xmrig/pull/1939) Fixed build with gcc 4.8. +- [#1941](https://github.com/xmrig/xmrig/pull/1941) Added CPUID info to JSON report. +- [#1941](https://github.com/xmrig/xmrig/pull/1942) Fixed alignment modification in memory pool. +- [#1944](https://github.com/xmrig/xmrig/pull/1944) Updated `randomx_boost.sh` with new MSR mod. +- Added `250K` and `500K` offline benchmarks. + # v6.5.1 - [#1932](https://github.com/xmrig/xmrig/pull/1932) New MSR mod for Ryzen, up to +3.5% on Zen2 and +1-2% on Zen3. - [#1918](https://github.com/xmrig/xmrig/issues/1918) Fixed 1GB huge pages support on ARMv8. diff --git a/scripts/randomx_boost.sh b/scripts/randomx_boost.sh index ecbcdb4e2..91a3cea8d 100755 --- a/scripts/randomx_boost.sh +++ b/scripts/randomx_boost.sh @@ -4,12 +4,22 @@ modprobe msr if cat /proc/cpuinfo | grep "AMD Ryzen" > /dev/null; then - echo "Detected Ryzen" - wrmsr -a 0xc0011022 0x510000 - wrmsr -a 0xc001102b 0x1808cc16 - wrmsr -a 0xc0011020 0 - wrmsr -a 0xc0011021 0x40 - echo "MSR register values for Ryzen applied" + if cat /proc/cpuinfo | grep "cpu family[[:space:]]:[[:space:]]25" > /dev/null; + then + echo "Detected Ryzen (Zen3)" + wrmsr -a 0xc0011020 0x4480000000000 + wrmsr -a 0xc0011021 0x1c000200000040 + wrmsr -a 0xc0011022 0xc000000401500000 + wrmsr -a 0xc001102b 0x2000cc14 + echo "MSR register values for Ryzen (Zen3) applied" + else + echo "Detected Ryzen (Zen1/Zen2)" + wrmsr -a 0xc0011020 0 + wrmsr -a 0xc0011021 0x40 + wrmsr -a 0xc0011022 0x1510000 + wrmsr -a 0xc001102b 0x2000cc16 + echo "MSR register values for Ryzen (Zen1/Zen2) applied" + fi elif cat /proc/cpuinfo | grep "Intel" > /dev/null; then echo "Detected Intel" diff --git a/src/backend/common/Benchmark.cpp b/src/backend/common/Benchmark.cpp index 869afb05b..ba1daf1cb 100644 --- a/src/backend/common/Benchmark.cpp +++ b/src/backend/common/Benchmark.cpp @@ -37,9 +37,35 @@ namespace xmrig { -static uint64_t hashCheck[2][10] = { - { 0x898B6E0431C28A6BULL, 0xEE9468F8B40926BCULL, 0xC2BC5D11724813C0ULL, 0x3A2C7B285B87F941ULL, 0x3B5BD2C3A16B450EULL, 0x5CD0602F20C5C7C4ULL, 0x101DE939474B6812ULL, 0x52B765A1B156C6ECULL, 0x323935102AB6B45CULL, 0xB5231262E2792B26ULL }, - { 0x0F3E5400B39EA96AULL, 0x85944CCFA2752D1FULL, 0x64AFFCAE991811BAULL, 0x3E4D0B836D3B13BAULL, 0xEB7417D621271166ULL, 0x97FFE10C0949FFA5ULL, 0x84CAC0F8879A4BA1ULL, 0xA1B79F031DA2459FULL, 0x9B65226DA873E65DULL, 0x0F9E00C5A511C200ULL }, +static const std::map > hashCheck = { + { Algorithm::RX_0, { + { 250000U, 0x7D6054757BB08A63ULL }, + { 500000U, 0x96607546DE1F5ECCULL }, + { 1000000U, 0x898B6E0431C28A6BULL }, + { 2000000U, 0xEE9468F8B40926BCULL }, + { 3000000U, 0xC2BC5D11724813C0ULL }, + { 4000000U, 0x3A2C7B285B87F941ULL }, + { 5000000U, 0x3B5BD2C3A16B450EULL }, + { 6000000U, 0x5CD0602F20C5C7C4ULL }, + { 7000000U, 0x101DE939474B6812ULL }, + { 8000000U, 0x52B765A1B156C6ECULL }, + { 9000000U, 0x323935102AB6B45CULL }, + { 10000000U, 0xB5231262E2792B26ULL } + }}, + { Algorithm::RX_WOW, { + { 250000U, 0xC7F712C9603E2603ULL }, + { 500000U, 0x21A0E5AAE6DA7D8DULL }, + { 1000000U, 0x0F3E5400B39EA96AULL }, + { 2000000U, 0x85944CCFA2752D1FULL }, + { 3000000U, 0x64AFFCAE991811BAULL }, + { 4000000U, 0x3E4D0B836D3B13BAULL }, + { 5000000U, 0xEB7417D621271166ULL }, + { 6000000U, 0x97FFE10C0949FFA5ULL }, + { 7000000U, 0x84CAC0F8879A4BA1ULL }, + { 8000000U, 0xA1B79F031DA2459FULL }, + { 9000000U, 0x9B65226DA873E65DULL }, + { 10000000U, 0x0F9E00C5A511C200ULL } + }} }; @@ -87,7 +113,7 @@ bool xmrig::Benchmark::finish(uint64_t totalHashCount) doc.AddMember("steady_done_ts", m_doneTime, allocator); doc.AddMember(StringRef(BenchConfig::kHash), Value(fmt::format("{:016X}", m_data).c_str(), allocator), allocator); - doc.AddMember("backend", m_backend->toJSON(doc), allocator); // FIXME + doc.AddMember("backend", m_backend->toJSON(doc), allocator); send(doc); } @@ -185,12 +211,13 @@ uint64_t xmrig::Benchmark::referenceHash() const } # endif - const uint32_t N = (m_end / 1000000) - 1; - if (((m_algo == Algorithm::RX_0) || (m_algo == Algorithm::RX_WOW)) && ((m_end % 1000000) == 0) && (N < 10)) { - return hashCheck[(m_algo == Algorithm::RX_0) ? 0 : 1][N]; - } + uint64_t hash = 0; - return 0; + try { + hash = hashCheck.at(m_algo).at(m_end); + } catch (const std::exception &ex) {} + + return hash; } diff --git a/src/backend/cpu/interfaces/ICpuInfo.h b/src/backend/cpu/interfaces/ICpuInfo.h index ffab2d7d0..57f6185a2 100644 --- a/src/backend/cpu/interfaces/ICpuInfo.h +++ b/src/backend/cpu/interfaces/ICpuInfo.h @@ -48,7 +48,8 @@ public: enum MsrMod : uint32_t { MSR_MOD_NONE, - MSR_MOD_RYZEN, + MSR_MOD_RYZEN_17H, + MSR_MOD_RYZEN_19H, MSR_MOD_INTEL, MSR_MOD_CUSTOM, MSR_MOD_MAX diff --git a/src/backend/cpu/platform/BasicCpuInfo.cpp b/src/backend/cpu/platform/BasicCpuInfo.cpp index 00422af0e..43dbe1d2c 100644 --- a/src/backend/cpu/platform/BasicCpuInfo.cpp +++ b/src/backend/cpu/platform/BasicCpuInfo.cpp @@ -189,15 +189,32 @@ xmrig::BasicCpuInfo::BasicCpuInfo() : memcpy(vendor + 4, &data[3], 4); memcpy(vendor + 8, &data[2], 4); + cpuid(PROCESSOR_INFO, data); + + m_procInfo = data[EAX_Reg]; + m_family = get_masked(m_procInfo, 12, 8) + get_masked(m_procInfo, 28, 20); + m_model = (get_masked(m_procInfo, 20, 16) << 4) | get_masked(m_procInfo, 8, 4); + m_stepping = get_masked(m_procInfo, 4, 0); + if (memcmp(vendor, "AuthenticAMD", 12) == 0) { m_vendor = VENDOR_AMD; - cpuid(PROCESSOR_INFO, data); - const int32_t family = get_masked(data[EAX_Reg], 12, 8) + get_masked(data[EAX_Reg], 28, 20); - - if (family >= 23) { + if (m_family >= 0x17) { m_assembly = Assembly::RYZEN; - m_msrMod = MSR_MOD_RYZEN; + + switch (m_family) { + case 0x17: + m_msrMod = MSR_MOD_RYZEN_17H; + break; + + case 0x19: + m_msrMod = MSR_MOD_RYZEN_19H; + break; + + default: + m_msrMod = MSR_MOD_NONE; + break; + } } else { m_assembly = Assembly::BULLDOZER; @@ -220,7 +237,6 @@ xmrig::BasicCpuInfo::BasicCpuInfo() : unsigned int reserved2 : 4; } processor_info; - cpuid(1, data); memcpy(&processor_info, data, sizeof(processor_info)); // Intel JCC erratum mitigation @@ -314,6 +330,10 @@ rapidjson::Value xmrig::BasicCpuInfo::toJSON(rapidjson::Document &doc) const Value out(kObjectType); out.AddMember("brand", StringRef(brand()), allocator); + out.AddMember("family", m_family, allocator); + out.AddMember("model", m_model, allocator); + out.AddMember("stepping", m_stepping, allocator); + out.AddMember("proc_info", m_procInfo, allocator); out.AddMember("aes", hasAES(), allocator); out.AddMember("avx2", hasAVX2(), allocator); out.AddMember("x64", isX64(), allocator); diff --git a/src/backend/cpu/platform/BasicCpuInfo.h b/src/backend/cpu/platform/BasicCpuInfo.h index e3e184bb8..85d2582db 100644 --- a/src/backend/cpu/platform/BasicCpuInfo.h +++ b/src/backend/cpu/platform/BasicCpuInfo.h @@ -70,6 +70,10 @@ protected: bool m_jccErratum = false; private: + uint32_t m_procInfo = 0; + uint32_t m_family = 0; + uint32_t m_model = 0; + uint32_t m_stepping = 0; Assembly m_assembly = Assembly::NONE; MsrMod m_msrMod = MSR_MOD_NONE; std::bitset m_flags; diff --git a/src/base/kernel/interfaces/IConfig.h b/src/base/kernel/interfaces/IConfig.h index fd7c873e8..8b5ae278a 100644 --- a/src/base/kernel/interfaces/IConfig.h +++ b/src/base/kernel/interfaces/IConfig.h @@ -83,6 +83,7 @@ public: BenchVerifyKey = 1045, BenchSeedKey = 1046, BenchHashKey = 1047, + BenchTokenKey = 1048, // xmrig common CPUPriorityKey = 1021, diff --git a/src/base/net/stratum/Pools.cpp b/src/base/net/stratum/Pools.cpp index cadc67ab4..a9c245fa3 100644 --- a/src/base/net/stratum/Pools.cpp +++ b/src/base/net/stratum/Pools.cpp @@ -70,6 +70,16 @@ bool xmrig::Pools::isEqual(const Pools &other) const } +int xmrig::Pools::donateLevel() const +{ +# ifdef XMRIG_FEATURE_BENCHMARK + return benchSize() || (m_benchmark && !m_benchmark->id().isEmpty()) ? 0 : m_donateLevel; +# else + return m_donateLevel; +# endif +} + + xmrig::IStrategy *xmrig::Pools::createStrategy(IStrategyListener *listener) const { if (active() == 1) { @@ -184,6 +194,27 @@ void xmrig::Pools::print() const } +void xmrig::Pools::toJSON(rapidjson::Value &out, rapidjson::Document &doc) const +{ + using namespace rapidjson; + auto &allocator = doc.GetAllocator(); + +# ifdef XMRIG_FEATURE_BENCHMARK + if (m_benchmark) { + out.AddMember(StringRef(BenchConfig::kBenchmark), m_benchmark->toJSON(doc), allocator); + + return; + } +# endif + + doc.AddMember(StringRef(kDonateLevel), m_donateLevel, allocator); + doc.AddMember(StringRef(kDonateOverProxy), m_proxyDonate, allocator); + out.AddMember(StringRef(kPools), toJSON(doc), allocator); + doc.AddMember(StringRef(kRetries), retries(), allocator); + doc.AddMember(StringRef(kRetryPause), retryPause(), allocator); +} + + void xmrig::Pools::setDonateLevel(int level) { if (level >= kMinimumDonateLevel && level <= 99) { diff --git a/src/base/net/stratum/Pools.h b/src/base/net/stratum/Pools.h index 42262f2d3..477ce211b 100644 --- a/src/base/net/stratum/Pools.h +++ b/src/base/net/stratum/Pools.h @@ -58,7 +58,6 @@ public: Pools(); inline const std::vector &data() const { return m_data; } - inline int donateLevel() const { return benchSize() ? 0 : m_donateLevel; } inline int retries() const { return m_retries; } inline int retryPause() const { return m_retryPause; } inline ProxyDonate proxyDonate() const { return m_proxyDonate; } @@ -67,12 +66,14 @@ public: inline bool operator==(const Pools &other) const { return isEqual(other); } bool isEqual(const Pools &other) const; + int donateLevel() const; IStrategy *createStrategy(IStrategyListener *listener) const; rapidjson::Value toJSON(rapidjson::Document &doc) const; size_t active() const; uint32_t benchSize() const; void load(const IJsonReader &reader); void print() const; + void toJSON(rapidjson::Value &out, rapidjson::Document &doc) const; private: void setDonateLevel(int level); diff --git a/src/base/net/stratum/benchmark/BenchClient.cpp b/src/base/net/stratum/benchmark/BenchClient.cpp index 51181cf8d..bc71492b1 100644 --- a/src/base/net/stratum/benchmark/BenchClient.cpp +++ b/src/base/net/stratum/benchmark/BenchClient.cpp @@ -54,6 +54,7 @@ xmrig::BenchClient::BenchClient(const std::shared_ptr &benchmark, I if (!m_benchmark->id().isEmpty()) { m_job.setId(m_benchmark->id()); + m_job.setBenchToken(m_benchmark->token()); m_mode = ONLINE_VERIFY; return; diff --git a/src/base/net/stratum/benchmark/BenchConfig.cpp b/src/base/net/stratum/benchmark/BenchConfig.cpp index ca4a781ad..8a524108f 100644 --- a/src/base/net/stratum/benchmark/BenchConfig.cpp +++ b/src/base/net/stratum/benchmark/BenchConfig.cpp @@ -57,6 +57,7 @@ xmrig::BenchConfig::BenchConfig(uint32_t size, const String &id, const rapidjson m_submit(Json::getBool(object, kSubmit)), m_id(id), m_seed(Json::getString(object, kSeed)), + m_token(Json::getString(object, kToken)), m_size(size), m_hash(0) { @@ -88,16 +89,53 @@ xmrig::BenchConfig *xmrig::BenchConfig::create(const rapidjson::Value &object) } +rapidjson::Value xmrig::BenchConfig::toJSON(rapidjson::Document &doc) const +{ + using namespace rapidjson; + Value out(kObjectType); + auto &allocator = doc.GetAllocator(); + + if (m_size == 0) { + out.AddMember(StringRef(kSize), 0U, allocator); + } + else if (m_size < 1000000) { + out.AddMember(StringRef(kSize), Value(fmt::format("{}K", m_size / 1000).c_str(), allocator), allocator); + } + else { + out.AddMember(StringRef(kSize), Value(fmt::format("{}M", m_size / 1000000).c_str(), allocator), allocator); + } + + out.AddMember(StringRef(kAlgo), m_algorithm.toJSON(), allocator); + out.AddMember(StringRef(kSubmit), m_submit, allocator); + out.AddMember(StringRef(kVerify), m_id.toJSON(), allocator); + out.AddMember(StringRef(kToken), m_token.toJSON(), allocator); + out.AddMember(StringRef(kSeed), m_seed.toJSON(), allocator); + + if (m_hash) { + out.AddMember(StringRef(kHash), Value(fmt::format("{:016X}", m_hash).c_str(), allocator), allocator); + } + else { + out.AddMember(StringRef(kHash), kNullType, allocator); + } + + return out; +} + + uint32_t xmrig::BenchConfig::getSize(const char *benchmark) { if (!benchmark) { - return false; + return 0; } const auto size = strtoul(benchmark, nullptr, 10); - if (size < 1 || size > 10) { - return false; + if (size >= 1 && size <= 10) { + return strcasecmp(benchmark, fmt::format("{}M", size).c_str()) == 0 ? size * 1000000 : 0; } - return strcasecmp(benchmark, fmt::format("{}M", size).c_str()) == 0 ? size * 1000000 : 0; + if (size == 250 || size == 500) { + return strcasecmp(benchmark, fmt::format("{}K", size).c_str()) == 0 ? size * 1000 : 0; + } + + return 0; } diff --git a/src/base/net/stratum/benchmark/BenchConfig.h b/src/base/net/stratum/benchmark/BenchConfig.h index 3d9909e96..f1310236f 100644 --- a/src/base/net/stratum/benchmark/BenchConfig.h +++ b/src/base/net/stratum/benchmark/BenchConfig.h @@ -57,9 +57,12 @@ public: inline const Algorithm &algorithm() const { return m_algorithm; } inline const String &id() const { return m_id; } inline const String &seed() const { return m_seed; } + inline const String &token() const { return m_token; } inline uint32_t size() const { return m_size; } inline uint64_t hash() const { return m_hash; } + rapidjson::Value toJSON(rapidjson::Document &doc) const; + private: static uint32_t getSize(const char *benchmark); @@ -67,6 +70,7 @@ private: bool m_submit; String m_id; String m_seed; + String m_token; uint32_t m_size; uint64_t m_hash; }; diff --git a/src/core/config/Config.cpp b/src/core/config/Config.cpp index f6b19b437..792b3873d 100644 --- a/src/core/config/Config.cpp +++ b/src/core/config/Config.cpp @@ -228,16 +228,14 @@ void xmrig::Config::getJSON(rapidjson::Document &doc) const doc.AddMember(StringRef(kCuda), cuda().toJSON(doc), allocator); # endif - doc.AddMember(StringRef(Pools::kDonateLevel), m_pools.donateLevel(), allocator); - doc.AddMember(StringRef(Pools::kDonateOverProxy), m_pools.proxyDonate(), allocator); doc.AddMember(StringRef(kLogFile), m_logFile.toJSON(), allocator); - doc.AddMember(StringRef(Pools::kPools), m_pools.toJSON(doc), allocator); + + m_pools.toJSON(doc, doc); + doc.AddMember(StringRef(kPrintTime), printTime(), allocator); # if defined(XMRIG_FEATURE_NVML) || defined (XMRIG_FEATURE_ADL) doc.AddMember(StringRef(kHealthPrintTime), healthPrintTime(), allocator); # endif - doc.AddMember(StringRef(Pools::kRetries), m_pools.retries(), allocator); - doc.AddMember(StringRef(Pools::kRetryPause), m_pools.retryPause(), allocator); doc.AddMember(StringRef(kSyslog), isSyslog(), allocator); # ifdef XMRIG_FEATURE_TLS diff --git a/src/core/config/ConfigTransform.cpp b/src/core/config/ConfigTransform.cpp index e6de98551..b8a431fd1 100644 --- a/src/core/config/ConfigTransform.cpp +++ b/src/core/config/ConfigTransform.cpp @@ -257,6 +257,7 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const case IConfig::StressKey: /* --stress */ case IConfig::BenchSubmitKey: /* --submit */ case IConfig::BenchVerifyKey: /* --verify */ + case IConfig::BenchTokenKey: /* --token */ case IConfig::BenchSeedKey: /* --seed */ case IConfig::BenchHashKey: /* --hash */ return transformBenchmark(doc, key, arg); @@ -333,6 +334,9 @@ void xmrig::ConfigTransform::transformBenchmark(rapidjson::Document &doc, int ke case IConfig::BenchVerifyKey: /* --verify */ return set(doc, BenchConfig::kBenchmark, BenchConfig::kVerify, arg); + case IConfig::BenchTokenKey: /* --token */ + return set(doc, BenchConfig::kBenchmark, BenchConfig::kToken, arg); + case IConfig::BenchSeedKey: /* --seed */ return set(doc, BenchConfig::kBenchmark, BenchConfig::kSeed, arg); diff --git a/src/core/config/Config_platform.h b/src/core/config/Config_platform.h index 452bdd453..f698836c4 100644 --- a/src/core/config/Config_platform.h +++ b/src/core/config/Config_platform.h @@ -103,6 +103,7 @@ static const option options[] = { # ifdef XMRIG_FEATURE_HTTP { "submit", 0, nullptr, IConfig::BenchSubmitKey }, { "verify", 1, nullptr, IConfig::BenchVerifyKey }, + { "token", 1, nullptr, IConfig::BenchTokenKey }, # endif { "seed", 1, nullptr, IConfig::BenchSeedKey }, { "hash", 1, nullptr, IConfig::BenchHashKey }, diff --git a/src/crypto/common/MemoryPool.cpp b/src/crypto/common/MemoryPool.cpp index 59f1af068..e99757ee9 100644 --- a/src/crypto/common/MemoryPool.cpp +++ b/src/crypto/common/MemoryPool.cpp @@ -71,7 +71,7 @@ uint8_t *xmrig::MemoryPool::get(size_t size, uint32_t) { assert(!(size % pageSize)); - if (!m_memory || (m_memory->size() - m_offset) < size) { + if (!m_memory || (m_memory->size() - m_offset - m_alignOffset) < size) { return nullptr; } diff --git a/src/crypto/randomx/vm_compiled.hpp b/src/crypto/randomx/vm_compiled.hpp index 2ffce558f..2db99c759 100644 --- a/src/crypto/randomx/vm_compiled.hpp +++ b/src/crypto/randomx/vm_compiled.hpp @@ -41,6 +41,7 @@ namespace randomx { class CompiledVm : public VmBase { public: + inline CompiledVm() {} void* operator new(size_t, void* ptr) { return ptr; } void operator delete(void*) {} diff --git a/src/crypto/rx/RxConfig.cpp b/src/crypto/rx/RxConfig.cpp index d35be18d1..43e21a89b 100644 --- a/src/crypto/rx/RxConfig.cpp +++ b/src/crypto/rx/RxConfig.cpp @@ -64,16 +64,17 @@ static const std::array modeNames = { "auto", " #ifdef XMRIG_FEATURE_MSR -constexpr size_t kMsrArraySize = 4; +constexpr size_t kMsrArraySize = 5; static const std::array msrPresets = { MsrItems(), + MsrItems{{ 0xC0011020, 0ULL }, { 0xC0011021, 0x40ULL, ~0x20ULL }, { 0xC0011022, 0x1510000ULL }, { 0xC001102b, 0x2000cc16ULL }}, MsrItems{{ 0xC0011020, 0x0004480000000000ULL }, { 0xC0011021, 0x001c000200000040ULL, ~0x20ULL }, { 0xC0011022, 0xc000000401500000ULL }, { 0xC001102b, 0x2000cc14ULL }}, MsrItems{{ 0x1a4, 0xf }}, MsrItems() }; -static const std::array modNames = { "none", "ryzen", "intel", "custom" }; +static const std::array modNames = { "none", "ryzen_17h", "ryzen_19h", "intel", "custom" }; static_assert (kMsrArraySize == ICpuInfo::MSR_MOD_MAX, "kMsrArraySize and MSR_MOD_MAX mismatch"); #endif diff --git a/src/crypto/rx/Rx_win.cpp b/src/crypto/rx/Rx_win.cpp index f100b0282..b32c3dae9 100644 --- a/src/crypto/rx/Rx_win.cpp +++ b/src/crypto/rx/Rx_win.cpp @@ -135,7 +135,7 @@ static HANDLE wrmsr_install_driver() SERVICE_STATUS status; const auto rc = QueryServiceStatus(hService, &status); - if (rc && Log::isVerbose()) { + if (rc) { DWORD dwBytesNeeded; QueryServiceConfigA(hService, nullptr, 0, &dwBytesNeeded); diff --git a/src/net/Network.cpp b/src/net/Network.cpp index 1c1aa8e20..0995d62b0 100644 --- a/src/net/Network.cpp +++ b/src/net/Network.cpp @@ -260,14 +260,16 @@ void xmrig::Network::onRequest(IApiRequest &request) void xmrig::Network::setJob(IClient *client, const Job &job, bool donate) { - uint64_t diff = job.diff();; - const char *scale = NetworkState::scaleDiff(diff); + uint64_t diff = job.diff();; + const char *scale = NetworkState::scaleDiff(diff); # ifdef XMRIG_FEATURE_BENCHMARK - if (job.benchSize()) { - LOG_NOTICE("%s " MAGENTA_BOLD("start benchmark ") "hashes " CYAN_BOLD("%" PRIu64 "M") " algo " WHITE_BOLD("%s") " print_time " CYAN_BOLD("%us"), + const uint32_t size = job.benchSize(); + if (size) { + LOG_NOTICE("%s " MAGENTA_BOLD("start benchmark ") "hashes " CYAN_BOLD("%u%s") " algo " WHITE_BOLD("%s") " print_time " CYAN_BOLD("%us"), Tags::bench(), - job.benchSize() / 1000000, + size < 1000000 ? size / 1000 : size / 1000000, + size < 1000000 ? "K" : "M", job.algorithm().shortName(), m_controller->config()->printTime()); diff --git a/src/version.h b/src/version.h index e13b28575..235faa72e 100644 --- a/src/version.h +++ b/src/version.h @@ -28,7 +28,7 @@ #define APP_ID "xmrig" #define APP_NAME "XMRig" #define APP_DESC "XMRig miner" -#define APP_VERSION "6.5.1" +#define APP_VERSION "6.5.2-dev" #define APP_DOMAIN "xmrig.com" #define APP_SITE "www.xmrig.com" #define APP_COPYRIGHT "Copyright (C) 2016-2020 xmrig.com" @@ -36,7 +36,7 @@ #define APP_VER_MAJOR 6 #define APP_VER_MINOR 5 -#define APP_VER_PATCH 1 +#define APP_VER_PATCH 2 #ifdef _MSC_VER # if (_MSC_VER >= 1920)