nanopool / nanominer

Nanominer is a versatile tool for mining cryptocurrencies on GPUs and CPUs.
https://nanominer.org
639 stars 348 forks source link

VerusHash doesn't work with MiningRigRentals (MRR) #314

Open PSLLSP opened 2 years ago

PSLLSP commented 2 years ago

nanominer-linux-3.4.6-cuda11.tar.gz

I tried to connect nanominer to miningrigrentals.com but it doesn't work, some compatibility issue... It looks like nanominer doesn't support client.reconnect.

This config doesn't work (issue):

$ cat test_config_verus2.ini 
;restarts=0
[verushash]
; MRR
wallet      = droidMiner.217232
rigPassword = TEST2
pool1       = eu-01.miningrigrentals.com:3333
coin        = VRSC
webport     = 3399
rigName     = TEST
cputhreads  = 4

This config works, it is a workaround:

$ cat test_config_verus3.ini 
;restarts=0
[verushash]
; MRR - use direct connection to user TCP port
wallet      = droidMiner.217232
rigPassword = TEST3
;pool1       = eu-01.miningrigrentals.com:3333
pool1       = eu-01.miningrigrentals.com:54387
coin        = VRSC
webport     = 3399
rigName     = TEST
cputhreads  = 4

nanonominer cannot connect to MRR pool (port 3333):

$ ./nanominer test_config_verus2.ini 
                                   _                 
 _ __   __ _ _ __   ___  _ __ ___ (_)_ __   ___ _ __ 
| '_ \ / _` | '_ \ / _ \| '_ ` _ \| | '_ \ / _ \ '__|
| | | | (_| | | | | (_) | | | | | | | | | |  __/ |   
|_| |_|\__,_|_| |_|\___/|_| |_| |_|_|_| |_|\___|_|   

Version 3.4.6-cuda11
2021-Dec-09 19:47:21: Started EthMan server on port 3333 without a password (read-only mode).
2021-Dec-09 19:47:21: Started web interface on port 3399 without a password.
-----------------Verushash:-----------------
Currency: Verus
Wallet: droidMiner.217232
Rig name: TEST
Email was not set.
Rig password: TEST2
Hashrate threshold to restart miner is not set
Number of rejected shares per hour to restart miner is not set
Using CPU threads: 4
Added pool: eu-01.miningrigrentals.com:3333
Auto pool sorting is disabled
-------------Common parameters:-------------
Log path: ./logs/
Log is written to file
GPU watchdog is enabled
Never calling reboot.sh (always restarting the miner in case of errors). 
2021-Dec-09 19:47:21: Setting up algorithm: Verushash
2021-Dec-09 19:47:21: Connecting to pools...
2021-Dec-09 19:47:21: Connected to pool: eu-01.miningrigrentals.com:3333 | IP: 188.166.37.58
2021-Dec-09 19:47:22: Verus: authorized
2021-Dec-09 19:47:22: Verus: trying to use "stratum" mining protocol... to disable this behaviour, specify: protocol=JSON-RPC
2021-Dec-09 19:47:22: Verus: authorized
2021-Dec-09 19:47:22: Verus: trying to use "stratum" mining protocol... to disable this behaviour, specify: protocol=JSON-RPC

Just for your reference, nheqminer from https://github.com/VerusCoin/nheqminer/releases works fine, the same configuration, no issue...

$ cat mine-vrcs-mrr.sh 
#!/bin/sh

POOL="eu-01.miningrigrentals.com:3333"
USER="droidMiner.217232"
PASS="TEST1"
OPTS=""
#OPTS="-t 4"

./nheqminer -v -l "$POOL" -u "$USER" -p "$PASS" $OPTS "$@"
$ sh mine-vrcs-mrr.sh 

    ==================== www.veruscoin.io ====================
    Equihash and VerusHash (CPU) v1.0 to v2.2 Miner, v0.8.2
    with support for mining VRSC and other VerusHash coins.

    Thanks to original Nicehash developers and Zcash developers
    for providing base of the code.

    Special thanks to tromp, xenoncat and djeZo for providing 
    optimized CPU and CUDA equihash solvers.

    Protocol upgrade and VerusHash CPU support by miketout.
    ==================== www.veruscoin.io ====================

Setting hash algorithm to VerusHash - CPU HARDWARE OPTIMIZED
Setting log level to 2
[19:48:17][0x00007f86a1513780] Using AES, AVX, and PCLMUL: YES
[19:48:17][0x00007f86a03c8700] stratum | Starting miner
[19:48:17][0x00007f86a03c8700] stratum | Connecting to stratum server eu-01.miningrigrentals.com:3333
[19:48:17][0x00007f869fbc7700] miner#0 | Starting thread #0 (VerusHash - CPU) 
[19:48:17][0x00007f86a03c8700] stratum | Connected!
[19:48:17][0x00007f86a03c8700] stratum | Subscribed to stratum server
[19:48:17][0x00007f86a03c8700] miner   | Extranonce is f800002e
[19:48:17][0x00007f86a03c8700] stratum | Authorized worker droidMiner.217232
[19:48:17][0x00007f86a03c8700] stratum | Reconnection requested
[19:48:17][0x00007f86a03c8700] stratum | Reconnecting in 3 seconds...
[19:48:20][0x00007f86a03c8700] stratum | Connecting to stratum server eu-01.miningrigrentals.com:54387
[19:48:20][0x00007f86a03c8700] stratum | Connected!
[19:48:20][0x00007f86a03c8700] stratum | Subscribed to stratum server
[19:48:20][0x00007f86a03c8700] miner   | Extranonce is dd38643b
[19:48:20][0x00007f86a03c8700] stratum | Authorized worker droidMiner.217232
[19:48:20][0x00007f86a03c8700] stratum | Target set to 0000008000000000000000000000000000000000000000000000000000000000
[19:48:20][0x00007f86a03c8700] stratum | Received new job #4e17dbe
[19:48:27][0x00007f86a1513780] Speed [15 sec]: 0.595002 MH/s, 
[19:48:31][0x00007f86a03c8700] stratum | Target set to 0000010aad71ce84d16000000000000000000000000000000000000000000000
[19:48:31][0x00007f86a03c8700] stratum | Received new job #4e17dbf
[19:48:37][0x00007f86a1513780] Speed [15 sec]: 1 MH/s, 
[19:48:46][0x00007f869fbc7700] stratum | Submitting share #4, nonce 0000000000000000000000000000000000000000000000000000000e
[19:48:46][0x00007f86a03c8700] stratum | Accepted share #4
[19:48:47][0x00007f869fbc7700] stratum | Submitting share #5, nonce 0000000000000000000000000000000000000000000000000000000f
[19:48:47][0x00007f86a03c8700] stratum | Accepted share #5
[19:48:47][0x00007f86a1513780] Speed [15 sec]: 1 MH/s, 
PSLLSP commented 1 year ago

Retested with version 3.8.5 (file nanominer-linux-3.8.5.tar.gz), issue still not fixed, nanominer still ignores method client.reconnect... :-(


For a reference, SRBminer knows how to handle method client.reconnect:

$ cat ./start_VRSC-test1.sh 
#!/bin/sh

POOL="eu-01.miningrigrentals.com:3333"
WALLET="droidMiner.217232"
PASS="TESTBOX3"

OPTS="--disable-gpu"

./SRBMiner-MULTI --algorithm verushash --pool "$POOL" --wallet "$WALLET" --password "$PASS" $OPTS $@
$ ./start_VRSC-test1.sh 

CPU0 : Intel(R) Xeon(R) CPU E3-1265L v3 @ 2.50GHz [L3:   8192 KB][L2:  1024 KB][L1:  128 KB][PU:   8]

======================================================================
SRBMiner-MULTI 2.3.5

Press 's' to display stats
Press 'p' to switch to the next pool
Press 'o' to switch to the previous pool
======================================================================

Algorithm/s         : verushash [0.85% fee]
Gpu mining          : disabled
Cpu mining          : enabled
Watchdog            : enabled
Huge-pages          : available
HW-Aes              : available

[2023-08-25 20:24:04] Run miner as administrator/root to enable MSR tweaks
[2023-08-25 20:24:04] Algorithm 0 available values for --cpu-threads-intensity : 1
[2023-08-25 20:24:05] 4 CPU core/s - 8 thread/s detected
[2023-08-25 20:24:05] Using 8 thread/s for CPU mining
[2023-08-25 20:24:07] Connected to eu-01.miningrigrentals.com:3333 [verushash]
[2023-08-25 20:24:07] Pool requested a reconnect to eu-01.miningrigrentals.com:50361 [verushash]
[2023-08-25 20:24:07] Pool unexpectedly closed the connection [verushash]
[2023-08-25 20:24:08] Reconnecting to eu-01.miningrigrentals.com:50361 in 5 seconds [verushash]
[2023-08-25 20:24:12] Connected to eu-01.miningrigrentals.com:50361 [verushash]
[2023-08-25 20:24:12] Difficulty 0.0572195859 [verushash][0]
[2023-08-25 20:24:40] Job received [6f304f             ] [verushash][0]
[2023-08-25 20:24:54] CPU result accepted      [   80ms] [verushash][0]
[2023-08-25 20:25:02] CPU result accepted      [   87ms] [verushash][0]
[2023-08-25 20:25:35] ================================================================
[2023-08-25 20:25:35] [0]    [verushash]
[2023-08-25 20:25:35] CPU  : 5227.44 kH/s      [       2|     0|
[2023-08-25 20:25:35] Total: 5227.44 kH/s      
[2023-08-25 20:25:35] ================================================================
[2023-08-25 20:25:37] Job received [6f30c2             ] [verushash][0]
PSLLSP commented 1 year ago

I ignore nanominer because it ignores stratum method client.reconnect...

$ ./nanominer --version
2023/11/05 18:43:42 Error: INIReader: LOAD: empty key name: =
                                   _                 
 _ __   __ _ _ __   ___  _ __ ___ (_)_ __   ___ _ __ 
| '_ \ / _` | '_ \ / _ \| '_ ` _ \| | '_ \ / _ \ '__|
| | | | (_| | | | | (_) | | | | | | | | | |  __/ |   
|_| |_|\__,_|_| |_|\___/|_| |_| |_|_|_| |_|\___|_|   

Version 3.8.5-linux
2023-Nov-05 18:43:42: Load error
2023-Nov-05 18:43:42: Minimal configuration file for Ethereum mining is "wallet=<your Ethereum wallet>".
2023-Nov-05 18:43:42: Minimal command line options for Ethereum mining is "-wallet <your Ethereum wallet>".
2023-Nov-05 18:43:42: See ReadMe document for detailed information.

Config file to test KawPow algo, it doesn't work because nanominer ignores stratum method client.reconnect

$ cat mrr-kawpow-test.ini
;restarts=0
[kawpow]
wallet      = droidMiner.294955
rigPassword = NM-TEST1
pool1       = eu-de01.miningrigrentals.com:3333
rigName     = NM-TEST1
$ ./nanominer mrr-kawpow-test.ini
                                   _                 
 _ __   __ _ _ __   ___  _ __ ___ (_)_ __   ___ _ __ 
| '_ \ / _` | '_ \ / _ \| '_ ` _ \| | '_ \ / _ \ '__|
| | | | (_| | | | | (_) | | | | | | | | | |  __/ |   
|_| |_|\__,_|_| |_|\___/|_| |_| |_|_|_| |_|\___|_|   

Version 3.8.5-linux
2023-Nov-05 18:48:17: Started EthMan server on port 3333 without a password (read-only mode).
2023-Nov-05 18:48:17: Started web interface on port 9090 without a password.
2023-Nov-05 18:48:17: NVIDIA driver version: 470.182.03 (11.4)
Single device detected
GPU 0 PCI 01:00.0, Platform: CUDA, Name: NVIDIA GeForce GTX 750 Ti, 2000 MB available
-------------------Kawpow:------------------
Currency: Raven
Wallet: droidMiner.294955
Rig name: NM-TEST1
Email was not set.
Rig password: NM-TEST1
Hashrate threshold to restart miner is not set
Number of rejected shares per hour to restart miner is not set
Added pool: eu-de01.miningrigrentals.com:3333
Auto pool sorting is disabled
Using all GPU devices
-------------Common parameters:-------------
Log path: ./logs/
Log is written to file
GPU watchdog is enabled
Never calling reboot.sh (always restarting the miner in case of errors). 
2023-Nov-05 18:48:17: Setting up algorithm: Kawpow
2023-Nov-05 18:48:17: Connecting to pools...
2023-Nov-05 18:48:18: Connected to pool: eu-de01.miningrigrentals.com:3333 | IP: 188.166.161.62
2023-Nov-05 18:48:18: Connection was closed.
2023-Nov-05 18:48:18: Connecting to pools...
2023-Nov-05 18:48:18: Reconnected to pool: eu-de01.miningrigrentals.com:3333 | IP: 188.166.161.62
2023-Nov-05 18:48:19: Connection was closed.
2023-Nov-05 18:48:19: Connecting to pools...
2023-Nov-05 18:48:20: Reconnected to pool: eu-de01.miningrigrentals.com:3333 | IP: 188.166.161.62
2023-Nov-05 18:48:20: Connection was closed.
2023-Nov-05 18:48:20: Connecting to pools...
2023-Nov-05 18:48:21: Reconnected to pool: eu-de01.miningrigrentals.com:3333 | IP: 188.166.161.62
2023-Nov-05 18:48:21: Connection was closed.
...

You can use gminer to verify that configuration is correct, that miner supports method client.reconnect and can connect to TCP port 3333 at MRR. gminer had similar issue but they already fixed it...


When I manually modify TCP port, (I replace port 3333 with 53899 that was dynamically allocated by MRR) nanominer can connect and mine.

...
2023-Nov-06 00:57:56: Setting up algorithm: Kawpow
2023-Nov-06 00:57:56: Connecting to pools...
2023-Nov-06 00:57:56: Connected to pool: eu-de01.miningrigrentals.com:53899 | IP: 188.166.161.62
2023-Nov-06 00:57:56: New job from eu-de01.miningrigrentals.com:53899 | share difficulty = 4 GH, epoch 38 (1327 MB)
2023-Nov-06 00:58:31: GPU0: 1327 MB DAG generated in 32.99 seconds
...

BTW, It is difficult to troubleshoot connection issues with nanominer, I cannot find any support for "protocol dump" or "debug mode"... I did a mistake an hour ago, I entered wrong TCP port (50175) and it was really difficult to find why nanominer is rejected from the pool... There is even no message about request to reconnect to different URL, so it is difficult to find correct TCP port for reconfiguration (that is why I entered wrong TCP port...)


Here is a reference command for gminer, it connects to TCP port 3333 and just works:

./gminer -a kawpow --server stratum+tcp://eu-de01.miningrigrentals.com:3333 --user droidMiner.294955 --pass TEST7