Post
Topic
Board Bitcoin Technical Support
Re: Block Chain's Time Stamp is Nonsequential?!
by
deepceleron
on 31/12/2013, 04:28:15 UTC
Thank you all for that information. There are ways of resolving the timestamp in a decentralized manner. when conducting the comparison of the size of the proof of work, each submitted proof of work will have an associated timestamp. Take the average and use that as the timestamp for the longest.  There are also methods of synchronizing the network clock, using the clocktime of participants.

From an analytics standpoint accurate time measurements are very important.

To the second part:

Where can I find the equations that are used to calculate difficulty (base 10 for dummies please) and network hash rate for each block?

Thanks again
The actual equations that calculate the next difficulty are at line 1000 or so of https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp
The difficulty is recalculated every 2016 blocks based on the average time of the last evaluation period, to maintain the rate of six blocks per hour when network hashing rate changes.

The equations you would use to calculate difficulty depend on what your question is.

https://en.bitcoin.it/wiki/Difficulty

Difficulty * 4295032833.0 / 600 = estimated hash rate

Difficulty = 600 / 4295032833.0 * estimated hash rate (hash/s)

Difficulty = 139.6962545641144970431923866272 * estimated hash rate (Ghash/s)