nanopool / nanominer

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

RigName is sent to the pool with a modification #308

Open PSLLSP opened 2 years ago

PSLLSP commented 2 years ago

nanominer 3.4.3, Linux

I try to mine with nanominer at unmineable.com pool. That pool has some advanced features, in general, it is pool where miner mines one coin, pool exchange coins for different coins those are sent to miner wallet. Pool and exchange in one. They needed to change interface for miners, so parameters are modified, like wallet address is prefixed with coin name. In general, miner can mine with with EthHash, EtcHash, KawPow and RandomX.

I see a problem with RigName parameter. It can contain referral code that decreases mining fee, syntax is WORKER#ref-code. In other miners, it is part of wallet address (user name), to mine Monero, syntax is XMR:Address.Worker#referral-code https://unmineable.com/coins/XMR

I tried to use nanominer to mine Monero with RandomX and EtcHash. When I connect to nanominer web interface at TCP port 9090, I see that referral code was removed from RigName. This could be just a small bug in web interface code; this is the first issue.

When I check pool statistics, I see that EtcHash miner has referral code, like it was sent to the pool. On the other side, I cannot see referral code from RandomX miner, like it was not sent or it was sent damaged. I tried to use debug parameter but it doesn't report these details so I have no idea what is sent to the pool.

The second issue is that pool doesn't get referral code, in my example refferal code is e4xd-wmzl (it is from an ebook about CPU mining).

UPDATE: I reported that nanominer reports referral code for EtcHash algo but I was wrong. Pool shows referral code but it was because it remembered it from the past, I used different miner (miniZ) before I tried nanominer... When I change rigName, I see that referral code is not propagated to the pool, like text after '#' is ignored, maybe it is just a comment. And it seems that information visible in the web interface at port 9090 is correct, referral code was removed from rigName :-(

This is a test config, GPU devices are disabled with device = 99; change it to 0 to activate that test. Mined coin (token) is SHIBA and it can be mined in 4 different ways (algos):

restarts    = 0
debug       = 1

; BUG2, e4xd-wmzl is not visible at pool
[RandomX] 
; XMR -> SHIB
wallet      = SHIB:0xe1b2456a2Ad227b93D7a7421f1E9Cc57908cC37c
rigPassword = x
pool1       = rx.unmineable.com:3333
coin        = XMR
rigName     = TEST#e4xd-wmzl
cpuThreads  = 2

[KawPow] 
; RVN -> SHIB
wallet      = SHIB:0xe1b2456a2Ad227b93D7a7421f1E9Cc57908cC37c
rigPassword = x
pool1       = kp.unmineable.com:3333
coin        = RVN
rigName     = TEST#e4xd-wmzl
device      = 99

[EtcHash] 
; ETC -> SHIB
wallet      = SHIB:0xe1b2456a2Ad227b93D7a7421f1E9Cc57908cC37c
rigPassword = x
pool1       = etchash.unmineable.com:3333
coin        = ETC
rigName     = TEST#e4xd-wmzl
device      = 99

[EtHash] 
; ETH -> SHIB
wallet      = SHIB:0xe1b2456a2Ad227b93D7a7421f1E9Cc57908cC37c
rigPassword = x
pool1       = ethash.unmineable.com:3333
coin        = ETH
rigName     = TEST#e4xd-wmzl
device      = 99

UPDATE

I tried to mine with CLI arguments but I see that even in this case referral code is removed (web UI at port 9090 and the pool).

#!/bin/sh

WALLET="SHIB:0xe1b2456a2Ad227b93D7a7421f1E9Cc57908cC37c"
WORKER="TEST#e4xd-wmzl"

POOL="rx.unmineable.com:3333"
THREADS="4"

./nanominer -rigName "$WORKER" -algo RandomX -coin XMR -pool1 "$POOL" -wallet "$WALLET" -cputhreads "$THREADS"
FibreFoX commented 2 years ago

This bug is very long existing, at least since 3.1.5 (if not longer).

In short: allow # as part of the worker-name in oder to have more people using Nanominer when mining on unMineable.

wkitty42 commented 2 years ago

does '#' need escaping, maybe? WORKER="TEST\#e4xd-wmz1" it may not be needed in the shell but if the parameter reading code in nanominer allows for escaping special characters, it might work...

FibreFoX commented 2 years ago

@wkitty42 this results in an error 2021-Nov-27 12:10:15: Error parsing JSON and the miner not creating any log-file or working at all.

As there is no documentation about "allowed chars" this kinda hits somehow unexpected. Maybe the original issue is the used INI-parser?!

wkitty42 commented 2 years ago

it was a pure eWAG... hate that it didn't work...

i did try to look at the source code for nanominer but the source code archives available here do not contain any sources... only the readme.md and the pdf file :disappointed: