Post
Topic
Board Hardware
Re: LightningAsic usb miners based Gridseed GC3355 Tech Support Thread
by
Andareed
on 26/02/2014, 20:28:36 UTC
I have been going through the .php files, and although I don't understand most of it (I am not a programmer), doesn't this mean that the hashrate shown in the webinterface is actually a derived hashrate as well, and not the actual measured hashrate?

Code:
function getLtcHashrate() {
$cache = new Cache(PATH_CACHE);
$stats = $cache->get(CACHE_STATSUI);
$ltc = array();
var_dump($stats['ltc']);

foreach($stats['ltc'] as $devid => $ltcminer) {
$hashrate = 0;
foreach($ltcminer as $diff => $shares)
{
$hashrate += $shares['valid'] > 0 ? ((float) $diff * pow(2.0, 15)) / ((time() - $shares['time']) / $shares['valid']) : 0;
}
$ltc[$devid] = round($hashrate / 1000);
}
return $ltc;
}

Looks like its calculating hash rate just like a pool would.

Yeah, exactly what I thought Sad I was hoping they had a way to actually measure hashrate.

So I guess that explains why the rate seems to jump around so much on the Dashboard?  Or is that more an indicator of hashing instability?

Mining is based on probability, so by hashing you really performing probabilistic trials. Eventually you will converge on the expected value. If you want the actual hash rate, there's no need to measure it. Computer chip operations are specified in terms of how many clock cycles they take, so if you know the frequency you can compute operation times. Unfortunately gridseed has not published operation cycle times (though this is something you could determine by measuring), though they have published hash rates for specific frequencies: