Miners work on finding blocks but don't sent anything until they find the block.
Considering that, how can sites like bitcoincharts.com display a graph of the network hash rate?
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.Sign up to join this community
The hashrate can be calculated from the expected rate of finding a block (144 a day), the actual rate of finding a block and the current difficulty.
So let's calculate the average hash_rate for a single day:
expected_blocks = 144 difficulty = 11187257.461361 # this is on May 22nd 2013 blocks_found = 155 # Also May 22nd 2013 hash_rate = (blocks_found/expected_blocks*difficulty * 2**32 / 600)
The reason we use a day to average out the hash_rate is that taken block by block the variance would be really high and we would not get anything meaningful.
According to WolframAlpha this gives us an averagge hash_rate for the 22nd May 2013 of 86.19 THashes/s. Numbers of course may vary depending on how you chose your interval, which appears to be the reason numbers don't match with the ones on Blockchain.info
The network hash rate can be statistically inferred from the difficulty and the rate at which blocks are found. It's just a more complex version of the fact that if you know that someone is flipping coins and heads comes up 800 times an hour, they're flipping about 1,600 coins an hour.