Bitcoin Forum

Bitcoin => Mining support => Topic started by: Bakemono on July 20, 2013, 01:39:22 AM



Title: Bitcoin Difficulty Question
Post by: Bakemono on July 20, 2013, 01:39:22 AM
I quote from the bitcoin wiki:

Quote
The difficulty is adjusted every 2016 blocks based on the time it took to find the previous 2016 blocks. At the desired rate of one block each 10 minutes, 2016 blocks would take exactly two weeks to find. If the previous 2016 blocks took more than two weeks to find, the difficulty is reduced. If they took less than two weeks, the difficulty is increased. The change in difficulty is in proportion to the amount of time over or under two weeks the previous 2016 blocks took to find.

If the change in difficulty is in proportion of the amount of time under two weeks the previous 2016 blocks took to find then why
the numbers don't match in this spreadsheet (https://docs.google.com/spreadsheet/ccc?key=0AmcTCtjBoRWUdHVRMHpqWUJValI1RlZiaEtCT1RrQmc#gid=0)

For example in line 123, 6/29/2013 we had 12.7 days with the previous difficulty and the increase is 10.32% and not (14-12.7)/14=0.093 (9.3%)
The same in line 124, 7/11/2013. Apparently it took 11.42 days for the previous 2016 block to be found but the increase was 22.63% and not (14-11.42)/14=0.18 (18%).

Why is this happening?


Title: Re: Bitcoin Difficulty Question
Post by: Zanatos666 on July 21, 2013, 11:54:24 PM
As the total bitcoin network hash rate is increasing, blocks are being found at a faster rate.  What you are you looking at right at that time frame is when a lot of ASICs starting coming online from BFL and other companies, making the total network hashing power exponentially increase.  Therefore burning through 2016 blocks was happening much faster at the difficulty that was listed at that time.  In order to compensate for this increase total hashing across the network, the difficulty increased ~20% as now it was harder to find shares with so many high hashing equipment coming online. 

Back in the day, you could have a GPU that could has at ~400Mh/s and in the beginning days could solo mine and find blocks by itself.  Now we are in the days of 100+Gh/s ASIC miners and having to compete agasint those.  This makes mining and finding a block and getting the reward much more difficult, but also means, assuming "luck" isnt completely horrible, finding 2016 blocks can happen in half the time under the right circumstances.


Title: Re: Bitcoin Difficulty Question
Post by: crazyates on July 22, 2013, 01:38:22 AM
For example in line 123, 6/29/2013 we had 12.7 days with the previous difficulty and the increase is 10.32% and not (14-12.7)/14=0.093 (9.3%)
The same in line 124, 7/11/2013. Apparently it took 11.42 days for the previous 2016 block to be found but the increase was 22.63% and not (14-11.42)/14=0.18 (18%).
First of all, ((14-12.7)/14) <- This equation doesn't make any sense. It should be ((14-12.7)/12.7)=10.24%, which is close.

Second of all, I think your window of 12.7 days is too inaccurate. Look at the seconds line, as that gives you a lot more accuracy. ((1209600-1097071/1097071)=10.25%, which is again close.

Another way to look at it is it took an average of 544.182 seconds per block. This number should be 600 (one block every 10 minutes, or 6 blocks an hour). 600/544.182=1.1025, or 10.25%.

So your questions should actually be, how is the difficulty change 10.32%, when the time show it to only be 10.25%?


Title: Re: Bitcoin Difficulty Question
Post by: Bakemono on July 22, 2013, 08:00:24 PM
For example in line 123, 6/29/2013 we had 12.7 days with the previous difficulty and the increase is 10.32% and not (14-12.7)/14=0.093 (9.3%)
The same in line 124, 7/11/2013. Apparently it took 11.42 days for the previous 2016 block to be found but the increase was 22.63% and not (14-11.42)/14=0.18 (18%).
First of all, ((14-12.7)/14) <- This equation doesn't make any sense. It should be ((14-12.7)/12.7)=10.24%, which is close.

Yea sorry my bad.
Thanks for your answer.

I actually calculated how much lower the previous diff is from the new one and not
how much difficulty we should add.

So a complete thought whould have been :
a=old dif
b=new dif
a=b-(9.3/100)b <=> a=(90.7/100)b <=> b=1.1025a

which is ofc the long way around of just calculating b=(14/12.7)a