-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release-v1.7] blockchain: Enforce testnet difficulty throttling.
Currently, version 3 of the test network implements a minimum difficulty reduction rule that was inherited from btcsuite which intends to act as mechanism to deal with major difficulty spikes due to ASICs which are typically not running testnet and since it's not reasonable to require high-powered hardware to keep the test network running smoothly. Unfortunately, this existing rule is not a particularly good solution in general as it is not very deterministic and introduces additional complications around difficulty selection. It is an even worse solution in the the case of Decred due to its hybrid model. Rather than the aforementioned reactive approach, this introduces more deterministic proactive testnet rules in order limit the type of games that ASICs can play on testnet. In particular, two new rules are introduced that are only imposed started with block height 962928: - A maximum allowed difficulty is now imposed on testnet such that CPU mining will still be feasible without resorting to any type of reactive and more complicated difficulty dropping - Once the maximum allowed difficulty is reached on testnet, blocks must be at least 1 minute apart The combination of these rules will prevent the difficulty on testnet from ever rising to levels that are out of reach for CPUs to continue mining blocks and throttle production in the case of higher-powered hardware such as GPUs and ASICs. It should be noted that this solution is only suitable on a test network where no real monetary value is in play and thus the typical game theory mechanics do not apply. Finally, code to invalidate the existing extremely high work testnet chain which has stalled testnet after that point is added to allow the test network to be recovered without needing to fire up a bunch of ASICs.
- Loading branch information
Showing
5 changed files
with
128 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters