jtoomim / p2pool

Peer-to-peer Bitcoin mining pool
https://github.com/jtoomim/p2pool/
GNU General Public License v3.0
37 stars 45 forks source link

litecoin 34.0 p2pool fork #31

Closed chargr closed 2 years ago

chargr commented 5 years ago

A few days ago the node with the most hash switched to 34.0 and the network has switched. Are you monitoring for bugs/issues? I have upgraded am seeing a lots of requests for parent shares and a lot of connects and attempts to share from older peers (because both are "protocol version is 3301" ?)

It's been a while since going through a p2pool version change for me, so I forget what the expected issues are such.

This came quick, I think it got pool owners off-guard.

Looks like right now the old chain has about 30GH/s but also seems to be the majority of nodes. There is about 500GH/s on the new chain.

jtoomim commented 5 years ago

The parent-shares requests is a common thing with upgrades. That happens because some people didn't upgrade, and are trying to connect repeatedly and getting shares they consider invalid, disconnecting, and repeating.

You're talking about the LTC p2pool, right? Yeah, it looked like about 93% of the hashrate had upgraded and 6-7% got forked off. The v33 chain should still work fine. The only issue with all the disconnect/reconnect stuff is some wasted bandwidth.

I think the best solution to this problem is to add peer banning to the code. Probably should have incremented the protocol version already, though. That will be hard to do now. Oh well. It should fade over time as more nodes upgrade.

jtoomim commented 5 years ago

We mined a BCH block already right after the BCH p2pool upgrade happened, so everything is looking good so far.

chargr commented 5 years ago

Yea, for now I have blocked the IPs of the nodes that were behaving like this:

2019-07-12 06:36:19.957861 Incoming connection from peer XXXXXXXXXX established. p2pool version: 3301 '33.0-2-g8390c9f9-dirty'
2019-07-12 06:36:20.020090 Sending 1 shares to XXXXXXXXXX
2019-07-12 06:36:20.154733 Lost peer XXXXXXXXXX - Connection to the other side was lost in a non-clean fashion.

The request for parent spam and reprocessing of shares has stopped. I'll flush it in a day or two.

As an interesting side effect I think the orphan count was decreasing, I see the top node has a negative orphan count in its stats now.

Shares: 11364 total (-74 orphaned, 217 dead) Efficiency: 100.4%

Thanks for the reassurance and for keeping this project alive. :+1:

jtoomim commented 5 years ago

Negative orphan count? That sounds like an interesting UI glitch. Maybe the orphans seen from the orphaned chain are getting double-negative counted? It won't affect the revenue calculations (which are very different from the stats computation code), but it's still amusing.

A decrease in orphan rate is an expected benefit of this fork. A decrease in DOA rates is also possible, but not expected. This effect on orphan rates will become much more prominent with high transaction loads, such as we have on BTC or during stress tests on BCH.

jtoomim commented 5 years ago

I've got some code in my dev branch that does peer banning. I'll release it soonish.