I am new to cryptocurrency and because they are fascinating, I was trying to understand how they work: How is the total network hashrate calculated? Or this info is stored on the network somewhere (i think not in blockchains but between peers?) . What I initially thought it should be is to 'reverse' it from the difficulty value but some instances shown me that it might not be true?
$total_ghs = ($gh_per_share * $cur_diff * ($blocks_elapsed / $sec_elapsed)