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

Work around pool bugs (drop duplicate jobs) #1161

Merged
merged 1 commit into from May 27, 2018

Conversation

Projects
None yet
3 participants
@jean-m-cyr
Collaborator

jean-m-cyr commented May 27, 2018

There are two known cases where pools will send duplicate jobs
leading to rejected shares.

1 - Ethermine will occasionally incorrectly send a duplicate job.

job A
job B
job C
job B <- undexpected dup.
job D

This occurs for reason unknown (pool bug?) causing the miner to
restart work on job B and finding the same solutions as the 1st
time through, these then rejected as duplicates.

Furthermore, this prevents any further results which might have
been found for job C.

2 - Protocol startum2 (nicehash) resends job after difficulty
change.

job A
job B
new diff
job B <- incorrectly restarts job B.

Some nicehash pools (counfoundry) resend the previous job after
sending a difficulty update notification. Causes the same problem
as in case 1.

Solution.

Keep a list of for last 4 jobs and drop any incoming duplicates.

Work around pool bugs (drop duplicate jobs)
There are two known cases where pools will send duplicate jobs
leading to rejected shares.

1 - Ethermine will occasionally incorrectly send a duplicate job.

    job A
    job B
    job C
    job B <- undexpected dup.
    job D

This occurs for reason unknown (pool bug?) causing the miner to
restart work on job B and finding the same solutions as the 1st
time through, these then rejected as duplicates.

Furthermore, this prevents any further results which might have
been found for job C.

2 - Protocol startum2 (nicehash) resends job after difficulty
    change.

    job A
    job B
    new diff
	job B <- incorrectly restarts job B.

Some nicehash pools (counfoundry) resend the previous job after
sending a difficulty update notification. Causes the same problem
as in case 1.

Solution.

Keep a list of for last 4 jobs and drop any incoming duplicates.
@AndreaLanfranchi

Looks good to me.

I only have a question about that. Will the window of 4 jobs be enough ? Sometimes I see ethermine.org to push 2 or more jobs in fast sequence (within 1 second).

@jean-m-cyr jean-m-cyr merged commit 1657cdf into master May 27, 2018

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jean-m-cyr jean-m-cyr deleted the deduplicate branch May 27, 2018

@piotr-dobrogost

This comment has been minimized.

Show comment
Hide comment
@piotr-dobrogost

piotr-dobrogost May 28, 2018

Why is 4 the magic number here? :)

piotr-dobrogost commented May 28, 2018

Why is 4 the magic number here? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment