Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Icon on September 30, 2014, 01:31:21 AM



Title: Difficulty retargeting with lower hashrate question..
Post by: Icon on September 30, 2014, 01:31:21 AM
I know the diff changes depending on the hash rate and retargets ever 1024 blocks? somewhere around there.. my question is what happens .. like it is now the hash rate drops and its taking longer then the average 10 mins per block, will bitcoin qt retarget sooner seeing its taking longer to solve a block now that there is less hash rate.. At the time of this post it's averaging 11 mins for a block to be solved. Are we going to have to wait longer then 2 weeks till the next 1024 blocks are solved  (ever how long that will be) before a retarget?

Icon


Title: Re: Difficulty retargeting with lower hashrate question..
Post by: frankenmint on September 30, 2014, 01:34:41 AM
I know the diff changes depending on the hash rate and retargets ever 1024 blocks? somewhere around there.. my question is what happens .. like it is now the hash rate drops and its taking longer then the average 10 mins per block, will bitcoin qt retarget sooner seeing its taking longer to solve a block now that there is less hash rate.. at the time of this post is averaging 11 mins to solve . Are we going to have to wait longer then 2 weeks till the next 1024 blocks (ever how long that will be) for a retarget?

Icon


quick answer: no it will go by network difficulty for the block it is trying to solve.

If the network lowers difficulty, then the software will 'retarget' the lower difficulty with the next block.  average time is just that - an average.  Some days blocks are found very quickly like within minutes or seconds of each other. 

If you are meddling with the core software to try to solve at a targeted lower difficulty, the network itself will reject your block if it was discovered at a difficulty lower than current.


Title: Re: Difficulty retargeting with lower hashrate question..
Post by: Icon on September 30, 2014, 02:33:51 AM
So you are saying the net work diff can retarget on the fly? and not wait to a predetermined block # then check to see if it needs to retarget?

The whole point of my question was will we have to wait for a X number of blocks to be solved before the network diff lowers due to the lowering in hash rate..


Icon



Title: Re: Difficulty retargeting with lower hashrate question..
Post by: -ck on September 30, 2014, 02:47:01 AM
Yes, it always waits 2016 blocks before a retarget. That means it takes less time before a retarget when diff is rising and more time before a retarget when diff is falling.


Title: Re: Difficulty retargeting with lower hashrate question..
Post by: Icon on September 30, 2014, 03:13:33 AM
thanks, that is what i was looking for.. well looks like a long wait for the next 2016 blocks.. @ 11.16 mins now per block and counting..

Seems with the price of btc lowering big miner companies have shut off some of there mining power.. meaning the diff is high but not enough hashing power to push them blocks..

Icon


Title: Re: Difficulty retargeting with lower hashrate question..
Post by: DannyHamilton on September 30, 2014, 05:02:35 AM
Assuming I haven't made any errors in my math (I was trying to get it done quickly before too many more blocks were solved and skewed my numbers):

I believe the last difficulty change was block 322560, therefore the next difficulty change should be block 324576.

The most recently completed block was 323139.

324576 - 323139 = 1437 more blocks until the next difficulty change.

Block 322560 was solved at approximately 2014-09-25 21:21:20 GMT
Block 323139 was solved at approximately 2014-09-30 04:44:37 GMT

That's 372,197 seconds for 579 blocks.

(372,197 / 579 ) / 60 = 10.714 minutes per block

If the average time per block remains 10.714 minutes per block for the remainder of this difficulty period, then the next difficulty change will be in:

10.714 minutes per block * 1437 blocks = 15,396 minutes = 10 days, 16 hours, 36 minutes

That would make the next difficulty change 2014-10-10 21:01:13.

Of course it is possible that the current rate of blocks is simply a small variation in the distribution, and that the average block time for this difficulty period will approach 10 minutes as more blocks are solved.

If the blocks were to average exactly 10 minutes per block by the end of this difficulty period, then the next difficulty would have been 2014-10-09 21:21:20.


Title: Re: Difficulty retargeting with lower hashrate question..
Post by: spin on October 03, 2014, 01:07:41 PM
You could look here for charts plus estimates: https://bitcoinwisdom.com/bitcoin/difficulty
Not entirely happy with the way they estimate the next difficulty but it gives you an idea.


Title: Re: Difficulty retargeting with lower hashrate question..
Post by: HELP.org on October 03, 2014, 01:12:36 PM
The time that goes by does not matter in the formulas, only the number of blocks.  People often say it retargets every 2 weeks or that the reward halving takes place every 4 years but those are just estimates and everything is calculated based on the number of blocks solved.