This commit is contained in:
commit
ca0f93bb22
109 changed files with 4895 additions and 461 deletions
|
@ -41,6 +41,7 @@
|
|||
#include "core/Miner.h"
|
||||
#include "crypto/common/Nonce.h"
|
||||
#include "crypto/rx/Rx.h"
|
||||
#include "crypto/astrobwt/AstroBWT.h"
|
||||
#include "rapidjson/document.h"
|
||||
#include "version.h"
|
||||
|
||||
|
@ -242,6 +243,10 @@ public:
|
|||
# endif
|
||||
|
||||
|
||||
# ifdef XMRIG_ALGO_ASTROBWT
|
||||
inline bool initAstroBWT() { return astrobwt::init(job); }
|
||||
# endif
|
||||
|
||||
Algorithm algorithm;
|
||||
Algorithms algorithms;
|
||||
bool active = false;
|
||||
|
@ -454,10 +459,14 @@ void xmrig::Miner::setJob(const Job &job, bool donate)
|
|||
d_ptr->userJobId = job.id();
|
||||
}
|
||||
|
||||
bool ready = true;
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
const bool ready = d_ptr->initRX();
|
||||
# else
|
||||
constexpr const bool ready = true;
|
||||
ready &= d_ptr->initRX();
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_ASTROBWT
|
||||
ready &= d_ptr->initAstroBWT();
|
||||
# endif
|
||||
|
||||
mutex.unlock();
|
||||
|
|
|
@ -212,7 +212,7 @@ void xmrig::Config::getJSON(rapidjson::Document &doc) const
|
|||
auto &allocator = doc.GetAllocator();
|
||||
|
||||
Value api(kObjectType);
|
||||
api.AddMember(StringRef(kApiId), m_apiId.toJSON(), allocator);
|
||||
api.AddMember(StringRef(kApiId), m_apiId.toJSON(), allocator);
|
||||
api.AddMember(StringRef(kApiWorkerId), m_apiWorkerId.toJSON(), allocator);
|
||||
|
||||
doc.AddMember(StringRef(kApi), api, allocator);
|
||||
|
@ -246,6 +246,11 @@ void xmrig::Config::getJSON(rapidjson::Document &doc) const
|
|||
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
|
||||
doc.AddMember(StringRef(kTls), m_tls.toJSON(doc), allocator);
|
||||
# endif
|
||||
|
||||
doc.AddMember(StringRef(kUserAgent), m_userAgent.toJSON(), allocator);
|
||||
doc.AddMember(StringRef(kVerbose), Log::verbose(), allocator);
|
||||
doc.AddMember(StringRef(kWatch), m_watch, allocator);
|
||||
|
|
|
@ -159,6 +159,9 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
|
|||
# ifdef XMRIG_ALGO_ASTROBWT
|
||||
case IConfig::AstroBWTMaxSizeKey: /* --astrobwt-max-size */
|
||||
return set(doc, kCpu, "astrobwt-max-size", static_cast<uint64_t>(strtol(arg, nullptr, 10)));
|
||||
|
||||
case IConfig::AstroBWTAVX2Key: /* --astrobwt-avx2 */
|
||||
return set(doc, kCpu, "astrobwt-avx2", true);
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
|
|
|
@ -91,9 +91,17 @@ static const option options[] = {
|
|||
{ "cpu-no-yield", 0, nullptr, IConfig::YieldKey },
|
||||
{ "verbose", 0, nullptr, IConfig::VerboseKey },
|
||||
{ "proxy", 1, nullptr, IConfig::ProxyKey },
|
||||
{ "data-dir", 1, nullptr, IConfig::DataDirKey },
|
||||
# ifdef XMRIG_FEATURE_TLS
|
||||
{ "tls", 0, nullptr, IConfig::TlsKey },
|
||||
{ "tls-fingerprint", 1, nullptr, IConfig::FingerprintKey },
|
||||
{ "tls-cert", 1, nullptr, IConfig::TlsCertKey },
|
||||
{ "tls-cert-key", 1, nullptr, IConfig::TlsCertKeyKey },
|
||||
{ "tls-dhparam", 1, nullptr, IConfig::TlsDHparamKey },
|
||||
{ "tls-protocols", 1, nullptr, IConfig::TlsProtocolsKey },
|
||||
{ "tls-ciphers", 1, nullptr, IConfig::TlsCiphersKey },
|
||||
{ "tls-ciphersuites", 1, nullptr, IConfig::TlsCipherSuitesKey },
|
||||
{ "tls-gen", 1, nullptr, IConfig::TlsGenKey },
|
||||
# endif
|
||||
# ifdef XMRIG_FEATURE_ASM
|
||||
{ "asm", 1, nullptr, IConfig::AssemblyKey },
|
||||
|
@ -111,6 +119,7 @@ static const option options[] = {
|
|||
# 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 },
|
||||
|
|
|
@ -96,6 +96,7 @@ static inline const std::string &usage()
|
|||
|
||||
# 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_HTTP
|
||||
|
@ -130,6 +131,17 @@ static inline const std::string &usage()
|
|||
u += " --no-nvml disable NVML (NVIDIA Management Library) support\n";
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_FEATURE_TLS
|
||||
u += "\nTLS:\n";
|
||||
u += " --tls-gen=HOSTNAME generate TLS certificate for specific hostname\n";
|
||||
u += " --tls-cert=FILE load TLS certificate chain from a file in the PEM format\n";
|
||||
u += " --tls-cert-key=FILE load TLS certificate private key from a file in the PEM format\n";
|
||||
u += " --tls-dhparam=FILE load DH parameters for DHE ciphers from a file in the PEM format\n";
|
||||
u += " --tls-protocols=N enable specified TLS protocols, example: \"TLSv1 TLSv1.1 TLSv1.2 TLSv1.3\"\n";
|
||||
u += " --tls-ciphers=S set list of available ciphers (TLSv1.2 and below)\n";
|
||||
u += " --tls-ciphersuites=S set list of available TLSv1.3 ciphersuites\n";
|
||||
# endif
|
||||
|
||||
u += "\nLogging:\n";
|
||||
|
||||
# ifdef HAVE_SYSLOG_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue