oliverw / miningcore

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

Dev branch: ERGO network hash and difficulty stats not updating? #1289

Open goodthebest opened 2 years ago

goodthebest commented 2 years ago

Describe the bug Miners data is being updated accordingly, however ergo's network hashrate and network difficulty stats are frozen and not updating, even though mining going smooth and blocks are found? I'm using Dev branch, please advising any possible cause?

fer000n commented 2 years ago

Describe the bug Miners data is being updated accordingly, however ergo's network hashrate and network difficulty stats are frozen and not updating, even though mining going smooth and blocks are found? I'm using Dev branch, please advising any possible cause?

I have the reverse problem, my miners hash rates are frozen but difficulty and pool hash rate are working and updating Using V69 and waiting for v70 tommorow

xmrstickers commented 2 years ago

@fer000n did you ever solve this? I have your issue. Pool hashrate updates, but TopMiners are frozen in time even 24 hours+ after stopping hash. Obviously, this is not conducive to a front-end UI for a mining pool.

Any help greatly appreciated here.

fer000n commented 2 years ago

@fer000n did you ever solve this? I have your issue. Pool hashrate updates, but TopMiners are frozen in time even 24 hours+ after stopping hash. Obviously, this is not conducive to a front-end UI for a mining pool.

Any help greatly appreciated here.

Not solved

xmrstickers commented 2 years ago

Thanks for the reply! Does your (under poolStats, found at /api/pools//) show 0 as well, despite miners hashing? (I have ~1gh/s on my solo node on mainnet and I am trying to make sure I'm not wasting my time waiting for a block that will never come) EDIT: sharesPerSecond showing 0 when your shares per second is < 1 which is unlikely in production. The value rounds down. See: https://github.com/oliverw/miningcore/issues/408

hopefully I can find time to find a fix for TopMiners api issue

Censseo commented 2 years ago

Hello, to add on this issue, I can say that the calculation of ergo network hashrate is not accurate, as it only changes when difficulty changes, it stays at the same value all the time. But as I can see on 2miners stats, it changes a lot: https://2miners.com/erg-network-hashrate I think it also make the effort calculation wrong as it use the networks hr to compute it.

Kali123411 commented 2 years ago

I just set up an Ergo pool tonight and the network hashrate is not changing either. Further the pending shares is extremely low, not sure what is happening.

oliverw commented 2 years ago

I just set up an Ergo pool tonight and the network hashrate is not changing either. Further the pending shares is extremely low, not sure what is happening.

What frontend are you using?

Kali123411 commented 2 years ago

I just set up an Ergo pool tonight and the network hashrate is not changing either. Further the pending shares is extremely low, not sure what is happening.

What frontend are you using?

miningcore-ui

Kali123411 commented 2 years ago

Shares per second calculation seems way off... image

tjayz commented 2 years ago

I can confirm all of the above. The api from miningcore giving constant network hashrate report, no variation. Effort seems to need to be multiplied by 10,000 to be in a vicinity which makes sense. Likewise shares per second and total shares is low and inconsistent with mining software by a factor similar to effort. Only 3259 shares submitted per api from 4 workers totalling 4ghz, over 11 days with static difficulty of 3.5, someone else can do the math on that one.

tjayz commented 2 years ago

I have added the latest commit and will report block effort next time I hit a block. Shares remain unchanged.

Per Censseo's comments above, comparing 2miners stats to https://explorer.ergoplatform.com/en/stats, ergo platform reports the average hashrate over the previous 24hr period. At 8:00am EST difficulty changed due to hashrate spike, which per the method ergo platform reports the hashrate over 24hr period it is consistent that the hashrate at that time was 57.3TH/s and my api has reported that value all day thus far with the correct, constant difficulty. Next time difficulty changes it will likely switch to the value reported by the ergo platform at that moment in the api.

Given the above, can hashrate either be reported in same manner 2miner reports it or poll if from the ergo platform independent from a change in difficulty? Only polling the network hashrate when the difficulty changes seems to be the main issue per OP.

tjayz commented 2 years ago

Network difficulty doubled. Ergo platform shows 85 THs, 2miners, 200.THs, and the miningcore api shows 134THs. I have no idea where 134THs is being polled from, but Censseo was right about only time network hashrate updates on api.

oliverw commented 1 year ago

I simply cannot repro this.