Bitcoin Forum

Other => Beginners & Help => Topic started by: DutchDemon on February 29, 2020, 11:43:06 AM



Title: Will the difficulty change and block halving take place on the same block?
Post by: DutchDemon on February 29, 2020, 11:43:06 AM
i.e. Block #630000 ?


Title: Re: Will the difficulty change and block halving take place on the same block?
Post by: nc50lc on February 29, 2020, 12:10:09 PM
The main title (question) is a bit vague, so I'll just answer based from the context:

Q: Will the difficulty change during/after the halving?
A: No, there's no direct relation between halving and difficulty,
The increased/decreased difficulty is just the effect of more/less miner competing for the lowered block reward and/or just because of the new ASICs that's more efficient.


Title: Re: Will the difficulty change and block halving take place on the same block?
Post by: DutchDemon on February 29, 2020, 12:17:47 PM
The main title (question) is a bit vague, so I'll just answer based from the context:

Q: Will the difficulty change during/after the halving?
A: No, there's no direct relation between halving and difficulty,
The increased/decreased difficulty is just the effect of more/less miner competing for the lowered block reward and/or just because of the new ASICs that's more efficient.

No. No. I am not asking whether difficulty will change because of halving. AFAIK, difficulty changes at every 2016 block and halving will occur at Block #630000. My question whether the two incident will coincide?


Title: Re: Will the difficulty change and block halving take place on the same block?
Post by: 20kevin20 on February 29, 2020, 12:20:25 PM
The block difficulty changes every 2016 blocks (https://en.bitcoin.it/wiki/Difficulty#How_often_does_the_network_difficulty_change.3F). That means the difficulty will be changed on block #628992 and block #631008. Therefore, the difficulty is not adjusted with the halving at the same time.

It's a simple calculus:

Divide block #630000 by 2016 and that results in the following number: 312.5.
312.5 is right in between 312 and 313, so multiply 312 and 313 separately by 2016 and you'll get the following numbers: 628992 and 631008.
630000 is in between these two numbers (block heights), so they will not coincide.

Edit:
In other words, difficulty adjustment will happen 1008 blocks before and after the halving.. or approximately a week before and after - as far as I know, it takes about 2 weeks for 2016 blocks to be solved. :)


Title: Re: Will the difficulty change and block halving take place on the same block?
Post by: o_e_l_e_o on February 29, 2020, 12:47:24 PM
That means the difficulty will be changed on block #628992 and block #631008.
This is the correct answer. You can see a list of all previous difficulty adjustments, including the block numbers as multiples of 2016, here: https://btc.com/stats/diff

as far as I know, it takes about 2 weeks for 2016 blocks to be solved.
That is the target, but it is usually less than that due to the hashrate increasing the majority of the time. If you take a look at the link I shared above, you'll see the average block time (certainly over the last 20-30 difficulty readjustments) has been less than 10 minutes. If we look at the last 20 adjustments, they cover a period of 271 days (May 30th through February 25th), instead of the target 280 days.


Title: Re: Will the difficulty change and block halving take place on the same block?
Post by: 20kevin20 on February 29, 2020, 01:03:40 PM
This is the correct answer. You can see a list of all previous difficulty adjustments, including the block numbers as multiples of 2016, here: https://btc.com/stats/diff
~
Thanks, I was looking for that link to make sure I'm not writing bullshit but couldn't find it anywhere. :D

That is the target, but it is usually less than that due to the hashrate increasing the majority of the time. If you take a look at the link I shared above, you'll see the average block time (certainly over the last 20-30 difficulty readjustments) has been less than 10 minutes. If we look at the last 20 adjustments, they cover a period of 271 days (May 30th through February 25th), instead of the target 280 days.
Interesting to know.


