From 1707f0350d9165b611f87b4f3634b0da82858934 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Thu, 13 Dec 2018 13:57:08 +0100 Subject: [PATCH 1/8] Bump nPowKGWHeight for testnet and cause a fork at height 4001 This will reset testnet so that we can start with a clean state. --- src/chainparams.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index e01c9c8c09..1ff3cf6e08 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -300,8 +300,8 @@ public: consensus.nPowTargetSpacing = 2.5 * 60; // Dash: 2.5 minutes consensus.fPowAllowMinDifficultyBlocks = true; consensus.fPowNoRetargeting = false; - consensus.nPowKGWHeight = 4001; // nPowKGWHeight >= nPowDGWHeight means "no KGW" - consensus.nPowDGWHeight = 4001; + consensus.nPowKGWHeight = 4002; // nPowKGWHeight >= nPowDGWHeight means "no KGW" + consensus.nPowDGWHeight = 4002; consensus.nRuleChangeActivationThreshold = 1512; // 75% for testchains consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28; From cb8ab03a9c013b245e259e6b9ff6b27391b340b3 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Thu, 13 Dec 2018 14:03:02 +0100 Subject: [PATCH 2/8] Change CSV, DIP0001 and BIP147 deployments to start today --- src/chainparams.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 1ff3cf6e08..409cd52463 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -310,20 +310,20 @@ public: // Deployment of BIP68, BIP112, and BIP113. consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0; - consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1506556800; // September 28th, 2017 - consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1538092800; // September 28th, 2018 + consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1544655600; // Dec 13th, 2018 + consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1576191600; // Dec 13th, 2019 // Deployment of DIP0001 consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].bit = 1; - consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nStartTime = 1505692800; // Sep 18th, 2017 - consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nTimeout = 1537228800; // Sep 18th, 2018 + consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nStartTime = 1544655600; // Dec 13th, 2018 + consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nTimeout = 1576191600; // Dec 13th, 2019 consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nWindowSize = 100; consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nThreshold = 50; // 50% of 100 // Deployment of BIP147 consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].bit = 2; - consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nStartTime = 1517792400; // Feb 5th, 2018 - consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nTimeout = 1549328400; // Feb 5th, 2019 + consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nStartTime = 1544655600; // Dec 13th, 2018 + consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nTimeout = 1576191600; // Dec 13th, 2019 consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nWindowSize = 100; consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nThreshold = 50; // 50% of 100 From 9eeea334cb2c303322c82c7743648213dc072ba0 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Thu, 13 Dec 2018 14:04:45 +0100 Subject: [PATCH 3/8] Update nMinimumChainWork and defaultAssumeValid for block 4000 --- src/chainparams.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 409cd52463..2e58610450 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -328,10 +328,10 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nThreshold = 50; // 50% of 100 // The best chain should have at least this much work. - consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000000003be69c34b1244f"); // 143200 + consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000000000000003cd72a542"); // 4000 // By default assume that the signatures in ancestors of this block are valid. - consensus.defaultAssumeValid = uint256S("0x0000000004a7878409189b7a8f75b3815d9b8c45ee8f79955a6c727d83bddb04"); // 143200 + consensus.defaultAssumeValid = uint256S("0x00000ce22113f3eb8636e225d6a1691e132fdd587aed993e1bc9b07a0235eea4"); // 4000 pchMessageStart[0] = 0xce; pchMessageStart[1] = 0xe2; From b5c71d9d5d34e22dcd15b751e5bb0083789211ec Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Thu, 13 Dec 2018 14:24:29 +0100 Subject: [PATCH 4/8] Remove checkpoints above block 4000 --- src/chainparams.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 2e58610450..8cf67033c1 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -383,13 +383,11 @@ public: ( 261, uint256S("0x00000c26026d0815a7e2ce4fa270775f61403c040647ff2c3091f99e894a4618")) ( 1999, uint256S("0x00000052e538d27fa53693efe6fb6892a0c1d26c0235f599171c48a3cce553b1")) ( 2999, uint256S("0x0000024bc3f4f4cb30d29827c13d921ad77d2c6072e586c7f60d83c2722cdcc5")) - ( 100000, uint256S("0x0000000003aa53e24b6e60ef97642e4193611f2bcb75ea1fa8105f0b5ffd5242")) - ( 143200, uint256S("0x0000000004a7878409189b7a8f75b3815d9b8c45ee8f79955a6c727d83bddb04")) }; - chainTxData = ChainTxData{ - 1529294335, // * UNIX timestamp of last known number of transactions - 5810120, // * total number of transactions between genesis and that timestamp + chainTxData = ChainTxData{ + 1544707462, // * UNIX timestamp of last known number of transactions + 4100, // * total number of transactions between genesis and that timestamp // (the tx=... number in the SetBestChain debug.log lines) 0.01 // * estimated number of transactions per second after that timestamp }; From ddd0068e297e6d9c7ad13f697818c9c6b856ac54 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Thu, 13 Dec 2018 15:28:23 +0100 Subject: [PATCH 5/8] Bump to 0.12.3.4 --- configure.ac | 2 +- doc/Doxyfile | 2 +- src/clientversion.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index e43c9f172c..d68da4bdb1 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) define(_CLIENT_VERSION_MINOR, 12) define(_CLIENT_VERSION_REVISION, 3) -define(_CLIENT_VERSION_BUILD, 3) +define(_CLIENT_VERSION_BUILD, 4) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2018) define(_COPYRIGHT_HOLDERS,[The %s developers]) diff --git a/doc/Doxyfile b/doc/Doxyfile index 586064e206..92b97ed5cc 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -41,7 +41,7 @@ PROJECT_NAME = "Dash Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.12.3.3 +PROJECT_NUMBER = 0.12.3.4 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/src/clientversion.h b/src/clientversion.h index 4e4d864ea7..3e5f8ccffc 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -17,7 +17,7 @@ #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 12 #define CLIENT_VERSION_REVISION 3 -#define CLIENT_VERSION_BUILD 3 +#define CLIENT_VERSION_BUILD 4 //! Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true From 0dc849dc99b070d649fa12a1ebdfce72cb679172 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Thu, 13 Dec 2018 15:28:43 +0100 Subject: [PATCH 6/8] Update release-notes.md and copy 0.12.3.3 release-notes --- doc/release-notes.md | 21 ++-- .../dash/release-notes-0.12.3.3.md | 99 +++++++++++++++++++ 2 files changed, 111 insertions(+), 9 deletions(-) create mode 100644 doc/release-notes/dash/release-notes-0.12.3.3.md diff --git a/doc/release-notes.md b/doc/release-notes.md index 3657617439..71ef284e59 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,11 +1,11 @@ -Dash Core version 0.12.3.3 +Dash Core version 0.12.3.4 ========================== Release is now available from: -This is a critical bugfix release. +This is an optional release and only contains changes for testnet. It is not required to update masternodes on mainnet. Please report bugs using the issue tracker at github: @@ -34,7 +34,7 @@ the database if you decide to use any pre-0.12.2.2 version. Wallet forward or backward compatibility was not affected. -### Downgrade to 0.12.2.2/3, 0.12.3.1/2 +### Downgrade to 0.12.3.1/2/3 Downgrading to these versions does not require any additional actions, should be fully compatible. @@ -43,16 +43,18 @@ fully compatible. Notable changes =============== -Fix crash bug with duplicate inputs within a transaction --------------------------------------------------------- +Fork/Reset testnet at block 4001 +-------------------------------- -There was a critical bug discovered in Bitcoin Core's codebase recently which -can cause node receiving a block to crash https://github.com/bitcoin/bitcoin/pull/14247 +This release is NOT required on mainnet. It is intended to be deployed on testnet and will cause a fork at block 4001. +The plan is to restart all testing for the v0.13.0.0 upgrade process. -0.12.3.3 Change log +When deployed on testnet, it is required to start with a fresh data directory or call Dash Core with `-reindex-chainstate`. + +0.12.3.4 Change log =================== -See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.12.3.2...dashpay:v0.12.3.3). +See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.12.3.3...dashpay:v0.12.3.4). Credits ======= @@ -84,6 +86,7 @@ Dash Core tree 0.12.1.x was a fork of Bitcoin Core tree 0.12. These release are considered obsolete. Old release notes can be found here: +- [v0.12.3.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.3.md) released Sep/19/2018 - [v0.12.3.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.2.md) released Jul/09/2018 - [v0.12.3.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.1.md) released Jul/03/2018 - [v0.12.2.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.2.3.md) released Jan/12/2018 diff --git a/doc/release-notes/dash/release-notes-0.12.3.3.md b/doc/release-notes/dash/release-notes-0.12.3.3.md new file mode 100644 index 0000000000..3657617439 --- /dev/null +++ b/doc/release-notes/dash/release-notes-0.12.3.3.md @@ -0,0 +1,99 @@ +Dash Core version 0.12.3.3 +========================== + +Release is now available from: + + + +This is a critical bugfix release. + +Please report bugs using the issue tracker at github: + + + + +Upgrading and downgrading +========================= + +How to Upgrade +-------------- + +If you are running an older version, shut it down. Wait until it has completely +shut down (which might take a few minutes for older versions), then run the +installer (on Windows) or just copy over /Applications/Dash-Qt (on Mac) or +dashd/dash-qt (on Linux). + +Downgrade warning +----------------- + +### Downgrade to a version < 0.12.2.2 + +Because release 0.12.2.2 included the [per-UTXO fix](release-notes/dash/release-notes-0.12.2.2.md#per-utxo-fix) +which changed the structure of the internal database, you will have to reindex +the database if you decide to use any pre-0.12.2.2 version. + +Wallet forward or backward compatibility was not affected. + +### Downgrade to 0.12.2.2/3, 0.12.3.1/2 + +Downgrading to these versions does not require any additional actions, should be +fully compatible. + + +Notable changes +=============== + +Fix crash bug with duplicate inputs within a transaction +-------------------------------------------------------- + +There was a critical bug discovered in Bitcoin Core's codebase recently which +can cause node receiving a block to crash https://github.com/bitcoin/bitcoin/pull/14247 + +0.12.3.3 Change log +=================== + +See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.12.3.2...dashpay:v0.12.3.3). + +Credits +======= + +Thanks to everyone who directly contributed to this release, +as well as everyone who submitted issues and reviewed pull requests. + + +Older releases +============== + +Dash was previously known as Darkcoin. + +Darkcoin tree 0.8.x was a fork of Litecoin tree 0.8, original name was XCoin +which was first released on Jan/18/2014. + +Darkcoin tree 0.9.x was the open source implementation of masternodes based on +the 0.8.x tree and was first released on Mar/13/2014. + +Darkcoin tree 0.10.x used to be the closed source implementation of Darksend +which was released open source on Sep/25/2014. + +Dash Core tree 0.11.x was a fork of Bitcoin Core tree 0.9, +Darkcoin was rebranded to Dash. + +Dash Core tree 0.12.0.x was a fork of Bitcoin Core tree 0.10. + +Dash Core tree 0.12.1.x was a fork of Bitcoin Core tree 0.12. + +These release are considered obsolete. Old release notes can be found here: + +- [v0.12.3.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.2.md) released Jul/09/2018 +- [v0.12.3.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.1.md) released Jul/03/2018 +- [v0.12.2.3](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.2.3.md) released Jan/12/2018 +- [v0.12.2.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.2.2.md) released Dec/17/2017 +- [v0.12.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.2.md) released Nov/08/2017 +- [v0.12.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.1.md) released Feb/06/2017 +- [v0.12.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.0.md) released Jun/15/2015 +- [v0.11.2](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.11.2.md) released Mar/04/2015 +- [v0.11.1](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.11.1.md) released Feb/10/2015 +- [v0.11.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.11.0.md) released Jan/15/2015 +- [v0.10.x](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.10.0.md) released Sep/25/2014 +- [v0.9.x](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.9.0.md) released Mar/13/2014 + From db4f43f874e699ad31b8ff0c087846b997be7514 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Thu, 13 Dec 2018 20:30:19 +0100 Subject: [PATCH 7/8] Don't check for nSuperblockStartHash on testnet --- src/chainparams.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 8cf67033c1..6dc5116f70 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -285,7 +285,7 @@ public: consensus.nBudgetPaymentsCycleBlocks = 50; consensus.nBudgetPaymentsWindowBlocks = 10; consensus.nSuperblockStartBlock = 4200; // NOTE: Should satisfy nSuperblockStartBlock > nBudgetPeymentsStartBlock - consensus.nSuperblockStartHash = uint256S("00000000cffabc0f646867fba0550afd6e30e0f4b0fc54e34d3e101a1552df5d"); + consensus.nSuperblockStartHash = uint256(); // do not check this on testnet consensus.nSuperblockCycle = 24; // Superblocks can be issued hourly on testnet consensus.nGovernanceMinQuorum = 1; consensus.nGovernanceFilterElements = 500; From 0fca0e6fc8eca2bcc3540f88c3f5a45fa3f3d842 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Thu, 13 Dec 2018 21:51:27 +0100 Subject: [PATCH 8/8] Remove temporary fork handling for emergency difficulty reduction on testnet As we reset testnet, we can also remove the special handling for old blocks. --- src/pow.cpp | 47 +++++++++++------------------------------------ 1 file changed, 11 insertions(+), 36 deletions(-) diff --git a/src/pow.cpp b/src/pow.cpp index 749ff9db28..d38fb923dc 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -89,43 +89,18 @@ unsigned int static DarkGravityWave(const CBlockIndex* pindexLast, const CBlockH return bnPowLimit.GetCompact(); } - if (params.fPowAllowMinDifficultyBlocks && ( - // testnet ... - (params.hashDevnetGenesisBlock.IsNull() && pindexLast->nChainWork >= UintToArith256(uint256S("0x000000000000000000000000000000000000000000000000003e9ccfe0e03e01"))) || - // or devnet - !params.hashDevnetGenesisBlock.IsNull())) { - // NOTE: 000000000000000000000000000000000000000000000000003e9ccfe0e03e01 is the work of the "wrong" chain, - // so this rule activates there immediately and new blocks with high diff from that chain are going - // to be rejected by updated nodes. Note, that old nodes are going to reject blocks from updated nodes - // after the "right" chain reaches this amount of work too. This is a temporary condition which should - // be removed when we decide to hard-fork testnet again. - // TODO: remove "testnet+work OR devnet" part on next testnet hard-fork - // Special difficulty rule for testnet/devnet: - // If the new block's timestamp is more than 2* 2.5 minutes - // then allow mining of a min-difficulty block. - - // start using smoother adjustment on testnet when total work hits - // 000000000000000000000000000000000000000000000000003ff00000000000 - if (pindexLast->nChainWork >= UintToArith256(uint256S("0x000000000000000000000000000000000000000000000000003ff00000000000")) - // and immediately on devnet - || !params.hashDevnetGenesisBlock.IsNull()) { - // recent block is more than 2 hours old - if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + 2 * 60 * 60) { - return bnPowLimit.GetCompact(); - } - // recent block is more than 10 minutes old - if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + params.nPowTargetSpacing*4) { - arith_uint256 bnNew = arith_uint256().SetCompact(pindexLast->nBits) * 10; - if (bnNew > bnPowLimit) { - bnNew = bnPowLimit; - } - return bnNew.GetCompact(); - } - } else { - // old stuff - if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + params.nPowTargetSpacing*2) { - return bnPowLimit.GetCompact(); + if (params.fPowAllowMinDifficultyBlocks) { + // recent block is more than 2 hours old + if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + 2 * 60 * 60) { + return bnPowLimit.GetCompact(); + } + // recent block is more than 10 minutes old + if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + params.nPowTargetSpacing * 4) { + arith_uint256 bnNew = arith_uint256().SetCompact(pindexLast->nBits) * 10; + if (bnNew > bnPowLimit) { + bnNew = bnPowLimit; } + return bnNew.GetCompact(); } }