wellenreiter01/p2pool-neoscrypt

Share can't follow NewShare

Closed this issue · 4 comments

Getting this on master. It looks like after I find a share:

> Traceback (most recent call last):
>   File "/home/rleblanc/p2pool-neoscrypt/p2pool/p2p.py", line 309, in handle_shares
>     self.node.handle_shares(result, self)
>   File "/home/rleblanc/p2pool-neoscrypt/p2pool/node.py", line 48, in handle_shares
>     self.node.set_best_share()
>   File "/home/rleblanc/p2pool-neoscrypt/p2pool/node.py", line 295, in set_best_share
>     best, desired, decorated_heads, bad_peer_addresses = self.tracker.think(self.get_height_rel_highest, self.bitcoind_work.value['previous_block'], self.bitcoind_work.value['bits'], self.known_txs_var.value)
>   File "/home/rleblanc/p2pool-neoscrypt/p2pool/data.py", line 831, in think
>     if not self.attempt_verify(share):
> --- <exception caught here> ---
>   File "/home/rleblanc/p2pool-neoscrypt/p2pool/data.py", line 775, in attempt_verify
>     share.check(self)
>   File "/home/rleblanc/p2pool-neoscrypt/p2pool/data.py", line 657, in check
>     raise p2p.PeerMisbehavingError('''%s can't follow %s''' % (type(self).__name__, type(previous_share).__name__))
> p2pool.p2p.PeerMisbehavingError: Share can't follow NewShare
Requesting parent share 68971410 from 93.189.148.149:54251

I updated the master.

can you pull and try again?

Been up for about 12 hours without the messages, so it seems like it is fixed.

I'm trying to understand the code, so maybe you can help me understand this.

You changed the share version back to 13 from 15 and the voting version back to 13 from 15. Doesn't the share version only need to change where there is a major change to the share? Shouldn't the old format of the share work until there is a majority of shares voting for a new version? At that point they then agree to change, then they start using the new version?

Was the update to 15 intentional, or just a byproduct of merging code from upstream?

Do you know why this was causing the problem?

Thanks.

The mechanism is that you have a share version X and a NewShare version Y with X > Y
In share the voting version is Y, so if majority of nodes votes for version Y the NewShare is used.

If you implement Versionn Z with Z > Y, you define Share with the parameters of the old Newshare and create a new NewShare.

I tried to remove NewShare for the moment, as we have all pool nodes on version 15 now, but that was a bad mistake.

Is it ok to close the issue?