Title: Re: Will the difficulty change and block halving take place on the same block?
Post by: LoyceV on February 29, 2020, 01:18:12 PM
If you take a look at the link I shared above, you'll see the average block time (certainly over the last 20-30 difficulty readjustments) has been less than 10 minutes.
Interesting to know.
The 10 minute average is based on a static hash rate. But since the hash rate is increasing most of the time, blocks are found slightly faster.
And the opposite happens when the hashrate drops, usually when miners switch off their hardware if the Bitcoin price drops so much it's no longer worth the electricity.


Title: Re: Will the difficulty change and block halving take place on the same block?
Post by: odolvlobo on February 29, 2020, 04:58:51 PM
The difficulty changes every 2016 blocks. The halving occurs every 210000 blocks. To find when they coincide, you find the LCM ("least common multiple"). The LCM is 1260000. They will coincide every 1260000 blocks, or about every 24 years.


Title: Re: Will the difficulty change and block halving take place on the same block?
Post by: SpanishSoldier on May 06, 2020, 07:27:06 PM
The difficulty changes every 2016 blocks. The halving occurs every 210000 blocks. To find when they coincide, you find the LCM ("least common multiple"). The LCM is 1260000. They will coincide every 1260000 blocks, or about every 24 years.
...and it happened at Block 628992.

Previous difficulty: 15958652328578.42
Current difficulty: 16104807485529.38

Increase was approximately 0.92%


Title: Re: Will the difficulty change and block halving take place on the same block?
Post by: hd49728 on May 08, 2020, 12:44:39 AM
The difficulty changes every 2016 blocks. The halving occurs every 210000 blocks. To find when they coincide, you find the LCM ("least common multiple"). The LCM is 1260000. They will coincide every 1260000 blocks, or about every 24 years.
Impressive. Thank you for those figures that I don't remember. From what you give, the difficulty on the network is changed after ~ 1.4 days (2016/1440 blocks per day). It can take longer or shorter than 1.4 days to adjust difficulty depends on how fast each batch of 2016 blocks found.

The big difference is difficulty does not increase two times or halve like block rewards. Therefore I don't see why people care about how difficulty change around halving time. The miner capitulation or new participation makes more sense on difficulty changes.


Title: Re: Will the difficulty change and block halving take place on the same block?
Post by: odolvlobo on May 08, 2020, 08:24:08 AM
From what you give, the difficulty on the network is changed after ~ 1.4 days (2016/1440 blocks per day). It can take longer or shorter than 1.4 days to adjust difficulty depends on how fast each batch of 2016 blocks found.

There are 144 blocks each day, not 1440. So the difficulty changes every 14 days.

The big difference is difficulty does not increase two times or halve like block rewards. Therefore I don't see why people care about how difficulty change around halving time. The miner capitulation or new participation makes more sense on difficulty changes.

The issue is the the halving may cause an large abrupt drop in the total hash rate, and blocks would take longer until the difficulty adjusts.

This year, the difficulty is nominally scheduled to adjust a week after the halving. Suppose that the hash rate drops by half (not likely, but not impossible). In that case, blocks will each take 20 minutes and the difficulty won't change for two weeks. Cutting Bitcoin's transaction rate by half for two weeks could have a major impact.


Title: Re: Will the difficulty change and block halving take place on the same block?
Post by: hd49728 on May 08, 2020, 11:53:50 AM
The issue is the the halving may cause an large abrupt drop in the total hash rate, and blocks would take longer until the difficulty adjusts.

This year, the difficulty is nominally scheduled to adjust a week after the halving. Suppose that the hash rate drops by half (not likely, but not impossible). In that case, blocks will each take 20 minutes and the difficulty won't change for two weeks. Cutting Bitcoin's transaction rate by half for two weeks could have a major impact.
It is nearly the same as what we saw in 2017 when bitcoin transactions got stucked even people tried to boost their fees to higher and higher. That's terrible in that period but such things often occur whenever bitcoin price skyrockets to the peaks. People turn to more actively move their coins and accept higher fees while more miners join. After all, when price drops back and newbie miners leave, we see some kinds of effects from less total hashrate and a 14 days waiting period to see difficulty adjusts.