sammy007 / open-ethereum-pool

Open Ethereum Mining Pool
GNU General Public License v3.0
1.4k stars 1.12k forks source link

Protect Pool with password againts Bots or banning them #382

Open millenniumcm opened 6 years ago

millenniumcm commented 6 years ago

Hi guys, there are some way to password protect the pool ? or how ban the bots got into my pool ? thanks

millenniumcm commented 6 years ago

If i modify the .config.json ... part

"stratum": { "enabled": true, "listen": "127.0.0.1:8008", "timeout": "120s", "maxConn": 8192

"maxCoon":1

Should accept only 1 miner connection ?

maxCoon var refer to wallets or IP connections ?

Astrates commented 6 years ago

Hi there. Yes, maxCoon limits TCP connections. And what sort of bots you're talking about? The ones which sends garbage packets or which simulates valid stratum behaviour?

millenniumcm commented 6 years ago

There are some connections in my private pool (bots) with hashpower between 20 - 200 MH/s, i have only 1 worker with 99,05 % of valid shared, but i would like ban or not allow connections to bots.... maxCoon limits TCP so its not refered to "number of workers" , i think could workout with limited maxCoon variable.

Astrates commented 6 years ago

Said workers are not bots, but DevFee wallets of miner you use. If they're annoying you so much, just turn off DevFee in the miner's settings.

And once again about maxCoon. Since it limits the maximum amount of incoming TCP connections, it's directly affects the maximum number of active workers, if these workers doesn't use stratum proxy to get the work and submitt all shares via single connection.

aemet93 commented 4 years ago

You can setup password as 3d parameter to eth_submitLogin request, and just validate it in code. Of course your workers should submit this password to pool.