Skip to content

Commit

Permalink
Added RandomWOW support
Browse files Browse the repository at this point in the history
  • Loading branch information
MoneroOcean committed Jun 17, 2019
1 parent 40f38b2 commit 52006e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
9 changes: 6 additions & 3 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/rwz, cn/zls, cn/double, cn/gpu, cn-pico, cn-lite, cn-heavy
--perf_<algo_class>=<hashrate> Sets hashrate for perf <algo_class> that is: cn/r, cn/2, cn, cn/half, cn/rwz, cn/zls, cn/double, cn/gpu, cn-pico, cn-lite, cn-heavy, rx/wow
--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 @@ -61,7 +61,8 @@ Check https://github.com/xmrig/xmrig-proxy/blob/master/doc/STRATUM_EXT.md#14-alg
"cn-heavy/0": "./xmrig --config=config-heavy.json",
"cn-heavy/xhv": "./xmrig --config=config-heavy.json",
"cn-heavy/tube": "./xmrig --config=config-heavy.json",
"cn-pico/trtl": "./xmrig --config=config-pico.json"
"cn-pico/trtl": "./xmrig --config=config-pico.json",
"rx/wow": "./xmrig --config=config-randomwow.json",
},
"algo_perf": {
"cn/r": 34,
Expand Down Expand Up @@ -191,16 +192,18 @@ cp config.json config-heavy.json
cp config.json config-lite.json
cp config.json config-pico.json
cp config.json config-gpu.json
cp config.json config-randomwow.json
sed -i 's/"algo": *"[^"]*",/"algo": "cryptonight-heavy\/0",/' config-heavy.json
sed -i 's/"algo": *"[^"]*",/"algo": "cryptonight-lite\/1",/' config-lite.json
sed -i 's/"algo": *"[^"]*",/"algo": "cryptonight-pico\/trtl",/' config-pico.json
sed -i 's/"algo": *"[^"]*",/"algo": "cryptonight\/gpu",/' config-gpu.json
sed -i 's/"algo": *"[^"]*",/"algo": "randomx\/wow",/' config-randomwow.json
```

* Run Meta Miner:

```shell
./mm.js -p=gulf.moneroocean.stream:10001 -m="./xmrig --config=config.json" -m="./xmrig --config=config-heavy.json" -m="./xmrig --config=config-lite.json" -m="./xmrig --config=config-pico.json" -m="./xmrig --config=config-gpu.json" -m="./xmrig --config=config.json"
./mm.js -p=gulf.moneroocean.stream:10001 -m="./xmrig --config=config.json" -m="./xmrig --config=config-heavy.json" -m="./xmrig --config=config-lite.json" -m="./xmrig --config=config-pico.json" -m="./xmrig --config=config-gpu.json"
```

### Usage example with xmr-stak (CPU only) on Linux
Expand Down
8 changes: 5 additions & 3 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.9";
const VERSION = "v2.0";
const DEFAULT_ALGO = "cn/r"; // 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 @@ -59,14 +59,15 @@ const algo_perf_algo = {
"cn-pico": "cn-pico/trtl",
"cn-lite": "cn-lite/1",
"cn-heavy": "cn-heavy/0",
"rx/wow": "rx/wow",
};

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/r";
if (algo.indexOf("wow") > -1) return "rx/wow";
if (algo.indexOf("rwz") > -1) return "cn/rwz";
if (algo.indexOf("zls") > -1) return "cn/zls";
if (algo.indexOf("double") > -1) return "cn/double";
Expand Down Expand Up @@ -99,6 +100,7 @@ let c = {
"cn-pico": 0,
"cn-lite": 0,
"cn-heavy": 0,
"rx/wow": 0,
},
algo_min_time: 0,
user: null,
Expand Down Expand Up @@ -631,7 +633,7 @@ function do_miner_perf_runs(cb) {
let id = "id" in json ? json.id : 1;
miner_socket.write(
'{"id":' + id + ',"jsonrpc":"2.0","error":null,"result":{"id":"benchmark","job":{"blob":"' + test_blob_str +
'","algo":"' + algo_perf_algo[algo_class] + '","job_id":"benchmark1","target":"01000000","id":"benchmark"},"status":"OK"}}\n'
'","algo":"' + algo_perf_algo[algo_class] + '","height":0,"seed_hash":"0000000000000000000000000000000000000000000000000000000000000000","job_id":"benchmark1","target":"01000000","id":"benchmark"},"status":"OK"}}\n'
);
};
miner_proc = start_miner(cmd, function(str) {
Expand Down

0 comments on commit 52006e0

Please sign in to comment.