SChernykh / p2pool

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

Only open stratum server when p2pool is finished synchronizing #185

Closed Titaniumtown closed 2 years ago

Titaniumtown commented 2 years ago

I've run into a reoccurring issue where if I restart my p2pool node and miners were previously connected, they would connect before the p2pool node was fully synchronized. This causes fake shares to be generated and report as submitted (idk how, it doesn't show up in p2pool observer). These "fake shares" continue to be created even after p2pool reports as synchronized, the only solution is to make sure all miners are off, then turning on p2pool, waiting for everything to synchronize, then starting all the miners. Ideally the stratum server shouldn't even be open until this synchronization was completed.

SChernykh commented 2 years ago

These are not fake shares, they're real shares but on a separate p2pool chain. P2Pool starts mining its own sidechain before it's synchronized with other nodes, and each of these shares is real and can potentially mine Monero block.

Titaniumtown commented 2 years ago

They rapidly start appearing, seconds within eachother.... Usually it takes me an hour to get a share that gets submitted to the P2Pool chain. I guess I'm confused.

SChernykh commented 2 years ago

Because new sidechain starts with difficulty 100000, but it quickly adjusts. You can just ignore all these shares, but you should know that they're real and have a chance to mine Monero block.

Titaniumtown commented 2 years ago

Oh ok. Well thanks for the good explanation! I guess my worries have been solved lol.

SChernykh commented 2 years ago

These "fake shares" continue to be created even after p2pool reports as synchronized

Continue for how long? If only for a few seconds then it's just network latency.

Titaniumtown commented 2 years ago

It was a few seconds, I stopped it before it could continue. I can test in the morning if you wish.