Merge remote-tracking branch 'remotes/origin/sync-base' into evo
This commit is contained in:
commit
f6dbe32c86
227 changed files with 80367 additions and 12475 deletions
|
@ -1,6 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2022 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2022 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
|
||||
|
@ -26,6 +26,7 @@
|
|||
#include "backend/cpu/Cpu.h"
|
||||
#include "base/io/log/Log.h"
|
||||
#include "base/kernel/interfaces/IJsonReader.h"
|
||||
#include "base/kernel/private/DnsConfig.h"
|
||||
#include "base/net/dns/Dns.h"
|
||||
#include "crypto/common/Assembly.h"
|
||||
|
||||
|
@ -297,7 +298,7 @@ void xmrig::Config::getJSON(rapidjson::Document &doc) const
|
|||
doc.AddMember(StringRef(kTls), m_tls.toJSON(doc), allocator);
|
||||
# endif
|
||||
|
||||
doc.AddMember(StringRef(DnsConfig::kField), Dns::config().toJSON(doc), allocator);
|
||||
doc.AddMember(StringRef(DnsConfig::kField), DnsConfig::current().toJSON(doc), allocator);
|
||||
doc.AddMember(StringRef(kUserAgent), m_userAgent.toJSON(), allocator);
|
||||
doc.AddMember(StringRef(kVerbose), Log::verbose(), allocator);
|
||||
doc.AddMember(StringRef(kWatch), m_watch, allocator);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2022 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2022 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
|
||||
|
@ -25,8 +25,7 @@
|
|||
|
||||
#include "3rdparty/rapidjson/fwd.h"
|
||||
#include "backend/cpu/CpuConfig.h"
|
||||
#include "base/kernel/config/BaseConfig.h"
|
||||
#include "base/tools/Object.h"
|
||||
#include "base/kernel/v6/config/BaseConfig.h"
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2022 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2022 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
|
||||
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
|
||||
#include "core/config/ConfigTransform.h"
|
||||
#include "base/crypto/Algorithm.h"
|
||||
#include "base/kernel/interfaces/IConfig.h"
|
||||
#include "base/net/stratum/Pool.h"
|
||||
#include "base/net/stratum/Pools.h"
|
||||
|
@ -102,6 +103,9 @@ void xmrig::ConfigTransform::finalize(rapidjson::Document &doc)
|
|||
profile.AddMember(StringRef(kThreads), m_threads, allocator);
|
||||
profile.AddMember(StringRef(kAffinity), m_affinity, allocator);
|
||||
|
||||
# ifdef XMRIG_ALGO_KAWPOW
|
||||
doc[CpuConfig::kField].AddMember(StringRef(Algorithm::kKAWPOW), false, doc.GetAllocator());
|
||||
# endif
|
||||
doc[CpuConfig::kField].AddMember(StringRef(kAsterisk), profile, doc.GetAllocator());
|
||||
}
|
||||
|
||||
|
@ -159,14 +163,6 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
|
|||
return set(doc, CpuConfig::kField, CpuConfig::kAsm, arg);
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_ASTROBWT
|
||||
case IConfig::AstroBWTMaxSizeKey: /* --astrobwt-max-size */
|
||||
return set(doc, CpuConfig::kField, CpuConfig::kAstroBWTMaxSize, static_cast<uint64_t>(strtol(arg, nullptr, 10)));
|
||||
|
||||
case IConfig::AstroBWTAVX2Key: /* --astrobwt-avx2 */
|
||||
return set(doc, CpuConfig::kField, CpuConfig::kAstroBWTAVX2, true);
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
case IConfig::RandomXInitKey: /* --randomx-init */
|
||||
return set(doc, RxConfig::kField, RxConfig::kInit, static_cast<int64_t>(strtol(arg, nullptr, 10)));
|
||||
|
@ -265,6 +261,7 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
|
|||
case IConfig::BenchSeedKey: /* --seed */
|
||||
case IConfig::BenchHashKey: /* --hash */
|
||||
case IConfig::UserKey: /* --user */
|
||||
case IConfig::RotationKey: /* --rotation */
|
||||
return transformBenchmark(doc, key, arg);
|
||||
# endif
|
||||
|
||||
|
@ -322,16 +319,18 @@ void xmrig::ConfigTransform::transformUint64(rapidjson::Document &doc, int key,
|
|||
#ifdef XMRIG_FEATURE_BENCHMARK
|
||||
void xmrig::ConfigTransform::transformBenchmark(rapidjson::Document &doc, int key, const char *arg)
|
||||
{
|
||||
set(doc, CpuConfig::kField, CpuConfig::kHugePagesJit, true);
|
||||
set(doc, CpuConfig::kField, CpuConfig::kPriority, 2);
|
||||
set(doc, CpuConfig::kField, CpuConfig::kYield, false);
|
||||
|
||||
switch (key) {
|
||||
case IConfig::AlgorithmKey: /* --algo */
|
||||
return set(doc, BenchConfig::kBenchmark, BenchConfig::kAlgo, arg);
|
||||
|
||||
case IConfig::BenchKey: /* --bench */
|
||||
{
|
||||
// CPU settings for the benchmark
|
||||
set(doc, CpuConfig::kField, CpuConfig::kHugePagesJit, true);
|
||||
set(doc, CpuConfig::kField, CpuConfig::kPriority, 2);
|
||||
set(doc, CpuConfig::kField, CpuConfig::kYield, false);
|
||||
return set(doc, BenchConfig::kBenchmark, BenchConfig::kSize, arg);
|
||||
}
|
||||
|
||||
case IConfig::StressKey: /* --stress */
|
||||
return add(doc, Pools::kPools, Pool::kUser, BenchConfig::kBenchmark);
|
||||
|
@ -354,6 +353,9 @@ void xmrig::ConfigTransform::transformBenchmark(rapidjson::Document &doc, int ke
|
|||
case IConfig::UserKey: /* --user */
|
||||
return set(doc, BenchConfig::kBenchmark, BenchConfig::kUser, arg);
|
||||
|
||||
case IConfig::RotationKey: /* --rotation */
|
||||
return set(doc, BenchConfig::kBenchmark, BenchConfig::kRotation, arg);
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* XMRig
|
||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright (c) 2018-2022 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright (c) 2016-2022 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
|
||||
|
@ -20,7 +20,7 @@
|
|||
#define XMRIG_CONFIGTRANSFORM_H
|
||||
|
||||
|
||||
#include "base/kernel/config/BaseTransform.h"
|
||||
#include "base/kernel/v6/config/BaseTransform.h"
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
|
|
@ -66,8 +66,6 @@ R"===(
|
|||
"max-threads-hint": 100,
|
||||
"asm": true,
|
||||
"argon2-impl": null,
|
||||
"astrobwt-max-size": 550,
|
||||
"astrobwt-avx2": false,
|
||||
"cn/0": false,
|
||||
"cn-lite/0": false
|
||||
},
|
||||
|
|
|
@ -71,6 +71,7 @@ static const option options[] = {
|
|||
{ "hugepage-size", 1, nullptr, IConfig::HugePageSizeKey },
|
||||
{ "huge-pages-jit", 0, nullptr, IConfig::HugePagesJitKey },
|
||||
{ "hugepages-jit", 0, nullptr, IConfig::HugePagesJitKey },
|
||||
{ "rotation", 1, nullptr, IConfig::RotationKey },
|
||||
{ "pass", 1, nullptr, IConfig::PasswordKey },
|
||||
{ "print-time", 1, nullptr, IConfig::PrintTimeKey },
|
||||
{ "retries", 1, nullptr, IConfig::RetriesKey },
|
||||
|
@ -139,10 +140,6 @@ static const option options[] = {
|
|||
{ "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 },
|
||||
{ "astrobwt-avx2", 0, nullptr, IConfig::AstroBWTAVX2Key },
|
||||
#endif
|
||||
# ifdef XMRIG_FEATURE_OPENCL
|
||||
{ "opencl", 0, nullptr, IConfig::OclKey },
|
||||
{ "opencl-devices", 1, nullptr, IConfig::OclDevicesKey },
|
||||
|
|
|
@ -105,11 +105,6 @@ static const std::string &usage()
|
|||
u += " --randomx-cache-qos enable Cache QoS\n";
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_ASTROBWT
|
||||
u += " --astrobwt-max-size=N skip hashes with large stage 2 size, default: 550, min: 400, max: 1200\n";
|
||||
u += " --astrobwt-avx2 enable AVX2 optimizations for AstroBWT algorithm";
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_FEATURE_OPENCL
|
||||
u += "\nOpenCL backend:\n";
|
||||
u += " --opencl enable OpenCL mining backend\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue