Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Smoothing fixes #28

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ option(WITH_NVML "Enable NVML (NVIDIA Management Library) support (on
option(WITH_ADL "Enable ADL (AMD Display Library) or sysfs support (only if OpenCL backend enabled)" ON)
option(WITH_STRICT_CACHE "Enable strict checks for OpenCL cache" ON)
option(WITH_INTERLEAVE_DEBUG_LOG "Enable debug log for threads interleave" OFF)
option(WITH_MO_BENCHMARK "Enable Benchmark module and algo-perf feature (for MoneroOcean)" ON)
option(WITH_PROFILING "Enable profiling for developers" OFF)
option(WITH_SSE4_1 "Enable SSE 4.1 for Blake2" ON)
option(WITH_AVX2 "Enable AVX2 for Blake2" ON)
option(WITH_VAES "Enable VAES instructions for Cryptonight" ON)
option(WITH_BENCHMARK "Enable builtin RandomX benchmark and stress test" ON)
option(WITH_SECURE_JIT "Enable secure access to JIT memory" OFF)
option(WITH_DMI "Enable DMI/SMBIOS reader" ON)
option(WITH_MO_BENCHMARK "Enable Benchmark module and algo-perf feature (for MoneroOcean)" ON)

option(BUILD_STATIC "Build static binary" OFF)
option(ARM_V8 "Force ARMv8 (64 bit) architecture, use with caution if automatic detection fails, but you sure it may work" OFF)
Expand Down Expand Up @@ -135,13 +135,6 @@ set(SOURCES_CRYPTO
src/crypto/flex/flex_keccak.c
)

if (WITH_MO_BENCHMARK)
list(APPEND SOURCES
src/core/MoBenchmark.cpp
)
add_definitions(/DXMRIG_FEATURE_MO_BENCHMARK)
endif()

if (CMAKE_C_COMPILER_ID MATCHES GNU)
set_source_files_properties(src/crypto/cn/CnHash.cpp PROPERTIES COMPILE_FLAGS "-Ofast -fno-tree-vectorize")
endif()
Expand Down Expand Up @@ -248,6 +241,13 @@ if (WITH_DEBUG_LOG)
add_definitions(/DAPP_DEBUG)
endif()

if (WITH_MO_BENCHMARK)
list(APPEND SOURCES
src/core/MoBenchmark.cpp
)
add_definitions(/DXMRIG_FEATURE_MO_BENCHMARK)
endif()

add_executable(${CMAKE_PROJECT_NAME} ${HEADERS} ${SOURCES} ${SOURCES_OS} ${HEADERS_CRYPTO} ${SOURCES_CRYPTO} ${SOURCES_SYSLOG} ${TLS_SOURCES} ${XMRIG_ASM_SOURCES})
target_link_libraries(${CMAKE_PROJECT_NAME} ${XMRIG_ASM_LIBRARY} ${OPENSSL_LIBRARIES} ${UV_LIBRARIES} ${EXTRA_LIBS} ${CPUID_LIB} ${ARGON2_LIBRARY} ${ETHASH_LIBRARY} ${GHOSTRIDER_LIBRARY})

Expand Down
12 changes: 5 additions & 7 deletions cmake/randomx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,11 @@ if (WITH_RANDOMX)
src/crypto/rx/RxDataset.cpp
src/crypto/rx/RxQueue.cpp
src/crypto/rx/RxVm.cpp

### Removed useless includes
src/crypto/randomx/panthera/sha256.c
src/crypto/randomx/panthera/KangarooTwelve.c
src/crypto/randomx/panthera/KeccakP-1600-reference.c
src/crypto/randomx/panthera/KeccakSpongeWidth1600.c
src/crypto/randomx/panthera/yespower-opt.c
src/crypto/randomx/panthera/sha256.c
src/crypto/randomx/panthera/KangarooTwelve.c
src/crypto/randomx/panthera/KeccakP-1600-reference.c
src/crypto/randomx/panthera/KeccakSpongeWidth1600.c
src/crypto/randomx/panthera/yespower-opt.c
)

if (WITH_ASM AND CMAKE_C_COMPILER_ID MATCHES MSVC)
Expand Down
4 changes: 0 additions & 4 deletions src/backend/common/Tags.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ const char *ocl_tag();
const char *cuda_tag();
#endif

