SChernykh / p2pool

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

Feature Request: IP Whitelist #201

Closed gnif closed 1 year ago

gnif commented 2 years ago

Currently if there is a communications error or a miner submits an invalid PoW the p2pool service bans the host for 5 minutes. It would be useful to be able to provide a whitelist of IPs that are never banned for miners that are a little bit unstable (recycled hardware) or communication faults.

SChernykh commented 2 years ago

You are talking about stratum server bans, right?

SChernykh commented 2 years ago

With the current code, only 127.0.0.1 is whitelisted, so you can run xmrig-proxy and p2pool on the same host and connect your miners to the proxy. Stratum server will only see 127.0.0.1 and will not ban it.

gnif commented 2 years ago

You are talking about stratum server bans, right?

Yes

With the current code, only 127.0.0.1 is whitelisted, so you can run xmrig-proxy and p2pool on the same host and connect your miners to the proxy. Stratum server will only see 127.0.0.1 and will not ban it.

Yes, this is a workaround but adding an extra application to work around such a basic limitation seems like using a sledgehammer to put in a nail.

SChernykh commented 2 years ago

I will rewrite the stratum server's ban logic in the next version. It shouldn't ban after the first invalid share, it's the ratio of invalid to valid and the frequency of invalid shares that should trigger a ban.