BTCPrivate / BitcoinPrivate-legacy

Bitcoin Private is a Bitcoin and Zclassic fork which uses ZK-SNARK technology for privacy and fungibility.
Other
285 stars 132 forks source link

Difficulty bomb removal #204

Closed mattpass closed 4 years ago

mattpass commented 5 years ago

The difficulty bomb is due to happen this year and it's been noted it's a good idea to remove it altogether.

Someone will need to look into when it is due to occur and remove it so it doesn't happen.

mattpass commented 5 years ago

Looking at code quickly, it seems the difficulty bomb is due to go off on block 600,000: https://github.com/BTCPrivate/BitcoinPrivate/blob/519ceaa3674faf07376f6ec14be86c692513518d/src/chainparams.cpp#L54

Some quick calculations - if Feb 16th is anticipated to be blockheight 480,000, there's 120,000 left before the bomb.

24 x 60 = 1,440 mins a day. 120,000 / 1,440 = 83.3 days after Feb 16th. Divided by 30 days on average a month = 2.77 months. That means sometime approx around the first half of May.

We should therefore have it disabled ASAP and ensure the codebase that is being used everywhere doesn't include this.

bigdaveakers commented 5 years ago

Couple of points...… What is the logic behind removing it rather than moving it? From a testing point of view moving it to block 1000000 is easier than testing complete removal. I am not a fan of redundant code, but...…..

Second point, your maths is wrong assuming blocks are mined every 2.5 minutes......so more like 6-7 months.....

mattpass commented 5 years ago

@bigdaveakers oops - forgot to add in the 2.5 mins to my equation - I did think May was a bit soon.

It's indeed 120000 / 24 * 60 / 2.5 = 208 days and not 83 days as I originally said. So 208 / 7 = 6.9 months as you pointed out.

As for moving it (or commenting it out as SnippleRifsky did originally) - we're not going to want it anymore. It was something initially coded into the codebase even with the assumption we'll never need it. If we do, we have GitHub commit history to dig it back out again.

PS - I like the idea of bringing it forward from block 600k to say 10k for testing purposes.

ghost commented 4 years ago

Fixed in https://github.com/BTCPrivate/BitcoinPrivate/pull/235