diff --git a/CHANGELOG.md b/CHANGELOG.md index 0eea372a3..61aa5ea5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# v6.3.1 +- [#1786](https://github.com/xmrig/xmrig/pull/1786) Added `pause-on-battery` option, supported on Windows and Linux. +- Added command line options `--randomx-cache-qos` and `--argon2-impl`. + # v6.3.0 - [#1771](https://github.com/xmrig/xmrig/pull/1771) Adopted new SSE2NEON and reduced ARM-specific changes. - [#1774](https://github.com/xmrig/xmrig/pull/1774) RandomX: Added new option `cache_qos` in `randomx` object for cache QoS support. diff --git a/cmake/flags.cmake b/cmake/flags.cmake index d2bc70d05..7c2c79b8d 100644 --- a/cmake/flags.cmake +++ b/cmake/flags.cmake @@ -60,6 +60,9 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC) set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Oi /DNDEBUG /GL") set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Oi /DNDEBUG /GL") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "/Ob1 /GL") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Ob1 /GL") + add_definitions(/D_CRT_SECURE_NO_WARNINGS) add_definitions(/D_CRT_NONSTDC_NO_WARNINGS) add_definitions(/DNOMINMAX) diff --git a/src/backend/common/Tags.h b/src/backend/common/Tags.h index 762f8f2e7..0e2982759 100644 --- a/src/backend/common/Tags.h +++ b/src/backend/common/Tags.h @@ -47,11 +47,6 @@ const char *cuda_tag(); #endif -#ifdef XMRIG_ALGO_RANDOMX -const char *rx_tag(); -#endif - - } // namespace xmrig diff --git a/src/backend/cpu/interfaces/ICpuInfo.h b/src/backend/cpu/interfaces/ICpuInfo.h index c33d26daa..dd740a180 100644 --- a/src/backend/cpu/interfaces/ICpuInfo.h +++ b/src/backend/cpu/interfaces/ICpuInfo.h @@ -28,6 +28,7 @@ #include "backend/cpu/CpuThreads.h" #include "base/crypto/Algorithm.h" +#include "base/tools/Object.h" #include "crypto/common/Assembly.h" @@ -37,6 +38,8 @@ namespace xmrig { class ICpuInfo { public: + XMRIG_DISABLE_COPY_MOVE(ICpuInfo) + enum Vendor : uint32_t { VENDOR_UNKNOWN, VENDOR_INTEL, @@ -66,6 +69,7 @@ public: FLAG_MAX }; + ICpuInfo() = default; virtual ~ICpuInfo() = default; # if defined(__x86_64__) || defined(_M_AMD64) || defined (__arm64__) || defined (__aarch64__) diff --git a/src/base/crypto/Algorithm.cpp b/src/base/crypto/Algorithm.cpp index e71ca168d..778bee760 100644 --- a/src/base/crypto/Algorithm.cpp +++ b/src/base/crypto/Algorithm.cpp @@ -135,6 +135,12 @@ static AlgoName const algorithm_names[] = { } /* namespace xmrig */ +xmrig::Algorithm::Algorithm(const rapidjson::Value &value) : + m_id(parse(value.GetString())) +{ +} + + rapidjson::Value xmrig::Algorithm::toJSON() const { using namespace rapidjson; @@ -143,6 +149,12 @@ rapidjson::Value xmrig::Algorithm::toJSON() const } +rapidjson::Value xmrig::Algorithm::toJSON(rapidjson::Document &) const +{ + return toJSON(); +} + + size_t xmrig::Algorithm::l2() const { # ifdef XMRIG_ALGO_RANDOMX diff --git a/src/base/crypto/Algorithm.h b/src/base/crypto/Algorithm.h index e4a1466aa..b04765d52 100644 --- a/src/base/crypto/Algorithm.h +++ b/src/base/crypto/Algorithm.h @@ -92,6 +92,7 @@ public: inline Algorithm() = default; inline Algorithm(const char *algo) : m_id(parse(algo)) {} inline Algorithm(Id id) : m_id(id) {} + Algorithm(const rapidjson::Value &value); inline bool isCN() const { auto f = family(); return f == CN || f == CN_LITE || f == CN_HEAVY || f == CN_PICO; } inline bool isEqual(const Algorithm &other) const { return m_id == other.m_id; } @@ -108,6 +109,7 @@ public: inline operator Algorithm::Id() const { return m_id; } rapidjson::Value toJSON() const; + rapidjson::Value toJSON(rapidjson::Document &doc) const; size_t l2() const; size_t l3() const; uint32_t maxIntensity() const; diff --git a/src/base/kernel/Platform.h b/src/base/kernel/Platform.h index 3fcf666be..b56c214d0 100644 --- a/src/base/kernel/Platform.h +++ b/src/base/kernel/Platform.h @@ -54,6 +54,8 @@ public: static inline const char *userAgent() { return m_userAgent; } + static bool isOnBatteryPower(); + private: static char *createUserAgent(); diff --git a/src/base/kernel/Platform_mac.cpp b/src/base/kernel/Platform_mac.cpp index 5a5520eb2..9dd4f15ee 100644 --- a/src/base/kernel/Platform_mac.cpp +++ b/src/base/kernel/Platform_mac.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include "base/kernel/Platform.h" @@ -107,3 +108,18 @@ void xmrig::Platform::setThreadPriority(int priority) setpriority(PRIO_PROCESS, 0, prio); } + +bool xmrig::Platform::isOnBatteryPower() +{ + for (int i = 0; i <= 1; ++i) { + char buf[64]; + snprintf(buf, 64, "/sys/class/power_supply/BAT%d/status", i); + std::ifstream f(buf); + if (f.is_open()) { + std::string status; + f >> status; + return (status == "Discharging"); + } + } + return false; +} diff --git a/src/base/kernel/Platform_unix.cpp b/src/base/kernel/Platform_unix.cpp index 6d9576363..f0b382c0c 100644 --- a/src/base/kernel/Platform_unix.cpp +++ b/src/base/kernel/Platform_unix.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include "base/kernel/Platform.h" @@ -146,3 +147,19 @@ void xmrig::Platform::setThreadPriority(int priority) } # endif } + + +bool xmrig::Platform::isOnBatteryPower() +{ + for (int i = 0; i <= 1; ++i) { + char buf[64]; + snprintf(buf, 64, "/sys/class/power_supply/BAT%d/status", i); + std::ifstream f(buf); + if (f.is_open()) { + std::string status; + f >> status; + return (status == "Discharging"); + } + } + return false; +} diff --git a/src/base/kernel/Platform_win.cpp b/src/base/kernel/Platform_win.cpp index 004974535..89f26a07a 100644 --- a/src/base/kernel/Platform_win.cpp +++ b/src/base/kernel/Platform_win.cpp @@ -157,3 +157,12 @@ void xmrig::Platform::setThreadPriority(int priority) SetThreadPriority(GetCurrentThread(), prio); } + +bool xmrig::Platform::isOnBatteryPower() +{ + SYSTEM_POWER_STATUS st; + if (GetSystemPowerStatus(&st)) { + return (st.ACLineStatus == 0); + } + return false; +} diff --git a/src/base/kernel/config/BaseConfig.cpp b/src/base/kernel/config/BaseConfig.cpp index 459055d79..2e3a598c9 100644 --- a/src/base/kernel/config/BaseConfig.cpp +++ b/src/base/kernel/config/BaseConfig.cpp @@ -61,6 +61,7 @@ const char *BaseConfig::kColors = "colors"; const char *BaseConfig::kDryRun = "dry-run"; const char *BaseConfig::kHttp = "http"; const char *BaseConfig::kLogFile = "log-file"; +const char *BaseConfig::kPauseOnBattery = "pause-on-battery"; const char *BaseConfig::kPrintTime = "print-time"; const char *BaseConfig::kSyslog = "syslog"; const char *BaseConfig::kTitle = "title"; @@ -85,15 +86,16 @@ bool xmrig::BaseConfig::read(const IJsonReader &reader, const char *fileName) return false; } - m_autoSave = reader.getBool(kAutosave, m_autoSave); - m_background = reader.getBool(kBackground, m_background); - m_dryRun = reader.getBool(kDryRun, m_dryRun); - m_syslog = reader.getBool(kSyslog, m_syslog); - m_watch = reader.getBool(kWatch, m_watch); - m_logFile = reader.getString(kLogFile); - m_userAgent = reader.getString(kUserAgent); - m_printTime = std::min(reader.getUint(kPrintTime, m_printTime), 3600U); - m_title = reader.getValue(kTitle); + m_autoSave = reader.getBool(kAutosave, m_autoSave); + m_background = reader.getBool(kBackground, m_background); + m_dryRun = reader.getBool(kDryRun, m_dryRun); + m_syslog = reader.getBool(kSyslog, m_syslog); + m_watch = reader.getBool(kWatch, m_watch); + m_pauseOnBattery = reader.getBool(kPauseOnBattery, m_pauseOnBattery); + m_logFile = reader.getString(kLogFile); + m_userAgent = reader.getString(kUserAgent); + m_printTime = std::min(reader.getUint(kPrintTime, m_printTime), 3600U); + m_title = reader.getValue(kTitle); # ifdef XMRIG_FEATURE_TLS m_tls = reader.getValue(kTls); diff --git a/src/base/kernel/config/BaseConfig.h b/src/base/kernel/config/BaseConfig.h index 2367aa79c..f97a711bb 100644 --- a/src/base/kernel/config/BaseConfig.h +++ b/src/base/kernel/config/BaseConfig.h @@ -55,6 +55,7 @@ public: static const char *kDryRun; static const char *kHttp; static const char *kLogFile; + static const char *kPauseOnBattery; static const char *kPrintTime; static const char *kSyslog; static const char *kTitle; @@ -71,6 +72,7 @@ public: inline bool isAutoSave() const { return m_autoSave; } inline bool isBackground() const { return m_background; } inline bool isDryRun() const { return m_dryRun; } + inline bool isPauseOnBattery() const { return m_pauseOnBattery; } inline bool isSyslog() const { return m_syslog; } inline const char *logFile() const { return m_logFile.data(); } inline const char *userAgent() const { return m_userAgent.data(); } @@ -95,12 +97,13 @@ public: void printVersions(); protected: - bool m_autoSave = true; - bool m_background = false; - bool m_dryRun = false; - bool m_syslog = false; - bool m_upgrade = false; - bool m_watch = true; + bool m_autoSave = true; + bool m_background = false; + bool m_dryRun = false; + bool m_pauseOnBattery = false; + bool m_syslog = false; + bool m_upgrade = false; + bool m_watch = true; Http m_http; Pools m_pools; String m_apiId; diff --git a/src/base/kernel/config/BaseTransform.cpp b/src/base/kernel/config/BaseTransform.cpp index 415262cf1..97041e7de 100644 --- a/src/base/kernel/config/BaseTransform.cpp +++ b/src/base/kernel/config/BaseTransform.cpp @@ -247,6 +247,7 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch case IConfig::HttpEnabledKey: /* --http-enabled */ case IConfig::DaemonKey: /* --daemon */ case IConfig::VerboseKey: /* --verbose */ + case IConfig::PauseOnBatteryKey: /* --pause-on-battery */ return transformBoolean(doc, key, true); case IConfig::ColorKey: /* --no-color */ @@ -305,6 +306,9 @@ void xmrig::BaseTransform::transformBoolean(rapidjson::Document &doc, int key, b case IConfig::NoTitleKey: /* --no-title */ return set(doc, BaseConfig::kTitle, enable); + case IConfig::PauseOnBatteryKey: /* --pause-on-battery */ + return set(doc, BaseConfig::kPauseOnBattery, enable); + default: break; } diff --git a/src/base/kernel/interfaces/IConfig.h b/src/base/kernel/interfaces/IConfig.h index 0924f1e2a..dd657c2d8 100644 --- a/src/base/kernel/interfaces/IConfig.h +++ b/src/base/kernel/interfaces/IConfig.h @@ -76,6 +76,7 @@ public: DataDirKey = 1035, TitleKey = 1037, NoTitleKey = 1038, + PauseOnBatteryKey = 1041, // xmrig common CPUPriorityKey = 1021, @@ -101,6 +102,8 @@ public: YieldKey = 1030, AstroBWTMaxSizeKey = 1034, AstroBWTAVX2Key = 1036, + Argon2ImplKey = 1039, + RandomXCacheQoSKey = 1040, // xmrig amd OclPlatformKey = 1400, diff --git a/src/config.json b/src/config.json index 2df01a5b6..f3f282679 100644 --- a/src/config.json +++ b/src/config.json @@ -91,5 +91,6 @@ }, "user-agent": null, "verbose": 0, - "watch": true + "watch": true, + "pause-on-battery": false } diff --git a/src/core/Miner.cpp b/src/core/Miner.cpp index 7d74d96a5..1a8c29f99 100644 --- a/src/core/Miner.cpp +++ b/src/core/Miner.cpp @@ -287,6 +287,7 @@ public: bool active = false; bool enabled = true; bool reset = true; + bool battery_power = false; Controller *controller; Job job; mutable std::map maxHashrate; @@ -429,13 +430,24 @@ void xmrig::Miner::setEnabled(bool enabled) return; } + if (d_ptr->battery_power && enabled) { + LOG_INFO("%s " YELLOW_BOLD("can't resume while on battery power"), Tags::miner()); + + return; + } + d_ptr->enabled = enabled; if (enabled) { - LOG_INFO(GREEN_BOLD("resumed")); + LOG_INFO("%s " GREEN_BOLD("resumed"), Tags::miner()); } else { - LOG_INFO(YELLOW_BOLD("paused") ", press " MAGENTA_BG_BOLD(" r ") " to resume"); + if (d_ptr->battery_power) { + LOG_INFO("%s " YELLOW_BOLD("paused"), Tags::miner()); + } + else { + LOG_INFO("%s " YELLOW_BOLD("paused") ", press " MAGENTA_BG_BOLD(" r ") " to resume", Tags::miner()); + } } if (!d_ptr->active) { @@ -538,6 +550,20 @@ void xmrig::Miner::onTimer(const Timer *) } d_ptr->ticks++; + + if (d_ptr->controller->config()->isPauseOnBattery()) { + const bool battery_power = Platform::isOnBatteryPower(); + if (battery_power && d_ptr->enabled) { + LOG_INFO("%s " YELLOW_BOLD("on battery power"), Tags::miner()); + d_ptr->battery_power = true; + setEnabled(false); + } + else if (!battery_power && !d_ptr->enabled && d_ptr->battery_power) { + LOG_INFO("%s " GREEN_BOLD("on AC power"), Tags::miner()); + d_ptr->battery_power = false; + setEnabled(true); + } + } } diff --git a/src/core/config/Config.cpp b/src/core/config/Config.cpp index 81eac42bb..4205e5e6f 100644 --- a/src/core/config/Config.cpp +++ b/src/core/config/Config.cpp @@ -252,4 +252,5 @@ void xmrig::Config::getJSON(rapidjson::Document &doc) const doc.AddMember(StringRef(kUserAgent), m_userAgent.toJSON(), allocator); doc.AddMember(StringRef(kVerbose), Log::verbose(), allocator); doc.AddMember(StringRef(kWatch), m_watch, allocator); + doc.AddMember(StringRef(kPauseOnBattery), isPauseOnBattery(), allocator); } diff --git a/src/core/config/ConfigTransform.cpp b/src/core/config/ConfigTransform.cpp index eccbd2354..80e8d07d0 100644 --- a/src/core/config/ConfigTransform.cpp +++ b/src/core/config/ConfigTransform.cpp @@ -5,8 +5,8 @@ * Copyright 2014-2016 Wolf9466 * Copyright 2016 Jay D Dee * Copyright 2017-2018 XMR-Stak , - * Copyright 2018-2019 SChernykh - * Copyright 2016-2019 XMRig , + * Copyright 2018-2020 SChernykh + * Copyright 2016-2020 XMRig , * * 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 @@ -151,6 +151,9 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const case IConfig::YieldKey: /* --cpu-no-yield */ return set(doc, kCpu, "yield", false); + case IConfig::Argon2ImplKey: /* --argon2-impl */ + return set(doc, kCpu, "argon2-impl", arg); + # ifdef XMRIG_FEATURE_ASM case IConfig::AssemblyKey: /* --asm */ return set(doc, kCpu, "asm", arg); @@ -186,6 +189,9 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const case IConfig::RandomXRdmsrKey: /* --randomx-no-rdmsr */ return set(doc, kRandomX, "rdmsr", false); + + case IConfig::RandomXCacheQoSKey: /* --cache-qos */ + return set(doc, kRandomX, "cache_qos", true); # endif # ifdef XMRIG_FEATURE_OPENCL diff --git a/src/core/config/ConfigTransform.h b/src/core/config/ConfigTransform.h index 66c497abe..1c01433f3 100644 --- a/src/core/config/ConfigTransform.h +++ b/src/core/config/ConfigTransform.h @@ -5,8 +5,8 @@ * Copyright 2014-2016 Wolf9466 * Copyright 2016 Jay D Dee * Copyright 2017-2018 XMR-Stak , - * Copyright 2018-2019 SChernykh - * Copyright 2016-2019 XMRig , + * Copyright 2018-2020 SChernykh + * Copyright 2016-2020 XMRig , * * 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 diff --git a/src/core/config/Config_default.h b/src/core/config/Config_default.h index e56cd7d98..dd01fa12b 100644 --- a/src/core/config/Config_default.h +++ b/src/core/config/Config_default.h @@ -109,7 +109,8 @@ R"===( "retry-pause": 5, "syslog": false, "user-agent": null, - "watch": true + "watch": true, + "pause-on-battery": false } )==="; #endif diff --git a/src/core/config/Config_platform.h b/src/core/config/Config_platform.h index 6125fdd90..3c6329f5b 100644 --- a/src/core/config/Config_platform.h +++ b/src/core/config/Config_platform.h @@ -87,11 +87,15 @@ static const option options[] = { { "cpu-max-threads-hint", 1, nullptr, IConfig::CPUMaxThreadsKey }, { "cpu-memory-pool", 1, nullptr, IConfig::MemoryPoolKey }, { "cpu-no-yield", 0, nullptr, IConfig::YieldKey }, + { "no-yield", 0, nullptr, IConfig::YieldKey }, + { "cpu-argon2-impl", 1, nullptr, IConfig::Argon2ImplKey }, + { "argon2-impl", 1, nullptr, IConfig::Argon2ImplKey }, { "verbose", 0, nullptr, IConfig::VerboseKey }, { "proxy", 1, nullptr, IConfig::ProxyKey }, { "data-dir", 1, nullptr, IConfig::DataDirKey }, { "title", 1, nullptr, IConfig::TitleKey }, { "no-title", 0, nullptr, IConfig::NoTitleKey }, + { "pause-on-battery", 0, nullptr, IConfig::PauseOnBatteryKey }, # ifdef XMRIG_FEATURE_TLS { "tls", 0, nullptr, IConfig::TlsKey }, { "tls-fingerprint", 1, nullptr, IConfig::FingerprintKey }, @@ -116,6 +120,8 @@ static const option options[] = { { "wrmsr", 2, nullptr, IConfig::RandomXWrmsrKey }, { "randomx-no-rdmsr", 0, nullptr, IConfig::RandomXRdmsrKey }, { "no-rdmsr", 0, nullptr, IConfig::RandomXRdmsrKey }, + { "randomx-cache-qos", 0, nullptr, IConfig::RandomXCacheQoSKey }, + { "cache-qos", 0, nullptr, IConfig::RandomXCacheQoSKey }, # endif #ifdef XMRIG_ALGO_ASTROBWT { "astrobwt-max-size", 1, nullptr, IConfig::AstroBWTMaxSizeKey }, diff --git a/src/core/config/usage.h b/src/core/config/usage.h index e265559b3..1b68973af 100644 --- a/src/core/config/usage.h +++ b/src/core/config/usage.h @@ -69,7 +69,7 @@ static inline const std::string &usage() u += " -r, --retries=N number of times to retry before switch to backup server (default: 5)\n"; u += " -R, --retry-pause=N time to pause between retries (default: 5)\n"; u += " --user-agent set custom user-agent string for pool\n"; - u += " --donate-level=N donate level, default 5%% (5 minutes in 100 minutes)\n"; + u += " --donate-level=N donate level, default 1%% (1 minute in 100 minutes)\n"; u += " --donate-over-proxy=N control donate over xmrig-proxy feature\n"; u += "\nCPU backend:\n"; @@ -85,13 +85,18 @@ static inline const std::string &usage() u += " --no-huge-pages disable huge pages support\n"; u += " --asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer\n"; +# if defined(__x86_64__) || defined(_M_AMD64) + u += " --argon2-impl=IMPL argon2 implementation: x86_64, SSE2, SSSE3, XOP, AVX2, AVX-512F\n"; +# endif + # ifdef XMRIG_ALGO_RANDOMX u += " --randomx-init=N threads count to initialize RandomX dataset\n"; u += " --randomx-no-numa disable NUMA support for RandomX\n"; u += " --randomx-mode=MODE RandomX mode: auto, fast, light\n"; - u += " --randomx-1gb-pages use 1GB hugepages for dataset (Linux only)\n"; - u += " --randomx-wrmsr=N write custom value (0-15) to Intel MSR register 0x1a4 or disable MSR mod (-1)\n"; + u += " --randomx-1gb-pages use 1GB hugepages for RandomX dataset (Linux only)\n"; + u += " --randomx-wrmsr=N write custom value(s) to MSR registers or disable MSR mod (-1)\n"; u += " --randomx-no-rdmsr disable reverting initial MSR values on exit\n"; + u += " --randomx-cache-qos enable Cache QoS\n"; # endif # ifdef XMRIG_ALGO_ASTROBWT @@ -99,16 +104,6 @@ static inline const std::string &usage() u += " --astrobwt-avx2 enable AVX2 optimizations for AstroBWT algorithm"; # endif -# ifdef XMRIG_FEATURE_HTTP - u += "\nAPI:\n"; - u += " --api-worker-id=ID custom worker-id for API\n"; - u += " --api-id=ID custom instance ID for API\n"; - u += " --http-host=HOST bind host for HTTP API (default: 127.0.0.1)\n"; - u += " --http-port=N bind port for HTTP API\n"; - u += " --http-access-token=T access token for HTTP API\n"; - u += " --http-no-restricted enable full remote access to HTTP API (only if access token set)\n"; -# endif - # ifdef XMRIG_FEATURE_OPENCL u += "\nOpenCL backend:\n"; u += " --opencl enable OpenCL mining backend\n"; @@ -131,6 +126,16 @@ static inline const std::string &usage() u += " --no-nvml disable NVML (NVIDIA Management Library) support\n"; # endif +# ifdef XMRIG_FEATURE_HTTP + u += "\nAPI:\n"; + u += " --api-worker-id=ID custom worker-id for API\n"; + u += " --api-id=ID custom instance ID for API\n"; + u += " --http-host=HOST bind host for HTTP API (default: 127.0.0.1)\n"; + u += " --http-port=N bind port for HTTP API\n"; + u += " --http-access-token=T access token for HTTP API\n"; + u += " --http-no-restricted enable full remote access to HTTP API (only if access token set)\n"; +# endif + # ifdef XMRIG_FEATURE_TLS u += "\nTLS:\n"; u += " --tls-gen=HOSTNAME generate TLS certificate for specific hostname\n"; @@ -172,6 +177,7 @@ static inline const std::string &usage() u += " --title set custom console window title\n"; u += " --no-title disable setting console window title\n"; # endif + u += " --pause-on-battery pause mine on battery power\n"; return u; } diff --git a/src/crypto/argon2/Impl.cpp b/src/crypto/argon2/Impl.cpp index f032cb277..42bd55874 100644 --- a/src/crypto/argon2/Impl.cpp +++ b/src/crypto/argon2/Impl.cpp @@ -72,8 +72,8 @@ bool xmrig::argon2::Impl::select(const String &nameHint, bool benchmark) } } - if (hint.isEmpty() || argon2_select_impl_by_name(hint) == 0) { - argon2_select_impl(); + if (!hint.isEmpty()) { + argon2_select_impl_by_name(hint); } # endif diff --git a/src/crypto/randomx/randomx.cpp b/src/crypto/randomx/randomx.cpp index f0adf5414..7bb7df7fb 100644 --- a/src/crypto/randomx/randomx.cpp +++ b/src/crypto/randomx/randomx.cpp @@ -165,32 +165,43 @@ RandomX_ConfigurationBase::RandomX_ConfigurationBase() fillAes4Rx4_Key[6] = rx_set_int_vec_i128(0xf63befa7, 0x2ba9660a, 0xf765a38b, 0xf273c9e7); fillAes4Rx4_Key[7] = rx_set_int_vec_i128(0xc0b0762d, 0x0c06d1fd, 0x915839de, 0x7a7cd609); + // Workaround for Visual Studio placing trampoline in debug builds. + auto addr = [](void (*func)()) { + const uint8_t* p = reinterpret_cast(func); +# if defined(_MSC_VER) + if (p[0] == 0xE9) { + p += *(const int32_t*)(p + 1) + 5; + } +# endif + return p; + }; + #if defined(_M_X64) || defined(__x86_64__) { - const uint8_t* a = (const uint8_t*)&randomx_sshash_prefetch; - const uint8_t* b = (const uint8_t*)&randomx_sshash_end; + const uint8_t* a = addr(randomx_sshash_prefetch); + const uint8_t* b = addr(randomx_sshash_end); memcpy(codeShhPrefetchTweaked, a, b - a); } { - const uint8_t* a = (const uint8_t*)&randomx_program_read_dataset; - const uint8_t* b = (const uint8_t*)&randomx_program_read_dataset_ryzen; + const uint8_t* a = addr(randomx_program_read_dataset); + const uint8_t* b = addr(randomx_program_read_dataset_ryzen); memcpy(codeReadDatasetTweaked, a, b - a); codeReadDatasetTweakedSize = b - a; } { - const uint8_t* a = (const uint8_t*)&randomx_program_read_dataset_ryzen; - const uint8_t* b = (const uint8_t*)&randomx_program_read_dataset_sshash_init; + const uint8_t* a = addr(randomx_program_read_dataset_ryzen); + const uint8_t* b = addr(randomx_program_read_dataset_sshash_init); memcpy(codeReadDatasetRyzenTweaked, a, b - a); codeReadDatasetRyzenTweakedSize = b - a; } { - const uint8_t* a = (const uint8_t*)&randomx_program_read_dataset_sshash_init; - const uint8_t* b = (const uint8_t*)&randomx_program_read_dataset_sshash_fin; + const uint8_t* a = addr(randomx_program_read_dataset_sshash_init); + const uint8_t* b = addr(randomx_program_read_dataset_sshash_fin); memcpy(codeReadDatasetLightSshInitTweaked, a, b - a); } { - const uint8_t* a = (const uint8_t*)&randomx_prefetch_scratchpad; - const uint8_t* b = (const uint8_t*)&randomx_prefetch_scratchpad_end; + const uint8_t* a = addr(randomx_prefetch_scratchpad); + const uint8_t* b = addr(randomx_prefetch_scratchpad_end); memcpy(codePrefetchScratchpadTweaked, a, b - a); } #endif diff --git a/src/crypto/rx/Rx.cpp b/src/crypto/rx/Rx.cpp index 36a9c5936..4c98d85ad 100644 --- a/src/crypto/rx/Rx.cpp +++ b/src/crypto/rx/Rx.cpp @@ -30,7 +30,6 @@ #include "backend/cpu/CpuConfig.h" #include "backend/cpu/CpuThreads.h" #include "base/io/log/Log.h" -#include "base/io/log/Tags.h" #include "crypto/rx/RxConfig.h" #include "crypto/rx/RxQueue.h" @@ -58,48 +57,6 @@ public: } // namespace xmrig -const char *xmrig::rx_tag() -{ - return Tags::randomx(); -} - - -bool xmrig::Rx::init(const Job &job, const RxConfig &config, const CpuConfig &cpu) -{ - if (job.algorithm().family() != Algorithm::RANDOM_X) { - if (msrInitialized) { - msrDestroy(); - msrInitialized = false; - } - return true; - } - - if (isReady(job)) { - return true; - } - - if (!msrInitialized) { - msrInit(config, cpu.threads().get(job.algorithm()).data()); - msrInitialized = true; - } - - if (!osInitialized) { - setupMainLoopExceptionFrame(); - osInitialized = true; - } - - d_ptr->queue.enqueue(job, config.nodeset(), config.threads(cpu.limit()), cpu.isHugePages(), config.isOneGbPages(), config.mode(), cpu.priority()); - - return false; -} - - -bool xmrig::Rx::isReady(const Job &job) -{ - return d_ptr->queue.isReady(job); -} - - xmrig::HugePagesInfo xmrig::Rx::hugePages() { return d_ptr->queue.hugePages(); @@ -130,6 +87,45 @@ void xmrig::Rx::init(IRxListener *listener) } +template +bool xmrig::Rx::init(const T &seed, const RxConfig &config, const CpuConfig &cpu) +{ + if (seed.algorithm().family() != Algorithm::RANDOM_X) { + if (msrInitialized) { + msrDestroy(); + msrInitialized = false; + } + + return true; + } + + if (isReady(seed)) { + return true; + } + + if (!msrInitialized) { + msrInit(config, cpu.threads().get(seed.algorithm()).data()); + msrInitialized = true; + } + + if (!osInitialized) { + setupMainLoopExceptionFrame(); + osInitialized = true; + } + + d_ptr->queue.enqueue(seed, config.nodeset(), config.threads(cpu.limit()), cpu.isHugePages(), config.isOneGbPages(), config.mode(), cpu.priority()); + + return false; +} + + +template +bool xmrig::Rx::isReady(const T &seed) +{ + return d_ptr->queue.isReady(seed); +} + + #ifndef XMRIG_FEATURE_MSR void xmrig::Rx::msrInit(const RxConfig &, const std::vector &) { @@ -147,3 +143,15 @@ void xmrig::Rx::setupMainLoopExceptionFrame() { } #endif + + +namespace xmrig { + + +template bool Rx::init(const RxSeed &seed, const RxConfig &config, const CpuConfig &cpu); +template bool Rx::isReady(const RxSeed &seed); +template bool Rx::init(const Job &seed, const RxConfig &config, const CpuConfig &cpu); +template bool Rx::isReady(const Job &seed); + + +} // namespace xmrig diff --git a/src/crypto/rx/Rx.h b/src/crypto/rx/Rx.h index 43be29cc2..71a9fb13e 100644 --- a/src/crypto/rx/Rx.h +++ b/src/crypto/rx/Rx.h @@ -7,8 +7,8 @@ * Copyright 2017-2019 XMR-Stak , * Copyright 2018 Lee Clagett * Copyright 2018-2019 tevador - * Copyright 2018-2019 SChernykh - * Copyright 2016-2019 XMRig , + * Copyright 2018-2020 SChernykh + * Copyright 2016-2020 XMRig , * * 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 @@ -52,12 +52,12 @@ class RxDataset; class Rx { public: - static bool init(const Job &job, const RxConfig &config, const CpuConfig &cpu); - static bool isReady(const Job &job); static HugePagesInfo hugePages(); static RxDataset *dataset(const Job &job, uint32_t nodeId); static void destroy(); static void init(IRxListener *listener); + template static bool init(const T &seed, const RxConfig &config, const CpuConfig &cpu); + template static bool isReady(const T &seed); # ifdef XMRIG_FIX_RYZEN static void setMainLoopBounds(const std::pair& bounds); diff --git a/src/crypto/rx/RxBasicStorage.cpp b/src/crypto/rx/RxBasicStorage.cpp index 8026166d6..7f3896660 100644 --- a/src/crypto/rx/RxBasicStorage.cpp +++ b/src/crypto/rx/RxBasicStorage.cpp @@ -7,8 +7,8 @@ * Copyright 2017-2019 XMR-Stak , * Copyright 2018 Lee Clagett * Copyright 2018-2019 tevador - * Copyright 2018-2019 SChernykh - * Copyright 2016-2019 XMRig , + * Copyright 2018-2020 SChernykh + * Copyright 2016-2020 XMRig , * * 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 @@ -28,6 +28,7 @@ #include "crypto/rx/RxBasicStorage.h" #include "backend/common/Tags.h" #include "base/io/log/Log.h" +#include "base/io/log/Tags.h" #include "base/tools/Chrono.h" #include "base/tools/Object.h" #include "crypto/rx/RxAlgo.h" @@ -75,7 +76,7 @@ public: if (!m_dataset->cache()->get()) { deleteDataset(); - LOG_INFO("%s" RED_BOLD("failed to allocate RandomX memory") BLACK_BOLD(" (%" PRIu64 " ms)"), rx_tag(), Chrono::steadyMSecs() - ts); + LOG_INFO("%s" RED_BOLD("failed to allocate RandomX memory") BLACK_BOLD(" (%" PRIu64 " ms)"), Tags::randomx(), Chrono::steadyMSecs() - ts); return false; } @@ -93,7 +94,7 @@ public: m_ready = m_dataset->init(m_seed.data(), threads, priority); if (m_ready) { - LOG_INFO("%s" GREEN_BOLD("dataset ready") BLACK_BOLD(" (%" PRIu64 " ms)"), rx_tag(), Chrono::steadyMSecs() - ts); + LOG_INFO("%s" GREEN_BOLD("dataset ready") BLACK_BOLD(" (%" PRIu64 " ms)"), Tags::randomx(), Chrono::steadyMSecs() - ts); } } @@ -105,7 +106,7 @@ private: const auto pages = m_dataset->hugePages(); LOG_INFO("%s" GREEN_BOLD("allocated") CYAN_BOLD(" %zu MB") BLACK_BOLD(" (%zu+%zu)") " huge pages %s%1.0f%% %u/%u" CLEAR " %sJIT" BLACK_BOLD(" (%" PRIu64 " ms)"), - rx_tag(), + Tags::randomx(), pages.size / oneMiB, RxDataset::maxSize() / oneMiB, RxCache::maxSize() / oneMiB, @@ -118,7 +119,7 @@ private: ); } else { - LOG_WARN(CLEAR "%s" YELLOW_BOLD_S "failed to allocate RandomX dataset, switching to slow mode" BLACK_BOLD(" (%" PRIu64 " ms)"), rx_tag(), Chrono::steadyMSecs() - ts); + LOG_WARN(CLEAR "%s" YELLOW_BOLD_S "failed to allocate RandomX dataset, switching to slow mode" BLACK_BOLD(" (%" PRIu64 " ms)"), Tags::randomx(), Chrono::steadyMSecs() - ts); } } diff --git a/src/crypto/rx/RxBasicStorage.h b/src/crypto/rx/RxBasicStorage.h index f11eb48aa..c689df835 100644 --- a/src/crypto/rx/RxBasicStorage.h +++ b/src/crypto/rx/RxBasicStorage.h @@ -7,8 +7,8 @@ * Copyright 2017-2019 XMR-Stak , * Copyright 2018 Lee Clagett * Copyright 2018-2019 tevador - * Copyright 2018-2019 SChernykh - * Copyright 2016-2019 XMRig , + * Copyright 2018-2020 SChernykh + * Copyright 2016-2020 XMRig , * * 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 diff --git a/src/crypto/rx/RxDataset.cpp b/src/crypto/rx/RxDataset.cpp index e0e9fccff..ef2371e0e 100644 --- a/src/crypto/rx/RxDataset.cpp +++ b/src/crypto/rx/RxDataset.cpp @@ -26,8 +26,8 @@ #include "crypto/rx/RxDataset.h" -#include "backend/common/Tags.h" #include "base/io/log/Log.h" +#include "base/io/log/Tags.h" #include "base/kernel/Platform.h" #include "crypto/common/VirtualMemory.h" #include "crypto/rx/RxAlgo.h" @@ -181,13 +181,13 @@ void xmrig::RxDataset::setRaw(const void *raw) void xmrig::RxDataset::allocate(bool hugePages, bool oneGbPages) { if (m_mode == RxConfig::LightMode) { - LOG_ERR(CLEAR "%s" RED_BOLD_S "fast RandomX mode disabled by config", rx_tag()); + LOG_ERR(CLEAR "%s" RED_BOLD_S "fast RandomX mode disabled by config", Tags::randomx()); return; } if (m_mode == RxConfig::AutoMode && uv_get_total_memory() < (maxSize() + RxCache::maxSize())) { - LOG_ERR(CLEAR "%s" RED_BOLD_S "not enough memory for RandomX dataset", rx_tag()); + LOG_ERR(CLEAR "%s" RED_BOLD_S "not enough memory for RandomX dataset", Tags::randomx()); return; } @@ -197,7 +197,7 @@ void xmrig::RxDataset::allocate(bool hugePages, bool oneGbPages) # ifdef XMRIG_OS_LINUX if (oneGbPages && !isOneGbPages()) { - LOG_ERR(CLEAR "%s" RED_BOLD_S "failed to allocate RandomX dataset using 1GB pages", rx_tag()); + LOG_ERR(CLEAR "%s" RED_BOLD_S "failed to allocate RandomX dataset using 1GB pages", Tags::randomx()); } # endif } diff --git a/src/crypto/rx/RxDataset.h b/src/crypto/rx/RxDataset.h index 34840fc42..a6bb74557 100644 --- a/src/crypto/rx/RxDataset.h +++ b/src/crypto/rx/RxDataset.h @@ -29,6 +29,7 @@ #include "base/crypto/Algorithm.h" +#include "base/tools/Buffer.h" #include "base/tools/Object.h" #include "crypto/common/HugePagesInfo.h" #include "crypto/randomx/configuration.h" @@ -43,7 +44,6 @@ namespace xmrig { -class Buffer; class RxCache; class VirtualMemory; diff --git a/src/crypto/rx/RxNUMAStorage.cpp b/src/crypto/rx/RxNUMAStorage.cpp index e345aaa9a..01164f64a 100644 --- a/src/crypto/rx/RxNUMAStorage.cpp +++ b/src/crypto/rx/RxNUMAStorage.cpp @@ -7,8 +7,8 @@ * Copyright 2017-2019 XMR-Stak , * Copyright 2018 Lee Clagett * Copyright 2018-2019 tevador - * Copyright 2018-2019 SChernykh - * Copyright 2016-2019 XMRig , + * Copyright 2018-2020 SChernykh + * Copyright 2016-2020 XMRig , * * 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 @@ -26,10 +26,10 @@ #include "crypto/rx/RxNUMAStorage.h" -#include "backend/common/Tags.h" #include "backend/cpu/Cpu.h" #include "backend/cpu/platform/HwlocCpuInfo.h" #include "base/io/log/Log.h" +#include "base/io/log/Tags.h" #include "base/kernel/Platform.h" #include "base/tools/Chrono.h" #include "base/tools/Object.h" @@ -72,13 +72,13 @@ static bool bindToNUMANode(uint32_t nodeId) static inline void printSkipped(uint32_t nodeId, const char *reason) { - LOG_WARN("%s" CYAN_BOLD("#%u ") RED_BOLD("skipped") YELLOW(" (%s)"), rx_tag(), nodeId, reason); + LOG_WARN("%s" CYAN_BOLD("#%u ") RED_BOLD("skipped") YELLOW(" (%s)"), Tags::randomx(), nodeId, reason); } static inline void printDatasetReady(uint32_t nodeId, uint64_t ts) { - LOG_INFO("%s" CYAN_BOLD("#%u ") GREEN_BOLD("dataset ready") BLACK_BOLD(" (%" PRIu64 " ms)"), rx_tag(), nodeId, Chrono::steadyMSecs() - ts); + LOG_INFO("%s" CYAN_BOLD("#%u ") GREEN_BOLD("dataset ready") BLACK_BOLD(" (%" PRIu64 " ms)"), Tags::randomx(), nodeId, Chrono::steadyMSecs() - ts); } @@ -142,7 +142,7 @@ public: if (m_datasets.empty()) { m_datasets.insert({ m_nodeset.front(), new RxDataset(m_cache) }); - LOG_WARN(CLEAR "%s" YELLOW_BOLD_S "failed to allocate RandomX datasets, switching to slow mode" BLACK_BOLD(" (%" PRIu64 " ms)"), rx_tag(), Chrono::steadyMSecs() - ts); + LOG_WARN(CLEAR "%s" YELLOW_BOLD_S "failed to allocate RandomX datasets, switching to slow mode" BLACK_BOLD(" (%" PRIu64 " ms)"), Tags::randomx(), Chrono::steadyMSecs() - ts); } else { if (m_cache) { @@ -246,7 +246,7 @@ private: if (!cache->get()) { delete cache; - LOG_INFO("%s" RED_BOLD("failed to allocate RandomX memory") BLACK_BOLD(" (%" PRIu64 " ms)"), rx_tag(), Chrono::steadyMSecs() - ts); + LOG_INFO("%s" RED_BOLD("failed to allocate RandomX memory") BLACK_BOLD(" (%" PRIu64 " ms)"), Tags::randomx(), Chrono::steadyMSecs() - ts); return; } @@ -272,7 +272,7 @@ private: const auto pages = dataset->hugePages(); LOG_INFO("%s" CYAN_BOLD("#%u ") GREEN_BOLD("allocated") CYAN_BOLD(" %zu MB") " huge pages %s%3.0f%%" CLEAR BLACK_BOLD(" (%" PRIu64 " ms)"), - rx_tag(), + Tags::randomx(), nodeId, pages.size / oneMiB, (pages.isFullyAllocated() ? GREEN_BOLD_S : RED_BOLD_S), @@ -287,7 +287,7 @@ private: const auto pages = cache->hugePages(); LOG_INFO("%s" CYAN_BOLD("#%u ") GREEN_BOLD("allocated") CYAN_BOLD(" %4zu MB") " huge pages %s%3.0f%%" CLEAR " %sJIT" BLACK_BOLD(" (%" PRIu64 " ms)"), - rx_tag(), + Tags::randomx(), nodeId, cache->size() / oneMiB, (pages.isFullyAllocated() ? GREEN_BOLD_S : RED_BOLD_S), @@ -303,7 +303,7 @@ private: auto pages = hugePages(); LOG_INFO("%s" CYAN_BOLD("-- ") GREEN_BOLD("allocated") CYAN_BOLD(" %4zu MB") " huge pages %s%3.0f%% %u/%u" CLEAR BLACK_BOLD(" (%" PRIu64 " ms)"), - rx_tag(), + Tags::randomx(), pages.size / oneMiB, (pages.isFullyAllocated() ? GREEN_BOLD_S : (pages.allocated == 0 ? RED_BOLD_S : YELLOW_BOLD_S)), pages.percent(), diff --git a/src/crypto/rx/RxNUMAStorage.h b/src/crypto/rx/RxNUMAStorage.h index 72900f42e..ef0d64310 100644 --- a/src/crypto/rx/RxNUMAStorage.h +++ b/src/crypto/rx/RxNUMAStorage.h @@ -7,8 +7,8 @@ * Copyright 2017-2019 XMR-Stak , * Copyright 2018 Lee Clagett * Copyright 2018-2019 tevador - * Copyright 2018-2019 SChernykh - * Copyright 2016-2019 XMRig , + * Copyright 2018-2020 SChernykh + * Copyright 2016-2020 XMRig , * * 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 diff --git a/src/crypto/rx/RxQueue.cpp b/src/crypto/rx/RxQueue.cpp index 59875a7b3..af139106f 100644 --- a/src/crypto/rx/RxQueue.cpp +++ b/src/crypto/rx/RxQueue.cpp @@ -7,8 +7,8 @@ * Copyright 2017-2019 XMR-Stak , * Copyright 2018 Lee Clagett * Copyright 2018-2019 tevador - * Copyright 2018-2019 SChernykh - * Copyright 2016-2019 XMRig , + * Copyright 2018-2020 SChernykh + * Copyright 2016-2020 XMRig , * * 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 @@ -26,11 +26,11 @@ #include "crypto/rx/RxQueue.h" -#include "backend/common/Tags.h" -#include "base/io/log/Log.h" -#include "crypto/rx/RxBasicStorage.h" -#include "base/tools/Handle.h" #include "backend/common/interfaces/IRxListener.h" +#include "base/io/log/Log.h" +#include "base/io/log/Tags.h" +#include "base/tools/Handle.h" +#include "crypto/rx/RxBasicStorage.h" #ifdef XMRIG_FEATURE_HWLOC @@ -66,14 +66,6 @@ xmrig::RxQueue::~RxQueue() } -bool xmrig::RxQueue::isReady(const Job &job) -{ - std::lock_guard lock(m_mutex); - - return isReadyUnsafe(job); -} - - xmrig::RxDataset *xmrig::RxQueue::dataset(const Job &job, uint32_t nodeId) { std::lock_guard lock(m_mutex); @@ -94,6 +86,15 @@ xmrig::HugePagesInfo xmrig::RxQueue::hugePages() } +template +bool xmrig::RxQueue::isReady(const T &seed) +{ + std::lock_guard lock(m_mutex); + + return isReadyUnsafe(seed); +} + + void xmrig::RxQueue::enqueue(const RxSeed &seed, const std::vector &nodeset, uint32_t threads, bool hugePages, bool oneGbPages, RxConfig::Mode mode, int priority) { std::unique_lock lock(m_mutex); @@ -124,9 +125,10 @@ void xmrig::RxQueue::enqueue(const RxSeed &seed, const std::vector &no } -bool xmrig::RxQueue::isReadyUnsafe(const Job &job) const +template +bool xmrig::RxQueue::isReadyUnsafe(const T &seed) const { - return m_storage != nullptr && m_storage->isAllocated() && m_state == STATE_IDLE && m_seed == job; + return m_storage != nullptr && m_storage->isAllocated() && m_state == STATE_IDLE && m_seed == seed; } @@ -149,7 +151,7 @@ void xmrig::RxQueue::backgroundInit() lock.unlock(); LOG_INFO("%s" MAGENTA_BOLD("init dataset%s") " algo " WHITE_BOLD("%s (") CYAN_BOLD("%u") WHITE_BOLD(" threads)") BLACK_BOLD(" seed %s..."), - rx_tag(), + Tags::randomx(), item.nodeset.size() > 1 ? "s" : "", item.seed.algorithm().shortName(), item.threads, @@ -180,3 +182,13 @@ void xmrig::RxQueue::onReady() m_listener->onDatasetReady(); } } + + +namespace xmrig { + + +template bool RxQueue::isReady(const Job &); +template bool RxQueue::isReady(const RxSeed &); + + +} // namespace xmrig diff --git a/src/crypto/rx/RxQueue.h b/src/crypto/rx/RxQueue.h index c83ae6d9a..fca4a12fc 100644 --- a/src/crypto/rx/RxQueue.h +++ b/src/crypto/rx/RxQueue.h @@ -7,8 +7,8 @@ * Copyright 2017-2019 XMR-Stak , * Copyright 2018 Lee Clagett * Copyright 2018-2019 tevador - * Copyright 2018-2019 SChernykh - * Copyright 2016-2019 XMRig , + * Copyright 2018-2020 SChernykh + * Copyright 2016-2020 XMRig , * * 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 @@ -82,9 +82,9 @@ public: RxQueue(IRxListener *listener); ~RxQueue(); - bool isReady(const Job &job); - RxDataset *dataset(const Job &job, uint32_t nodeId); HugePagesInfo hugePages(); + RxDataset *dataset(const Job &job, uint32_t nodeId); + template bool isReady(const T &seed); void enqueue(const RxSeed &seed, const std::vector &nodeset, uint32_t threads, bool hugePages, bool oneGbPages, RxConfig::Mode mode, int priority); private: @@ -94,7 +94,7 @@ private: STATE_SHUTDOWN }; - bool isReadyUnsafe(const Job &job) const; + template bool isReadyUnsafe(const T &seed) const; void backgroundInit(); void onReady(); diff --git a/src/crypto/rx/RxSeed.h b/src/crypto/rx/RxSeed.h index c8993a18f..f30fbfb72 100644 --- a/src/crypto/rx/RxSeed.h +++ b/src/crypto/rx/RxSeed.h @@ -7,8 +7,8 @@ * Copyright 2017-2019 XMR-Stak , * Copyright 2018 Lee Clagett * Copyright 2018-2019 tevador - * Copyright 2018-2019 SChernykh - * Copyright 2016-2019 XMRig , + * Copyright 2018-2020 SChernykh + * Copyright 2016-2020 XMRig , * * 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 diff --git a/src/version.h b/src/version.h index 807e93b73..1cdbd5c7a 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.3.0" +#define APP_VERSION "6.3.1-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 3 -#define APP_VER_PATCH 0 +#define APP_VER_PATCH 1 #ifdef _MSC_VER # if (_MSC_VER >= 1920)