From 470bf6783304cf0ab17c5a6504d13fb9a22c3ae6 Mon Sep 17 00:00:00 2001 From: BenDroid Date: Fri, 16 Mar 2018 20:22:22 +0100 Subject: [PATCH 1/7] Integrated PoW changes for AEON Added option to force PoW Version Updated donate address --- src/Options.cpp | 17 ++++++++++++++--- src/Options.h | 14 +++++++++++--- src/crypto/CryptoNight.cpp | 22 ++++++++++++++-------- src/crypto/CryptoNight_arm.h | 12 ++++++------ src/crypto/CryptoNight_x86.h | 12 ++++++------ src/net/strategies/DonateStrategy.cpp | 4 ++-- 6 files changed, 53 insertions(+), 28 deletions(-) diff --git a/src/Options.cpp b/src/Options.cpp index d26efecb..f8d173d8 100644 --- a/src/Options.cpp +++ b/src/Options.cpp @@ -160,7 +160,8 @@ static struct option const options[] = { { "user-agent", 1, nullptr, 1008 }, { "userpass", 1, nullptr, 'O' }, { "version", 0, nullptr, 'V' }, - { "use-tls", 1, nullptr, 1015 }, + { "use-tls", 0, nullptr, 1015 }, + { "force-pow-version",1, nullptr, 1016 }, { "api-port", 1, nullptr, 4000 }, { "api-access-token", 1, nullptr, 4001 }, { "api-worker-id", 1, nullptr, 4002 }, @@ -203,6 +204,7 @@ static struct option const config_options[] = { { "syslog", 0, nullptr, 'S' }, { "threads", 1, nullptr, 't' }, { "user-agent", 1, nullptr, 1008 }, + { "force-pow-version", 1, nullptr, 1016 }, { "doublehash-thread-mask", 1, nullptr, 4013 }, { "multihash-thread-mask", 1, nullptr, 4013 }, { nullptr, 0, nullptr, 0 } @@ -302,6 +304,7 @@ Options::Options(int argc, char **argv) : m_ccKeyFile(nullptr), m_ccCertFile(nullptr), m_algo(ALGO_CRYPTONIGHT), + m_forcePowVersion(POW_AUTODETECT), m_algoVariant(AV0_AUTO), m_aesni(AESNI_AUTO), m_hashFactor(0), @@ -522,11 +525,10 @@ bool Options::parseArg(int key, const char *arg) case 1003: /* --donate-level */ case 1004: /* --max-cpu-usage */ case 1007: /* --print-time */ + case 1016: /* --force-pow-version */ case 1021: /* --cpu-priority */ case 4000: /* --api-port */ - return parseArg(key, strtol(arg, nullptr, 10)); case 4006: /* --cc-port */ - return parseArg(key, strtol(arg, nullptr, 10)); case 4012: /* --cc-update-interval-c */ return parseArg(key, strtol(arg, nullptr, 10)); @@ -671,6 +673,15 @@ bool Options::parseArg(int key, uint64_t arg) m_printTime = (int) arg; break; + case 1016: /* --force-pow-version */ + if (arg < POW_AUTODETECT || arg > POW_V2) { + showUsage(1); + return false; + } + + m_forcePowVersion = static_cast(arg); + break; + case 1020: /* --cpu-affinity */ if (arg) { m_affinity = arg; diff --git a/src/Options.h b/src/Options.h index 9e24c34e..bd4c8140 100644 --- a/src/Options.h +++ b/src/Options.h @@ -61,6 +61,12 @@ public: AESNI_OFF }; + enum PowVersion { + POW_AUTODETECT, /* Default, automatic detect by block version */ + POW_V1, /* Force to use PoW algo before 28.03.2018 */ + POW_V2, /* Force to use PoW algo used by Monero V7 (after 28.03.2018) and AEON */ + }; + static inline Options* i() { return m_self; } static Options *parse(int argc, char **argv); @@ -86,19 +92,20 @@ public: inline const char *ccCertFile() const { return m_ccCertFile == nullptr ? "server.pem" : m_ccCertFile; } inline const std::vector &pools() const { return m_pools; } inline Algo algo() const { return m_algo; } + inline PowVersion forcePowVersion() const { return m_forcePowVersion; } inline bool aesni() const { return m_aesni == AESNI_ON; } - inline size_t hashFactor() const { return m_hashFactor; } + inline size_t hashFactor() const { return m_hashFactor; } inline int apiPort() const { return m_apiPort; } inline int donateLevel() const { return m_donateLevel; } inline int printTime() const { return m_printTime; } inline int priority() const { return m_priority; } inline int retries() const { return m_retries; } inline int retryPause() const { return m_retryPause; } - inline size_t threads() const { return m_threads; } + inline size_t threads() const { return m_threads; } inline int ccUpdateInterval() const { return m_ccUpdateInterval; } inline int ccPort() const { return m_ccPort; } inline int64_t affinity() const { return m_affinity; } - inline int64_t multiHashThreadMask() const { return m_multiHashThreadMask; } + inline int64_t multiHashThreadMask() const { return m_multiHashThreadMask; } inline void setColors(bool colors) { m_colors = colors; } inline static void release() { delete m_self; } @@ -155,6 +162,7 @@ private: Algo m_algo; AlgoVariant m_algoVariant; AesNi m_aesni; + PowVersion m_forcePowVersion; size_t m_hashFactor; int m_apiPort; int m_donateLevel; diff --git a/src/crypto/CryptoNight.cpp b/src/crypto/CryptoNight.cpp index 9ea9eb0b..0a3f194a 100644 --- a/src/crypto/CryptoNight.cpp +++ b/src/crypto/CryptoNight.cpp @@ -36,8 +36,8 @@ template static void cryptonight_aesni(const void *input, size_t size, void *output, cryptonight_ctx *ctx) { # if !defined(XMRIG_ARMv7) - if (reinterpret_cast(input)[0] > 6) { - CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, false, NUM_HASH_BLOCKS>::hashV7(input, size, output, ctx); + if (reinterpret_cast(input)[0] > 6 || Options::i()->forcePowVersion() == Options::PowVersion::POW_V2) { + CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, false, NUM_HASH_BLOCKS>::hashPowV2(input, size, output, ctx); } else { CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, false, NUM_HASH_BLOCKS>::hash(input, size, output, ctx); } @@ -46,9 +46,8 @@ static void cryptonight_aesni(const void *input, size_t size, void *output, cryp template static void cryptonight_softaes(const void *input, size_t size, void *output, cryptonight_ctx *ctx) { - if (reinterpret_cast(input)[0] > 6) - { - CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, true, NUM_HASH_BLOCKS>::hashV7(input, size, output, ctx); + if (reinterpret_cast(input)[0] > 6 || Options::i()->forcePowVersion() == Options::PowVersion::POW_V2) { + CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, true, NUM_HASH_BLOCKS>::hashPowV2(input, size, output, ctx); } else { CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, true, NUM_HASH_BLOCKS>::hash(input, size, output, ctx); } @@ -57,13 +56,21 @@ static void cryptonight_softaes(const void *input, size_t size, void *output, cr template static void cryptonight_lite_aesni(const void *input, size_t size, void *output, cryptonight_ctx *ctx) { # if !defined(XMRIG_ARMv7) - CryptoNightMultiHash<0x40000, MEMORY_LITE, 0xFFFF0, false, NUM_HASH_BLOCKS>::hash(input, size, output, ctx); + if (reinterpret_cast(input)[0] > 1 || Options::i()->forcePowVersion() == Options::PowVersion::POW_V2) { + CryptoNightMultiHash<0x40000, MEMORY_LITE, 0xFFFF0, false, NUM_HASH_BLOCKS>::hashPowV2(input, size, output, ctx); + } else { + CryptoNightMultiHash<0x40000, MEMORY_LITE, 0xFFFF0, false, NUM_HASH_BLOCKS>::hash(input, size, output, ctx); + } # endif } template static void cryptonight_lite_softaes(const void *input, size_t size, void *output, cryptonight_ctx *ctx) { - CryptoNightMultiHash<0x40000, MEMORY_LITE, 0xFFFF0, true, NUM_HASH_BLOCKS>::hash(input, size, output, ctx); + if (reinterpret_cast(input)[0] > 1 || Options::i()->forcePowVersion() == Options::PowVersion::POW_V2) { + CryptoNightMultiHash<0x40000, MEMORY_LITE, 0xFFFF0, true, NUM_HASH_BLOCKS>::hashPowV2(input, size, output, ctx); + } else { + CryptoNightMultiHash<0x40000, MEMORY_LITE, 0xFFFF0, true, NUM_HASH_BLOCKS>::hash(input, size, output, ctx); + } } void (*cryptonight_hash_ctx[MAX_NUM_HASH_BLOCKS])(const void *input, size_t size, void *output, cryptonight_ctx *ctx); @@ -71,7 +78,6 @@ void (*cryptonight_hash_ctx[MAX_NUM_HASH_BLOCKS])(const void *input, size_t size template void setCryptoNightHashMethods(Options::Algo algo, bool aesni) { - switch (algo) { case Options::ALGO_CRYPTONIGHT: if (aesni) { diff --git a/src/crypto/CryptoNight_arm.h b/src/crypto/CryptoNight_arm.h index 041c16e8..4316ab98 100644 --- a/src/crypto/CryptoNight_arm.h +++ b/src/crypto/CryptoNight_arm.h @@ -462,7 +462,7 @@ public: } } - inline static void hashV7(const void* __restrict__ input, + inline static void hashPowV2(const void* __restrict__ input, size_t size, void* __restrict__ output, cryptonight_ctx* __restrict__ ctx) @@ -537,7 +537,7 @@ public: extra_hashes[ctx->state[0][0] & 3](ctx->state[0], 200, static_cast(output)); } - inline static void hashV7(const void* __restrict__ input, + inline static void hashPowV2(const void* __restrict__ input, size_t size, void* __restrict__ output, cryptonight_ctx* __restrict__ ctx) @@ -705,7 +705,7 @@ public: extra_hashes[ctx->state[1][0] & 3](ctx->state[1], 200, static_cast(output) + 32); } - inline static void hashV7(const void* __restrict__ input, + inline static void hashPowV2(const void* __restrict__ input, size_t size, void* __restrict__ output, cryptonight_ctx* __restrict__ ctx) @@ -948,7 +948,7 @@ public: extra_hashes[ctx->state[2][0] & 3](ctx->state[2], 200, static_cast(output) + 64); } - inline static void hashV7(const void* __restrict__ input, + inline static void hashPowV2(const void* __restrict__ input, size_t size, void* __restrict__ output, cryptonight_ctx* __restrict__ ctx) @@ -1266,7 +1266,7 @@ public: extra_hashes[ctx->state[3][0] & 3](ctx->state[3], 200, static_cast(output) + 96); } - inline static void hashV7(const void* __restrict__ input, + inline static void hashPowV2(const void* __restrict__ input, size_t size, void* __restrict__ output, cryptonight_ctx* __restrict__ ctx) @@ -1656,7 +1656,7 @@ public: extra_hashes[ctx->state[4][0] & 3](ctx->state[4], 200, static_cast(output) + 128); } - inline static void hashV7(const void* __restrict__ input, + inline static void hashPowV2(const void* __restrict__ input, size_t size, void* __restrict__ output, cryptonight_ctx* __restrict__ ctx) diff --git a/src/crypto/CryptoNight_x86.h b/src/crypto/CryptoNight_x86.h index 02e0f2e1..1eeb9365 100644 --- a/src/crypto/CryptoNight_x86.h +++ b/src/crypto/CryptoNight_x86.h @@ -421,7 +421,7 @@ public: } } - inline static void hashV7(const void* __restrict__ input, + inline static void hashPowV2(const void* __restrict__ input, size_t size, void* __restrict__ output, cryptonight_ctx* __restrict__ ctx) @@ -493,7 +493,7 @@ public: extra_hashes[ctx->state[0][0] & 3](ctx->state[0], 200, static_cast(output)); } - inline static void hashV7(const void* __restrict__ input, + inline static void hashPowV2(const void* __restrict__ input, size_t size, void* __restrict__ output, cryptonight_ctx* __restrict__ ctx) @@ -656,7 +656,7 @@ public: extra_hashes[ctx->state[1][0] & 3](ctx->state[1], 200, static_cast(output) + 32); } - inline static void hashV7(const void* __restrict__ input, + inline static void hashPowV2(const void* __restrict__ input, size_t size, void* __restrict__ output, cryptonight_ctx* __restrict__ ctx) @@ -895,7 +895,7 @@ public: extra_hashes[ctx->state[2][0] & 3](ctx->state[2], 200, static_cast(output) + 64); } - inline static void hashV7(const void* __restrict__ input, + inline static void hashPowV2(const void* __restrict__ input, size_t size, void* __restrict__ output, cryptonight_ctx* __restrict__ ctx) @@ -1209,7 +1209,7 @@ public: extra_hashes[ctx->state[3][0] & 3](ctx->state[3], 200, static_cast(output) + 96); } - inline static void hashV7(const void* __restrict__ input, + inline static void hashPowV2(const void* __restrict__ input, size_t size, void* __restrict__ output, cryptonight_ctx* __restrict__ ctx) @@ -1595,7 +1595,7 @@ public: extra_hashes[ctx->state[4][0] & 3](ctx->state[4], 200, static_cast(output) + 128); } - inline static void hashV7(const void* __restrict__ input, + inline static void hashPowV2(const void* __restrict__ input, size_t size, void* __restrict__ output, cryptonight_ctx* __restrict__ ctx) diff --git a/src/net/strategies/DonateStrategy.cpp b/src/net/strategies/DonateStrategy.cpp index 4c5555ce..4d4634fb 100644 --- a/src/net/strategies/DonateStrategy.cpp +++ b/src/net/strategies/DonateStrategy.cpp @@ -50,9 +50,9 @@ DonateStrategy::DonateStrategy(const char *agent, IStrategyListener *listener) : Job::toHex(hash, 32, userId); #ifndef XMRIG_NO_TLS - Url *url = new Url("donate.graef.in", Options::i()->algo() == Options::ALGO_CRYPTONIGHT_LITE ? 8080 : 8081, userId, nullptr, true, false, true); + Url *url = new Url("donate2.graef.in", Options::i()->algo() == Options::ALGO_CRYPTONIGHT_LITE ? 8081 : 443, userId, nullptr, true, false, true); #else - Url *url = new Url("donate.graef.in", Options::i()->algo() == Options::ALGO_CRYPTONIGHT_LITE ? 80 : 443, userId, nullptr, false, false, true); + Url *url = new Url("donate2.graef.in", Options::i()->algo() == Options::ALGO_CRYPTONIGHT_LITE ? 8080 : 80, userId, nullptr, false, false, true); #endif m_client = new Client(-1, agent, this); From 0299ec88882380693c4dacf7abe91da61ebb09b0 Mon Sep 17 00:00:00 2001 From: BenDroid Date: Fri, 16 Mar 2018 21:37:34 +0100 Subject: [PATCH 2/7] Preparation 1.5.1 --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba4f8fb9..671f5464 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # 1.5.1 - Applied changes for Monero v7 PoW starting 03/28/18 (No changes in config needed) -- Applied new design / icons +- Applied changes for upcoming AEON PoW changes. (No changes in config needed) +- Added option to force PoW version +- Added new design / icons # 1.5.0 - Full SSL/TLS support for the whole communication: - XMRigCCServer Dashboard <-> Browser From 8b2424b97aec29f29f5e269ffb7632fe5cdfd245 Mon Sep 17 00:00:00 2001 From: BenDroid Date: Fri, 16 Mar 2018 22:07:04 +0100 Subject: [PATCH 3/7] Cleanup --- CHANGELOG.md | 4 ++-- src/Options.cpp | 4 +++- src/config.json | 1 + src/default_config.json | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 671f5464..3f6be39e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # 1.5.1 -- Applied changes for Monero v7 PoW starting 03/28/18 (No changes in config needed) -- Applied changes for upcoming AEON PoW changes. (No changes in config needed) +- 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) - Added option to force PoW version - Added new design / icons # 1.5.0 diff --git a/src/Options.cpp b/src/Options.cpp index f8d173d8..2ef55f7a 100644 --- a/src/Options.cpp +++ b/src/Options.cpp @@ -71,9 +71,11 @@ Options:\n" -p, --pass=PASSWORD password for mining server\n\ -t, --threads=N number of miner threads\n\ -v, --av=N algorithm variation, 0 auto select\n\ + -A, --aesni=N selection of AES-NI mode (0 auto, 1 on, 2 off)\n\ -k, --keepalive send keepalived for prevent timeout (need pool support)\n\ -r, --retries=N number of times to retry before switch to backup server (default: 5)\n\ -R, --retry-pause=N time to pause between retries (default: 5)\n\ + --force-pow-version=N force to use specific PoW variation (default: 0 POW_AUTODETECT, 1 POW_V1, 2 POW_V2)\n\ --multihash-thread-mask for av=2/4 only, limits multihash to given threads (mask), (default: all threads)\n\ --cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1\n\ --cpu-priority set process priority (0 idle, 2 normal to 5 highest)\n\ @@ -304,9 +306,9 @@ Options::Options(int argc, char **argv) : m_ccKeyFile(nullptr), m_ccCertFile(nullptr), m_algo(ALGO_CRYPTONIGHT), - m_forcePowVersion(POW_AUTODETECT), m_algoVariant(AV0_AUTO), m_aesni(AESNI_AUTO), + m_forcePowVersion(POW_AUTODETECT), m_hashFactor(0), m_apiPort(0), m_donateLevel(kDonateLevel), diff --git a/src/config.json b/src/config.json index 02e53f37..2e995227 100644 --- a/src/config.json +++ b/src/config.json @@ -9,6 +9,7 @@ "threads": 0, // number of miner threads (not set or 0 enables automatic selection of optimal thread count) "multihash-factor": 0, // number of hash blocks to process at a time (not set or 0 enables automatic selection of optimal number of hash blocks) "multihash-thread-mask" : null, // for multihash-factors>0 only, limits multihash to given threads (mask), mask "0x3" means run multihash on thread 0 and 1 only (default: all threads) + "force-pow-version" : 0, // force to use specific PoW variation (default: 0 POW_AUTODETECT, 1 POW_V1, 2 POW_V2) "background": false, // true to run the miner in the background (Windows only, for *nix plase use screen/tmux or systemd service instead) "colors": true, // false to disable colored output "cpu-affinity": null, // set process affinity to CPU core(s), mask "0x3" for cores 0 and 1 diff --git a/src/default_config.json b/src/default_config.json index 1964e364..d647ba0a 100644 --- a/src/default_config.json +++ b/src/default_config.json @@ -9,6 +9,7 @@ "threads": 0, // number of miner threads (not set or 0 enables automatic selection of optimal thread count) "multihash-factor": 0, // number of hash blocks to process at a time (not set or 0 enables automatic selection of optimal number of hash blocks) "multihash-thread-mask" : null, // for multihash-factors>0 only, limits multihash to given threads (mask), mask "0x3" means run multihash on thread 0 and 1 only (default: all threads) + "force-pow-version" : 0, // force to use specific PoW variation (default: 0 POW_AUTODETECT, 1 POW_V1, 2 POW_V2) "background": false, // true to run the miner in the background (Windows only, for *nix plase use screen/tmux or systemd service instead) "colors": true, // false to disable colored output "cpu-affinity": null, // set process affinity to CPU core(s), mask "0x3" for cores 0 and 1 From f5dd1cd5cf882925d1ff8565b85e79efe3c008e8 Mon Sep 17 00:00:00 2001 From: sebastianstolzenberg Date: Fri, 16 Mar 2018 22:24:59 +0100 Subject: [PATCH 4/7] Removed unused code (#68) --- src/crypto/CryptoNight_arm.h | 1 - src/crypto/CryptoNight_monero.h | 57 --------------------------------- src/crypto/CryptoNight_x86.h | 1 - 3 files changed, 59 deletions(-) delete mode 100644 src/crypto/CryptoNight_monero.h diff --git a/src/crypto/CryptoNight_arm.h b/src/crypto/CryptoNight_arm.h index 4316ab98..dd3699f9 100644 --- a/src/crypto/CryptoNight_arm.h +++ b/src/crypto/CryptoNight_arm.h @@ -36,7 +36,6 @@ #include "crypto/CryptoNight.h" -#include "crypto/CryptoNight_monero.h" #include "crypto/soft_aes.h" diff --git a/src/crypto/CryptoNight_monero.h b/src/crypto/CryptoNight_monero.h deleted file mode 100644 index 504b9b9d..00000000 --- a/src/crypto/CryptoNight_monero.h +++ /dev/null @@ -1,57 +0,0 @@ -/* XMRig - * Copyright 2010 Jeff Garzik - * Copyright 2012-2014 pooler - * Copyright 2014 Lucas Jones - * Copyright 2014-2016 Wolf9466 - * Copyright 2016 Jay D Dee - * Copyright 2017-2018 XMR-Stak , - * Copyright 2018 Lee Clagett - * Copyright 2016-2018 XMRig , - * - * 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 - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef __CRYPTONIGHT_MONERO_H__ -#define __CRYPTONIGHT_MONERO_H__ - -// VARIANT ALTERATIONS -#define VARIANT1_INIT(part) \ - const uint8_t version##part = static_cast(input)[part * size]; \ - uint64_t tweak1_2_##part = 0; \ - /*if (MONERO)*/ { \ - if (version##part > 6) { \ - tweak1_2_##part = (*reinterpret_cast(reinterpret_cast(input) + 35 + part * size) ^ \ - *(reinterpret_cast(ctx->state[part]) + 24)); \ - } \ - } - -#define VARIANT1_1(p, part) \ - /*if (MONERO)*/ { \ - if (version##part > 6) { \ - const uint8_t tmp = reinterpret_cast(p)[11]; \ - static const uint32_t table = 0x75310; \ - const uint8_t index = (((tmp >> 3) & 6) | (tmp & 1)) << 1; \ - ((uint8_t*)(p))[11] = tmp ^ ((table >> index) & 0x30); \ - } \ - } - -#define VARIANT1_2(p, part) \ - /*if (MONERO)*/ { \ - if (version##part > 6) { \ - (p) ^= tweak1_2_##part; \ - } \ - } - - -#endif /* __CRYPTONIGHT_MONERO_H__ */ diff --git a/src/crypto/CryptoNight_x86.h b/src/crypto/CryptoNight_x86.h index 1eeb9365..c14c0172 100644 --- a/src/crypto/CryptoNight_x86.h +++ b/src/crypto/CryptoNight_x86.h @@ -36,7 +36,6 @@ #include "crypto/CryptoNight.h" -#include "crypto/CryptoNight_monero.h" #include "crypto/soft_aes.h" From 6e38088573cd8eae85bb6f3068a62882bf452d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20Gr=C3=A4f?= Date: Sat, 17 Mar 2018 11:08:33 +0100 Subject: [PATCH 5/7] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a2710cda..b782ddf8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ [![Windows Build status](https://ci.appveyor.com/api/projects/status/l8v7cuuy320a4tpd?svg=true)](https://ci.appveyor.com/project/Bendr0id/xmrigcc) [![Docker Build status](https://img.shields.io/docker/build/bendr0id/xmrigcc.svg)](https://hub.docker.com/r/bendr0id/xmrigcc/) -[![GitHub release](https://img.shields.io/github/release/bendr0id/xmrigCC/all.svg)](https://github.com/bendr0id/xmrigCC/releases) +[![GitHub release](https://img.shields.io/github/release/bendr0id/xmrigCC/all.svg)] +(https://github.com/bendr0id/xmrigCC/releases) +[![Github downloads release](https://img.shields.io/github/downloads/bendr0id/xmrigCC/1.5.1/total.svg)](https://github.com/bendr0id/xmrigCC/releases) [![Github downloads release](https://img.shields.io/github/downloads/bendr0id/xmrigCC/total.svg)](https://github.com/bendr0id/xmrigCC/releases) [![GitHub stars](https://img.shields.io/github/stars/bendr0id/xmrigCC.svg)](https://github.com/bendr0id/xmrigCC/stargazers) From dd3d2db2a0764fbc78f58dca50bf2211e46d46a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20Gr=C3=A4f?= Date: Sat, 17 Mar 2018 11:09:29 +0100 Subject: [PATCH 6/7] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b782ddf8..ea895b21 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,8 @@ [![Windows Build status](https://ci.appveyor.com/api/projects/status/l8v7cuuy320a4tpd?svg=true)](https://ci.appveyor.com/project/Bendr0id/xmrigcc) [![Docker Build status](https://img.shields.io/docker/build/bendr0id/xmrigcc.svg)](https://hub.docker.com/r/bendr0id/xmrigcc/) -[![GitHub release](https://img.shields.io/github/release/bendr0id/xmrigCC/all.svg)] -(https://github.com/bendr0id/xmrigCC/releases) -[![Github downloads release](https://img.shields.io/github/downloads/bendr0id/xmrigCC/1.5.1/total.svg)](https://github.com/bendr0id/xmrigCC/releases) +[![GitHub release](https://img.shields.io/github/release/bendr0id/xmrigCC/all.svg)](https://github.com/bendr0id/xmrigCC/releases) +[![Github downloads 1.5.1](https://img.shields.io/github/downloads/bendr0id/xmrigCC/1.5.1/total.svg)](https://github.com/bendr0id/xmrigCC/releases) [![Github downloads release](https://img.shields.io/github/downloads/bendr0id/xmrigCC/total.svg)](https://github.com/bendr0id/xmrigCC/releases) [![GitHub stars](https://img.shields.io/github/stars/bendr0id/xmrigCC.svg)](https://github.com/bendr0id/xmrigCC/stargazers) From 90202b292020cf8ce5677ca685bec06f63f4d3d0 Mon Sep 17 00:00:00 2001 From: djfinch Date: Mon, 19 Mar 2018 23:04:19 +0100 Subject: [PATCH 7/7] OSX Mem.cpp fix (#70) Thx to @djfinch * OSX Mem.cp fix * Fixed current serverTime overflow. --- index.html | 6 +++--- src/Mem.cpp | 2 +- src/Mem.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index d753b356..277566ea 100644 --- a/index.html +++ b/index.html @@ -89,7 +89,7 @@ $(document).ready(function() { var table = $('#clientStatusList').DataTable({ - dom: "<'row'<'col-sm-9'B><'col-sm-3'f>><'row'<'col-sm-12't>><'row'<'col-sm-10'i><'col-sm-2'<'#serverTime'>>>", + dom: "<'row'<'col-sm-9'B><'col-sm-3'f>><'row'<'col-sm-12't>><'row'<'col-sm-4'i><'col-sm-8'<'#serverTime'>>>", bPaginate: false, ajax: { url: "/admin/getClientStatusList", @@ -329,7 +329,7 @@ currentServerTime = settings.json.current_server_time * 1000; clockDrift = new Date().getTime() - currentServerTime; - $('#serverTime').html("
" + new Date(currentServerTime) + "
"); + $('#serverTime').html("
" + new Date(currentServerTime) + "
"); }); table.on('select', function () { @@ -691,4 +691,4 @@ - \ No newline at end of file + diff --git a/src/Mem.cpp b/src/Mem.cpp index 5d9261d0..a7e0fc8a 100644 --- a/src/Mem.cpp +++ b/src/Mem.cpp @@ -34,7 +34,7 @@ int Mem::m_flags = 0; size_t Mem::m_hashFactor = 1; size_t Mem::m_threads = 0; size_t Mem::m_memorySize = 0; -uint8_t *Mem::m_memory = nullptr; +alignas(16) uint8_t *Mem::m_memory = nullptr; Mem::ThreadBitSet Mem::m_multiHashThreadMask = Mem::ThreadBitSet(-1L); cryptonight_ctx *Mem::create(int threadId) diff --git a/src/Mem.h b/src/Mem.h index 5334f72a..e2048162 100644 --- a/src/Mem.h +++ b/src/Mem.h @@ -27,8 +27,8 @@ #define __MEM_H__ -#include -#include +#include +#include #include #include "Options.h"