Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Dobrodav on May 30, 2011, 08:48:33 AM



Title: Difficulty change failsafe mechanism
Post by: Dobrodav on May 30, 2011, 08:48:33 AM
Lets imagine that in one point, we will suffer from sudden lost of interest in bitcoin,
due to legalization problems, or due to some other factors.

Computation power of the network will be suddenly changed,
but difficulty will stay the same for long time (max 2016 blocks).

In result, we will have situation when, possibly even one block, will not be solved in a day,
and therefore - extremely slow transactions confirmation.

How to handle that situation ?
Is there any precaution ?

If not, maybe one should be implemented?

Like, as example this ones, -
Change of difficulty every 12 hours, or 72 blocks.
Difficulty  starts to change, if no block was found in 1-3 hours. (Added)

Please comment.


Title: Re: Difficulty change failsafe mechanism
Post by: Sukrim on May 30, 2011, 09:56:01 AM
I already asked at the opposite if someine could drop in 100 TH/s from outer space, driving difficulty so high that it's nearly impossible to mine...

Difficulty can only increase max. 4-fold, so that is being taken care of.

On the other extreme, to have only 1 block per day(!) quite a bit more than 99% of miners would need to suddenly drop out of the network. This is not realistic at all.

Even if the hashrate goes down to 25% of what it is right now, difficulty would adapt within 2 months.


I guess that an emergency client could be coded though in such extreme cases that you describe and if the majority of the (now very small) network uses this, it could be done. The problem is, that the eventually returning miners would also need to accept this (and could fight it easily, as they have more hashong power by definition).


Title: Re: Difficulty change failsafe mechanism
Post by: Belkaar on May 30, 2011, 10:22:54 AM
The problem is that this is not necessarily only theoratical.

If I'd have a big mining cluster that burns a lot of electricity I would implement a safety net that shuts down the miners once the exchange rate drops below a certain amount where mining is not profitable any more. This could very well start a chain reaction because many people might panic-sell if large chunks of hashing power suddenly vanish. "Transactions are not getting confirmed any more, need to sell fast while it still works". This would drive the price down and auto-shutdown even more mining-rigs.

I think recovering from such an outage is not easy to do because nobody will trust the network to do timely transaction-confirmations any more, so the value will not rise again. Two month to get the network back in it's feet would be the end of bitcoin IMHO.


Title: Re: Difficulty change failsafe mechanism
Post by: FreeMoney on May 30, 2011, 11:16:02 AM
The problem is that this is not necessarily only theoratical.

If I'd have a big mining cluster that burns a lot of electricity I would implement a safety net that shuts down the miners once the exchange rate drops below a certain amount where mining is not profitable any more. This could very well start a chain reaction because many people might panic-sell if large chunks of hashing power suddenly vanish. "Transactions are not getting confirmed any more, need to sell fast while it still works". This would drive the price down and auto-shutdown even more mining-rigs.

I think recovering from such an outage is not easy to do because nobody will trust the network to do timely transaction-confirmations any more, so the value will not rise again. Two month to get the network back in it's feet would be the end of bitcoin IMHO.

Everyone has different costs, there is no reason to think that a large chunk of miners will quit in unison. When a small amount do quit then difficulty will drop and some will come back or others will not quit.


Title: Re: Difficulty change failsafe mechanism
Post by: Dobrodav on May 30, 2011, 11:31:06 AM
Everyone has different costs, there is no reason to think that a large chunk of miners will quit in unison. When a small amount do quit then difficulty will drop and some will come back or others will not quit.

There we talk about some hypothetic, and unlikely to happen situation, but we should take in consideration that this is possible.
I am  do not want to speculate on that situation details, but if you insist ...

1) Larger countries just shutdown internet. Now we are relaying on miners of other countries.
2) Larger countries found a way to block bitcoin related traffic - same as 1)
3) Extremal drop of change course. (much more possible scenario)
4) Something else always possible.

As another failsafe mechanism - difficulty  starts to change, if block was not found in 1-3 hours.


Title: Re: Difficulty change failsafe mechanism
Post by: Maged on May 31, 2011, 02:32:59 AM
Lets imagine that in one point, we will suffer from sudden lost of interest in bitcoin,
due to legalization problems, or due to some other factors.

Computation power of the network will be suddenly changed,
but difficulty will stay the same for long time (max 2016 blocks).

In result, we will have situation when, possibly even one block, will not be solved in a day,
and therefore - extremely slow transactions confirmation.

How to handle that situation ?
Is there any precaution ?

If not, maybe one should be implemented?

Like, as example this ones, -
Change of difficulty every 12 hours, or 72 blocks.
Difficulty  starts to change, if no block was found in 1-3 hours. (Added)

Please comment.

I completely disagree with implementing such a system. In fact, if such a situation occurred, we should be WARNING THE USER. Why? Because this most likely means that the network has been segmented. The last thing we want to do is increase the speed of block creation on a segmented network.

If this happened as a result of a sudden loss of interest, as you supposed, then we'd just have to put out a new client. Under no circumstance should this be built in to the client.


Title: Re: Difficulty change failsafe mechanism
Post by: TiagoTiago on May 31, 2011, 03:08:13 AM
It would be interesting to have a proggie that attempts to simulate the behavior of miners faster than realtime to, among other things, try to see how bad things could get if a large chunk of the processing power suddenly went away with the way the system is currently set (obviously comparing the simulated behavior with how things happened in the past would be a great way to get an idea how close the proggie is to reality)


Title: Re: Difficulty change failsafe mechanism
Post by: Dobrodav on May 31, 2011, 07:14:03 AM
Consensus - That situation should be handed manually.
Some preparations should be made - (patched version of client).


Title: Re: Difficulty change failsafe mechanism
Post by: Sukrim on May 31, 2011, 11:21:45 AM
A problem with dropping difficulty at a certain time is that defining an exact nanosecond worldwide is a tough business...
and if you would drop difficulty at a certain block, you would still have to mine that block which in the worst case still takes too long to do.

Anyways, if you see a sudden drop of more than 99,999% in hashing rate this much more likely means your government has pulled the plug on the internet (--> like Iran plans to do currently) and you're in an isolated network off the global grid.


Title: Re: Difficulty change failsafe mechanism
Post by: Maged on May 31, 2011, 07:05:50 PM
A problem with dropping difficulty at a certain time is that defining an exact nanosecond worldwide is a tough business...
and if you would drop difficulty at a certain block, you would still have to mine that block which in the worst case still takes too long to do.
Not really. It could be activated just by receiving a special transaction signed by the current lead developer.

That said, the last thing we should do is prepare for this. The longer we're forced to think this over, the better.