Skip to content
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

Handle non-int pool difficulties better. #141

Merged
merged 1 commit into from
Feb 20, 2017

Conversation

jcvernaleo
Copy link
Member

Closes #140

@jolan
Copy link

jolan commented Feb 17, 2017

I was trying to trigger this yesterday with intel graphics but it kept mining at diff 1 on yiimp.ccminer.org.

I remember seeing pools sending diffs < 1 awhile back so maybe we need something like:

if diff < 1
  diff = 1
else
  diff = math.Floor(diff)

I'm not clear on what diff 0 would actually do. Wouldn't it send basically everything? I guess it's easy enough to check.

@jcvernaleo
Copy link
Member Author

We already don't allow diff <= 0 so yeah, I should set to 1 in the 0<d<1 case.

@jcvernaleo
Copy link
Member Author

As for testing, I've had better luck see non-int diffs at dcr.maxminers.net

@jcvernaleo
Copy link
Member Author

jcvernaleo commented Feb 17, 2017

FYI I've been running with this pr for around 5 hours without an issue which is the longer than I've lasted without hitting the crash in #135 in a long time.

Copy link

@jolan jolan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a bit concerned that rounding down the difficulty would cause rejects but I didn't see that in my testing with multiple pools. Since the pool backend stuff is a blackbox I will just assume that they have a minimum difficulty and accept everything above that threshold. I guess the difficulty adjustments are just suggestions?

Anyway, works fine in my testing with multiple pools.

OK

Take care of dff between 0 and 1
@jcvernaleo jcvernaleo merged commit 2841619 into decred:master Feb 20, 2017
@jcvernaleo jcvernaleo deleted the jcv_poolDiff branch February 20, 2017 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants