Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/xmrig/xmrig
Browse files Browse the repository at this point in the history
  • Loading branch information
MoneroOcean committed Mar 7, 2020
2 parents f9287c2 + 6cb27e9 commit df48cb1
Show file tree
Hide file tree
Showing 28 changed files with 5,873 additions and 5,656 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v5.9.0
- [#1578](https://github.com/xmrig/xmrig/pull/1578) Added new RandomKEVA algorithm for upcoming Kevacoin fork, as `"algo": "rx/keva"` or `"coin": "keva"`.
- [#1584](https://github.com/xmrig/xmrig/pull/1584) Fixed invalid AstroBWT hashes after algorithm switching.
- Added command line option `--astrobwt-max-size`.

# v5.8.2
- [#1580](https://github.com/xmrig/xmrig/pull/1580) AstroBWT algorithm 20-50% speedup.
- Added new option `astrobwt-max-size`.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ CPU backend:
--randomx-1gb-pages use 1GB hugepages for dataset (Linux only)
--randomx-wrmsr=N write custom value (0-15) to Intel MSR register 0x1a4 or disable MSR mod (-1)
--randomx-no-rdmsr disable reverting initial MSR values on exit
--astrobwt-max-size=N skip hashes with large stage 2 size, default: 550, min: 400, max: 1200
API:
--api-worker-id=ID custom worker-id for API
Expand Down
1 change: 1 addition & 0 deletions scripts/generate_cl.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function rx()
'randomx_constants_wow.h',
'randomx_constants_loki.h',
'randomx_constants_arqma.h',
'randomx_constants_keva.h',
'aes.cl',
'blake2b.cl',
'randomx_vm.cl',
Expand Down
6 changes: 3 additions & 3 deletions src/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
Expand Down Expand Up @@ -61,7 +61,7 @@ xmrig::App::~App()
int xmrig::App::exec()
{
if (!m_controller->isReady()) {
LOG_EMERG("no valid configuration found.");
LOG_EMERG("no valid configuration found, try https://xmrig.com/wizard");

return 2;
}
Expand Down
4 changes: 2 additions & 2 deletions src/App.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
Expand Down
6 changes: 2 additions & 4 deletions src/backend/cpu/Cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
Expand Down Expand Up @@ -91,8 +91,6 @@ rapidjson::Value xmrig::Cpu::toJSON(rapidjson::Document &doc)

void xmrig::Cpu::release()
{
assert(cpuInfo != nullptr);

delete cpuInfo;
cpuInfo = nullptr;
}
4 changes: 2 additions & 2 deletions src/backend/cpu/Cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
Expand Down
20 changes: 10 additions & 10 deletions src/backend/cpu/CpuConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ class CpuConfig
inline bool isYield() const { return m_yield; }
inline const Assembly &assembly() const { return m_assembly; }
inline const String &argon2Impl() const { return m_argon2Impl; }
inline int astrobwtMaxSize() const { return m_astrobwtMaxSize; }
inline const Threads<CpuThreads> &threads() const { return m_threads; }
inline int astrobwtMaxSize() const { return m_astrobwtMaxSize; }
inline int priority() const { return m_priority; }
inline uint32_t limit() const { return m_limit; }

Expand All @@ -70,18 +70,18 @@ class CpuConfig

inline void setPriority(int priority) { m_priority = (priority >= -1 && priority <= 5) ? priority : -1; }

AesMode m_aes = AES_AUTO;
AesMode m_aes = AES_AUTO;
Assembly m_assembly;
bool m_enabled = true;
bool m_hugePages = true;
bool m_shouldSave = false;
bool m_yield = true;
int m_memoryPool = 0;
int m_priority = -1;
bool m_enabled = true;
bool m_hugePages = true;
bool m_shouldSave = false;
bool m_yield = true;
int m_astrobwtMaxSize = 550;
int m_memoryPool = 0;
int m_priority = -1;
String m_argon2Impl;
int m_astrobwtMaxSize = 550;
Threads<CpuThreads> m_threads;
uint32_t m_limit = 100;
uint32_t m_limit = 100;
};


Expand Down
21 changes: 16 additions & 5 deletions src/backend/cpu/CpuConfig_gen.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
Expand Down Expand Up @@ -109,11 +109,11 @@ template<>
size_t inline generate<Algorithm::RANDOM_X>(Threads<CpuThreads> &threads, uint32_t limit)
{
size_t count = 0;

auto wow = Cpu::info()->threads(Algorithm::RX_WOW, limit);
auto cpuInfo = Cpu::info();
auto wow = cpuInfo->threads(Algorithm::RX_WOW, limit);

if (!threads.isExist(Algorithm::RX_ARQ)) {
auto arq = Cpu::info()->threads(Algorithm::RX_ARQ, limit);
auto arq = cpuInfo->threads(Algorithm::RX_ARQ, limit);
if (arq == wow) {
threads.setAlias(Algorithm::RX_ARQ, "rx/wow");
++count;
Expand All @@ -123,6 +123,17 @@ size_t inline generate<Algorithm::RANDOM_X>(Threads<CpuThreads> &threads, uint32
}
}

if (!threads.isExist(Algorithm::RX_KEVA)) {
auto keva = cpuInfo->threads(Algorithm::RX_KEVA, limit);
if (keva == wow) {
threads.setAlias(Algorithm::RX_KEVA, "rx/wow");
++count;
}
else {
count += threads.move("rx/keva", std::move(keva));
}
}

if (!threads.isExist(Algorithm::RX_WOW)) {
count += threads.move("rx/wow", std::move(wow));
}
Expand Down
9 changes: 7 additions & 2 deletions src/backend/cuda/CudaConfig_gen.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
Expand Down Expand Up @@ -115,6 +115,7 @@ size_t inline generate<Algorithm::RANDOM_X>(Threads<CudaThreads> &threads, const
auto rx = CudaThreads(devices, Algorithm::RX_0);
auto wow = CudaThreads(devices, Algorithm::RX_WOW);
auto arq = CudaThreads(devices, Algorithm::RX_ARQ);
auto kva = CudaThreads(devices, Algorithm::RX_KEVA);

if (!threads.isExist(Algorithm::RX_WOW) && wow != rx) {
count += threads.move("rx/wow", std::move(wow));
Expand All @@ -124,6 +125,10 @@ size_t inline generate<Algorithm::RANDOM_X>(Threads<CudaThreads> &threads, const
count += threads.move("rx/arq", std::move(arq));
}

if (!threads.isExist(Algorithm::RX_KEVA) && kva != rx) {
count += threads.move("rx/keva", std::move(kva));
}

count += threads.move("rx", std::move(rx));

return count;
Expand Down
7 changes: 4 additions & 3 deletions src/backend/opencl/cl/cn/algorithm.cl
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
#define ALGO_RX_LOKI 21
#define ALGO_RX_ARQMA 22
#define ALGO_RX_SFX 23
#define ALGO_AR2_CHUKWA 24
#define ALGO_AR2_WRKZ 25
#define ALGO_ASTROBWT_DERO 26
#define ALGO_RX_KEVA 24
#define ALGO_AR2_CHUKWA 25
#define ALGO_AR2_WRKZ 26
#define ALGO_ASTROBWT_DERO 27

#define FAMILY_UNKNOWN 0
#define FAMILY_CN 1
Expand Down
Loading

0 comments on commit df48cb1

Please sign in to comment.