oliverw / miningcore

Miningcore is a high-performance Mining Pool Software for Linux and Windows.
https://store.miningcore.pro
MIT License
729 stars 671 forks source link

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

Open miketweaver opened 3 years ago

miketweaver commented 3 years ago

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.

oliverw commented 3 years ago

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.

def670 commented 3 years ago

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

stale[bot] commented 2 years ago

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.

revolutionchain commented 2 years ago

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

oliverw commented 2 years ago

@revolutionchain Could you re-test with v66?

Reggerriee commented 2 years ago

@revolutionchain Could you re-test with v66?

I tested v67 but no change :(

James1847 commented 2 years ago

Me too, why the pendingshares are so small?

thewhiterabbit commented 2 years ago

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.

fer000n commented 2 years ago

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

same issue in ergo