SChernykh / p2pool

Decentralized pool for Monero mining
GNU General Public License v3.0
1.03k stars 123 forks source link

Added worker password support #280

Closed BadTigrou closed 8 months ago

BadTigrou commented 9 months ago

Small modifications to take into account the pass value sent by workers. It shows up in the workers command and in the stratum file of the api (as the login value).

There is no real authentication.

It just allow miners to use the pass arguments to provide any value as login.

SChernykh commented 9 months ago

I don't think it's necessary in p2pool. First of all, it's not a real password. Regular pools use it for rig names because user field is used for wallet address. In p2pool, the wallet address is set on pool side, so user field can be used for anything, and password is not needed.

BadTigrou commented 9 months ago

i personally use it to put the bay location of my workers. i agree that it's not a real password. it just gives the possibility to add a second label to your workers.

SChernykh commented 9 months ago

XMRig has rig-id parameter exactly for this purpose: https://github.com/xmrig/xmrig/blob/master/src/config.json#L68 I gets passed as rigid in the login JSON in Stratum protocol: https://github.com/xmrig/xmrig/blob/master/src/base/net/stratum/Client.cpp#L628

BadTigrou commented 9 months ago

So you are in favor of implementation of rigid instead of password ? The use case is the same to me the name of the field is not really relevant in my opinion

SChernykh commented 9 months ago

Yes, rigid makes more sense.