Merge xmrig v6.18.0 into master

This commit is contained in:
MoneroOcean 2022-06-23 17:43:36 +00:00
commit 4b6759adf9
144 changed files with 6006 additions and 15104 deletions

View file

@ -62,11 +62,6 @@
#endif
#ifdef XMRIG_ALGO_ASTROBWT
# include "crypto/astrobwt/AstroBWT.h"
#endif
#ifdef XMRIG_ALGO_GHOSTRIDER
# include "crypto/ghostrider/ghostrider.h"
#endif
@ -399,10 +394,6 @@ xmrig::Miner::Miner(Controller *controller)
Rx::init(this);
# endif
# ifdef XMRIG_ALGO_ASTROBWT
astrobwt::init();
# endif
controller->addListener(this);
# ifdef XMRIG_FEATURE_API
@ -515,7 +506,7 @@ void xmrig::Miner::setEnabled(bool enabled)
return;
}
if (d_ptr->battery_power && enabled) {
if (d_ptr->controller->config()->isPauseOnBattery() && d_ptr->battery_power && enabled) {
LOG_INFO("%s " YELLOW_BOLD("can't resume while on battery power"), Tags::miner());
return;

View file

@ -166,14 +166,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)));
@ -330,16 +322,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);

View file

@ -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
},

View file

@ -145,10 +145,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 },

View file

@ -108,11 +108,6 @@ static inline 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";