Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

Work around pool bugs (drop duplicate jobs) #1161

Merged
merged 1 commit into from
May 27, 2018
Merged

Work around pool bugs (drop duplicate jobs) #1161

merged 1 commit into from
May 27, 2018

Conversation

jean-m-cyr
Copy link
Contributor

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.

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.
Copy link
Collaborator

@AndreaLanfranchi AndreaLanfranchi left a comment

Choose a reason for hiding this comment

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

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
@jean-m-cyr jean-m-cyr deleted the deduplicate branch May 27, 2018 13:43
@piotr-dobrogost
Copy link

piotr-dobrogost commented May 28, 2018

Why is 4 the magic number here? :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants