From ac2980cea7f22317b22441579911940286bc82a7 Mon Sep 17 00:00:00 2001 From: BenDroid Date: Sat, 24 Mar 2018 23:44:47 +0100 Subject: [PATCH] # 1.5.2 Preparation - Fixed OSX Build- Fixed force PoW algo version - Added AEON test vectors for new PoW Algo - Changed DonateStrategy to latest XMRig to avoid peaks on donate pool when restarting multiple miners --- CHANGELOG.md | 5 +++++ README.md | 5 +++-- src/donate.h | 5 ++++- src/net/strategies/DonateStrategy.cpp | 13 ++++++++----- src/net/strategies/DonateStrategy.h | 2 +- 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f6be39e..ea77baa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 1.5.2 +- Fixed OSX Build +- Fixed force PoW algo version +- Added AEON test vectors for new PoW Algo +- Changed DonateStrategy to latest XMRig to avoid peaks on donate pool when restarting multiple miners # 1.5.1 - Applied changes for upcoming Monero v7 PoW changes starting 03/28/18 (No changes in config needed) - Applied changes for upcoming AEON PoW changes starting 04/07/18 (No changes in config needed) diff --git a/README.md b/README.md index a2710cda..6f2b1bee 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,13 @@ ### About XMRigCC XMRigCC is a fork of [XMRig](https://github.com/xmrig/xmrig) which adds the ability to remote control your XMRig instances via a Webfrontend and REST api. -This fork is based on XMRig (2.4.5 RC) and adds a "Command and Control" (C&C) server, a daemon to reload XMRig on config changes and modifications in XMRig to send the current status to the C&C Server. +This fork is based on XMRig (2.4.5) and adds a "Command and Control" (C&C) server, a daemon to reload XMRig on config changes and modifications in XMRig to send the current status to the C&C Server. The modified version can also handle commands like "update config", "start/stop mining" or "restart/shutdown" which can be send from the C&C-Server. Full Windows/Linux compatible, and you can mix Linux and Windows miner on one XMRigCCServer. ## Additional features of XMRigCC (on top of XMRig) -* **NEW: Ready for Monero v7 PoW changes on 03/28/18** +* **NEW: Ready for Monero v7 PoW changes on 04/07/18 and AEON v7 PoW on 04/??/18** * **NEW: Full SSL/TLS support for the whole communication: [Howto](https://github.com/Bendr0id/xmrigCC/wiki/tls)** - XMRigCCServer Dashboard <-> Browser - XMRigCCServer <-> XMRigMiner @@ -118,6 +118,7 @@ xmrigDaemon -o pool.minemonero.pro:5555 -u YOUR_WALLET -p x -k --cc-url=IP_OF_CC -k, --keepalive send keepalived for prevent timeout (need pool support) -r, --retries=N number of times to retry before switch to backup server (default: 5) -R, --retry-pause=N time to pause between retries (default: 5) + --force-pow-version=N force to use specific PoW variation (default: 0 POW_AUTODETECT, 1 POW_V1, 2 POW_V2) --multihash-thread-mask for multihash-factor > 1 only, limits multihash to given threads (mask), (default: all threads) --cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1 --cpu-priority set process priority (0 idle, 2 normal to 5 highest) diff --git a/src/donate.h b/src/donate.h index 8c75f74a..2ffb3d4b 100644 --- a/src/donate.h +++ b/src/donate.h @@ -4,7 +4,8 @@ * Copyright 2014 Lucas Jones * Copyright 2014-2016 Wolf9466 * Copyright 2016 Jay D Dee - * Copyright 2016-2017 XMRig + * Copyright 2017-2018 XMR-Stak , + * Copyright 2017-2018 XMRig * Copyright 2017- BenDr0id * * @@ -32,6 +33,8 @@ * Percentage of your hashing power that you want to donate to the developer, can be 0 if you don't want to do that. * Example of how it works for the default setting of 1: * You miner will mine into your usual pool for 99 minutes, then switch to the developer's pool for 1 minute. + * Since v1.5.2 start time randomized in range from 50 to 150 minutes minus donation time, to reduce peaks on donation + * pool when restarting a bunch of miners. * Switching is instant, and only happens after a successful connection, so you never loose any hashes. * * If you plan on changing this setting to 0 please consider making a one off donation to my wallet: diff --git a/src/net/strategies/DonateStrategy.cpp b/src/net/strategies/DonateStrategy.cpp index 4d4634fb..85d144fd 100644 --- a/src/net/strategies/DonateStrategy.cpp +++ b/src/net/strategies/DonateStrategy.cpp @@ -4,7 +4,7 @@ * Copyright 2014 Lucas Jones * Copyright 2014-2016 Wolf9466 * Copyright 2016 Jay D Dee - * Copyright 2016-2017 XMRig + * Copyright 2016-2018 XMRig * Copyright 2017- BenDr0id * * @@ -35,6 +35,9 @@ extern "C" #include "crypto/c_keccak.h" } +static inline int random(int min, int max) { + return min + rand() / (RAND_MAX / (max - min + 1) + 1); +} DonateStrategy::DonateStrategy(const char *agent, IStrategyListener *listener) : m_active(false), @@ -65,7 +68,7 @@ DonateStrategy::DonateStrategy(const char *agent, IStrategyListener *listener) : m_timer.data = this; uv_timer_init(uv_default_loop(), &m_timer); - idle(); + idle(random(3000, 9000) * 1000 - m_donateTime); } @@ -122,9 +125,9 @@ void DonateStrategy::onResultAccepted(Client *client, const SubmitResult &result } -void DonateStrategy::idle() +void DonateStrategy::idle(int timeout) { - uv_timer_start(&m_timer, DonateStrategy::onTimer, m_idleTime, 0); + uv_timer_start(&m_timer, DonateStrategy::onTimer, static_cast(timeout), 0); } @@ -135,7 +138,7 @@ void DonateStrategy::suspend() m_active = false; m_listener->onPause(this); - idle(); + idle(m_idleTime); } diff --git a/src/net/strategies/DonateStrategy.h b/src/net/strategies/DonateStrategy.h index 302de292..3cb644b8 100644 --- a/src/net/strategies/DonateStrategy.h +++ b/src/net/strategies/DonateStrategy.h @@ -58,7 +58,7 @@ protected: void onResultAccepted(Client *client, const SubmitResult &result, const char *error) override; private: - void idle(); + void idle(int timeout); void suspend(); static void onTimer(uv_timer_t *handle);