-
Notifications
You must be signed in to change notification settings - Fork 8
Tentative block template refresh timeout #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Untested: I have no pool setup to verify it.
|
I was connected for over 18 hours straight to a pool node instance running this patch. Given that this was with a single core of my CPU and not an entire CPU or GPU, the single "Low difficulty share" is likely legitimate. I'd like to see another person test this as well, if at all possible. I know ddvs1 was checking it out yesterday. If nobody is able/willing to test beyond this, the next step is production testing to confirm blocks get mined with this change. I'll see where we are tomorrow on this and potentially shift itnspool.net over to this. |
|
What is advantage of refreshing block template (even it is stale) ? Refreshing = same block template ? |
|
@bobbieltd to update block time and, most importantly, add new transactions from the memory pool. |
|
@pallas1 Thanks for clarification. |
|
I have taken a slightly modified approach to this which also tackles the duplicated/unnecessary templateUpdate fighting going on between the master and worker processes of pool.js. I have it in a dev branch right now: https://github.com/Venthos/nodejs-pool/tree/templaterefreshdev It is currently the live code for all 3 of my pool nodes after performing some extensive hours of testing on a testnet pool. We'll see how it goes. Feel free to pull down the dev branch and test with me. |
|
To add a bit of clarification to help with testing. There are 3 situations in which you should see a new block template from a miner standpoint.
This can cause the appearance of a "double block template being sent" when the templateRefreshTime coincides with a vardiff update. |
|
maybe we should apply some sort of locking, to avoid any of the first two conditions race with the third for the new template? |
|
It's possible, but we'd have to make the logic much more granular per-miner. Just adding locking won't help. The difficulty change only applies to users connecting via vardiff. Static Difficulty miners never get this logic. Beyond that, not every vardiff miner will have their difficulty adjusted each "diff check" cycle. It only happens if the logic discerns that their diff needs to change. Further, the difficulty change sends the exact same template but provides new job criteria (a new difficulty target). This is unique per-miner. Lastly, sending a new block template per #1 or #2 does NOT affect the miner difficulty. This is independently handled by #3. This is why even if it is rapid-fire closer together it does have value in its current form. Sending this "same template" is not considered a duplicate job by miners since by definition its job details are unique (a new diff target). Resolving this in a more sane matter would involve a heavier rewrite than simply adding locking. But, I agree, it's less than ideal right now. I would like to get some more testing from folks (has anyone else put this into testing?). One person has indicated they have gotten a few "Low difficulty share" errors in their miner yesterday, but it's unclear if they were simply legitimately low or due to a bug (I haven't seen the logs yet). I did not experience this in testing. |
Untested: I have no pool setup to verify it.