BTCPrivate / BitcoinPrivate-legacy

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

Calculate network difficulty based on legacy powLimit value #131

Closed donshin closed 6 years ago

donshin commented 6 years ago

With the increased powLimit value, the network difficulty values calculated are hundreds of times larger than typically expected for Equihash-based tokens; this may be problematic within the context of pre-existing mining profitability calculators. While the pow targets for mainnet at the moment are well below the current and legacy powLimit values, reverting the powLimit to the legacy value causes an assertion failure while checking the bits values of at least one previous block after the fork- so the calculation for displayed network difficulty is changed to use the legacy powLimit value so as to maintain comparability with the network difficulty values of other Equihash-based coins. A floor of 1.0 is also implemented to avoid potential compatibility issues with mining profitability calculators as well.

ch4ot1c commented 6 years ago

LGTM - tested by @donshin

sennevb commented 6 years ago

this will only affect the displayed diff, and not the vardiff calculations, right?