#ifdef XMRIG_FEATURE_MO_BENCHMARK
const char *bm_tag();
#endif


} // namespace xmrig

Expand Down
4 changes: 3 additions & 1 deletion src/backend/common/Threads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ xmrig::String xmrig::Threads<T>::profileName(const Algorithm &algorithm, bool st
}
}

if (std::is_same<T, CpuThreads>::value && (name == "defyx" || name == "panthera") && has("rx")) return "rx";
if (std::is_same<T, CpuThreads>::value && (name == Algorithm::kRX_XLA) && has(Algorithm::kRX)) {
return Algorithm::kRX;
}

if (has(kAsterisk)) {
return kAsterisk;
Expand Down
2 changes: 1 addition & 1 deletion src/backend/cpu/platform/BasicCpuInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ xmrig::CpuThreads xmrig::BasicCpuInfo::threads(const Algorithm &algorithm, uint3

# ifdef XMRIG_ALGO_CN_FEMTO
if (f == Algorithm::CN_FEMTO) {
return CpuThreads(count, 2);
return CpuThreads(count_limit, 2);
}
# endif

Expand Down
3 changes: 1 addition & 2 deletions src/backend/opencl/cl/cn/algorithm.cl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#define ALGO_RX_WOW 0x72141177
#define ALGO_RX_ARQ 0x72121061
#define ALGO_RX_XEQ 0x72121000
#define ALGO_RX_XLA 0x721211ff
#define ALGO_RX_SFX 0x72151273
#define ALGO_RX_GRAFT 0x72151267
#define ALGO_RX_YADA 0x72151279
Expand All @@ -31,8 +32,6 @@
#define ALGO_AR2_WRKZ 0x61120000
#define ALGO_KAWPOW_RVN 0x6b0f0000

#define ALGO_RX_XLA 0x721211ff

#define FAMILY_UNKNOWN 0
#define FAMILY_CN 0x63150000
#define FAMILY_CN_LITE 0x63140000
Expand Down
18 changes: 9 additions & 9 deletions src/backend/opencl/cl/cn/cryptonight_cl.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ static const char cryptonight_cl[61538] = {
0x35,0x31,0x32,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x57,0x4f,0x57,0x20,0x30,0x78,0x37,0x32,0x31,0x34,
0x31,0x31,0x37,0x37,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x41,0x52,0x51,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31,
0x30,0x36,0x31,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x58,0x45,0x51,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31,0x30,
0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x53,0x46,0x58,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x37,
0x33,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x47,0x52,0x41,0x46,0x54,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,
0x36,0x37,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x59,0x41,0x44,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,
0x37,0x39,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x20,0x30,0x78,0x36,0x31,0x31,
0x33,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x5f,0x56,0x32,
0x20,0x30,0x78,0x36,0x31,0x31,0x34,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x57,0x52,0x4b,
0x5a,0x20,0x30,0x78,0x36,0x31,0x31,0x32,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x4b,0x41,0x57,0x50,0x4f,0x57,
0x5f,0x52,0x56,0x4e,0x20,0x30,0x78,0x36,0x62,0x30,0x66,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,
0x58,0x4c,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31,0x31,0x66,0x66,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x55,0x4e,
0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x58,0x4c,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31,0x31,0x66,
0x66,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x53,0x46,0x58,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x37,0x33,
0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x47,0x52,0x41,0x46,0x54,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x36,
0x37,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x59,0x41,0x44,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x37,
0x39,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x20,0x30,0x78,0x36,0x31,0x31,0x33,
0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x5f,0x56,0x32,0x20,
0x30,0x78,0x36,0x31,0x31,0x34,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x57,0x52,0x4b,0x5a,
0x20,0x30,0x78,0x36,0x31,0x31,0x32,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x4b,0x41,0x57,0x50,0x4f,0x57,0x5f,
0x52,0x56,0x4e,0x20,0x30,0x78,0x36,0x62,0x30,0x66,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x55,0x4e,
0x4b,0x4e,0x4f,0x57,0x4e,0x20,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x43,0x4e,0x20,0x30,0x78,0x36,0x33,0x31,0x35,
0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x43,0x4e,0x5f,0x4c,0x49,0x54,0x45,0x20,0x30,0x78,0x36,0x33,
0x31,0x34,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x43,0x4e,0x5f,0x48,0x45,0x41,0x56,0x59,0x20,0x30,
Expand Down
18 changes: 9 additions & 9 deletions src/backend/opencl/cl/rx/randomx_cl.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ static const char randomx_cl[137840] = {
0x31,0x32,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x57,0x4f,0x57,0x20,0x30,0x78,0x37,0x32,0x31,0x34,0x31,
0x31,0x37,0x37,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x41,0x52,0x51,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31,0x30,
0x36,0x31,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x58,0x45,0x51,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31,0x30,0x30,
0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x53,0x46,0x58,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x37,0x33,
0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x47,0x52,0x41,0x46,0x54,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x36,
0x37,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x59,0x41,0x44,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x37,
0x39,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x20,0x30,0x78,0x36,0x31,0x31,0x33,
0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x5f,0x56,0x32,0x20,
0x30,0x78,0x36,0x31,0x31,0x34,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x57,0x52,0x4b,0x5a,
0x20,0x30,0x78,0x36,0x31,0x31,0x32,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x4b,0x41,0x57,0x50,0x4f,0x57,0x5f,
0x52,0x56,0x4e,0x20,0x30,0x78,0x36,0x62,0x30,0x66,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x58,
0x4c,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31,0x31,0x66,0x66,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x55,0x4e,0x4b,
0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x58,0x4c,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x32,0x31,0x31,0x66,0x66,
0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x53,0x46,0x58,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x37,0x33,0x0a,
0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x47,0x52,0x41,0x46,0x54,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x36,0x37,
0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x52,0x58,0x5f,0x59,0x41,0x44,0x41,0x20,0x30,0x78,0x37,0x32,0x31,0x35,0x31,0x32,0x37,0x39,
0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x20,0x30,0x78,0x36,0x31,0x31,0x33,0x30,
0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x43,0x48,0x55,0x4b,0x57,0x41,0x5f,0x56,0x32,0x20,0x30,
0x78,0x36,0x31,0x31,0x34,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x41,0x52,0x32,0x5f,0x57,0x52,0x4b,0x5a,0x20,
0x30,0x78,0x36,0x31,0x31,0x32,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x41,0x4c,0x47,0x4f,0x5f,0x4b,0x41,0x57,0x50,0x4f,0x57,0x5f,0x52,
0x56,0x4e,0x20,0x30,0x78,0x36,0x62,0x30,0x66,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x55,0x4e,0x4b,
0x4e,0x4f,0x57,0x4e,0x20,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x43,0x4e,0x20,0x30,0x78,0x36,0x33,0x31,0x35,0x30,
0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x43,0x4e,0x5f,0x4c,0x49,0x54,0x45,0x20,0x30,0x78,0x36,0x33,0x31,
0x34,0x30,0x30,0x30,0x30,0x0a,0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x46,0x41,0x4d,0x49,0x4c,0x59,0x5f,0x43,0x4e,0x5f,0x48,0x45,0x41,0x56,0x59,0x20,0x30,0x78,
Expand Down
10 changes: 2 additions & 8 deletions src/base/crypto/Algorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const char *Algorithm::kRX_0 = "rx/0";
const char *Algorithm::kRX_WOW = "rx/wow";
const char *Algorithm::kRX_ARQ = "rx/arq";
const char *Algorithm::kRX_XEQ = "rx/xeq";
const char *Algorithm::kRX_XLA = "panthera";
const char *Algorithm::kRX_GRAFT = "rx/graft";
const char *Algorithm::kRX_SFX = "rx/sfx";
const char *Algorithm::kRX_KEVA = "rx/keva";
Expand All @@ -109,10 +110,6 @@ const char* Algorithm::kFLEX = "flex";
const char* Algorithm::kFLEX_KCN = "flex";
#endif

#ifdef XMRIG_ALGO_RANDOMX
const char *Algorithm::kRX_XLA = "panthera";
#endif


#define ALGO_NAME(ALGO) { Algorithm::ALGO, Algorithm::k##ALGO }
#define ALGO_ALIAS(ALGO, NAME) { NAME, Algorithm::ALGO }
Expand Down Expand Up @@ -287,6 +284,7 @@ static const std::map<const char *, Algorithm::Id, aliasCompare> kAlgorithmAlias
ALGO_ALIAS(RX_ARQ, "randomarq"),
ALGO_ALIAS_AUTO(RX_XEQ), ALGO_ALIAS(RX_XEQ, "randomx/xeq"),
ALGO_ALIAS(RX_XEQ, "randomxeq"),
ALGO_ALIAS_AUTO(RX_XLA), ALGO_ALIAS(RX_XLA, "Panthera"),
ALGO_ALIAS_AUTO(RX_GRAFT), ALGO_ALIAS(RX_GRAFT, "randomx/graft"),
ALGO_ALIAS(RX_GRAFT, "randomgraft"),
ALGO_ALIAS_AUTO(RX_SFX), ALGO_ALIAS(RX_SFX, "randomx/sfx"),
Expand All @@ -307,10 +305,6 @@ static const std::map<const char *, Algorithm::Id, aliasCompare> kAlgorithmAlias
ALGO_ALIAS_AUTO(KAWPOW_RVN), ALGO_ALIAS(KAWPOW_RVN, "kawpow/rvn"),
# endif

# ifdef XMRIG_ALGO_RANDOMX
ALGO_ALIAS_AUTO(RX_XLA), ALGO_ALIAS(RX_XLA, "Panthera"),
# endif

# ifdef XMRIG_ALGO_GHOSTRIDER
ALGO_ALIAS_AUTO(GHOSTRIDER_RTM), ALGO_ALIAS(GHOSTRIDER_RTM, "ghostrider/rtm"),
ALGO_ALIAS(GHOSTRIDER_RTM, "gr"),
Expand Down
3 changes: 1 addition & 2 deletions src/base/crypto/Algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class Algorithm
RX_WOW = 0x72141177, // "rx/wow" RandomWOW (Wownero).
RX_ARQ = 0x72121061, // "rx/arq" RandomARQ (Arqma).
RX_XEQ = 0x72121000,
RX_XLA = 0x721211ff, // "panthera" Panthera (Scala).
RX_GRAFT = 0x72151267, // "rx/graft" RandomGRAFT (Graft).
RX_SFX = 0x72151273, // "rx/sfx" RandomSFX (Safex Cash).
RX_KEVA = 0x7214116b, // "rx/keva" RandomKEVA (Keva).
Expand All @@ -86,8 +87,6 @@ class Algorithm
AR2_CHUKWA_V2 = 0x61140000, // "argon2/chukwav2" Argon2id (Chukwa v2).
AR2_WRKZ = 0x61120000, // "argon2/wrkz" Argon2id (WRKZ)
KAWPOW_RVN = 0x6b0f0000, // "kawpow/rvn" KawPow (RVN)

RX_XLA = 0x721211ff, // "panthera" Panthera (Scala2).
};

enum Family : uint32_t {
Expand Down
1 change: 1 addition & 0 deletions src/base/crypto/Coin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const char *Coin::kDisabled = "DISABLED_COIN";
const char *Coin::kField = "coin";
const char *Coin::kUnknown = "UNKNOWN_COIN";


} /* namespace xmrig */


Expand Down
8 changes: 4 additions & 4 deletions src/base/io/log/Tags.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ class Tags
static const char *opencl();
# endif

# ifdef XMRIG_FEATURE_MO_BENCHMARK
static const char *benchmark();
# endif

# ifdef XMRIG_FEATURE_PROFILING
static const char* profiler();
# endif

# ifdef XMRIG_FEATURE_MO_BENCHMARK
static const char *benchmark();
# endif
};


Expand Down
7 changes: 3 additions & 4 deletions src/base/kernel/config/BaseConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ bool xmrig::BaseConfig::read(const IJsonReader &reader, const char *fileName)
m_autoSave = reader.getBool(kAutosave, m_autoSave);
m_background = reader.getBool(kBackground, m_background);
m_dryRun = reader.getBool(kDryRun, m_dryRun);
# ifdef XMRIG_FEATURE_MO_BENCHMARK
m_rebenchAlgo = reader.getBool(kRebenchAlgo, m_rebenchAlgo);
# endif
m_syslog = reader.getBool(kSyslog, m_syslog);
m_watch = reader.getBool(kWatch, m_watch);
m_logFile = reader.getString(kLogFile);
Expand All @@ -107,11 +104,13 @@ bool xmrig::BaseConfig::read(const IJsonReader &reader, const char *fileName)
m_tls = reader.getValue(kTls);
# endif

Log::setColors(reader.getBool(kColors, Log::isColors()));
# ifdef XMRIG_FEATURE_MO_BENCHMARK
m_rebenchAlgo = reader.getBool(kRebenchAlgo, m_rebenchAlgo);
m_benchAlgoTime = reader.getInt(kBenchAlgoTime, m_benchAlgoTime);
m_algoMinTime = reader.getInt(kAlgoMinTime, m_algoMinTime);
# endif

Log::setColors(reader.getBool(kColors, Log::isColors()));
setVerbose(reader.getValue(kVerbose));

const auto &api = reader.getObject(kApi);
Expand Down
27 changes: 14 additions & 13 deletions src/base/kernel/config/BaseTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,18 +242,20 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch
# endif

case IConfig::RetriesKey: /* --retries */
# ifdef XMRIG_FEATURE_MO_BENCHMARK
case IConfig::BenchAlgoTimeKey: /* --bench-algo-time */
case IConfig::AlgoMinTimeKey: /* --algo-min-time */
# endif
case IConfig::RetryPauseKey: /* --retry-pause */
case IConfig::PrintTimeKey: /* --print-time */
# ifdef XMRIG_FEATURE_HTTP
case IConfig::HttpPort: /* --http-port */
case IConfig::DonateLevelKey: /* --donate-level */
case IConfig::DaemonPollKey: /* --daemon-poll-interval */
case IConfig::DaemonJobTimeoutKey: /* --daemon-job-timeout */
case IConfig::DnsTtlKey: /* --dns-ttl */
case IConfig::DaemonZMQPortKey: /* --daemon-zmq-port */
# endif
case IConfig::DnsTtlKey: /* --dns-ttl */
case IConfig::DonateLevelKey: /* --donate-level */
# ifdef XMRIG_FEATURE_MO_BENCHMARK
case IConfig::BenchAlgoTimeKey: /* --bench-algo-time */
case IConfig::AlgoMinTimeKey: /* --algo-min-time */
# endif
return transformUint64(doc, key, static_cast<uint64_t>(strtol(arg, nullptr, 10)));

case IConfig::BackgroundKey: /* --background */
Expand All @@ -268,13 +270,12 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch
case IConfig::HttpEnabledKey: /* --http-enabled */
case IConfig::DaemonKey: /* --daemon */
# endif
# ifdef XMRIG_FEATURE_MO_BENCHMARK
case IConfig::RebenchAlgoKey: /* --rebench-algo */
# endif
case IConfig::PauseOnBatteryKey: /* --pause-on-battery */
case IConfig::SubmitToOriginKey: /* --submit-to-origin */
case IConfig::VerboseKey: /* --verbose */
case IConfig::DnsIPv6Key: /* --dns-ipv6 */
# ifdef XMRIG_FEATURE_MO_BENCHMARK
case IConfig::RebenchAlgoKey: /* --rebench-algo */
# endif
return transformBoolean(doc, key, true);

case IConfig::ColorKey: /* --no-color */
Expand Down Expand Up @@ -335,14 +336,14 @@ void xmrig::BaseTransform::transformBoolean(rapidjson::Document &doc, int key, b
case IConfig::NoTitleKey: /* --no-title */
return set(doc, BaseConfig::kTitle, enable);

case IConfig::DnsIPv6Key: /* --dns-ipv6 */
return set(doc, DnsConfig::kField, DnsConfig::kIPv6, enable);

# ifdef XMRIG_FEATURE_MO_BENCHMARK
case IConfig::RebenchAlgoKey: /* --rebench-algo */
return set(doc, BaseConfig::kRebenchAlgo, enable);
# endif

case IConfig::DnsIPv6Key: /* --dns-ipv6 */
return set(doc, DnsConfig::kField, DnsConfig::kIPv6, enable);

default:
break;
}
Expand Down
10 changes: 5 additions & 5 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"nvml": true,
"cn/0": false,
"cn-lite/0": false,
"panthera": false,
"astrobwt": false
"astrobwt": false,
"panthera": false
},
"donate-level": 1,
"donate-over-proxy": 1,
Expand Down Expand Up @@ -102,8 +102,8 @@
"user-agent": null,
"verbose": 0,
"watch": true,
"rebench-algo": false,
"bench-algo-time": 20,
"pause-on-battery": false,
"pause-on-active": false
"pause-on-active": false,
"rebench-algo": false,
"bench-algo-time": 20
}
Loading