Skip to content

Commit

Permalink
Updated with new cn/rwz, cn/zls and cn/double algos
Browse files Browse the repository at this point in the history
  • Loading branch information
MoneroOcean committed Mar 7, 2019
1 parent d225327 commit 883bd33
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 33 deletions.
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Options:
--port=<number>: defines port that will be used for miner connections (3333 by default)
--user=<wallet> (-u): <wallet> to use as pool user login (will be taken from the first miner otherwise)
--pass=<miner_id>: <miner_id> to use as pool pass login (will be taken from the first miner otherwise)
--perf_<algo_class>=<hashrate> Sets hashrate for perf <algo_class> that is: cn/2, cn/r, cn, cn/half, cn/gpu, cn/wow, cn-pico, cn-lite, cn-heavy
--perf_<algo_class>=<hashrate> Sets hashrate for perf <algo_class> that is: cn/2, cn/r, cn, cn/half, cn/rwz, cn/zls, cn/double, cn/gpu, cn-pico, cn-lite, cn-heavy
--algo_min_time=<seconds> Sets <seconds> minimum time pool should keep our miner on one algo (0 default, set higher for starting miners)
--miner=<command_line> (-m): <command_line> to start smart miner that can report algo itself
--<algo>=<command_line>: <command_line> to start miner for <algo> that can not report it itself
Expand Down Expand Up @@ -52,6 +52,9 @@ Check https://github.com/xmrig/xmrig-proxy/blob/master/doc/STRATUM_EXT.md#14-alg
"cn/rto": "./xmrig --config=config.json",
"cn/half": "./xmrig --config=config.json",
"cn/wow": "./xmrig --config=config.json",
"cn/rwz": "./xmrig --config=config.json",
"cn/zls": "./xmrig --config=config.json",
"cn/double": "./xmrig --config=config.json",
"cn/gpu": "./xmrig --config=config-gpu.json",
"cn-lite/1": "./xmrig --config=config-lite.json",
"cn-lite/0": "./xmrig --config=config-lite.json",
Expand All @@ -66,7 +69,9 @@ Check https://github.com/xmrig/xmrig-proxy/blob/master/doc/STRATUM_EXT.md#14-alg
"cn": 36.3,
"cn/half": 73.5,
"cn/gpu": 6,
"cn/wow": 34,
"cn/rwz": 49.6,
"cn/zls": 49.6,
"cn/double": 18.7,
"cn-pico": 394.7,
"cn-lite": 114.9,
"cn-heavy": 18.2
Expand Down Expand Up @@ -104,7 +109,7 @@ Place mm.exe or mm.js (with nodejs installed) into unpacked miner directory eith

### Usage example with xmrig-amd on Windows

* Download and unpack the lastest xmrig-amd (https://github.com/xmrig/xmrig-amd/releases/download/v2.13.0/xmrig-amd-2.13.0-msvc-win64.zip).
* Download and unpack the lastest xmrig-amd (https://github.com/xmrig/xmrig-amd/releases/download/v2.14.0/xmrig-amd-2.14.0-msvc-win64.zip).

* Modify config.json file in xmrig-amd directory this way and adjust it for the best threads performance (out of scope of this guide):

Expand Down Expand Up @@ -172,9 +177,9 @@ chmod +x mm.js
* Get xmrig:

```shell
wget https://github.com/xmrig/xmrig-amd/releases/download/v2.13.0/xmrig-amd-2.13.0-xenial-x64.tar.gz
tar xf xmrig-2.13.0-xenial-amd64.tar.gz
cd xmrig-2.13.0/
wget https://github.com/xmrig/xmrig-amd/releases/download/v2.14.0/xmrig-amd-2.14.0-xenial-x64.tar.gz
tar xf xmrig-2.14.0-xenial-amd64.tar.gz
cd xmrig-2.14.0/
```

* Prepare configs for different algorithms (put your Monero address):
Expand Down
61 changes: 34 additions & 27 deletions mm.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const child_process = require('child_process');
// *** CONSTS ***
// *****************************************************************************

const VERSION = "v1.8";
const VERSION = "v1.9";
const DEFAULT_ALGO = "cn/2"; // this is algo that is assumed to be sent by pool if its job does not contain algo stratum extension
const AGENT = "Meta Miner " + VERSION;

Expand All @@ -48,26 +48,31 @@ const hashrate_regexes = [

// basic algo for each algo class that is used for performance measurements
const algo_perf_algo = {
"cn/r": "cn/r",
"cn/2": "cn/2",
"cn": "cn/1",
"cn/half": "cn/half",
"cn/gpu": "cn/gpu",
"cn/wow": "cn/wow",
"cn-pico": "cn-pico/trtl",
"cn-lite": "cn-lite/1",
"cn-heavy": "cn-heavy/0",
"cn/r": "cn/r",
"cn/2": "cn/2",
"cn": "cn/1",
"cn/half": "cn/half",
"cn/rwz": "cn/rwz",
"cn/zls": "cn/zls",
"cn/double": "cn/double",
"cn/gpu": "cn/gpu",
"cn-pico": "cn-pico/trtl",
"cn-lite": "cn-lite/1",
"cn-heavy": "cn-heavy/0",
};

function algo_perf_class(algo) { // converts algo to algo class
if (algo.indexOf("heavy") > -1) return "cn-heavy";
if (algo.indexOf("lite") > -1) return "cn-lite";
if (algo.indexOf("half") > -1) return "cn/half";
if (algo.indexOf("gpu") > -1) return "cn/gpu";
if (algo.indexOf("wow") > -1) return "cn/wow";
if (algo.indexOf("pico") > -1) return "cn-pico";
if (algo.indexOf("cn/2") > -1) return "cn/2";
if (algo.indexOf("cn/r") > -1) return "cn/r";
if (algo.indexOf("heavy") > -1) return "cn-heavy";
if (algo.indexOf("lite") > -1) return "cn-lite";
if (algo.indexOf("half") > -1) return "cn/half";
if (algo.indexOf("gpu") > -1) return "cn/gpu";
if (algo.indexOf("wow") > -1) return "cn/r";
if (algo.indexOf("rwz") > -1) return "cn/rwz";
if (algo.indexOf("zls") > -1) return "cn/zls";
if (algo.indexOf("double") > -1) return "cn/double";
if (algo.indexOf("pico") > -1) return "cn-pico";
if (algo.indexOf("cn/2") > -1) return "cn/2";
if (algo.indexOf("cn/r") > -1) return "cn/r";
return "cn";
}

Expand All @@ -83,15 +88,17 @@ let c = {
pools: [],
algos: {},
algo_perf: {
"cn/r": 0,
"cn/2": 0,
"cn": 0,
"cn/half": 0,
"cn/gpu": 0,
"cn/wow": 0,
"cn-pico": 0,
"cn-lite": 0,
"cn-heavy": 0,
"cn/r": 0,
"cn/2": 0,
"cn": 0,
"cn/half": 0,
"cn/rwz": 0,
"cn/zls": 0,
"cn/double": 0,
"cn/gpu": 0,
"cn-pico": 0,
"cn-lite": 0,
"cn-heavy": 0,
},
algo_min_time: 0,
user: null,
Expand Down

0 comments on commit 883bd33

Please sign in to comment.