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/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