SChernykh / p2pool

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

Duplicate shares #222

Closed SChernykh closed 1 year ago

SChernykh commented 1 year ago

A high hashrate miner can potentially find 2 or more shares with the same ID but different nonce/extra_nonce values at exactly the same time. This will result in only one of the shares added to P2Pool's sidechain.

Intended behavior: 2nd, 3rd... shares found at the same time should have different IDs and they should all be added to P2Pool's sidechain as uncle shares.

The fix for this will require a P2Pool hardfork.

Tentative fix

Add miner controlled sidechain_extra_nonce to sidechain data so that every P2Pool node will be able to generate a unique sidechain_id for every connected worker.

Current workaround

Don't connect too much hashrate to a single P2Pool node. It's recommended to have less than 5-10 MH/s per node. If you have more than 5-10 MH/s, run multiple P2Pool nodes and split your hashrate between them equally.