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

Hashrate #12

Open
Aziz87 opened this issue Jul 7, 2023 · 1 comment
Open

Hashrate #12

Aziz87 opened this issue Jul 7, 2023 · 1 comment

Comments

@Aziz87
Copy link

Aziz87 commented Jul 7, 2023

Hello @p4u
tell me please, how i can get hashrate of worker?

i know, i can call
echo '{ "query":"getshares" }' | nc 127.0.0.1 4444
but it return only shares, i don't know how convert shares to hashrate )

@p4u
Copy link
Owner

p4u commented Jul 10, 2023

Wow, does this code still work? I made it 9 years ago...

To be honest, I don't remember exactly how to compute the hashrate from shares. However, I do believe you would need the difficulty in order to compute the hashrate. It should be something like this:

hashRate= (difficulty × number of shares) / time

  • The difficulty is the current difficulty level of the mining operation.
  • The number of shares is the number of shares that the miner has solved.
  • The time is the time period over which the number of shares were solved.

The result of this forumla whould be Hashes/second, so you might want to transform it to Mega or Giga Hashes.

Good luck.

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

2 participants