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

Investigate reason for high number of **rejected** mined shares #1215

Closed
bladedoyle opened this issue Jul 3, 2018 · 17 comments
Closed

Investigate reason for high number of **rejected** mined shares #1215

bladedoyle opened this issue Jul 3, 2018 · 17 comments

Comments

@bladedoyle
Copy link
Contributor

A fast miner (1080 ti GPU) sees a high number of both rejected and stale shares. ex:
"974 accepted, 44 rejected and 25 stales"

A slow miner (1-core on an i7 cpu) sees far fewer stale shares but still sees many shares rejected due to invalid POW. ex:
"109 accepted, 16 rejected, 0 stale"

We need to understand why the shares are rejected:

  • does the miner return invalid pow?
  • does the data get corrupted in transit?
  • is there some issue with the validation code?
  • something else?

The grin.log messages associated with rejected shares:

Jun 30 00:25:29.786 DEBG pipe: process_block b67f0bcb at 126038 with 0 inputs, 1 outputs, 1 kernels
Jun 30 00:25:29.787 ERRO pipe: validate_header failed for cuckoo shift size 30
Jun 30 00:25:29.787 INFO Rejected block b67f0bcb at 126038: InvalidPow
Jun 30 00:25:29.789 ERRO (Server ID: StratumServer) Failed to validate solution at height 126038: InvalidPow
@yeastplume
Copy link
Member

This appears to be happening just after the attempt_time_per_block timeout expires and the server builds a new block with a new timestamp and nonce. If grin-miner returns a solution for the previous block, it's rejected as invalid (presumably because the nonce it returns doesn't match the new block).

@yeastplume
Copy link
Member

No, scratch that.. it seems to be happening every time a solution is returned very quickly after the job is sent out, which is very odd (why should that pow not verify in that case?)

@yeastplume
Copy link
Member

This (and potentially some cases of #1216) appear to have been caused by reading the wrong solution from an underlying solution output queue.. so if two solutions are found in rapid succession and one meets difficulty, the next job would read an old solution from the queue. Fixed this within cuckoo-miner and the latest version of grin-miner, so will monitor for a while now to see if this occurs again.

@ignopeverell
Copy link
Contributor

Nice! Thanks for looking.

@bladedoyle
Copy link
Contributor Author

I think (at least part of) the problem is in the Stratum Server.

The stratum server just uses whatever header a miner submits and attaches that to the "current block". If the stratum server just built a new block, and the miner sends a solution for the previous one, the block wont validate (even if none of the transactions changed the timestamp will).

  1. The stratum server will need to version the templates it sends - probably by adding an "id" field to the job template struct.
    AND
  2. the stratum server needs to keep a history of the blocks it built in the past for the current chain height so it can accept shares for previous versions of the same block.

@bladedoyle
Copy link
Contributor Author

I believe this is fully resolved, please re-open if necessary.

@HT-Moh
Copy link

HT-Moh commented May 1, 2020

Hi
I am having same issue with a version 4.0.0 alpha.1

Screenshot from 2020-05-01 15-00-41

@quentinlesceller
Copy link
Member

You certainly using the wrong mining plugin @HT-Moh

@HT-Moh
Copy link

HT-Moh commented May 1, 2020

@quentinlesceller Thanks for your response, can you please tell me how to identify which plugin to use?
Spec

  • Ubuntu
  • VGA compatible controller: Intel Corporation Iris Plus Graphics G7 (rev 07)
  • Intel(R) Core(TM) i7-1065G7

The only thing I change on the miner config is uncommenting the line
miner_plugin_dir = "./plugins"
and I have this plugin enabled

[[mining.miner_plugin_config]]
plugin_name = "cuckarood_cpu_compat_29"
[mining.miner_plugin_config.parameters]
nthreads = 4
 

@quentinlesceller
Copy link
Member

You have to use Cuckaroom.

@HT-Moh
Copy link

HT-Moh commented May 1, 2020

Thanks @quentinlesceller
Ok I compiled from source and installed the necessary plugins wasn't straightforward but yes it seems to work but not everything, I am having this error on the logs I am not sure if my configurations are correct can you please check

save
save_2
missing

@quentinlesceller
Copy link
Member

Is it with the latest master?

@HT-Moh
Copy link

HT-Moh commented May 1, 2020

Yes its master
I got this error as well

Screenshot from 2020-05-01 20-56-34

@quentinlesceller
Copy link
Member

Okay the ban is unrelated. I'm fixing the error in the log above. But other than that everything is fine and the error in grin-miner logs are okay (not going to cause any problems).

@HT-Moh
Copy link

HT-Moh commented May 1, 2020

I can ignore as well the ban, right? one more question the size column in the mining device is always 0 and the graph time column as well is that normal ?

@HT-Moh
Copy link

HT-Moh commented May 2, 2020

I am getting often Error parsing message, so I tried to debug this and saw that I am getting often a message with value a 10 which cause Error parsing message. can you please check screenshot attached.
debug

@quentinlesceller
Copy link
Member

@HT-Moh I believe it’s because of this #3315. The stratum sends an empty message.

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

No branches or pull requests

5 participants