miningcore icon indicating copy to clipboard operation
miningcore copied to clipboard

`/miners` hashrate differs from the hashrate shown in `/miners/address`

Open miketweaver opened this issue 2 years ago • 9 comments

Describe the bug I'm working with a Litecoin clone called defcoin.

The overall mining stats do not match the individual performance:

root@defcoin-miningcore:~/miningcore# curl localhost:4000/api/pools/dfc1/miners
[
  {
    "miner": "D7VcZVYqaoLdJppgp9AsVRhmt9aWK9z4uW",
    "hashrate": 2649034,
    "sharesPerSecond": 0.053
  },
  {
    "miner": "DMTwnxXWMrdaU7USXRxekgT1y6TroC67zh",
    "hashrate": 1378949,
    "sharesPerSecond": 0.041
  }
]


root@defcoin-miningcore:~/miningcore# curl localhost:4000/api/pools/dfc1/miners/D7VcZVYqaoLdJppgp9AsVRhmt9aWK9z4uW
{
  "pendingShares": 0.3870845676189348,
  "pendingBalance": 0,
  "totalPaid": 0,
  "todayPaid": 0,
  "lastPayment": null,
  "lastPaymentLink": null,
  "performance": {
    "created": "2021-09-22T04:57:41.629893",
    "workers": {
      "": {
        "hashrate": 0,
        "sharesPerSecond": 0
      }
    }
  },
  "performanceSamples": []
}


root@defcoin-miningcore:~/miningcore# curl localhost:4000/api/pools/dfc1/miners/DMTwnxXWMrdaU7USXRxekgT1y6TroC67zh
{
  "pendingShares": 0.15760338578886043,
  "pendingBalance": 0,
  "totalPaid": 0,
  "todayPaid": 0,
  "lastPayment": null,
  "lastPaymentLink": null,
  "performance": {
    "created": "2021-09-22T05:03:41.667311",
    "workers": {
      "": {
        "hashrate": 681647,
        "sharesPerSecond": 0.107
      }
    }
  },
  "performanceSamples": []

I went back to miningcore-47 and didn't seem to have this issue.

Any clue what's going on here? It seems to be a bug to me, but it could also be inexperience.

miketweaver avatar Sep 22 '21 05:09 miketweaver

I've back ported some stats related changes from MinerNL's fork. In hindsight I'm not fully convinced anymore that this was the right move.

oliverw avatar Sep 22 '21 07:09 oliverw

i have often noticed that OEP does not report exactly right - often off by 30mh or more either way on my rig. I was told it was due to the pool numbers being estimates from the shares produced, while your miner is actually working with your numbers. dont know how accurate that is/was but it seemed to fit

def670 avatar Sep 23 '21 19:09 def670

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 25 '21 21:11 stale[bot]

I think this error persists. Now the api is not even removing offline miners🤔

revolutionchain avatar Dec 04 '21 09:12 revolutionchain

@revolutionchain Could you re-test with v66?

oliverw avatar Jan 02 '22 13:01 oliverw

@revolutionchain Could you re-test with v66?

I tested v67 but no change :(

Reggerriee avatar Jan 18 '22 11:01 Reggerriee

Me too, why the pendingshares are so small?

James1847 avatar Jan 19 '22 07:01 James1847

i have often noticed that OEP does not report exactly right - often off by 30mh or more either way on my rig. I was told it was due to the pool numbers being estimates from the shares produced, while your miner is actually working with your numbers. dont know how accurate that is/was but it seemed to fit

Yes, when calc is for hash accepted it's a different calc than for real-time hashing rates.

Me too, why the pendingshares are so small?

That would require knowing:

  1. your pool real-time hashrate
  2. your pool hashrate accepted
  3. your paid shares per pay cycle for at least 10 cycles (for averaging)
  4. the algo your miners are running

Then you need to determine if this is a fluke luck gap or a consistent gap in expected payout range; e.i., with your hashrates the laws of probability have been violated.

If the latter, then maybe share attempts are failing because of hardware errors.

If it's not a hardware tuning issue, then we look at software.

From my own experience, differences in actual and real-time hasrates can vary by ~80%+/-. Not consistently, just as sometimes you will attain ~80% success, you will attain ~80% failure. Over some time you can see a plateau when you zoom the chart out and that is your historical average and you can clearly see then if what you've been earning matches the community average for your hashrates. If not, then we have a serious problem, otherwise false alarm.

Additionally, you can hit pockets of failure for several hours at a time which will change your projected average to nil and be very concerning, but I can assure you, eventually the reverse equivalent will happen provided enough time to base averages. Anything you see that's an estimated calculation is short-term related, not long-term related. Example: This morning my pool was estimating 4.76/daily and I historically get ~15/daily. Right now it's saying 15.64, but yesterday it said 24.56 for several minutes.

thewhiterabbit avatar Jan 26 '22 19:01 thewhiterabbit

I think this error persists. Now the api is not even removing offline miners🤔

same issue in ergo

fer000n avatar Oct 08 '22 19:10 fer000n