From 332e0361c77cdaaddbe08d0d23d5517aba0b887a Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 15 Jan 2019 15:46:02 +0300
Subject: [PATCH 01/28] Add checkbox to show only masternodes the wallet has
 keys for (#2627)

---
 src/qt/forms/masternodelist.ui | 10 +++++++++
 src/qt/masternodelist.cpp      | 37 ++++++++++++++++++++++++++++++++++
 src/qt/masternodelist.h        |  1 +
 3 files changed, 48 insertions(+)

diff --git a/src/qt/forms/masternodelist.ui b/src/qt/forms/masternodelist.ui
index f479a608d9e7..9f5ca2c41486 100644
--- a/src/qt/forms/masternodelist.ui
+++ b/src/qt/forms/masternodelist.ui
@@ -356,6 +356,16 @@
              </property>
             </widget>
            </item>
+           <item>
+            <widget class="QCheckBox" name="checkBoxMyMasternodesOnly">
+             <property name="toolTip">
+              <string>Show only masternodes this wallet has keys for.</string>
+             </property>
+             <property name="text">
+              <string>My masternodes only</string>
+             </property>
+            </widget>
+           </item>
            <item>
             <spacer name="horizontalSpacer_4">
              <property name="orientation">
diff --git a/src/qt/masternodelist.cpp b/src/qt/masternodelist.cpp
index 1331025aa5b3..9e0896b92cee 100644
--- a/src/qt/masternodelist.cpp
+++ b/src/qt/masternodelist.cpp
@@ -148,6 +148,17 @@ void MasternodeList::showContextMenuDIP3(const QPoint& point)
     if (item) contextMenuDIP3->exec(QCursor::pos());
 }
 
+static bool CheckWalletOwnsScript(const CScript& script)
+{
+    CTxDestination dest;
+    if (ExtractDestination(script, dest)) {
+        if ((boost::get<CKeyID>(&dest) && pwalletMain->HaveKey(*boost::get<CKeyID>(&dest))) || (boost::get<CScriptID>(&dest) && pwalletMain->HaveCScript(*boost::get<CScriptID>(&dest)))) {
+            return true;
+        }
+    }
+    return false;
+}
+
 void MasternodeList::StartAlias(std::string strAlias)
 {
     std::string strStatusHtml;
@@ -442,7 +453,26 @@ void MasternodeList::updateDIP3List()
         nextPayments.emplace(dmn->proTxHash, mnList.GetHeight() + (int)i + 1);
     }
 
+    std::set<COutPoint> setOutpts;
+    if (pwalletMain && ui->checkBoxMyMasternodesOnly->isChecked()) {
+        LOCK(pwalletMain->cs_wallet);
+        std::vector<COutPoint> vOutpts;
+        pwalletMain->ListProTxCoins(vOutpts);
+        for (const auto& outpt : vOutpts) {
+            setOutpts.emplace(outpt);
+        }
+    }
+
     mnList.ForEachMN(false, [&](const CDeterministicMNCPtr& dmn) {
+        if (pwalletMain && ui->checkBoxMyMasternodesOnly->isChecked()) {
+            LOCK(pwalletMain->cs_wallet);
+            bool fMyMasternode = setOutpts.count(dmn->collateralOutpoint) ||
+                pwalletMain->HaveKey(dmn->pdmnState->keyIDOwner) ||
+                pwalletMain->HaveKey(dmn->pdmnState->keyIDVoting) ||
+                CheckWalletOwnsScript(dmn->pdmnState->scriptPayout) ||
+                CheckWalletOwnsScript(dmn->pdmnState->scriptOperatorPayout);
+            if (!fMyMasternode) return;
+        }
         // populate list
         // Address, Protocol, Status, Active Seconds, Last Seen, Pub Key
         QTableWidgetItem* addressItem = new QTableWidgetItem(QString::fromStdString(dmn->pdmnState->addr.ToString()));
@@ -701,6 +731,13 @@ void MasternodeList::ShowQRCode(std::string strAlias)
     dialog->show();
 }
 
+void MasternodeList::on_checkBoxMyMasternodesOnly_stateChanged(int state)
+{
+    // no cooldown
+    nTimeFilterUpdatedDIP3 = GetTime() - MASTERNODELIST_FILTER_COOLDOWN_SECONDS;
+    fFilterUpdatedDIP3 = true;
+}
+
 CDeterministicMNCPtr MasternodeList::GetSelectedDIP3MN()
 {
     std::string strProTxHash;
diff --git a/src/qt/masternodelist.h b/src/qt/masternodelist.h
index 5532c94e661c..88ef6fe6d448 100644
--- a/src/qt/masternodelist.h
+++ b/src/qt/masternodelist.h
@@ -90,6 +90,7 @@ private Q_SLOTS:
     void on_startMissingButton_clicked();
     void on_tableWidgetMyMasternodes_itemSelectionChanged();
     void on_UpdateButton_clicked();
+    void on_checkBoxMyMasternodesOnly_stateChanged(int state);
 
     void extraInfoDIP3_clicked();
     void copyProTxHash_clicked();

From 3a3586d5a316be9778b566d9a8abd152363d61f9 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 29 Jan 2019 17:54:01 +0300
Subject: [PATCH 02/28] Use helper function to produce help text for params of
 `protx` rpcs (#2649)

* Adjust help text of `register*` rpc commands

Copy/paste help for various fields of `register`/`register_prepare` instead of referring to `register_fund`
Adjust description of provided functionality and expected results

* Adjust whitespaces to match in different protx commands

* Add missing results descriptions

* Introduce new helper function GetHelpString to concentrate most of param descriptions in rpcevo in one place

* [MOVEONLY] Move GetHelpString out of #ifdef ENABLE_WALLET/#endif

* static const
---
 src/rpc/rpcevo.cpp | 192 +++++++++++++++++++++++++++++++--------------
 1 file changed, 131 insertions(+), 61 deletions(-)

diff --git a/src/rpc/rpcevo.cpp b/src/rpc/rpcevo.cpp
index 5e7e1f44c5db..6bbc7a03ce0d 100644
--- a/src/rpc/rpcevo.cpp
+++ b/src/rpc/rpcevo.cpp
@@ -30,6 +30,73 @@ extern UniValue signrawtransaction(const JSONRPCRequest& request);
 extern UniValue sendrawtransaction(const JSONRPCRequest& request);
 #endif//ENABLE_WALLET
 
+std::string GetHelpString(int nParamNum, std::string strParamName)
+{
+    static const std::map<std::string, std::string> mapParamHelp = {
+        {"collateralAddress",
+            "%d. \"collateralAddress\"        (string, required) The dash address to send the collateral to.\n"
+            "                              Must be a P2PKH address.\n"
+        },
+        {"collateralHash",
+            "%d. \"collateralHash\"           (string, required) The collateral transaction hash.\n"
+        },
+        {"collateralIndex",
+            "%d. collateralIndex            (numeric, required) The collateral transaction output index.\n"
+        },
+        {"feeSourceAddress",
+            "%d. \"feeSourceAddress\"         (string, optional) If specified wallet will only use coins from this address to fund ProTx.\n"
+            "                              If not specified, payoutAddress is the one that is going to be used.\n"
+            "                              The private key belonging to this address must be known in your wallet.\n"
+        },
+        {"fundAddress",
+            "%d. \"fundAddress\"              (string, optional) If specified wallet will only use coins from this address to fund ProTx.\n"
+            "                              If not specified, payoutAddress is the one that is going to be used.\n"
+            "                              The private key belonging to this address must be known in your wallet.\n"
+        },
+        {"ipAndPort",
+            "%d. \"ipAndPort\"                (string, required) IP and port in the form \"IP:PORT\".\n"
+            "                              Must be unique on the network. Can be set to 0, which will require a ProUpServTx afterwards.\n"
+        },
+        {"operatorKey",
+            "%d. \"operatorKey\"              (string, required) The operator private key belonging to the\n"
+            "                              registered operator public key.\n"
+        },
+        {"operatorPubKey",
+            "%d. \"operatorPubKey\"           (string, required) The operator BLS public key. The private key does not have to be known.\n"
+            "                              It has to match the private key which is later used when operating the masternode.\n"
+        },
+        {"operatorReward",
+            "%d. \"operatorReward\"           (numeric, required) The fraction in %% to share with the operator. The value must be\n"
+            "                              between 0.00 and 100.00.\n"
+        },
+        {"ownerAddress",
+            "%d. \"ownerAddress\"             (string, required) The dash address to use for payee updates and proposal voting.\n"
+            "                              The private key belonging to this address must be known in your wallet. The address must\n"
+            "                              be unused and must differ from the collateralAddress\n"
+        },
+        {"payoutAddress",
+            "%d. \"payoutAddress\"            (string, required) The dash address to use for masternode reward payments.\n"
+        },
+        {"proTxHash",
+            "%d. \"proTxHash\"                (string, required) The hash of the initial ProRegTx.\n"
+        },
+        {"reason",
+            "%d. reason                     (numeric, optional) The reason for masternode service revocation.\n"
+        },
+        {"votingAddress",
+            "%d. \"votingAddress\"            (string, required) The voting key address. The private key does not have to be known by your wallet.\n"
+            "                              It has to match the private key which is later used when voting on proposals.\n"
+            "                              If set to an empty string, ownerAddress will be used.\n"
+        },
+    };
+
+    auto it = mapParamHelp.find(strParamName);
+    if (it == mapParamHelp.end())
+        throw std::runtime_error(strprintf("FIXME: WRONG PARAM NAME %s!", strParamName));
+
+    return strprintf(it->second, nParamNum);
+}
+
 // Allows to specify Dash address or priv key. In case of Dash address, the priv key is taken from the wallet
 static CKey ParsePrivKey(const std::string &strKeyOrAddress, bool allowAddresses = true) {
     CBitcoinAddress address;
@@ -231,24 +298,16 @@ void protx_register_fund_help()
             "A few of the limitations you see in the arguments are temporary and might be lifted after DIP3\n"
             "is fully deployed.\n"
             "\nArguments:\n"
-            "1. \"collateralAddress\"   (string, required) The dash address to send the collateral to.\n"
-            "                         Must be a P2PKH address.\n"
-            "2. \"ipAndPort\"           (string, required) IP and port in the form \"IP:PORT\".\n"
-            "                         Must be unique on the network. Can be set to 0, which will require a ProUpServTx afterwards.\n"
-            "3. \"ownerAddress\"        (string, required) The owner key used for payee updates and proposal voting.\n"
-            "                         The private key belonging to this address must be known in your wallet. The address must\n"
-            "                         be unused and must differ from the collateralAddress\n"
-            "4. \"operatorPubKey\"      (string, required) The operator BLS public key. The private key does not have to be known.\n"
-            "                         It has to match the private key which is later used when operating the masternode.\n"
-            "5. \"votingAddress\"       (string, required) The voting key address. The private key does not have to be known by your wallet.\n"
-            "                         It has to match the private key which is later used when voting on proposals.\n"
-            "                         If set to an empty string, ownerAddress will be used.\n"
-            "6. \"operatorReward\"      (numeric, required) The fraction in % to share with the operator. The value must be\n"
-            "                         between 0.00 and 100.00.\n"
-            "7. \"payoutAddress\"       (string, required) The dash address to use for masternode reward payments.\n"
-            "8. \"fundAddress\"         (string, optional) If specified wallet will only use coins from this address to fund ProTx.\n"
-            "                         If not specified, payoutAddress is the one that is going to be used.\n"
-            "                         The private key belonging to this address must be known in your wallet.\n"
+            + GetHelpString(1, "collateralAddress")
+            + GetHelpString(2, "ipAndPort")
+            + GetHelpString(3, "ownerAddress")
+            + GetHelpString(4, "operatorPubKey")
+            + GetHelpString(5, "votingAddress")
+            + GetHelpString(6, "operatorReward")
+            + GetHelpString(7, "payoutAddress")
+            + GetHelpString(8, "fundAddress") +
+            "\nResult:\n"
+            "\"txid\"                        (string) The transaction id.\n"
             "\nExamples:\n"
             + HelpExampleCli("protx", "register_fund \"XrVhS9LogauRJGJu2sHuryjhpuex4RNPSb\" \"1.2.3.4:1234\" \"Xt9AMWaYSz7tR7Uo7gzXA3m4QmeWgrR3rr\" \"93746e8731c57f87f79b3620a7982924e2931717d49540a85864bd543de11c43fb868fd63e501a1db37e19ed59ae6db4\" \"Xt9AMWaYSz7tR7Uo7gzXA3m4QmeWgrR3rr\" 0 \"XrVhS9LogauRJGJu2sHuryjhpuex4RNPSb\"")
     );
@@ -260,12 +319,19 @@ void protx_register_help()
             "protx register \"collateralHash\" collateralIndex \"ipAndPort\" \"ownerAddress\" \"operatorPubKey\" \"votingAddress\" operatorReward \"payoutAddress\" ( \"feeSourceAddress\" )\n"
             "\nSame as \"protx register_fund\", but with an externally referenced collateral.\n"
             "The collateral is specified through \"collateralHash\" and \"collateralIndex\" and must be an unspent\n"
-            "transaction output. It must also not be used by any other masternode.\n"
+            "transaction output spendable by this wallet. It must also not be used by any other masternode.\n"
             "\nArguments:\n"
-            "1. \"collateralHash\"     (string, required) The collateral transaction hash.\n"
-            "2. collateralIndex      (numeric, required) The collateral transaction output index.\n"
-            "3., 4., 5. ...          See help text of \"protx register_fund\"\n"
-            "feeSourceAddress        See help text for \"fundAddress\" of \"protx register_fund\"\n"
+            + GetHelpString(1, "collateralHash")
+            + GetHelpString(2, "collateralIndex")
+            + GetHelpString(3, "ipAndPort")
+            + GetHelpString(4, "ownerAddress")
+            + GetHelpString(5, "operatorPubKey")
+            + GetHelpString(6, "votingAddress")
+            + GetHelpString(7, "operatorReward")
+            + GetHelpString(8, "payoutAddress")
+            + GetHelpString(9, "feeSourceAddress") +
+            "\nResult:\n"
+            "\"txid\"                        (string) The transaction id.\n"
             "\nExamples:\n"
             + HelpExampleCli("protx", "register \"0123456701234567012345670123456701234567012345670123456701234567\" 0 \"1.2.3.4:1234\" \"Xt9AMWaYSz7tR7Uo7gzXA3m4QmeWgrR3rr\" \"93746e8731c57f87f79b3620a7982924e2931717d49540a85864bd543de11c43fb868fd63e501a1db37e19ed59ae6db4\" \"Xt9AMWaYSz7tR7Uo7gzXA3m4QmeWgrR3rr\" 0 \"XrVhS9LogauRJGJu2sHuryjhpuex4RNPSb\"")
     );
@@ -279,14 +345,21 @@ void protx_register_prepare_help()
             "key and then passed to \"protx register_submit\". The prepared transaction will also contain inputs\n"
             "and outputs to cover fees.\n"
             "\nArguments:\n"
-            "1., 2., 3., ...         See help text of \"protx register\".\n"
-            "feeSourceAddress        See help text for \"fundAddress\" of \"protx register_fund\"\n"
+            + GetHelpString(1, "collateralHash")
+            + GetHelpString(2, "collateralIndex")
+            + GetHelpString(3, "ipAndPort")
+            + GetHelpString(4, "ownerAddress")
+            + GetHelpString(5, "operatorPubKey")
+            + GetHelpString(6, "votingAddress")
+            + GetHelpString(7, "operatorReward")
+            + GetHelpString(8, "payoutAddress")
+            + GetHelpString(9, "feeSourceAddress") +
             "\nResult:\n"
-            "{                         (json object)\n"
-            "  \"tx\" :                  (string) The serialized ProTx in hex format.\n"
-            "  \"collateralAddress\" :   (string) The collateral address.\n"
-            "  \"signMessage\" :         (string) The string message that needs to be signed with\n"
-            "                          the collateral key.\n"
+            "{                             (json object)\n"
+            "  \"tx\" :                      (string) The serialized ProTx in hex format.\n"
+            "  \"collateralAddress\" :       (string) The collateral address.\n"
+            "  \"signMessage\" :             (string) The string message that needs to be signed with\n"
+            "                              the collateral key.\n"
             "}\n"
             "\nExamples:\n"
             + HelpExampleCli("protx", "register_prepare \"0123456701234567012345670123456701234567012345670123456701234567\" 0 \"1.2.3.4:1234\" \"Xt9AMWaYSz7tR7Uo7gzXA3m4QmeWgrR3rr\" \"93746e8731c57f87f79b3620a7982924e2931717d49540a85864bd543de11c43fb868fd63e501a1db37e19ed59ae6db4\" \"Xt9AMWaYSz7tR7Uo7gzXA3m4QmeWgrR3rr\" 0 \"XrVhS9LogauRJGJu2sHuryjhpuex4RNPSb\"")
@@ -302,6 +375,8 @@ void protx_register_submit_help()
             "\nArguments:\n"
             "1. \"tx\"                 (string, required) The serialized transaction previously returned by \"protx register_prepare\"\n"
             "2. \"sig\"                (string, required) The signature signed with the collateral key. Must be in base64 format.\n"
+            "\nResult:\n"
+            "\"txid\"                  (string) The transaction id.\n"
             "\nExamples:\n"
             + HelpExampleCli("protx", "register_submit \"tx\" \"sig\"")
     );
@@ -490,17 +565,13 @@ void protx_update_service_help()
             "of a masternode.\n"
             "If this is done for a masternode that got PoSe-banned, the ProUpServTx will also revive this masternode.\n"
             "\nArguments:\n"
-            "1. \"proTxHash\"                (string, required) The hash of the initial ProRegTx.\n"
-            "2. \"ipAndPort\"                (string, required) IP and port in the form \"IP:PORT\".\n"
-            "                              Must be unique on the network.\n"
-            "3. \"operatorKey\"              (string, required) The operator private key belonging to the\n"
-            "                              registered operator public key.\n"
-            "4. \"operatorPayoutAddress\"    (string, optional) The address used for operator reward payments.\n"
-            "                              Only allowed when the ProRegTx had a non-zero operatorReward value.\n"
-            "                              If set to an empty string, the currently active payout address is reused.\n"
-            "5. \"feeSourceAddress\"         (string, optional) If specified wallet will only use coins from this address to fund ProTx.\n"
-            "                              If not specified, operatorPayoutAddress is the one that is going to be used.\n"
-            "                              The private key belonging to this address must be known in your wallet.\n"
+            + GetHelpString(1, "proTxHash")
+            + GetHelpString(2, "ipAndPort")
+            + GetHelpString(3, "operatorKey")
+            + GetHelpString(4, "operatorPayoutAddress")
+            + GetHelpString(5, "feeSourceAddress") +
+            "\nResult:\n"
+            "\"txid\"                        (string) The transaction id.\n"
             "\nExamples:\n"
             + HelpExampleCli("protx", "update_service \"0123456701234567012345670123456701234567012345670123456701234567\" \"1.2.3.4:1234\" 5a2e15982e62f1e0b7cf9783c64cf7e3af3f90a52d6c40f6f95d624c0b1621cd")
     );
@@ -583,18 +654,13 @@ void protx_update_registrar_help()
             "address of the masternode specified by \"proTxHash\".\n"
             "The owner key of the masternode must be known to your wallet.\n"
             "\nArguments:\n"
-            "1. \"proTxHash\"           (string, required) The hash of the initial ProRegTx.\n"
-            "2. \"operatorPubKey\"      (string, required) The operator public key. The private key does not have to be known by you.\n"
-            "                         It has to match the private key which is later used when operating the masternode.\n"
-            "                         If set to an empty string, the last on-chain operator key of the masternode will be used.\n"
-            "3. \"votingAddress\"       (string, required) The voting key address. The private key does not have to be known by your wallet.\n"
-            "                         It has to match the private key which is later used when voting on proposals.\n"
-            "                         If set to an empty string, the last on-chain voting key of the masternode will be used.\n"
-            "4. \"payoutAddress\"       (string, required) The dash address to use for masternode reward payments\n"
-            "                         If set to an empty string, the last on-chain payout address of the masternode will be used.\n"
-            "5. \"feeSourceAddress\"    (string, optional) If specified wallet will only use coins from this address to fund ProTx.\n"
-            "                         If not specified, payoutAddress is the one that is going to be used.\n"
-            "                         The private key belonging to this address must be known in your wallet.\n"
+            + GetHelpString(1, "proTxHash")
+            + GetHelpString(2, "operatorPubKey")
+            + GetHelpString(3, "votingAddress")
+            + GetHelpString(4, "payoutAddress")
+            + GetHelpString(5, "feeSourceAddress") +
+            "\nResult:\n"
+            "\"txid\"                        (string) The transaction id.\n"
             "\nExamples:\n"
             + HelpExampleCli("protx", "update_registrar \"0123456701234567012345670123456701234567012345670123456701234567\" \"982eb34b7c7f614f29e5c665bc3605f1beeef85e3395ca12d3be49d2868ecfea5566f11cedfad30c51b2403f2ad95b67\" \"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwG\"")
     );
@@ -666,13 +732,12 @@ void protx_revoke_help()
             "to zero. Use this in case your operator key got compromised or you want to stop providing your service\n"
             "to the masternode owner.\n"
             "\nArguments:\n"
-            "1. \"proTxHash\"           (string, required) The hash of the initial ProRegTx.\n"
-            "2. \"operatorKey\"         (string, required) The operator private key belonging to the\n"
-            "                         registered operator public key.\n"
-            "3. reason                (numeric, optional) The reason for revocation.\n"
-            "4. \"feeSourceAddress\"    (string, optional) If specified wallet will only use coins from this address to fund ProTx.\n"
-            "                         If not specified, operatorPayoutAddress specified earlier is the one that is going to be used.\n"
-            "                         The private key belonging to this address must be known in your wallet.\n"
+            + GetHelpString(1, "proTxHash")
+            + GetHelpString(2, "operatorKey")
+            + GetHelpString(3, "reason")
+            + GetHelpString(4, "feeSourceAddress") +
+            "\nResult:\n"
+            "\"txid\"                        (string) The transaction id.\n"
             "\nExamples:\n"
             + HelpExampleCli("protx", "revoke \"0123456701234567012345670123456701234567012345670123456701234567\" \"072f36a77261cdd5d64c32d97bac417540eddca1d5612f416feb07ff75a8e240\"")
     );
@@ -910,7 +975,12 @@ void protx_info_help()
             "protx info \"proTxHash\"\n"
             "\nReturns detailed information about a deterministic masternode.\n"
             "\nArguments:\n"
-            "1. \"proTxHash\"           (string, required) The hash of the initial ProRegTx.\n"
+            + GetHelpString(1, "proTxHash") +
+            "\nResult:\n"
+            "{                             (json object) Details about a specific deterministic masternode\n"
+            "}\n"
+            "\nExamples:\n"
+            + HelpExampleCli("protx", "info \"0123456701234567012345670123456701234567012345670123456701234567\"")
     );
 }
 

From 070ad103ff39ce146b2fc882f981a1eac880f08e Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 28 Jan 2019 14:23:59 +0300
Subject: [PATCH 03/28] Wait for script checks to finish before messing with
 txes in Dash-specific way (#2652)

Benchmark Dash part while at it
---
 src/validation.cpp | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/validation.cpp b/src/validation.cpp
index 51bd5a9923a3..8e9f0a2392b2 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -2208,6 +2208,11 @@ static bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockInd
     int64_t nTime3 = GetTimeMicros(); nTimeConnect += nTime3 - nTime2;
     LogPrint("bench", "      - Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin) [%.2fs]\n", (unsigned)block.vtx.size(), 0.001 * (nTime3 - nTime2), 0.001 * (nTime3 - nTime2) / block.vtx.size(), nInputs <= 1 ? 0 : 0.001 * (nTime3 - nTime2) / (nInputs-1), nTimeConnect * 0.000001);
 
+    if (!control.Wait())
+        return state.DoS(100, false);
+    int64_t nTime4 = GetTimeMicros(); nTimeVerify += nTime4 - nTime2;
+    LogPrint("bench", "    - Verify %u txins: %.2fms (%.3fms/txin) [%.2fs]\n", nInputs - 1, 0.001 * (nTime4 - nTime2), nInputs <= 1 ? 0 : 0.001 * (nTime4 - nTime2) / (nInputs-1), nTimeVerify * 0.000001);
+
     if (!ProcessSpecialTxsInBlock(block, pindex, state)) {
         return error("ConnectBlock(): ProcessSpecialTxsInBlock for block %s failed with %s",
                      pindex->GetBlockHash().ToString(), FormatStateMessage(state));
@@ -2232,12 +2237,10 @@ static bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockInd
         return state.DoS(0, error("ConnectBlock(DASH): couldn't find masternode or superblock payments"),
                                 REJECT_INVALID, "bad-cb-payee");
     }
-    // END DASH
+    int64_t nTime5 = GetTimeMicros(); nTimeVerify += nTime5 - nTime4;
+    LogPrint("bench", "    - Payee and special txes: %.2fms [%.2fs]\n", 0.001 * (nTime4 - nTime2), nTimeVerify * 0.000001);
 
-    if (!control.Wait())
-        return state.DoS(100, false);
-    int64_t nTime4 = GetTimeMicros(); nTimeVerify += nTime4 - nTime2;
-    LogPrint("bench", "    - Verify %u txins: %.2fms (%.3fms/txin) [%.2fs]\n", nInputs - 1, 0.001 * (nTime4 - nTime2), nInputs <= 1 ? 0 : 0.001 * (nTime4 - nTime2) / (nInputs-1), nTimeVerify * 0.000001);
+    // END DASH
 
     if (fJustCheck)
         return true;
@@ -2294,8 +2297,8 @@ static bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockInd
         }
     }
 
-    int64_t nTime5 = GetTimeMicros(); nTimeIndex += nTime5 - nTime4;
-    LogPrint("bench", "    - Index writing: %.2fms [%.2fs]\n", 0.001 * (nTime5 - nTime4), nTimeIndex * 0.000001);
+    int64_t nTime6 = GetTimeMicros(); nTimeIndex += nTime6 - nTime5;
+    LogPrint("bench", "    - Index writing: %.2fms [%.2fs]\n", 0.001 * (nTime6 - nTime5), nTimeIndex * 0.000001);
 
     // Watch for changes to the previous coinbase transaction.
     static uint256 hashPrevBestCoinBase;
@@ -2304,8 +2307,8 @@ static bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockInd
 
     evoDb->WriteBestBlock(pindex->GetBlockHash());
 
-    int64_t nTime6 = GetTimeMicros(); nTimeCallbacks += nTime6 - nTime5;
-    LogPrint("bench", "    - Callbacks: %.2fms [%.2fs]\n", 0.001 * (nTime6 - nTime5), nTimeCallbacks * 0.000001);
+    int64_t nTime7 = GetTimeMicros(); nTimeCallbacks += nTime7 - nTime6;
+    LogPrint("bench", "    - Callbacks: %.2fms [%.2fs]\n", 0.001 * (nTime7 - nTime6), nTimeCallbacks * 0.000001);
 
     return true;
 }

From 592210dafc67c2e27ef606bc11e6d1477f6c7ef8 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 29 Jan 2019 17:54:57 +0300
Subject: [PATCH 04/28] Bump block stats when adding commitment tx into block
 (#2654)

---
 src/miner.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/miner.cpp b/src/miner.cpp
index 217804ac5cdd..ca78887eaa39 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -159,6 +159,8 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
                 pblock->vtx.emplace_back(qcTx);
                 pblocktemplate->vTxFees.emplace_back(0);
                 pblocktemplate->vTxSigOps.emplace_back(0);
+                nBlockSize += qcTx->GetTotalSize();
+                ++nBlockTx;
             }
         }
     }

From 0d8cc0761c075d67e73612fd482dbc27c3689a99 Mon Sep 17 00:00:00 2001
From: Alexander Block <ablock84@gmail.com>
Date: Fri, 1 Feb 2019 08:49:18 +0100
Subject: [PATCH 05/28] Invoke CheckSpecialTx after all normal TX checks have
 passed (#2673)

Otherwise duplicate-keys checks for deterministic masternodes triggers
for duplicate/identical transactions.
---
 src/validation.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/validation.cpp b/src/validation.cpp
index 8e9f0a2392b2..73b1fe2d1861 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -656,9 +656,6 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
         return state.DoS(100, false, REJECT_INVALID, "qc-not-allowed");
     }
 
-    if (!CheckSpecialTx(tx, chainActive.Tip(), state))
-        return false;
-
     // Coinbase is only valid in a block, not as a loose transaction
     if (tx.IsCoinBase())
         return state.DoS(100, false, REJECT_INVALID, "coinbase");
@@ -866,6 +863,12 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
             return state.DoS(0, false, REJECT_NONSTANDARD, "too-long-mempool-chain", false, errString);
         }
 
+        // check special TXs after all the other checks. If we'd do this before the other checks, we might end up
+        // DoS scoring a node for non-critical errors, e.g. duplicate keys because a TX is received that was already
+        // mined
+        if (!CheckSpecialTx(tx, chainActive.Tip(), state))
+            return false;
+
         // If we aren't going to actually accept it but just were verifying it, we are fine already
         if(fDryRun) return true;
 

From e18916386557e5a72a9aef7fe87275f14e74519d Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 4 Feb 2019 12:52:24 +0300
Subject: [PATCH 06/28] Add missing help text for `operatorPayoutAddress`
 (#2679)

---
 src/rpc/rpcevo.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/rpc/rpcevo.cpp b/src/rpc/rpcevo.cpp
index 6bbc7a03ce0d..37a36a51a66a 100644
--- a/src/rpc/rpcevo.cpp
+++ b/src/rpc/rpcevo.cpp
@@ -61,6 +61,11 @@ std::string GetHelpString(int nParamNum, std::string strParamName)
             "%d. \"operatorKey\"              (string, required) The operator private key belonging to the\n"
             "                              registered operator public key.\n"
         },
+        {"operatorPayoutAddress",
+            "%d. \"operatorPayoutAddress\"    (string, optional) The address used for operator reward payments.\n"
+            "                              Only allowed when the ProRegTx had a non-zero operatorReward value.\n"
+            "                              If set to an empty string, the currently active payout address is reused.\n"
+        },
         {"operatorPubKey",
             "%d. \"operatorPubKey\"           (string, required) The operator BLS public key. The private key does not have to be known.\n"
             "                              It has to match the private key which is later used when operating the masternode.\n"

From 8961a6acc01fce32c8dca606b07d4b3e9370bb2c Mon Sep 17 00:00:00 2001
From: Alexander Block <ablock84@gmail.com>
Date: Tue, 5 Feb 2019 15:45:54 +0100
Subject: [PATCH 07/28] Stop checking MN protocol version before signalling
 DIP3 (#2684)

---
 src/versionbits.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/versionbits.cpp b/src/versionbits.cpp
index eaddecad275a..e570f031b341 100644
--- a/src/versionbits.cpp
+++ b/src/versionbits.cpp
@@ -30,7 +30,7 @@ const struct BIP9DeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION
     {
         /*.name =*/ "dip0003",
         /*.gbt_force =*/ true,
-        /*.check_mn_protocol =*/ true,
+        /*.check_mn_protocol =*/ false,
     }
 };
 

From 023f8a01ae9d984072f735fe23c871d3ef694170 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 2 Feb 2019 03:09:03 +0300
Subject: [PATCH 08/28] Fix bench log for payee and special txes (#2678)

---
 src/validation.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/validation.cpp b/src/validation.cpp
index 73b1fe2d1861..53cd09443792 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -1909,6 +1909,7 @@ static ThresholdConditionCache warningcache[VERSIONBITS_NUM_BITS];
 static int64_t nTimeCheck = 0;
 static int64_t nTimeForks = 0;
 static int64_t nTimeVerify = 0;
+static int64_t nTimePayeeAndSpecial = 0;
 static int64_t nTimeConnect = 0;
 static int64_t nTimeIndex = 0;
 static int64_t nTimeCallbacks = 0;
@@ -2240,8 +2241,8 @@ static bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockInd
         return state.DoS(0, error("ConnectBlock(DASH): couldn't find masternode or superblock payments"),
                                 REJECT_INVALID, "bad-cb-payee");
     }
-    int64_t nTime5 = GetTimeMicros(); nTimeVerify += nTime5 - nTime4;
-    LogPrint("bench", "    - Payee and special txes: %.2fms [%.2fs]\n", 0.001 * (nTime4 - nTime2), nTimeVerify * 0.000001);
+    int64_t nTime5 = GetTimeMicros(); nTimePayeeAndSpecial += nTime5 - nTime4;
+    LogPrint("bench", "    - Payee and special txes: %.2fms [%.2fs]\n", 0.001 * (nTime5 - nTime4), nTimePayeeAndSpecial * 0.000001);
 
     // END DASH
 

From bd0de48762d1f1b22ddd5e666c5c8c6669210c33 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 6 Feb 2019 08:11:16 +0300
Subject: [PATCH 09/28] Bump version to 0.13.1 (#2686)

---
 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 33369d27dff3..b875969814f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
 AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 13)
-define(_CLIENT_VERSION_REVISION, 0)
+define(_CLIENT_VERSION_REVISION, 1)
 define(_CLIENT_VERSION_BUILD, 0)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2018)
diff --git a/doc/Doxyfile b/doc/Doxyfile
index c55bc2f66d69..4cad2d4a44a8 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.13.0.0
+PROJECT_NUMBER         = 0.13.1.0
 
 # 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 e597f27e0104..599b8c26110f 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -16,7 +16,7 @@
 //! These need to be macros, as clientversion.cpp's and dash*-res.rc's voodoo requires it
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 13
-#define CLIENT_VERSION_REVISION 0
+#define CLIENT_VERSION_REVISION 1
 #define CLIENT_VERSION_BUILD 0
 
 //! Set to true for release, false for prerelease or test build

From 23eb70cb77aa87d7b461068ca245074ef85d06f7 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 30 Jan 2019 21:53:22 +0300
Subject: [PATCH 10/28] Add getspecialtxes rpc (#2668)

* Add getspecialtxes rpc

Returns an array of special transactions found in the specified block

* small help text tweak

* add comments
---
 src/rpc/blockchain.cpp | 109 +++++++++++++++++++++++++++++++++++++++++
 src/rpc/client.cpp     |   4 ++
 2 files changed, 113 insertions(+)

diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index d72ed10f8fbe..5b43c4f7f284 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -9,6 +9,7 @@
 #include "chainparams.h"
 #include "checkpoints.h"
 #include "coins.h"
+#include "core_io.h"
 #include "consensus/validation.h"
 #include "instantx.h"
 #include "validation.h"
@@ -1620,6 +1621,113 @@ UniValue reconsiderblock(const JSONRPCRequest& request)
     return NullUniValue;
 }
 
+UniValue getspecialtxes(const JSONRPCRequest& request)
+{
+    if (request.fHelp || request.params.size() < 1 || request.params.size() > 5)
+        throw std::runtime_error(
+            "getspecialtxes \"blockhash\" ( type count skip verbosity ) \n"
+            "Returns an array of special transactions found in the specified block\n"
+            "\nIf verbosity is 0, returns tx hash for each transaction.\n"
+            "If verbosity is 1, returns hex-encoded data for each transaction.\n"
+            "If verbosity is 2, returns an Object with information for each transaction.\n"
+            "\nArguments:\n"
+            "1. \"blockhash\"          (string, required) The block hash\n"
+            "2. type                 (numeric, optional, default=-1) Filter special txes by type, -1 means all types\n"
+            "3. count                (numeric, optional, default=10) The number of transactions to return\n"
+            "4. skip                 (numeric, optional, default=0) The number of transactions to skip\n"
+            "5. verbosity            (numeric, optional, default=0) 0 for hashes, 1 for hex-encoded data, and 2 for json object\n"
+            "\nResult (for verbosity = 0):\n"
+            "[\n"
+            "  \"txid\" : \"xxxx\",    (string) The transaction id\n"
+            "]\n"
+            "\nResult (for verbosity = 1):\n"
+            "[\n"
+            "  \"data\",               (string) A string that is serialized, hex-encoded data for the transaction\n"
+            "]\n"
+            "\nResult (for verbosity = 2):\n"
+            "[                       (array of Objects) The transactions in the format of the getrawtransaction RPC.\n"
+            "  ...,\n"
+            "]\n"
+            "\nExamples:\n"
+            + HelpExampleCli("getspecialtxes", "\"00000000000fd08c2fb661d2fcb0d49abb3a91e5f27082ce64feed3b4dede2e2\"")
+            + HelpExampleRpc("getspecialtxes", "\"00000000000fd08c2fb661d2fcb0d49abb3a91e5f27082ce64feed3b4dede2e2\"")
+        );
+
+    LOCK(cs_main);
+
+    std::string strHash = request.params[0].get_str();
+    uint256 hash(uint256S(strHash));
+
+    int nTxType = -1;
+    if (request.params.size() > 1) {
+        nTxType = request.params[1].get_int();
+    }
+
+    int nCount = 10;
+    if (request.params.size() > 2) {
+        nCount = request.params[2].get_int();
+        if (nCount < 0)
+            throw JSONRPCError(RPC_INVALID_PARAMETER, "Negative count");
+    }
+
+    int nSkip = 0;
+    if (request.params.size() > 3) {
+        nSkip = request.params[3].get_int();
+        if (nSkip < 0)
+            throw JSONRPCError(RPC_INVALID_PARAMETER, "Negative skip");
+    }
+
+    int nVerbosity = 0;
+    if (request.params.size() > 4) {
+        nVerbosity = request.params[4].get_int();
+        if (nVerbosity < 0 || nVerbosity > 2) {
+            throw JSONRPCError(RPC_INVALID_PARAMETER, "Verbosity must be in range 0..2");
+        }
+    }
+
+    if (mapBlockIndex.count(hash) == 0)
+        throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");
+
+    CBlock block;
+    CBlockIndex* pblockindex = mapBlockIndex[hash];
+
+    if (fHavePruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0)
+        throw JSONRPCError(RPC_INTERNAL_ERROR, "Block not available (pruned data)");
+
+    if(!ReadBlockFromDisk(block, pblockindex, Params().GetConsensus()))
+        throw JSONRPCError(RPC_INTERNAL_ERROR, "Can't read block from disk");
+
+    int nTxNum = 0;
+    UniValue result(UniValue::VARR);
+    for(const auto& tx : block.vtx)
+    {
+        if (tx->nVersion != 3 || tx->nType == TRANSACTION_NORMAL // ensure it's in fact a special tx
+            || (nTxType != -1 && tx->nType != nTxType)) { // ensure special tx type matches filter, if given
+                continue;
+        }
+
+        nTxNum++;
+        if (nTxNum <= nSkip) continue;
+        if (nTxNum > nSkip + nCount) break;
+
+        switch (nVerbosity)
+        {
+            case 0 : result.push_back(tx->GetHash().GetHex()); break;
+            case 1 : result.push_back(EncodeHexTx(*tx)); break;
+            case 2 :
+                {
+                    UniValue objTx(UniValue::VOBJ);
+                    TxToJSON(*tx, uint256(), objTx);
+                    result.push_back(objTx);
+                    break;
+                }
+            default : throw JSONRPCError(RPC_INTERNAL_ERROR, "Unsupported verbosity");
+        }
+    }
+
+    return result;
+}
+
 static const CRPCCommand commands[] =
 { //  category              name                      actor (function)         okSafe argNames
   //  --------------------- ------------------------  -----------------------  ------ ----------
@@ -1638,6 +1746,7 @@ static const CRPCCommand commands[] =
     { "blockchain",         "getmempoolentry",        &getmempoolentry,        true,  {"txid"} },
     { "blockchain",         "getmempoolinfo",         &getmempoolinfo,         true,  {} },
     { "blockchain",         "getrawmempool",          &getrawmempool,          true,  {"verbose"} },
+    { "blockchain",         "getspecialtxes",         &getspecialtxes,         true,  {"blockhash", "type", "count", "skip", "verbosity"} },
     { "blockchain",         "gettxout",               &gettxout,               true,  {"txid","n","include_mempool"} },
     { "blockchain",         "gettxoutsetinfo",        &gettxoutsetinfo,        true,  {} },
     { "blockchain",         "pruneblockchain",        &pruneblockchain,        true,  {"height"} },
diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp
index 643beb54e7c9..e949fc9efad3 100644
--- a/src/rpc/client.cpp
+++ b/src/rpc/client.cpp
@@ -154,6 +154,10 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "getaddressdeltas", 0, "addresses" },
     { "getaddressutxos", 0, "addresses" },
     { "getaddressmempool", 0, "addresses" },
+    { "getspecialtxes", 1, "type" },
+    { "getspecialtxes", 2, "count" },
+    { "getspecialtxes", 3, "skip" },
+    { "getspecialtxes", 4, "verbosity" },
     // Echo with conversion (For testing only)
     { "echojson", 0, "arg0" },
     { "echojson", 1, "arg1" },

From 6ada90c11c5466477689882cf83cfafe5e60f1a7 Mon Sep 17 00:00:00 2001
From: Alexander Block <ablock84@gmail.com>
Date: Wed, 6 Feb 2019 17:54:10 +0100
Subject: [PATCH 11/28] Call existsProviderTxConflict after CheckSpecialTx
 (#2690)

Otherwise we might end up passing and invalid proTx into it, causing
assertions to fail and thus crash the process.
---
 src/validation.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/validation.cpp b/src/validation.cpp
index 53cd09443792..2435f2040051 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -665,10 +665,6 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
     if (fRequireStandard && !IsStandardTx(tx, reason))
         return state.DoS(0, false, REJECT_NONSTANDARD, reason);
 
-    if (pool.existsProviderTxConflict(tx)) {
-        return state.DoS(0, false, REJECT_DUPLICATE, "protx-dup");
-    }
-
     // Only accept nLockTime-using transactions that can be mined in the next
     // block; we don't want our mempool filled up with transactions that can't
     // be mined yet.
@@ -869,6 +865,10 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
         if (!CheckSpecialTx(tx, chainActive.Tip(), state))
             return false;
 
+        if (pool.existsProviderTxConflict(tx)) {
+            return state.DoS(0, false, REJECT_DUPLICATE, "protx-dup");
+        }
+
         // If we aren't going to actually accept it but just were verifying it, we are fine already
         if(fDryRun) return true;
 

From da5a861c0f7932e39af5e2ec4c7cf4a272531207 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 6 Feb 2019 19:57:27 +0300
Subject: [PATCH 12/28] Change the way invalid ProTxes are handled in
 `addUnchecked` and `existsProviderTxConflict` (#2691)

* Invalid ProTxes should never reach addUnchecked

* Invalid ProTxes should not cause existsProviderTxConflict to crash
---
 src/txmempool.cpp | 48 ++++++++++++++++++++++++-----------------------
 1 file changed, 25 insertions(+), 23 deletions(-)

diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 3037caeac2a9..8d17764e47b1 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -441,12 +441,13 @@ bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry,
     vTxHashes.emplace_back(hash, newit);
     newit->vTxHashesIdx = vTxHashes.size() - 1;
 
+    // Invalid ProTxes should never get this far because transactions should be
+    // fully checked by AcceptToMemoryPool() at this point, so we just assume that
+    // everything is fine here.
     if (tx.nType == TRANSACTION_PROVIDER_REGISTER) {
         CProRegTx proTx;
-        if (!GetTxPayload(tx, proTx)) {
-            LogPrintf("%s: ERROR: Invalid transaction payload, tx: %s", __func__, tx.ToString());
-            return false;
-        }
+        bool ok = GetTxPayload(tx, proTx);
+        assert(ok);
         if (!proTx.collateralOutpoint.hash.IsNull()) {
             mapProTxRefs.emplace(tx.GetHash(), proTx.collateralOutpoint.hash);
         }
@@ -458,36 +459,29 @@ bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry,
         }
     } else if (tx.nType == TRANSACTION_PROVIDER_UPDATE_SERVICE) {
         CProUpServTx proTx;
-        if (!GetTxPayload(tx, proTx)) {
-            LogPrintf("%s: ERROR: Invalid transaction payload, tx: %s", __func__, tx.ToString());
-            return false;
-        }
+        bool ok = GetTxPayload(tx, proTx);
+        assert(ok);
         mapProTxRefs.emplace(proTx.proTxHash, tx.GetHash());
         mapProTxAddresses.emplace(proTx.addr, tx.GetHash());
     } else if (tx.nType == TRANSACTION_PROVIDER_UPDATE_REGISTRAR) {
         CProUpRegTx proTx;
-        if (!GetTxPayload(tx, proTx)) {
-            LogPrintf("%s: ERROR: Invalid transaction payload, tx: %s", __func__, tx.ToString());
-            return false;
-        }
+        bool ok = GetTxPayload(tx, proTx);
+        assert(ok);
         mapProTxRefs.emplace(proTx.proTxHash, tx.GetHash());
         mapProTxBlsPubKeyHashes.emplace(proTx.pubKeyOperator.GetHash(), tx.GetHash());
-
         auto dmn = deterministicMNManager->GetListAtChainTip().GetMN(proTx.proTxHash);
-        assert(dmn); // we should never get such a ProTx into the mempool
+        assert(dmn);
         newit->validForProTxKey = ::SerializeHash(dmn->pdmnState->pubKeyOperator);
         if (dmn->pdmnState->pubKeyOperator != proTx.pubKeyOperator) {
             newit->isKeyChangeProTx = true;
         }
     } else if (tx.nType == TRANSACTION_PROVIDER_UPDATE_REVOKE) {
         CProUpRevTx proTx;
-        if (!GetTxPayload(tx, proTx)) {
-            LogPrintf("%s: ERROR: Invalid transaction payload, tx: %s", __func__, tx.ToString());
-            return false;
-        }
+        bool ok = GetTxPayload(tx, proTx);
+        assert(ok);
         mapProTxRefs.emplace(proTx.proTxHash, tx.GetHash());
         auto dmn = deterministicMNManager->GetListAtChainTip().GetMN(proTx.proTxHash);
-        assert(dmn); // we should never get such a ProTx into the mempool
+        assert(dmn);
         newit->validForProTxKey = ::SerializeHash(dmn->pdmnState->pubKeyOperator);
         if (dmn->pdmnState->pubKeyOperator != CBLSPublicKey()) {
             newit->isKeyChangeProTx = true;
@@ -1306,9 +1300,13 @@ bool CTxMemPool::existsProviderTxConflict(const CTransaction &tx) const {
             return true; // i.e. can't decode payload == conflict
         }
 
-        // only allow one operator key change in the mempool
+        // this method should only be called with validated ProTxs
         auto dmn = deterministicMNManager->GetListAtChainTip().GetMN(proTx.proTxHash);
-        assert(dmn); // this method should only be called with validated ProTxs
+        if (!dmn) {
+            LogPrintf("%s: ERROR: Masternode is not in the list, proTxHash: %s", __func__, proTx.proTxHash.ToString());
+            return true; // i.e. failed to find validated ProTx == conflict
+        }
+        // only allow one operator key change in the mempool
         if (dmn->pdmnState->pubKeyOperator != proTx.pubKeyOperator) {
             if (hasKeyChangeInMempool(proTx.proTxHash)) {
                 return true;
@@ -1324,9 +1322,13 @@ bool CTxMemPool::existsProviderTxConflict(const CTransaction &tx) const {
             return true; // i.e. can't decode payload == conflict
         }
 
-        // only allow one operator key change in the mempool
+        // this method should only be called with validated ProTxs
         auto dmn = deterministicMNManager->GetListAtChainTip().GetMN(proTx.proTxHash);
-        assert(dmn); // this method should only be called with validated ProTxs
+        if (!dmn) {
+            LogPrintf("%s: ERROR: Masternode is not in the list, proTxHash: %s", __func__, proTx.proTxHash.ToString());
+            return true; // i.e. failed to find validated ProTx == conflict
+        }
+        // only allow one operator key change in the mempool
         if (dmn->pdmnState->pubKeyOperator != CBLSPublicKey()) {
             if (hasKeyChangeInMempool(proTx.proTxHash)) {
                 return true;

From bac6661553f29a2bfe9878b2c842d6feff71465d Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 7 Feb 2019 16:48:50 +0300
Subject: [PATCH 13/28] Release notes v0.13.1.0 (#2689)

* Release notes v0.13.1.0

* Add a note about no proto bump

* update

* Add a note about downgrading to 0.13.0.0

* 0.13.0.0->0.13.1.0

Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
---
 doc/release-notes.md                          | 711 ++---------------
 .../dash/release-notes-0.13.0.md              | 749 ++++++++++++++++++
 2 files changed, 802 insertions(+), 658 deletions(-)
 create mode 100644 doc/release-notes/dash/release-notes-0.13.0.md

diff --git a/doc/release-notes.md b/doc/release-notes.md
index b4d058f90309..84c033707e82 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -1,11 +1,11 @@
-Dash Core version 0.13.0.0
+Dash Core version 0.13.1.0
 ==========================
 
 Release is now available from:
 
   <https://www.dash.org/downloads/#wallets>
 
-This is a new major version release, bringing new features, various bugfixes and other improvements.
+This is a new minor version release, bringing various bugfixes and other improvements.
 
 Please report bugs using the issue tracker at github:
 
@@ -23,7 +23,11 @@ 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). If you upgrade after DIP0003 activation you will
 have to reindex (start with -reindex-chainstate or -reindex) to make sure
-your wallet has all the new data synced.
+your wallet has all the new data synced (only if you were using version < 0.13).
+
+Note that there is no protocol bump in this version and thus active masternodes
+updating from v0.13.0.0 do not require any additional actions (no need to issue
+`masternode start` command).
 
 Downgrade warning
 -----------------
@@ -34,656 +38,60 @@ Downgrading to a version smaller than 0.13 is only supported as long as DIP2/DIP
 has not been activated. Activation will happen when enough miners signal compatibility
 through a BIP9 (bit 3) deployment.
 
+### Downgrade to 0.13.0.0
+
+Downgrading to 0.13.0.0 is fully supported but is not recommended unless you have some serious issues with 0.13.1.0.
+
 Notable changes
 ===============
 
-DIP0002 - Special Transactions
-------------------------------
-Currently, new features and consensus mechanisms have to be implemented on top of the restrictions
-imposed by the simple nature of transactions. Since classical transactions can only carry inputs
-and outputs, they are most useful for financial transactions (i.e. transfers of quantities of Dash
-between addresses on the distributed ledger). These inputs and outputs carry scripts and signatures
-which are used to authorize and validate the transaction.
-
-To implement new on-chain features and consensus mechanisms which do not fit into this concept of
-financial transactions, it is often necessary to misuse the inputs/outputs and their corresponding
-scripts to add additional data and meaning to a transaction. For example, new opcodes would have
-to be introduced to mark a transaction as something special and add a payload. In other cases,
-OP_RETURN has been misused to store data on-chain.
-
-The introduction of special transactions will require the whole Dash ecosystem to perform a one-time
-mandatory update of all the software and libraries involved. Software and libraries will have to be
-changed so that they can differentiate between classical transactions and special transactions.
-Deserialization of a classical transaction remains unchanged. Deserialization of a special transaction
-requires the software/library to at least implement skipping and ignoring the extra_payload field.
-Validation and processing of the inputs and outputs of a special transaction must remain identical to
-classical transactions.
-
-Read more: https://github.com/dashpay/dips/blob/master/dip-0002.md
-
-DIP0003 - Deterministic Masternode Lists
-----------------------------------------
-This DIP provides on-chain consensus for masternode lists that in turn allow for deterministic quorum
-derivation and service scoring of masternode rewards.
-
-In the previous system, each node maintained its own individual masternode list. Masternodes gained
-entry to that masternode list after the owner created a 1000 Dash UTXO and the masternode broadcast
-a "masternode broadcast/announcement" P2P message. This in turn set the masternode to a PRE_ENABLED
-state in the list maintained by each node. Masternodes then regularly broadcasted ping messages to
-keep the masternode in ENABLED state.
-
-The previous system was maintained with consensus mechanisms that predated Satoshi Nakamoto’s solution
-to the Byzantine Generals Problem. This meant that each node needed to maintain their own individual
-masternode list with P2P messages and not a blockchain based solution. Due to the nature of the P2P
-system, there was no guarantee that nodes would come to the same conclusion on what the masternode
-list ought to look like. Discrepancies might, for example, occur due to a different order of message
-reception or if messages had not been received at all. This posed some risks in regard to consensus
-and limited the possible uses of quorums by the system.
-
-Additionally, the previous system required a complicated and failure prone "masternode sync" after
-the initial startup of the node. After the blockchain was synced, the node would request the current
-masternode list, the reward payment votes, and then verify the received list. This process tended to
-take an unnecessarily long amount of time and sometimes resulted in failure.
-
-In the new system, the masternode list is derived entirely from information found on-chain. New
-masternodes are added by new special transactions called Provider Registration Transactions
-(abbreviated as ProRegTx). They are only removed by spending the collateral. A ProRegTx is a special
-transaction which includes either a 1000-Dash collateral payment or a reference to it, along with
-other payload information (DIP0002).
-
-The new system is going to be activated via combination of a BIP9-like deployment (bit 3) and new spork
-(`SPORK_15_DETERMINISTIC_MNS_ENABLED`).
-
-Read more: https://github.com/dashpay/dips/blob/master/dip-0003.md
-Upgrade instructions: https://docs.dash.org/DIP3-masternode-upgrade
-
-DIP0004 - Simplified Verification of Deterministic Masternode Lists
--------------------------------------------------------------------
-A verifiable and correct masternode list is foundational to many Dash features, including verification
-of an InstantSend transaction, mixing in PrivateSend and many features of Evolution. The deterministic
-masternode lists introduced by DIP0003 enable full derivation and verification of a masternode list via
-on-chain data. This, however, requires the full chain to be available to construct or verify this list.
-A SPV client does not have the full chain and thus would have to rely on a list provided by one or more
-nodes in the network. This provided list must be verifiable by the SPV client without needing the full
-chain. This DIP proposes additions to the block’s coinbase transaction and new P2P messages to get and
-update a masternode list with additional proof data.
-
-Read more: https://github.com/dashpay/dips/blob/master/dip-0004.md
-
-Mining
-------
-Please note that masternode payments in `getblocktemplate` rpc are now returned as an array and not as
-a single object anymore. Make sure to apply corresponding changes to your pool software.
-
-Also, deterministic masternodes can now set their payout address to a P2SH address. The most common use
-case for P2SH is multisig but script can be pretty much anything. If your pool software doesn't recognize
-P2SH addresses, the simplest way to fix it is to use `script` field which shows scriptPubKey for each
-entry of masternode payments array in `getblocktemplate`.
-
-And finally, after DIP0003 activation your pool software must be able to produce Coinbase Special
-Transaction https://github.com/dashpay/dips/blob/master/dip-0004.md#coinbase-special-transaction.
-Use `coinbase_payload` from `getblocktemplate` to get extra payload needed to construct this transaction.
-
-PrivateSend
------------
-With further refactoring of PrivateSend code it became possible to implement mixing in few parallel
-mixing sessions at once from one single wallet. You can set number of mixing sessions via
-`privatesendsessions` cmd-line option or dash.conf. You can pick any number of sessions between 1 and 10,
-default is 4 which should be good enough for most users. For this feature to work you should also make
-sure that `privatesendmultisession` is set to `1` via cmd-line or `Enable PrivateSend multi-session` is
-enabled in GUI.
-
-Introducing parallel mixing sessions should speed mixing up which makes it reasonable to add a new
-mixing denom (0.00100001 DASH) now while keeping all the old ones too. It also makes sense to allow more
-mixing rounds now, so the new default number of rounds is 4 and the maximum number of rounds is 16 now.
-
-You can also adjust rounds and amount via `setprivatesendrounds` and `setprivatesendamount` RPC commands
-which override corresponding cmd-line params (`privatesendrounds` and `privatesendamount` respectively).
-
-NOTE: Introducing the new denom and a couple of other changes made it incompatible with mixing on
-masternodes running on pre-0.13 software. Please keep using 0.12.3 local wallet to mix your coins until
-there is some significant number of masternodes running on version 0.13 to make sure you have enough
-masternodes to choose from when the wallet picks one to mix funds on.
-
-InstantSend
------------
-With further improvements of networking code it's now possible to handle more load, so we are changing
-InstantSend to be always-on for so called "simple txes" - transactions with 4 or less inputs. Such
-transactions will be automatically locked even if they only pay minimal fee. According to stats, this
-means that up to 90% of currently observed transactions will became automatically locked via InstantSend
-with no additional cost to end users or any additional effort from wallet developers or other service
-providers.
-
-This feature is going to be activated via combination of a BIP9-like deployment (we are reusing bit 3)
-and new spork (`SPORK_16_INSTANTSEND_AUTOLOCKS`).
-
-Historically, InstantSend transactions were shown in GUI and RPC with more confirmations than regular ones,
-which caused quite a bit of confusion. This will no longer be the case, instead we are going to show real
-blockchain confirmations only and a separate indicator to show if transaction was locked via InstantSend
-or not. For GUI it's color highlight and a new column, for RPC commands - `instantlock` field and `addlocked`
-param.
-
-One of the issues with InstantSend adoption by SPV wallets (besides lack of Deterministic Masternode List)
-was inability to filter all InstantSend messages the same way transactions are filtered. This should be
-fixed now and SPV wallets should only get lock votes for transactions they are interested in.
-
-Another popular request was to preserve information about InstantSend locks between wallet restarts, which
-is now implemented. This data is stored in a new cache file `instantsend.dat`. You can safely remove it,
-if you don't need information about recent transaction locks for some reason (NOTE: make sure it's not one
-of your wallets!).
-
-We also added new ZMQ notifications for double-spend attempts which try to override transactions locked
-via InstantSend - `zmqpubrawinstantsenddoublespend` and `zmqpubhashinstantsenddoublespend`.
-
-Sporks
-------
-There are a couple of new sporks introduced in this version `SPORK_15_DETERMINISTIC_MNS_ENABLED` (block
-based) and `SPORK_16_INSTANTSEND_AUTOLOCKS` (timestamp based). There is aslo `SPORK_17_QUORUM_DKG_ENABLED`
-(timestamp based) which is going to be used on testnet only for now.
-
-Spork data is stored in a new cache file (`sporks.dat`) now.
-
-Governance
-----------
-Introduction of Deterministic Masternodes requires replacing of the old masternode private key which was used
-both for operating a MN and for voting on proposals with a set of separate keys, preferably fresh new ones.
-This means that votes casted for proposals by Masternode Owners via the old system will no longer be valid
-after DIP0003 activation and must be re-casted using the new voting key.
-
-Also, you can now get notifications about governance objects or votes via new ZMQ notifications:
-`zmqpubhashgovernancevote`, `zmqpubhashgovernanceobject`, `zmqpubrawgovernancevote` and
-`zmqpubhashgovernanceobject`.
+DIP0003 block signaling
+-----------------------
+Miners running v0.13.1.0 are going to signal DIP3 regardles of the readiness of the corresponding masternode.
+With 70%+ masternodes already running on v0.13.0.0 we believe it's safe to slightly speed up the migration
+this way. This is fully backwards compatible and no update is required for (non-mining) nodes running on v0.13.0.0.
 
 GUI changes
 -----------
-Masternodes tab has a new section dedicated to DIP0003 registered masternodes now. After DIP0003 activation
-this will be the only section shown here, the two old sections for non-deterministic masternodes will no
-longer be available.
-
-There are changes in the way InstantSend transactions are displayed, see `InstantSend` section above.
-
-Some other (mostly minor) issues were also fixed, see `GUI` part of `0.13.0.0 Change log` section below for
-detailed list of fixes.
+Masternodes tab has a new checkbox that should filter masternode list by using keys stored in the wallet.
+This should make it much easier for masternode owners to find their masternodes in the list.
 
 RPC changes
 -----------
-There are a few changes in existing RPC interfaces in this release:
-- `gobject prepare` allows to send proposal transaction as an InstantSend one and also accepts an UTXO reference to spend;
-- `masternode status` and `masternode list` show some DIP0003 related info now;
-- `previousbits` and `coinbase_payload` fields were added in `getblocktemplate`;
-- `getblocktemplate` now returns an array for masternode payments instead of a single object (miners and mining pools have to upgrade their software to support multiple masternode payees);
-- masternode and superblock payments in `getblocktemplate` show payee scriptPubKey in `script` field in addition to payee address in `payee`;
-- `getblockchaininfo` shows BIP9 deployment progress;
-- `help command subCommand` should give detailed help for subcommands e.g. `help protx list`;
-- `compressed` option in `masternode genkey`;
-- `dumpwallet` shows info about dumped wallet and warns user about security issues;
-- `instantlock` field added in output of `getrawmempool`, `getmempoolancestors`, `getmempooldescendants`, `getmempoolentry`,
-`getrawtransaction`, `decoderawtransaction`, `gettransaction`, `listtransactions`, `listsinceblock`;
-- `addlocked` param added to `getreceivedbyaddress`, `getreceivedbyaccount`, `getbalance`, `sendfrom`, `sendmany`,
-`listreceivedbyaddress`, `listreceivedbyaccount`, `listaccounts`.
-
-There are also new RPC commands:
-- `protx` (`list`, `info`, `diff`, `register`, `register_fund`, `register_prepare`,
-`register_submit`, `update_service`, `update_registrar`, `revoke`);
-- `bls generate`;
-- `setprivatesendrounds`;
-- `setprivatesendamount`.
-
-See `help command` in rpc for more info.
-
-Command-line options
---------------------
-
-New cmd-line options:
-- `masternodeblsprivkey`;
-- `minsporkkeys`;
-- `privatesendsessions`;
-- `zmqpubrawinstantsenddoublespend`;
-- `zmqpubhashinstantsenddoublespend`;
-- `zmqpubhashgovernancevote`;
-- `zmqpubhashgovernanceobject`;
-- `zmqpubrawgovernancevote`;
-- `zmqpubhashgovernanceobject`.
-
-Some of them are Devnet only:
-- `budgetparams`;
-- `minimumdifficultyblocks`;
-- `highsubsidyblocks`;
-- `highsubsidyfactor`.
-
-Few cmd-line options are no longer supported:
-- `instantsenddepth`;
-- `mempoolreplacement`.
-
-See `Help -> Command-line options` in Qt wallet or `dashd --help` for more info.
-
-Lots of refactoring and bug fixes
----------------------------------
-
-A lot of refactoring, code cleanups and other small fixes were done in this release.
-
-0.13.0.0 Change log
+There is a new RPC command `getspecialtxes` which returns an array of special transactions found in the specified
+block with different level of verbosity. Also, various `protx` commands show extended help text for each parameter
+now (instead of referencing `protx register`).
+
+Bug fixes/Other improvements
+----------------------------
+There are few bug fixes in this release:
+- Block size should be calculated correctly for blocks with quorum commitments when constructing new block;
+- Special transactions should be checked for mempool acceptance at the right time (nodes could ban each other
+in some rare cases otherwise);
+- Signature verification and processing of special transactions is decoupled to avoid any potential issues.
+
+ 0.13.1.0 Change log
 ===================
 
-See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.12.3.4...dashpay:v0.13.0.0).
-
-### Network
-- [`03a6865d9`](https://github.com/dashpay/dash/commit/03a6865d9) Enforce correct port on mainnet for DIP3 MNs (#2576)
-- [`3f26ed78c`](https://github.com/dashpay/dash/commit/3f26ed78c) Backport network checks missing in CActiveDeterministicMasternodeManager::Init() (#2572)
-- [`7c7500864`](https://github.com/dashpay/dash/commit/7c7500864) Also stop asking other peers for a TX when ProcessTxLockRequest fails (#2529)
-- [`19a6f718d`](https://github.com/dashpay/dash/commit/19a6f718d) Don't respond with getdata for legacy inv types when spork15 is active (#2528)
-- [`22dcec71a`](https://github.com/dashpay/dash/commit/22dcec71a) Punish nodes which keep requesting and then rejecting blocks (#2518)
-- [`a18ca49a2`](https://github.com/dashpay/dash/commit/a18ca49a2) Disconnect peers with version < 70212 after DIP3 activation via BIP9 (#2497)
-- [`a57e9dea7`](https://github.com/dashpay/dash/commit/a57e9dea7) Fix filtering of the lock votes for SPV nodes. (#2468)
-- [`c6cf4d9a4`](https://github.com/dashpay/dash/commit/c6cf4d9a4) Relay txes through MN network faster than through regular nodes (#2397)
-- [`e66c4e184`](https://github.com/dashpay/dash/commit/e66c4e184) Don't revert to INV based block announcements when the previous block is the devnet genesis block (#2388)
-- [`b5142ee2c`](https://github.com/dashpay/dash/commit/b5142ee2c) Implement RemoveAskFor to indicate that we're not interested in an item anymore (#2384)
-- [`53e12b7b4`](https://github.com/dashpay/dash/commit/53e12b7b4) Don't bail out from ProcessMasternodeConnections in regtest (#2368)
-- [`31759a44d`](https://github.com/dashpay/dash/commit/31759a44d) Fix tx inv throughput (#2300)
-- [`9d90b4fa4`](https://github.com/dashpay/dash/commit/9d90b4fa4) Honor filterInventoryKnown for non-tx/non-block items (#2292)
-- [`6764dafec`](https://github.com/dashpay/dash/commit/6764dafec) Skip initial masternode list sync if spork 15 is active
-- [`fced9a4b8`](https://github.com/dashpay/dash/commit/fced9a4b8) Ban peers that send us MNLISTDIFF messages
-- [`d3ac86206`](https://github.com/dashpay/dash/commit/d3ac86206) Implement GETMNLISTDIFF and MNLISTDIFF P2P messages
-- [`40eee1775`](https://github.com/dashpay/dash/commit/40eee1775) Fix sync in regtest (again) (#2241)
-- [`c4ee2c89e`](https://github.com/dashpay/dash/commit/c4ee2c89e) Fix mnsync in regtest (#2202)
-
-### Mining
-- [`f96563462`](https://github.com/dashpay/dash/commit/f96563462) Fix check for nTemporaryTestnetForkDIP3Height (#2508)
-- [`80656038f`](https://github.com/dashpay/dash/commit/80656038f) Bump nTemporaryTestnetForkHeight to 274000 (#2498)
-- [`1c25356ff`](https://github.com/dashpay/dash/commit/1c25356ff) Allow to use low difficulty and higher block rewards for devnet (#2369)
-- [`3cc4ac137`](https://github.com/dashpay/dash/commit/3cc4ac137) Fix crash bug with duplicate inputs within a transaction (#2302)
-- [`e6b699bc2`](https://github.com/dashpay/dash/commit/e6b699bc2) Enforce MN and superblock payments in same block
-- [`c7f75afdd`](https://github.com/dashpay/dash/commit/c7f75afdd) Fix nulldummy tests by creating correct DIP4 coinbase transactions
-- [`bcc071957`](https://github.com/dashpay/dash/commit/bcc071957) Calculate and enforce DIP4 masternodes merkle root in CbTx
-- [`0a086898f`](https://github.com/dashpay/dash/commit/0a086898f) Implement and enforce CbTx with correct block height and deprecate BIP34
-
-### RPC
-- [`a22f1bffe`](https://github.com/dashpay/dash/commit/a22f1bffe) Remove support for "0" as an alternative to "" when the default is requested (#2622) (#2624)
-- [`18e1edabf`](https://github.com/dashpay/dash/commit/18e1edabf) Backport 2618 to v0.13.0.x (#2619)
-- [`0dce846d5`](https://github.com/dashpay/dash/commit/0dce846d5) Add an option to use specific address as a source of funds in protx rpc commands (otherwise use payoutAddress/operatorPayoutAddress) (#2581)
-- [`e71ea29e6`](https://github.com/dashpay/dash/commit/e71ea29e6) Add ownerAddr and votingAddr to CDeterministicMNState::ToJson (#2571)
-- [`999a51907`](https://github.com/dashpay/dash/commit/999a51907) Fix optional revocation reason parameter for "protx revoke" and a few help strings (#2568)
-- [`c08926146`](https://github.com/dashpay/dash/commit/c08926146) Unify "protx list" options (#2559)
-- [`e9f7142ed`](https://github.com/dashpay/dash/commit/e9f7142ed) Bump PROTOCOL_VERSION and DMN_PROTO_VERSION to 70213 (#2557)
-- [`818f0f464`](https://github.com/dashpay/dash/commit/818f0f464) Allow consuming specific UTXO in gobject prepare command (#2482)
-- [`1270b7122`](https://github.com/dashpay/dash/commit/1270b7122) Use a verbosity instead of two verbose parameters (#2506)
-- [`f6f6d075d`](https://github.com/dashpay/dash/commit/f6f6d075d) Still support "protx list" and "protx diff" when wallet is disabled at compile time (#2511)
-- [`5a3f64310`](https://github.com/dashpay/dash/commit/5a3f64310) Deserialize CFinalCommitmentTxPayload instead of CFinalCommitment in TxToJSON (#2510)
-- [`5da4c9728`](https://github.com/dashpay/dash/commit/5da4c9728) Use "registered" as default for "protx list" (#2513)
-- [`fc6d651c4`](https://github.com/dashpay/dash/commit/fc6d651c4) Fix crashes in "protx" RPCs when wallet is disabled (#2509)
-- [`ba49a4a16`](https://github.com/dashpay/dash/commit/ba49a4a16) Trivial: protx fund_register RPC help corrections (#2502)
-- [`45421b1a3`](https://github.com/dashpay/dash/commit/45421b1a3) Add IS parameter for gobject prepare (#2452)
-- [`2ba1ff521`](https://github.com/dashpay/dash/commit/2ba1ff521) Use ParseFixedPoint instead of ParseDoubleV in "protx register" commands (#2458)
-- [`e049f9c1e`](https://github.com/dashpay/dash/commit/e049f9c1e) fix protx register rpc help (#2461)
-- [`eb2103760`](https://github.com/dashpay/dash/commit/eb2103760) trivail, clarifies help text for protx register (#2462)
-- [`76e93c7d7`](https://github.com/dashpay/dash/commit/76e93c7d7) Corrections to incorrect syntax in RPC help (#2466)
-- [`3c1f44c3a`](https://github.com/dashpay/dash/commit/3c1f44c3a) Make sure protx_update_registrar adds enough funds for the fees
-- [`d130f25ac`](https://github.com/dashpay/dash/commit/d130f25ac) Fix check for number of params to protx_update_service (#2443)
-- [`adf9c87e2`](https://github.com/dashpay/dash/commit/adf9c87e2) Fix protx/bls rpc help (#2438)
-- [`579c83e88`](https://github.com/dashpay/dash/commit/579c83e88) Add coinbase_payload to getblocktemplate help (#2437)
-- [`3685c85e7`](https://github.com/dashpay/dash/commit/3685c85e7) Show BIP9 progress in getblockchaininfo (#2435)
-- [`da3e3db4d`](https://github.com/dashpay/dash/commit/da3e3db4d) Fix sub-command help for masternode, gobject and protx rpcs (#2425)
-- [`adad3fcfe`](https://github.com/dashpay/dash/commit/adad3fcfe) RPC: protx help corrections (#2422)
-- [`1d56dffda`](https://github.com/dashpay/dash/commit/1d56dffda) Unify help display logic for various "complex" rpc commands (#2415)
-- [`02442673d`](https://github.com/dashpay/dash/commit/02442673d) Trivial: Correct protx diff RPC help (#2410)
-- [`1f56600c4`](https://github.com/dashpay/dash/commit/1f56600c4) Trivial: Protx operator reward clarification (#2407)
-- [`7011fec1b`](https://github.com/dashpay/dash/commit/7011fec1b) RPC: Add help details for the bls RPC (#2403)
-- [`50f133ad0`](https://github.com/dashpay/dash/commit/50f133ad0) Add merkle tree and coinbase transaction to the `protx diff` rpc command (#2392)
-- [`25b6dae9e`](https://github.com/dashpay/dash/commit/25b6dae9e) Code style and RPC help string cleanups for DIP2/DIP3 (#2379)
-- [`0ad2906c5`](https://github.com/dashpay/dash/commit/0ad2906c5) Clarify addlocked description in getbalance RPC (#2364)
-- [`547b81dd0`](https://github.com/dashpay/dash/commit/547b81dd0) log `gobject prepare` params (#2317)
-- [`d932d2c4e`](https://github.com/dashpay/dash/commit/d932d2c4e) Add instantlock field to getrawtransaction rpc output (#2314)
-- [`c3d6b0651`](https://github.com/dashpay/dash/commit/c3d6b0651) Remove redundant check for unknown commands in masternode RPC (#2279)
-- [`44706dc88`](https://github.com/dashpay/dash/commit/44706dc88) Implement projection of MN reward winners in "masternode winners"
-- [`2d8f1244c`](https://github.com/dashpay/dash/commit/2d8f1244c) Implement 'masternode info <proTxHash>' RPC
-- [`e2a9dbbce`](https://github.com/dashpay/dash/commit/e2a9dbbce) Better "masternode status" for deterministic masternodes
-- [`50ac6fb3a`](https://github.com/dashpay/dash/commit/50ac6fb3a) Throw exception when trying to invoke start-xxx RPC in deterministic mode
-- [`58aa81364`](https://github.com/dashpay/dash/commit/58aa81364) Implement "protx revoke" RPC
-- [`185416b97`](https://github.com/dashpay/dash/commit/185416b97) Implement "protx update_registrar" RPC
-- [`32951f795`](https://github.com/dashpay/dash/commit/32951f795) Implement "protx update_service" RPC
-- [`5e3abeca2`](https://github.com/dashpay/dash/commit/5e3abeca2) Implement "protx list" RPC
-- [`c77242346`](https://github.com/dashpay/dash/commit/c77242346) Implement "protx register" RPC
-- [`1c2565804`](https://github.com/dashpay/dash/commit/1c2565804) Refactor `masternode` and `gobject` RPCs to support `help command subCommand` syntax (#2240)
-- [`fb4d301a2`](https://github.com/dashpay/dash/commit/fb4d301a2) Add extraPayloadSize/extraPayload fields to RPC help
-- [`2997d6d26`](https://github.com/dashpay/dash/commit/2997d6d26) add compressed option to `masternode genkey` (#2232)
-- [`98ed90cbb`](https://github.com/dashpay/dash/commit/98ed90cbb) adds rpc calls for `setprivatesendrounds` and `setprivatesendamount` (#2230)
-- [`50eb98d90`](https://github.com/dashpay/dash/commit/50eb98d90) Prepare for DIP3 operator reward payments and switch to array in getblocktemplate (#2216)
-- [`a959f60aa`](https://github.com/dashpay/dash/commit/a959f60aa) De-duplicate "gobject vote-alias" and "gobject "vote-many" code (#2217)
-- [`566fa5ec3`](https://github.com/dashpay/dash/commit/566fa5ec3) Add support for "help command subCommand" (#2210)
-- [`4cd969e3d`](https://github.com/dashpay/dash/commit/4cd969e3d) Add `previousbits` field to `getblocktemplate` output (#2201)
-- [`ac30196bc`](https://github.com/dashpay/dash/commit/ac30196bc) Show some info about the wallet dumped via dumpwallet (#2191)
-
-### LLMQ and Deterministic Masternodes
-- [`a3b01dfbe`](https://github.com/dashpay/dash/commit/a3b01dfbe) Gracefully shutdown on evodb inconsistency instead of crashing (#2611) (#2620)
-- [`3861c6a82`](https://github.com/dashpay/dash/commit/3861c6a82) Add BIP9 deployment for DIP3 on mainnet (#2585)
-- [`587911b36`](https://github.com/dashpay/dash/commit/587911b36) Fix IsBlockPayeeValid (#2577)
-- [`3c30a6aff`](https://github.com/dashpay/dash/commit/3c30a6aff) Add missing masternodeblsprivkey help text (#2569)
-- [`378dadd0f`](https://github.com/dashpay/dash/commit/378dadd0f) Ensure EvoDB consistency for quorum commitments by storing the best block hash (#2537)
-- [`2127a426b`](https://github.com/dashpay/dash/commit/2127a426b) Further refactoring of CQuorumBlockProcessor (#2545)
-- [`1522656d6`](https://github.com/dashpay/dash/commit/1522656d6) Correctly handle spent collaterals for MNs that were registered in the same block (#2553)
-- [`583035337`](https://github.com/dashpay/dash/commit/583035337) Track operator key changes in mempool and handle conflicts (#2540)
-- [`88f7bf0d8`](https://github.com/dashpay/dash/commit/88f7bf0d8) Don't delete/add values to the unique property map when it's null (#2538)
-- [`15414dac2`](https://github.com/dashpay/dash/commit/15414dac2) Refactor CQuorumBlockProcessor and CDeterministicMNManager (#2536)
-- [`d9b28fe1a`](https://github.com/dashpay/dash/commit/d9b28fe1a) Introduce dummy (ping-like) contributions for the dummy DKG (#2542)
-- [`df0d0cce7`](https://github.com/dashpay/dash/commit/df0d0cce7) Watch for changes in operator key and disable local MN (#2541)
-- [`511dc3714`](https://github.com/dashpay/dash/commit/511dc3714) Remove ProTxs from mempool that refer to a ProRegTx for which the collateral was spent (#2539)
-- [`225c2135e`](https://github.com/dashpay/dash/commit/225c2135e) Allow skipping of MN payments with zero duffs (#2534)
-- [`60867978d`](https://github.com/dashpay/dash/commit/60867978d) Avoid printing DIP3/DIP4 related logs twice (#2525)
-- [`7037f7c99`](https://github.com/dashpay/dash/commit/7037f7c99) Bail out from GetBlockTxOuts in case nBlockHeight is above tip+1 (#2523)
-- [`022491420`](https://github.com/dashpay/dash/commit/022491420) Print the state object when ProcessSpecialTxsInBlock fails in ConnectBlock (#2516)
-- [`812834dc5`](https://github.com/dashpay/dash/commit/812834dc5) Put height into mined commitments and use it instead of the special handling of quorumVvecHash (#2501)
-- [`a4f5ba38b`](https://github.com/dashpay/dash/commit/a4f5ba38b)  Implement CDummyDKG and CDummyCommitment until we have the real DKG merged (#2492)
-- [`66612cc4b`](https://github.com/dashpay/dash/commit/66612cc4b) Add 0 entry to vTxSigOps when adding quorum commitments (#2489)
-- [`f5beeafa1`](https://github.com/dashpay/dash/commit/f5beeafa1) Also restart MNs which didn't have the collateral moved, but do it later (#2483)
-- [`0123517b4`](https://github.com/dashpay/dash/commit/0123517b4) Implement PoSe based on information from LLMQ commitments (#2478)
-- [`22b5952c5`](https://github.com/dashpay/dash/commit/22b5952c5) Implement and enforce DIP6 commitments (#2477)
-- [`d40a5ce31`](https://github.com/dashpay/dash/commit/d40a5ce31)  Properly initialize confirmedHash in CSimplifiedMNListEntry (#2479)
-- [`5ffc31bce`](https://github.com/dashpay/dash/commit/5ffc31bce) Forbid version=0 in special TXs (#2473)
-- [`85157f9a9`](https://github.com/dashpay/dash/commit/85157f9a9) Few trivial fixes for DIP2/DIP3 (#2474)
-- [`b5947f299`](https://github.com/dashpay/dash/commit/b5947f299) Implement BuildSimplifiedDiff in CDeterministicMNList
-- [`6edad3745`](https://github.com/dashpay/dash/commit/6edad3745) Use ForEachMN and GetMN in BuildDiff instead of directly accessing mnMap
-- [`83aac461b`](https://github.com/dashpay/dash/commit/83aac461b) Allow P2SH/multisig addresses for operator rewards
-- [`f5864254c`](https://github.com/dashpay/dash/commit/f5864254c) Do not use keyIDCollateralAddress anymore when spork15 is active
-- [`5ccf556f3`](https://github.com/dashpay/dash/commit/5ccf556f3) GetMasternodeInfo with payee argument should do nothing when DIP3 is active
-- [`927e8bd79`](https://github.com/dashpay/dash/commit/927e8bd79) Also forbid reusing collateral key for owner/voting keys
-- [`826e7d063`](https://github.com/dashpay/dash/commit/826e7d063) Move internal collateral check to the else branch of the external collateral check
-- [`dc404e755`](https://github.com/dashpay/dash/commit/dc404e755) Allow P2SH for payout scripts
-- [`9adf8ad73`](https://github.com/dashpay/dash/commit/9adf8ad73) Remove restriction that forced use of same addresses for payout and collateral
-- [`7c1f11089`](https://github.com/dashpay/dash/commit/7c1f11089) Revert #2441 and retry fixing (#2444)
-- [`6761fa49f`](https://github.com/dashpay/dash/commit/6761fa49f) More checks for tx type
-- [`b84369663`](https://github.com/dashpay/dash/commit/b84369663) Be more specific about tx version in conditions
-- [`c975a986b`](https://github.com/dashpay/dash/commit/c975a986b) no cs_main in specialtxes
-- [`8bd5b231b`](https://github.com/dashpay/dash/commit/8bd5b231b) Log mempool payload errors instead of crashing via assert
-- [`658b7afd1`](https://github.com/dashpay/dash/commit/658b7afd1) Make error messages re payload a bit more specific
-- [`153afb906`](https://github.com/dashpay/dash/commit/153afb906) Restart MNs in DIP3 tests even if collateral has not moved (#2441)
-- [`4ad2f647c`](https://github.com/dashpay/dash/commit/4ad2f647c) Use proTxHash instead of outpoint when calculating masternode scores (#2440)
-- [`c27e62935`](https://github.com/dashpay/dash/commit/c27e62935) Allow reusing of external collaterals in DIP3 (#2427)
-- [`9da9d575a`](https://github.com/dashpay/dash/commit/9da9d575a) Allow collaterals for non-DIP3 MNs which were created after DIP3/BIP9 activation (#2412)
-- [`30a2b283a`](https://github.com/dashpay/dash/commit/30a2b283a) Sign ProRegTx collaterals with a string message instead of payload hash, split `protx register` into `prepare`/`submit` (#2395)
-- [`e34701295`](https://github.com/dashpay/dash/commit/e34701295) Fix crash when deterministic MN list is empty and keep paying superblocks in this case (#2387)
-- [`28a6007a4`](https://github.com/dashpay/dash/commit/28a6007a4) Prepare DIP3 for testnet and reuse DIP3 deployment for autoix deployment (#2389)
-- [`e3df91082`](https://github.com/dashpay/dash/commit/e3df91082) Allow referencing other TX outputs for ProRegTx collateral (#2366)
-- [`fdfb07742`](https://github.com/dashpay/dash/commit/fdfb07742) Update ProRegTx serialization order (#2378)
-- [`eaa856eb7`](https://github.com/dashpay/dash/commit/eaa856eb7) Remove nProtocolVersion and add mode/type fields to DIP3 (#2358)
-- [`c9d274518`](https://github.com/dashpay/dash/commit/c9d274518) Use BLS keys for the DIP3 operator key (#2352)
-- [`eaef90202`](https://github.com/dashpay/dash/commit/eaef90202) Don't use boost range adaptors in CDeterministicMNList (#2327)
-- [`6adc236d0`](https://github.com/dashpay/dash/commit/6adc236d0) Only use dataDir in CEvoDB when not in-memory (#2291)
-- [`8a878bfcf`](https://github.com/dashpay/dash/commit/8a878bfcf) Call InitializeCurrentBlockTip and activeMasternodeManager->Init after importing has finished (#2286)
-- [`6b3d65028`](https://github.com/dashpay/dash/commit/6b3d65028) After DIP3 activation, allow voting with voting keys stored in your wallet (#2281)
-- [`d8247dfff`](https://github.com/dashpay/dash/commit/d8247dfff) Use refactored payment logic when spork15 is active
-- [`60002b7dd`](https://github.com/dashpay/dash/commit/60002b7dd) Payout and enforce operator reward payments
-- [`2c481f0f8`](https://github.com/dashpay/dash/commit/2c481f0f8) Implement deterministic version of CMasternodePayments::IsScheduled
-- [`19fbf8ab7`](https://github.com/dashpay/dash/commit/19fbf8ab7) Move cs_main lock from CMasternode::UpdateLastPaid to CMasternodeMan
-- [`dc7292afa`](https://github.com/dashpay/dash/commit/dc7292afa) Implement new MN payments logic and add compatibility code
-- [`d4530eb7d`](https://github.com/dashpay/dash/commit/d4530eb7d) Put all masternodes in MASTERNODE_ENABLED state when spork15 is active
-- [`31b4f8354`](https://github.com/dashpay/dash/commit/31b4f8354) Forbid starting of legacy masternodes with non matching ProTx collateral values
-- [`5050a9205`](https://github.com/dashpay/dash/commit/5050a9205) Add compatibility code for FindRandomNotInVec and GetMasternodeScores
-- [`cc73422f8`](https://github.com/dashpay/dash/commit/cc73422f8) Add methods to add/remove (non-)deterministic MNs
-- [`7d14566bc`](https://github.com/dashpay/dash/commit/7d14566bc) Add compatibility code to CMasternodeMan so that old code is still compatible
-- [`27e8b48a6`](https://github.com/dashpay/dash/commit/27e8b48a6) Stop executing legacy MN list code when spork 15 is activated
-- [`d90b13996`](https://github.com/dashpay/dash/commit/d90b13996) Implement CActiveDeterministicMasternodeManager
-- [`a5e65aa37`](https://github.com/dashpay/dash/commit/a5e65aa37) Erase mnListCache entry on UndoBlock (#2254)
-- [`88e7888de`](https://github.com/dashpay/dash/commit/88e7888de) Try using cache in GetListForBlock before reading from disk (#2253)
-- [`9653af2f3`](https://github.com/dashpay/dash/commit/9653af2f3) Classes, validation and update logic for CProUpRevTX
-- [`1c68d1107`](https://github.com/dashpay/dash/commit/1c68d1107) Classes, validation and update logic for CProUpRegTX
-- [`8aca3b040`](https://github.com/dashpay/dash/commit/8aca3b040) Also check duplicate addresses for CProUpServTX in CTxMemPool
-- [`923fd6739`](https://github.com/dashpay/dash/commit/923fd6739) Implement CProUpServTx logic in CDeterministicMNManager
-- [`6ec0d7aea`](https://github.com/dashpay/dash/commit/6ec0d7aea) Classes and basic validation of ProUpServTx
-- [`255403e92`](https://github.com/dashpay/dash/commit/255403e92) Include proTx data in json formatted transactions
-- [`25545fc1e`](https://github.com/dashpay/dash/commit/25545fc1e) Split keyIDMasternode into keyIDOwner/keyIDOperator/keyIDVoting (#2248)
-- [`2c172873a`](https://github.com/dashpay/dash/commit/2c172873a) Don't allow non-ProTx masternode collaterals after DIP3 activation
-- [`9e8a86714`](https://github.com/dashpay/dash/commit/9e8a86714) Implementation of deterministic MNs list
-- [`76fd30894`](https://github.com/dashpay/dash/commit/76fd30894) Automatically lock ProTx collaterals when TX is added/loaded to wallet
-- [`cdd723ede`](https://github.com/dashpay/dash/commit/cdd723ede) Conflict handling for ProRegTx in mempool
-- [`958b84ace`](https://github.com/dashpay/dash/commit/958b84ace) Implementation of ProRegTx with basic validation (no processing)
-- [`c9a72e888`](https://github.com/dashpay/dash/commit/c9a72e888) Introduce CEvoDB for all evo related things, e.g. DIP3
-- [`4531f6b89`](https://github.com/dashpay/dash/commit/4531f6b89) Implement CDBTransaction and CScopedDBTransaction
-- [`e225cebcd`](https://github.com/dashpay/dash/commit/e225cebcd) Use previous block for CheckSpecialTx (#2243)
-- [`b92bd8997`](https://github.com/dashpay/dash/commit/b92bd8997) Fix mninfo search by payee (#2233)
-- [`8af7f6223`](https://github.com/dashpay/dash/commit/8af7f6223) Account for extraPayload when calculating fees in FundTransaction
-- [`b606bde9a`](https://github.com/dashpay/dash/commit/b606bde9a) Support version 3 transaction serialization in mininode.py
-- [`61bbe54ab`](https://github.com/dashpay/dash/commit/61bbe54ab) Add Get-/SetTxPayload helpers
-- [`cebf71bbc`](https://github.com/dashpay/dash/commit/cebf71bbc) Stubs for special TX validation and processing
-- [`d6c5a72e2`](https://github.com/dashpay/dash/commit/d6c5a72e2) Basic validation of version 3 TXs in CheckTransaction
-- [`a3c4ee3fd`](https://github.com/dashpay/dash/commit/a3c4ee3fd) DIP2 changes to CTransaction and CMutableTransaction
-- [`d20100ecd`](https://github.com/dashpay/dash/commit/d20100ecd) DIP0003 deployment
-- [`4d3518fe0`](https://github.com/dashpay/dash/commit/4d3518fe0) Refactor MN payee logic in preparation for DIP3 (#2215)
-- [`d946f21bd`](https://github.com/dashpay/dash/commit/d946f21bd) Masternode related refactorings in preparation of DIP3 (#2212)
-
-### PrivateSend
-- [`07309f0ec`](https://github.com/dashpay/dash/commit/07309f0ec) Allow up to MASTERNODE_MAX_MIXING_TXES (5) DSTXes per MN in a row (#2552)
-- [`ed53fce47`](https://github.com/dashpay/dash/commit/ed53fce47) Revert "Apply similar logic to vecMasternodesUsed" (#2503)
-- [`69bffed72`](https://github.com/dashpay/dash/commit/69bffed72) Do not sort resulting vector in SelectCoinsGroupedByAddresses (#2493)
-- [`bb11f1a63`](https://github.com/dashpay/dash/commit/bb11f1a63) Fix recent changes in DSA conditions (#2494)
-- [`6480ad1d5`](https://github.com/dashpay/dash/commit/6480ad1d5) Should check dsq queue regardless of the mixing state (#2491)
-- [`67483cd34`](https://github.com/dashpay/dash/commit/67483cd34) Fix dsq/dsa conditions (#2487)
-- [`9d4df466b`](https://github.com/dashpay/dash/commit/9d4df466b) Fix CreateDenominated failure for addresses with huge amount of inputs (#2486)
-- [`2b400f74b`](https://github.com/dashpay/dash/commit/2b400f74b) Base dsq/dstx thresholold on total number of up to date masternodes (#2465)
-- [`262454791`](https://github.com/dashpay/dash/commit/262454791) Add 5th denom, drop deprecated logic and bump min PS version (#2318)
-- [`23f169c44`](https://github.com/dashpay/dash/commit/23f169c44) Drop custom PS logic for guessing fees etc. from SelectCoins (#2371)
-- [`f7b0b5759`](https://github.com/dashpay/dash/commit/f7b0b5759) Pick rounds with the most inputs available to mix first (#2278)
-- [`727e940c0`](https://github.com/dashpay/dash/commit/727e940c0) Fix recently introduced PS bugs (#2330)
-- [`85a958a36`](https://github.com/dashpay/dash/commit/85a958a36) Drop dummy copy constructors in CPrivateSend*Session (#2305)
-- [`c6a0c5541`](https://github.com/dashpay/dash/commit/c6a0c5541) A couple of small fixes for mixing collaterals (#2294)
-- [`d192d642f`](https://github.com/dashpay/dash/commit/d192d642f) Move heavy coin selection out of the loop in SubmitDenominate (#2274)
-- [`28e0476f4`](https://github.com/dashpay/dash/commit/28e0476f4) Squash two logic branches in SubmitDenominate into one (#2270)
-- [`9b6eb4765`](https://github.com/dashpay/dash/commit/9b6eb4765) Include inputs with max rounds in SelectCoinsDark/SelectCoinsByDenominations (#2277)
-- [`55d7bb900`](https://github.com/dashpay/dash/commit/55d7bb900) Add an option to disable popups for PS mixing txes (#2272)
-- [`38ccfef3b`](https://github.com/dashpay/dash/commit/38ccfef3b) Identify PS collateral payments in transaction list a bit more accurate (#2271)
-- [`ad31dbbd7`](https://github.com/dashpay/dash/commit/ad31dbbd7) Add more variance to coin selection in PS mixing (#2261)
-- [`8c9cb2909`](https://github.com/dashpay/dash/commit/8c9cb2909) Revert 2075 (#2259)
-- [`b164bcc7a`](https://github.com/dashpay/dash/commit/b164bcc7a) Split PS into Manager and Session and allow running multiple mixing sessions in parallel (client side) (#2203)
-- [`d4d11476a`](https://github.com/dashpay/dash/commit/d4d11476a) Fix typo and grammar in PS error message (#2199)
-- [`a83ab5501`](https://github.com/dashpay/dash/commit/a83ab5501) Fix wallet lock check in DoAutomaticDenominating (#2196)
-- [`30fa8bc33`](https://github.com/dashpay/dash/commit/30fa8bc33) Make sure pwalletMain is not null whenever it's used in PS client (#2190)
-- [`3c89983db`](https://github.com/dashpay/dash/commit/3c89983db) Remove DarksendConfig (#2132)
-- [`43091a3ef`](https://github.com/dashpay/dash/commit/43091a3ef) PrivateSend Enhancement: Up default round count to 4 and allow user to mix up to 16 rounds (#2128)
-
-### InstantSend
-- [`35550a3f9`](https://github.com/dashpay/dash/commit/35550a3f9) Add quorumModifierHash to instant send lock vote (#2505)
-- [`fa8f4a10c`](https://github.com/dashpay/dash/commit/fa8f4a10c)  Include masternodeProTxHash in CTxLockVote (#2484)
-- [`624e50949`](https://github.com/dashpay/dash/commit/624e50949) Remove few leftovers of `-instantsenddepth`
-- [`733cd9512`](https://github.com/dashpay/dash/commit/733cd9512) Remove global fDIP0003ActiveAtTip and fix wrong use of VersionBitsState in auto IX (#2380)
-- [`5454bea37`](https://github.com/dashpay/dash/commit/5454bea37) Automatic InstantSend locks for "simple" transactions (#2140)
-- [`1e74bcace`](https://github.com/dashpay/dash/commit/1e74bcace) [ZMQ] Notify when an IS double spend is attempted (#2262)
-- [`6bcd868de`](https://github.com/dashpay/dash/commit/6bcd868de) Fix lockedByInstantSend initialization (#2197)
-- [`0a6f47323`](https://github.com/dashpay/dash/commit/0a6f47323) Remove dummy confirmations in RPC API and GUI for InstantSend transactions (#2040)
-- [`ace980834`](https://github.com/dashpay/dash/commit/ace980834) Extend Bloom Filter support to InstantSend related messages (#2184)
-- [`2c0d4c9d7`](https://github.com/dashpay/dash/commit/2c0d4c9d7) Save/load InstantSend cache (#2051)
-
-### Sporks
-- [`33f78d70e`](https://github.com/dashpay/dash/commit/33f78d70e) Do not accept sporks with nTimeSigned way too far into the future (#2578)
-- [`6c4b3ed8d`](https://github.com/dashpay/dash/commit/6c4b3ed8d) Load sporks before checking blockchain (#2573)
-- [`d94092b60`](https://github.com/dashpay/dash/commit/d94092b60) Fix spork propagation while in IBD and fix spork integration tests (#2533)
-- [`43e757bee`](https://github.com/dashpay/dash/commit/43e757bee) Amend SERIALIZATION_VERSION_STRING string for spork cache (#2339)
-- [`f7ab6c469`](https://github.com/dashpay/dash/commit/f7ab6c469) M-of-N-like sporks (#2288)
-- [`c2958733e`](https://github.com/dashpay/dash/commit/c2958733e) CSporkManager::Clear() should not alter sporkPubKeyID and sporkPrivKey (#2313)
-- [`8c0dca282`](https://github.com/dashpay/dash/commit/8c0dca282) Add versioning to spork cache (#2312)
-- [`5461e92bf`](https://github.com/dashpay/dash/commit/5461e92bf) Add spork to control deterministic MN lists activation
-- [`73c2ddde7`](https://github.com/dashpay/dash/commit/73c2ddde7) extract sporkmanager from sporkmessage (#2234)
-- [`1767e3457`](https://github.com/dashpay/dash/commit/1767e3457) Save/load spork cache (#2206)
-- [`075ca0903`](https://github.com/dashpay/dash/commit/075ca0903) Protect CSporkManager with critical section (#2213)
-
-### Governance
-- [`222e5b4f7`](https://github.com/dashpay/dash/commit/222e5b4f7) Remove proposal/funding votes from MNs that changed the voting key (#2570)
-- [`5185dd5b7`](https://github.com/dashpay/dash/commit/5185dd5b7) Use correct time field when removing pre-DIP3 votes (#2535)
-- [`d2ca9edde`](https://github.com/dashpay/dash/commit/d2ca9edde) Fix multiple issues with governance voting after spork15 activation (#2526)
-- [`08dc17871`](https://github.com/dashpay/dash/commit/08dc17871) Drop pre-DIP3 votes from current votes per MN per object (#2524)
-- [`0c1b683a0`](https://github.com/dashpay/dash/commit/0c1b683a0) Clear votes which were created before spork15 activation and use operator key for non-funding votes (#2512)
-- [`da4b5fb16`](https://github.com/dashpay/dash/commit/da4b5fb16) Remove an unused function from governance object collateral code (#2480)
-- [`8deb8e90f`](https://github.com/dashpay/dash/commit/8deb8e90f) Modernize Gov Methods (#2326)
-- [`0471fa884`](https://github.com/dashpay/dash/commit/0471fa884) Drop MAX_GOVERNANCE_OBJECT_DATA_SIZE (and maxgovobjdatasize in rpc) (#2298)
-- [`737353c84`](https://github.com/dashpay/dash/commit/737353c84) Fix IsBlockValueValid/IsOldBudgetBlockValueValid (#2276)
-- [`a5643f899`](https://github.com/dashpay/dash/commit/a5643f899) Switch RequestGovernanceObjectVotes from pointers to hashes (#2189)
-- [`0e689341d`](https://github.com/dashpay/dash/commit/0e689341d) Implement Governance ZMQ notification messages (#2160)
-
-### GUI
-- [`858bb52ad`](https://github.com/dashpay/dash/commit/858bb52ad) Show correct operator payee address in DIP3 MN list GUI (#2563)
-- [`190863722`](https://github.com/dashpay/dash/commit/190863722) Remove legacy MN list tabs on spork15 activation (#2567)
-- [`3e97b0cbd`](https://github.com/dashpay/dash/commit/3e97b0cbd) Make sure that we can get inputType and fUseInstantSend regardless of the way recipients are sorted (#2550)
-- [`1a7c29b97`](https://github.com/dashpay/dash/commit/1a7c29b97) Revert "Sort recipients in SendCoins dialog via BIP69 rule (#2546)" (#2549)
-- [`ca0aec2a3`](https://github.com/dashpay/dash/commit/ca0aec2a3) Match recipients with txouts by scriptPubKey in reassignAmounts() (#2548)
-- [`09730e1c5`](https://github.com/dashpay/dash/commit/09730e1c5) Bail out from update methods in MasternodeList when shutdown is requested (#2551)
-- [`18cd5965c`](https://github.com/dashpay/dash/commit/18cd5965c) Sort recipients in SendCoins dialog via BIP69 rule (#2546)
-- [`9100c69eb`](https://github.com/dashpay/dash/commit/9100c69eb) Allow filtering by proTxHash on DIP3 MN tab (#2532)
-- [`216119921`](https://github.com/dashpay/dash/commit/216119921) Fix wrong total MN count in UI and "masternode count" RPC (#2527)
-- [`8f8878a94`](https://github.com/dashpay/dash/commit/8f8878a94) Add dummy/hidden column to carry the proTxHash per MN list entry... (#2530)
-- [`a4ea816b2`](https://github.com/dashpay/dash/commit/a4ea816b2) use aqua gui theme (#2472)
-- [`aa495405b`](https://github.com/dashpay/dash/commit/aa495405b) [GUI] Realign tx filter widgets (#2485)
-- [`f4ef388de`](https://github.com/dashpay/dash/commit/f4ef388de) Update PS help text for the new denom (#2471)
-- [`7cabbadef`](https://github.com/dashpay/dash/commit/7cabbadef) Implement context menu and extra info on double-click for DIP3 masternode list (#2459)
-- [`9232a455c`](https://github.com/dashpay/dash/commit/9232a455c) Do not hold cs_main while emitting messages in WalletModel::prepareTransaction (#2463)
-- [`cf2b547b7`](https://github.com/dashpay/dash/commit/cf2b547b7) Implement tab for DIP3 MN list (#2454)
-- [`46462d682`](https://github.com/dashpay/dash/commit/46462d682) Add a column for IS lock status on Transactions tab (#2433)
-- [`5ecd91b05`](https://github.com/dashpay/dash/commit/5ecd91b05) Fix ps collateral/denom creation tx category confusion (#2430)
-- [`4a78b161f`](https://github.com/dashpay/dash/commit/4a78b161f) PrivateSend spending txes should have "outgoing" icon on overview screen (#2396)
-- [`d7e210341`](https://github.com/dashpay/dash/commit/d7e210341) Fixes inaccurate round count in CoinControlDialog (#2137)
-
-### Cleanups/Tests/Docs/Other
-- [`b5670c475`](https://github.com/dashpay/dash/commit/b5670c475) Set CLIENT_VERSION_IS_RELEASE to true (#2591)
-- [`a05eeb21e`](https://github.com/dashpay/dash/commit/a05eeb21e) Update immer to c89819df92191d6969a6a22c88c72943b8e25016 (#2626)
-- [`10b3736bd`](https://github.com/dashpay/dash/commit/10b3736bd) [0.13.0.x] Translations201901 (#2592)
-- [`34d2a6038`](https://github.com/dashpay/dash/commit/34d2a6038) Release notes 0.13.0.0 draft (#2583)
-- [`c950a8f51`](https://github.com/dashpay/dash/commit/c950a8f51) Merge v0.12.3.4 commits into develop (#2582)
-- [`6dfceaba5`](https://github.com/dashpay/dash/commit/6dfceaba5) Force FlushStateToDisk on ConnectTip/DisconnectTip while not in IBD (#2560)
-- [`552d9089e`](https://github.com/dashpay/dash/commit/552d9089e) Update testnet seeds to point to MNs that are on the new chain (#2558)
-- [`63b58b1e9`](https://github.com/dashpay/dash/commit/63b58b1e9) Reintroduce BLSInit to correctly set secure alloctor callbacks (#2543)
-- [`cbd030352`](https://github.com/dashpay/dash/commit/cbd030352) Serialize the block header in CBlockHeader::GetHash() (#2531)
-- [`3a6bd8d23`](https://github.com/dashpay/dash/commit/3a6bd8d23) Call ProcessTick every second, handle tick cooldown inside (#2522)
-- [`973a7f6dd`](https://github.com/dashpay/dash/commit/973a7f6dd) Fix GUI warnings in debug.log (#2521)
-- [`c248c48e4`](https://github.com/dashpay/dash/commit/c248c48e4) Try to fix a few sporadic instant send failures in DIP3 tests  (#2500)
-- [`7a709b81d`](https://github.com/dashpay/dash/commit/7a709b81d) Perform less instant send tests in DIP3 tests (#2499)
-- [`245c3220e`](https://github.com/dashpay/dash/commit/245c3220e) Sync blocks before creating TXs (#2496)
-- [`65528e9e7`](https://github.com/dashpay/dash/commit/65528e9e7) Bump masternodeman cache version (#2467)
-- [`6c190d1bb`](https://github.com/dashpay/dash/commit/6c190d1bb) Fix make deploy error on macos (#2475)
-- [`df7d12b41`](https://github.com/dashpay/dash/commit/df7d12b41) Add univalue test for real numbers (#2460)
-- [`614ff70b4`](https://github.com/dashpay/dash/commit/614ff70b4) Let ccache compress the cache by itself instead of compressing ccache.tar (#2456)
-- [`40fa1bb49`](https://github.com/dashpay/dash/commit/40fa1bb49) Add platform dependent include_directories in CMakeLists.txt (#2455)
-- [`12aba2592`](https://github.com/dashpay/dash/commit/12aba2592) Updating translations for de, es, fi, nl, pt, sk, zh_CN, zh_TW (#2451)
-- [`52bf5a6b0`](https://github.com/dashpay/dash/commit/52bf5a6b0) Install libxkbcommon0 in gitian-linux.yml
-- [`fefe34250`](https://github.com/dashpay/dash/commit/fefe34250) Update manpages
-- [`c60687fe6`](https://github.com/dashpay/dash/commit/c60687fe6) Sleep longer between attempts in sync_blocks
-- [`88498ba13`](https://github.com/dashpay/dash/commit/88498ba13) Apply suggestions from code review
-- [`91af72b18`](https://github.com/dashpay/dash/commit/91af72b18) Allow to specify how log to sleep between attempts in wait_until
-- [`f65e74682`](https://github.com/dashpay/dash/commit/f65e74682) Pass "-parallel=3" to reduce load on Travis nodes while testing
-- [`3c99d9e35`](https://github.com/dashpay/dash/commit/3c99d9e35) Fix test_fail_create_protx in DIP3 tests
-- [`4de70f0ac`](https://github.com/dashpay/dash/commit/4de70f0ac) Test P2SH/multisig payee addresses in DIP3 tests
-- [`5fc4072ca`](https://github.com/dashpay/dash/commit/5fc4072ca) Parallel ASN resolve and allow passing of input file names to makeseeds.py (#2432)
-- [`76a38f6ce`](https://github.com/dashpay/dash/commit/76a38f6ce)  Update defaultAssumeValid, nMinimumChainWork and checkpoints (#2428)
-- [`0e9ad207a`](https://github.com/dashpay/dash/commit/0e9ad207a) Update hardcoded seeds (#2429)
-- [`42ee369b1`](https://github.com/dashpay/dash/commit/42ee369b1) [Formatting] masternodelist.* clang+manual format (#2426)
-- [`e961c7134`](https://github.com/dashpay/dash/commit/e961c7134) Translations 201811 (#2249)
-- [`f0df5bffa`](https://github.com/dashpay/dash/commit/f0df5bffa) Clang evo folder and activemasternode.* (#2418)
-- [`98bdf35f9`](https://github.com/dashpay/dash/commit/98bdf35f9) bump PS copyright (#2417)
-- [`e9bb822c1`](https://github.com/dashpay/dash/commit/e9bb822c1) Clang format PrivateSend files (#2373)
-- [`bea590958`](https://github.com/dashpay/dash/commit/bea590958) Fix auto-IS tests (#2414)
-- [`f03629d6d`](https://github.com/dashpay/dash/commit/f03629d6d) Explicitly specify which branch of Wine to install (#2411)
-- [`5e829a3b1`](https://github.com/dashpay/dash/commit/5e829a3b1) Update Chia bls-signature to latest version (#2409)
-- [`51addf9a0`](https://github.com/dashpay/dash/commit/51addf9a0) Fix p2p-instantsend.py test (#2408)
-- [`7e8f07bb9`](https://github.com/dashpay/dash/commit/7e8f07bb9) A couple of fixes for shutdown sequence (#2406)
-- [`9c455caea`](https://github.com/dashpay/dash/commit/9c455caea) A couple of fixes for init steps (#2405)
-- [`6560ac64b`](https://github.com/dashpay/dash/commit/6560ac64b) Properly escape $ in Jenkinsfile.gitian (#2404)
-- [`70eb710b1`](https://github.com/dashpay/dash/commit/70eb710b1) Undefine DOUBLE after include Chia BLS headers (#2400)
-- [`052af81b4`](https://github.com/dashpay/dash/commit/052af81b4) Ensure correct order of destruction for BLS secure allocator (#2401)
-- [`c8804ea5a`](https://github.com/dashpay/dash/commit/c8804ea5a) Do not ignore patches in depends (#2399)
-- [`13f2eb449`](https://github.com/dashpay/dash/commit/13f2eb449) Force fvisibility=hidden when compiling on macos (#2398)
-- [`9eb9c99d5`](https://github.com/dashpay/dash/commit/9eb9c99d5) Bump version to 0.13.0 (#2386)
-- [`8f9b004ca`](https://github.com/dashpay/dash/commit/8f9b004ca) Support "fast" mode when calling sync_masternodes (#2383)
-- [`fcea333ba`](https://github.com/dashpay/dash/commit/fcea333ba) Rewrite handling of too long depends builds in .travis.yml (#2385)
-- [`d1debfc26`](https://github.com/dashpay/dash/commit/d1debfc26) Implement mt_pooled_secure_allocator and use it for BLS secure allocation (#2375)
-- [`0692de1c5`](https://github.com/dashpay/dash/commit/0692de1c5) Fix prepare_masternodes/create_masternodes in DashTestFramework (#2382)
-- [`6433a944a`](https://github.com/dashpay/dash/commit/6433a944a) [Trivial] typo Groupped -> Grouped (#2374)
-- [`59932401b`](https://github.com/dashpay/dash/commit/59932401b) Change internal references of Darksend to PrivateSend (#2372)
-- [`e3046adb3`](https://github.com/dashpay/dash/commit/e3046adb3) Clear devNetParams and mimic behavior of other param types (#2367)
-- [`de426e962`](https://github.com/dashpay/dash/commit/de426e962) Give tail calls enough time to print errors (#2376)
-- [`0402240a2`](https://github.com/dashpay/dash/commit/0402240a2) Bump CMAKE_CXX_STANDARD to 14 in CMakeLists.txt (#2377)
-- [`3c9237aa4`](https://github.com/dashpay/dash/commit/3c9237aa4) Use VersionBitsState instead of VersionBitsTipState to avoid cs_main lock (#2370)
-- [`c4351fd32`](https://github.com/dashpay/dash/commit/c4351fd32) revert 737, DEFAULT_TRANSACTION_MAXFEE = 0.1 * COIN (#2362)
-- [`1c9ed7806`](https://github.com/dashpay/dash/commit/1c9ed7806) GDB automation with Python script to measure memory usage in dashd (#1609)
-- [`d998dc13e`](https://github.com/dashpay/dash/commit/d998dc13e) Add cmake to non-mac gitian descriptors (#2360)
-- [`266dd3232`](https://github.com/dashpay/dash/commit/266dd3232) mkdir -p to allow re-start of failed chia build (#2359)
-- [`11a0cbf84`](https://github.com/dashpay/dash/commit/11a0cbf84) InstantSend-related tests refactoring (#2333)
-- [`3313bbd51`](https://github.com/dashpay/dash/commit/3313bbd51) Backport bitcoin #13623 Migrate gitian-build.sh to python (#2319)
-- [`7b76bbb57`](https://github.com/dashpay/dash/commit/7b76bbb57)  Update Chia BLS libs to latest master (#2357)
-- [`e2de632f8`](https://github.com/dashpay/dash/commit/e2de632f8) Move handling of `size != SerSize` into SetBuf/GetBuf (#2356)
-- [`81d60bc28`](https://github.com/dashpay/dash/commit/81d60bc28) Fix the issue with transaction amount precision in IS tests (#2353)
-- [`a45055384`](https://github.com/dashpay/dash/commit/a45055384) Fix qt configure to detect clang version correctly (#2344)
-- [`b99d94a0f`](https://github.com/dashpay/dash/commit/b99d94a0f) Minor build documentation updates (#2343)
-- [`464191698`](https://github.com/dashpay/dash/commit/464191698) Review fixes
-- [`9c8e4ac76`](https://github.com/dashpay/dash/commit/9c8e4ac76) Move bls stuff from crypto/ to bls/
-- [`bed1ded8b`](https://github.com/dashpay/dash/commit/bed1ded8b) Remove duplicated check (#2336)
-- [`89f744d06`](https://github.com/dashpay/dash/commit/89f744d06) pack of small cleanup fixes / optimizations (#2334)
-- [`9603c5290`](https://github.com/dashpay/dash/commit/9603c5290) Trivial: Codestyle fixes in InstantSend code (#2332)
-- [`90ad75911`](https://github.com/dashpay/dash/commit/90ad75911) Fix auto-IS and tests (#2331)
-- [`b3fc236af`](https://github.com/dashpay/dash/commit/b3fc236af) Fix mnodeman.cs vs cs_vPendingMasternodes vs cs_main deadlock (#2200)
-- [`80fd096b0`](https://github.com/dashpay/dash/commit/80fd096b0) Add ECDSA benchmarks
-- [`78675d9bb`](https://github.com/dashpay/dash/commit/78675d9bb) Add BLS and DKG benchmarks
-- [`3ee27c168`](https://github.com/dashpay/dash/commit/3ee27c168) Add highly parallelized worker/helper for BLS/DKG calculations
-- [`aa3b0aa8a`](https://github.com/dashpay/dash/commit/aa3b0aa8a) Add simple helpers/wrappers for BLS+AES based integrated encryption schemes (IES)
-- [`9ccf6f584`](https://github.com/dashpay/dash/commit/9ccf6f584) Implement wrappers around Chia BLS lib
-- [`3039d44d3`](https://github.com/dashpay/dash/commit/3039d44d3) Add Chia bls-signatures library to depends
-- [`f3dcb6916`](https://github.com/dashpay/dash/commit/f3dcb6916) Add cmake to ci/Dockerfile.builder
-- [`057d7445e`](https://github.com/dashpay/dash/commit/057d7445e) Add libgmp to depends
-- [`b0d0093d7`](https://github.com/dashpay/dash/commit/b0d0093d7) Add helper to rename all threads of a ctpl::thread_pool
-- [`47a162255`](https://github.com/dashpay/dash/commit/47a162255) Add ctpl header only library
-- [`407baccec`](https://github.com/dashpay/dash/commit/407baccec) Remove obsolete build-openbsd.md (#2328)
-- [`8a1b51356`](https://github.com/dashpay/dash/commit/8a1b51356) Backport: Fix Qt build with XCode (for depends) (#2325)
-- [`a5aca049d`](https://github.com/dashpay/dash/commit/a5aca049d) rename vars in mnsync to make more sense (#2308)
-- [`ee6a5a33b`](https://github.com/dashpay/dash/commit/ee6a5a33b) Gov cleanup + copyright bump (#2324)
-- [`d7e5f02ea`](https://github.com/dashpay/dash/commit/d7e5f02ea) Update build documentation (#2323)
-- [`bd8c54d12`](https://github.com/dashpay/dash/commit/bd8c54d12) A bit more verbosity for some critical errors (#2316)
-- [`a4ff2a19a`](https://github.com/dashpay/dash/commit/a4ff2a19a) Fix some warnings and do a couple of other trivial cleanups (#2315)
-- [`07208a4ae`](https://github.com/dashpay/dash/commit/07208a4ae) document spork system with doxygen comments (#2301)
-- [`2c1a17909`](https://github.com/dashpay/dash/commit/2c1a17909) cleanup: remove unused vars, includes, functions (#2306)
-- [`3d48824b4`](https://github.com/dashpay/dash/commit/3d48824b4) Update .clang-format to more accurately show the actual style (#2299)
-- [`8ea40102c`](https://github.com/dashpay/dash/commit/8ea40102c) Remove leftover RBF code from BTC (#2297)
-- [`76599aad3`](https://github.com/dashpay/dash/commit/76599aad3) Drop (pre-)70208 compatibility code (#2295)
-- [`016681cd3`](https://github.com/dashpay/dash/commit/016681cd3) Add support for serialization of bitsets and tuples (#2293)
-- [`2a95dd30c`](https://github.com/dashpay/dash/commit/2a95dd30c) Fix locking issues in DIP3 unit tests (#2285)
-- [`47ca06ab3`](https://github.com/dashpay/dash/commit/47ca06ab3) DIP3 integration tests (#2280)
-- [`ad6c2893c`](https://github.com/dashpay/dash/commit/ad6c2893c) Docs - Update Core version number in readme files (#2267)
-- [`bc7924d41`](https://github.com/dashpay/dash/commit/bc7924d41) Add unit tests for DIP3 and DIP4
-- [`d653ace99`](https://github.com/dashpay/dash/commit/d653ace99) Update CbTx in TestChainSetup
-- [`9674be8f9`](https://github.com/dashpay/dash/commit/9674be8f9) Refactor TestChain100Setup to allow different test chain setups
-- [`cb37c3972`](https://github.com/dashpay/dash/commit/cb37c3972) Bump PROTOCOL_VERSION to 70211, bump MIN_* protocols to 70210 (#2256)
-- [`b99886532`](https://github.com/dashpay/dash/commit/b99886532) add link for developer-notes in contributing (#2260)
-- [`fded838c9`](https://github.com/dashpay/dash/commit/fded838c9) RPC folder: Cleaned up brackets on if, while, for, BOOST_FOREACH. Some whitespace fixes (#2257)
-- [`5295c78cc`](https://github.com/dashpay/dash/commit/5295c78cc) Fix typo in "penalty" (#2247)
-- [`c566ce75d`](https://github.com/dashpay/dash/commit/c566ce75d) Update copyright in specialtx.h/cpp
-- [`e002c50b0`](https://github.com/dashpay/dash/commit/e002c50b0) Add "immer" functional/immutable containers library (#2244)
-- [`799e3c312`](https://github.com/dashpay/dash/commit/799e3c312) Perform Jenkins builds in /dash-src all the time to fix caching issues (#2242)
-- [`b6896387a`](https://github.com/dashpay/dash/commit/b6896387a) Move DIP1 transaction size checks out of ContextualCheckBlock and use ContextualCheckTransaction instead (#2238)
-- [`e415fd049`](https://github.com/dashpay/dash/commit/e415fd049) Revert CMasternodePayments::IsTransactionValid to the logic before the recent refactorings (#2237)
-- [`8da88ecf6`](https://github.com/dashpay/dash/commit/8da88ecf6) Don't crash when formatting in logging throws exceptions (#2231)
-- [`2e06f8133`](https://github.com/dashpay/dash/commit/2e06f8133) fix missed format parameter (#2229)
-- [`3d654b981`](https://github.com/dashpay/dash/commit/3d654b981) Build bionic base image in Jenkinsfile.gitian & update docs (#2226)
-- [`c09f57bd7`](https://github.com/dashpay/dash/commit/c09f57bd7) Backport move to Ubuntu Bionic and GCC7 in Gitian builds (#2225)
-- [`7cf9572c2`](https://github.com/dashpay/dash/commit/7cf9572c2) Backport Bitcoin #11881: Remove Python2 support (#2224)
-- [`633879cd2`](https://github.com/dashpay/dash/commit/633879cd2) Only use version 1 and 2 transactions for sighash_tests (#2219)
-- [`2d4e18537`](https://github.com/dashpay/dash/commit/2d4e18537) Some useful commits from the DIP3 PR in regard to integration tests (#2218)
-- [`106bab1ae`](https://github.com/dashpay/dash/commit/106bab1ae) Add new ParseXXX methods to easily parse UniValue values (#2211)
-- [`c4c610783`](https://github.com/dashpay/dash/commit/c4c610783) Use C++14 standard when building (#2209)
-- [`589a77013`](https://github.com/dashpay/dash/commit/589a77013) Correction to release date for 0.12.0 (#2205)
-- [`96435288f`](https://github.com/dashpay/dash/commit/96435288f) Move block template specific stuff from CBlock to CBlockTemplate (#2195)
-- [`3d002c946`](https://github.com/dashpay/dash/commit/3d002c946) Fix active masternode task schedule (#2193)
-- [`65b904526`](https://github.com/dashpay/dash/commit/65b904526) Add helpers GetSentinelString() and GetDaemonString() to CMasternodePing (#2192)
-- [`eb202e812`](https://github.com/dashpay/dash/commit/eb202e812) Use ccache in gitian builds (#2185)
-- [`b47617325`](https://github.com/dashpay/dash/commit/b47617325) Install python3 in gitian builds (#2182)
-- [`7a85e24c3`](https://github.com/dashpay/dash/commit/7a85e24c3) Remove deprecated gitian-rpi2.yml descriptor (#2183)
-- [`1681d6366`](https://github.com/dashpay/dash/commit/1681d6366) Replace Dash-specific threads with Dash-specific scheduled tasks (#2043)
-- [`dac090964`](https://github.com/dashpay/dash/commit/dac090964) remove dashpay.io dns seed entry (#2181)
-- [`753c2436b`](https://github.com/dashpay/dash/commit/753c2436b) Fix MissingPropertyException on Jenkins when no cache was found (#2180)
-- [`f3e380659`](https://github.com/dashpay/dash/commit/f3e380659) Move to in-docker CI builds and add Jenkins support (#2178)
-- [`23dde9f12`](https://github.com/dashpay/dash/commit/23dde9f12) Remove a few annoying debug prints from CMasternodeMan (#2179)
-- [`5036d7dfc`](https://github.com/dashpay/dash/commit/5036d7dfc) depends: Update Qt download url (#2177)
-- [`e23339d6f`](https://github.com/dashpay/dash/commit/e23339d6f) use nullptr in Dash-specific code (#2166)
-- [`42c193df0`](https://github.com/dashpay/dash/commit/42c193df0) replace map count/insert w/emplace in instantx.cpp (#2165)
-- [`fd70a1eb9`](https://github.com/dashpay/dash/commit/fd70a1eb9) iterator cleanup in several places (#2164)
-- [`df1be90ce`](https://github.com/dashpay/dash/commit/df1be90ce)  Update links to obsolete documentation (#2162)
-- [`448e92f4a`](https://github.com/dashpay/dash/commit/448e92f4a) GetOutPointPrivateSendRounds readability (#2149)
-- [`6da2837bd`](https://github.com/dashpay/dash/commit/6da2837bd) InstantSend Integration tests (#2141)
-- [`8ee9333bc`](https://github.com/dashpay/dash/commit/8ee9333bc) remove boost dependency from Dash-specific code (#2072)
-- [`a527845e4`](https://github.com/dashpay/dash/commit/a527845e4) Bump to 0.12.4.0 pre-release (#2167)
+See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.13.0.0...dashpay:v0.13.1.0).
+
+### Backports
+
+- [`da5a861c0`](https://github.com/dashpay/dash/commit/da5a861c0) Change the way invalid ProTxes are handled in `addUnchecked` and `existsProviderTxConflict` (#2691)
+- [`6ada90c11`](https://github.com/dashpay/dash/commit/6ada90c11) Call existsProviderTxConflict after CheckSpecialTx (#2690)
+- [`23eb70cb7`](https://github.com/dashpay/dash/commit/23eb70cb7) Add getspecialtxes rpc (#2668)
+- [`023f8a01a`](https://github.com/dashpay/dash/commit/023f8a01a) Fix bench log for payee and special txes (#2678)
+- [`8961a6acc`](https://github.com/dashpay/dash/commit/8961a6acc) Stop checking MN protocol version before signalling DIP3 (#2684)
+- [`e18916386`](https://github.com/dashpay/dash/commit/e18916386) Add missing help text for `operatorPayoutAddress` (#2679)
+- [`0d8cc0761`](https://github.com/dashpay/dash/commit/0d8cc0761) Invoke CheckSpecialTx after all normal TX checks have passed (#2673)
+- [`592210daf`](https://github.com/dashpay/dash/commit/592210daf) Bump block stats when adding commitment tx into block (#2654)
+- [`070ad103f`](https://github.com/dashpay/dash/commit/070ad103f) Wait for script checks to finish before messing with txes in Dash-specific way (#2652)
+- [`3a3586d5a`](https://github.com/dashpay/dash/commit/3a3586d5a) Use helper function to produce help text for params of `protx` rpcs (#2649)
+- [`332e0361c`](https://github.com/dashpay/dash/commit/332e0361c) Add checkbox to show only masternodes the wallet has keys for (#2627)
+
+### Other
+
+- [`bd0de4876`](https://github.com/dashpay/dash/commit/bd0de4876) Bump version to 0.13.1 (#2686)
 
 Credits
 =======
@@ -692,22 +100,8 @@ Thanks to everyone who directly contributed to this release:
 
 - Alexander Block
 - UdjinM6
-- PastaPastaPasta
-- gladcow
-- Nathan Marley
-- thephez
-- strophy
-- PaulieD
-- InhumanPerfection
-- Spencer Lievens
-- -k
-- Salisbury
-- Solar Designer
-- Oleg Girko
-- Anton Suprunchuk
-
-As well as everyone that submitted issues, reviewed pull requests or helped translating on
-[Transifex](https://www.transifex.com/projects/p/dash/).
+
+As well as everyone that submitted issues and reviewed pull requests.
 
 Older releases
 ==============
@@ -732,6 +126,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.13.0.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.13.0.0.md) released Jan/14/2019
 - [v0.12.3.4](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.4.md) released Dec/14/2018
 - [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
diff --git a/doc/release-notes/dash/release-notes-0.13.0.md b/doc/release-notes/dash/release-notes-0.13.0.md
new file mode 100644
index 000000000000..b4d058f90309
--- /dev/null
+++ b/doc/release-notes/dash/release-notes-0.13.0.md
@@ -0,0 +1,749 @@
+Dash Core version 0.13.0.0
+==========================
+
+Release is now available from:
+
+  <https://www.dash.org/downloads/#wallets>
+
+This is a new major version release, bringing new features, various bugfixes and other improvements.
+
+Please report bugs using the issue tracker at github:
+
+  <https://github.com/dashpay/dash/issues>
+
+
+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). If you upgrade after DIP0003 activation you will
+have to reindex (start with -reindex-chainstate or -reindex) to make sure
+your wallet has all the new data synced.
+
+Downgrade warning
+-----------------
+
+### Downgrade to a version < 0.13.0.0
+
+Downgrading to a version smaller than 0.13 is only supported as long as DIP2/DIP3
+has not been activated. Activation will happen when enough miners signal compatibility
+through a BIP9 (bit 3) deployment.
+
+Notable changes
+===============
+
+DIP0002 - Special Transactions
+------------------------------
+Currently, new features and consensus mechanisms have to be implemented on top of the restrictions
+imposed by the simple nature of transactions. Since classical transactions can only carry inputs
+and outputs, they are most useful for financial transactions (i.e. transfers of quantities of Dash
+between addresses on the distributed ledger). These inputs and outputs carry scripts and signatures
+which are used to authorize and validate the transaction.
+
+To implement new on-chain features and consensus mechanisms which do not fit into this concept of
+financial transactions, it is often necessary to misuse the inputs/outputs and their corresponding
+scripts to add additional data and meaning to a transaction. For example, new opcodes would have
+to be introduced to mark a transaction as something special and add a payload. In other cases,
+OP_RETURN has been misused to store data on-chain.
+
+The introduction of special transactions will require the whole Dash ecosystem to perform a one-time
+mandatory update of all the software and libraries involved. Software and libraries will have to be
+changed so that they can differentiate between classical transactions and special transactions.
+Deserialization of a classical transaction remains unchanged. Deserialization of a special transaction
+requires the software/library to at least implement skipping and ignoring the extra_payload field.
+Validation and processing of the inputs and outputs of a special transaction must remain identical to
+classical transactions.
+
+Read more: https://github.com/dashpay/dips/blob/master/dip-0002.md
+
+DIP0003 - Deterministic Masternode Lists
+----------------------------------------
+This DIP provides on-chain consensus for masternode lists that in turn allow for deterministic quorum
+derivation and service scoring of masternode rewards.
+
+In the previous system, each node maintained its own individual masternode list. Masternodes gained
+entry to that masternode list after the owner created a 1000 Dash UTXO and the masternode broadcast
+a "masternode broadcast/announcement" P2P message. This in turn set the masternode to a PRE_ENABLED
+state in the list maintained by each node. Masternodes then regularly broadcasted ping messages to
+keep the masternode in ENABLED state.
+
+The previous system was maintained with consensus mechanisms that predated Satoshi Nakamoto’s solution
+to the Byzantine Generals Problem. This meant that each node needed to maintain their own individual
+masternode list with P2P messages and not a blockchain based solution. Due to the nature of the P2P
+system, there was no guarantee that nodes would come to the same conclusion on what the masternode
+list ought to look like. Discrepancies might, for example, occur due to a different order of message
+reception or if messages had not been received at all. This posed some risks in regard to consensus
+and limited the possible uses of quorums by the system.
+
+Additionally, the previous system required a complicated and failure prone "masternode sync" after
+the initial startup of the node. After the blockchain was synced, the node would request the current
+masternode list, the reward payment votes, and then verify the received list. This process tended to
+take an unnecessarily long amount of time and sometimes resulted in failure.
+
+In the new system, the masternode list is derived entirely from information found on-chain. New
+masternodes are added by new special transactions called Provider Registration Transactions
+(abbreviated as ProRegTx). They are only removed by spending the collateral. A ProRegTx is a special
+transaction which includes either a 1000-Dash collateral payment or a reference to it, along with
+other payload information (DIP0002).
+
+The new system is going to be activated via combination of a BIP9-like deployment (bit 3) and new spork
+(`SPORK_15_DETERMINISTIC_MNS_ENABLED`).
+
+Read more: https://github.com/dashpay/dips/blob/master/dip-0003.md
+Upgrade instructions: https://docs.dash.org/DIP3-masternode-upgrade
+
+DIP0004 - Simplified Verification of Deterministic Masternode Lists
+-------------------------------------------------------------------
+A verifiable and correct masternode list is foundational to many Dash features, including verification
+of an InstantSend transaction, mixing in PrivateSend and many features of Evolution. The deterministic
+masternode lists introduced by DIP0003 enable full derivation and verification of a masternode list via
+on-chain data. This, however, requires the full chain to be available to construct or verify this list.
+A SPV client does not have the full chain and thus would have to rely on a list provided by one or more
+nodes in the network. This provided list must be verifiable by the SPV client without needing the full
+chain. This DIP proposes additions to the block’s coinbase transaction and new P2P messages to get and
+update a masternode list with additional proof data.
+
+Read more: https://github.com/dashpay/dips/blob/master/dip-0004.md
+
+Mining
+------
+Please note that masternode payments in `getblocktemplate` rpc are now returned as an array and not as
+a single object anymore. Make sure to apply corresponding changes to your pool software.
+
+Also, deterministic masternodes can now set their payout address to a P2SH address. The most common use
+case for P2SH is multisig but script can be pretty much anything. If your pool software doesn't recognize
+P2SH addresses, the simplest way to fix it is to use `script` field which shows scriptPubKey for each
+entry of masternode payments array in `getblocktemplate`.
+
+And finally, after DIP0003 activation your pool software must be able to produce Coinbase Special
+Transaction https://github.com/dashpay/dips/blob/master/dip-0004.md#coinbase-special-transaction.
+Use `coinbase_payload` from `getblocktemplate` to get extra payload needed to construct this transaction.
+
+PrivateSend
+-----------
+With further refactoring of PrivateSend code it became possible to implement mixing in few parallel
+mixing sessions at once from one single wallet. You can set number of mixing sessions via
+`privatesendsessions` cmd-line option or dash.conf. You can pick any number of sessions between 1 and 10,
+default is 4 which should be good enough for most users. For this feature to work you should also make
+sure that `privatesendmultisession` is set to `1` via cmd-line or `Enable PrivateSend multi-session` is
+enabled in GUI.
+
+Introducing parallel mixing sessions should speed mixing up which makes it reasonable to add a new
+mixing denom (0.00100001 DASH) now while keeping all the old ones too. It also makes sense to allow more
+mixing rounds now, so the new default number of rounds is 4 and the maximum number of rounds is 16 now.
+
+You can also adjust rounds and amount via `setprivatesendrounds` and `setprivatesendamount` RPC commands
+which override corresponding cmd-line params (`privatesendrounds` and `privatesendamount` respectively).
+
+NOTE: Introducing the new denom and a couple of other changes made it incompatible with mixing on
+masternodes running on pre-0.13 software. Please keep using 0.12.3 local wallet to mix your coins until
+there is some significant number of masternodes running on version 0.13 to make sure you have enough
+masternodes to choose from when the wallet picks one to mix funds on.
+
+InstantSend
+-----------
+With further improvements of networking code it's now possible to handle more load, so we are changing
+InstantSend to be always-on for so called "simple txes" - transactions with 4 or less inputs. Such
+transactions will be automatically locked even if they only pay minimal fee. According to stats, this
+means that up to 90% of currently observed transactions will became automatically locked via InstantSend
+with no additional cost to end users or any additional effort from wallet developers or other service
+providers.
+
+This feature is going to be activated via combination of a BIP9-like deployment (we are reusing bit 3)
+and new spork (`SPORK_16_INSTANTSEND_AUTOLOCKS`).
+
+Historically, InstantSend transactions were shown in GUI and RPC with more confirmations than regular ones,
+which caused quite a bit of confusion. This will no longer be the case, instead we are going to show real
+blockchain confirmations only and a separate indicator to show if transaction was locked via InstantSend
+or not. For GUI it's color highlight and a new column, for RPC commands - `instantlock` field and `addlocked`
+param.
+
+One of the issues with InstantSend adoption by SPV wallets (besides lack of Deterministic Masternode List)
+was inability to filter all InstantSend messages the same way transactions are filtered. This should be
+fixed now and SPV wallets should only get lock votes for transactions they are interested in.
+
+Another popular request was to preserve information about InstantSend locks between wallet restarts, which
+is now implemented. This data is stored in a new cache file `instantsend.dat`. You can safely remove it,
+if you don't need information about recent transaction locks for some reason (NOTE: make sure it's not one
+of your wallets!).
+
+We also added new ZMQ notifications for double-spend attempts which try to override transactions locked
+via InstantSend - `zmqpubrawinstantsenddoublespend` and `zmqpubhashinstantsenddoublespend`.
+
+Sporks
+------
+There are a couple of new sporks introduced in this version `SPORK_15_DETERMINISTIC_MNS_ENABLED` (block
+based) and `SPORK_16_INSTANTSEND_AUTOLOCKS` (timestamp based). There is aslo `SPORK_17_QUORUM_DKG_ENABLED`
+(timestamp based) which is going to be used on testnet only for now.
+
+Spork data is stored in a new cache file (`sporks.dat`) now.
+
+Governance
+----------
+Introduction of Deterministic Masternodes requires replacing of the old masternode private key which was used
+both for operating a MN and for voting on proposals with a set of separate keys, preferably fresh new ones.
+This means that votes casted for proposals by Masternode Owners via the old system will no longer be valid
+after DIP0003 activation and must be re-casted using the new voting key.
+
+Also, you can now get notifications about governance objects or votes via new ZMQ notifications:
+`zmqpubhashgovernancevote`, `zmqpubhashgovernanceobject`, `zmqpubrawgovernancevote` and
+`zmqpubhashgovernanceobject`.
+
+GUI changes
+-----------
+Masternodes tab has a new section dedicated to DIP0003 registered masternodes now. After DIP0003 activation
+this will be the only section shown here, the two old sections for non-deterministic masternodes will no
+longer be available.
+
+There are changes in the way InstantSend transactions are displayed, see `InstantSend` section above.
+
+Some other (mostly minor) issues were also fixed, see `GUI` part of `0.13.0.0 Change log` section below for
+detailed list of fixes.
+
+RPC changes
+-----------
+There are a few changes in existing RPC interfaces in this release:
+- `gobject prepare` allows to send proposal transaction as an InstantSend one and also accepts an UTXO reference to spend;
+- `masternode status` and `masternode list` show some DIP0003 related info now;
+- `previousbits` and `coinbase_payload` fields were added in `getblocktemplate`;
+- `getblocktemplate` now returns an array for masternode payments instead of a single object (miners and mining pools have to upgrade their software to support multiple masternode payees);
+- masternode and superblock payments in `getblocktemplate` show payee scriptPubKey in `script` field in addition to payee address in `payee`;
+- `getblockchaininfo` shows BIP9 deployment progress;
+- `help command subCommand` should give detailed help for subcommands e.g. `help protx list`;
+- `compressed` option in `masternode genkey`;
+- `dumpwallet` shows info about dumped wallet and warns user about security issues;
+- `instantlock` field added in output of `getrawmempool`, `getmempoolancestors`, `getmempooldescendants`, `getmempoolentry`,
+`getrawtransaction`, `decoderawtransaction`, `gettransaction`, `listtransactions`, `listsinceblock`;
+- `addlocked` param added to `getreceivedbyaddress`, `getreceivedbyaccount`, `getbalance`, `sendfrom`, `sendmany`,
+`listreceivedbyaddress`, `listreceivedbyaccount`, `listaccounts`.
+
+There are also new RPC commands:
+- `protx` (`list`, `info`, `diff`, `register`, `register_fund`, `register_prepare`,
+`register_submit`, `update_service`, `update_registrar`, `revoke`);
+- `bls generate`;
+- `setprivatesendrounds`;
+- `setprivatesendamount`.
+
+See `help command` in rpc for more info.
+
+Command-line options
+--------------------
+
+New cmd-line options:
+- `masternodeblsprivkey`;
+- `minsporkkeys`;
+- `privatesendsessions`;
+- `zmqpubrawinstantsenddoublespend`;
+- `zmqpubhashinstantsenddoublespend`;
+- `zmqpubhashgovernancevote`;
+- `zmqpubhashgovernanceobject`;
+- `zmqpubrawgovernancevote`;
+- `zmqpubhashgovernanceobject`.
+
+Some of them are Devnet only:
+- `budgetparams`;
+- `minimumdifficultyblocks`;
+- `highsubsidyblocks`;
+- `highsubsidyfactor`.
+
+Few cmd-line options are no longer supported:
+- `instantsenddepth`;
+- `mempoolreplacement`.
+
+See `Help -> Command-line options` in Qt wallet or `dashd --help` for more info.
+
+Lots of refactoring and bug fixes
+---------------------------------
+
+A lot of refactoring, code cleanups and other small fixes were done in this release.
+
+0.13.0.0 Change log
+===================
+
+See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.12.3.4...dashpay:v0.13.0.0).
+
+### Network
+- [`03a6865d9`](https://github.com/dashpay/dash/commit/03a6865d9) Enforce correct port on mainnet for DIP3 MNs (#2576)
+- [`3f26ed78c`](https://github.com/dashpay/dash/commit/3f26ed78c) Backport network checks missing in CActiveDeterministicMasternodeManager::Init() (#2572)
+- [`7c7500864`](https://github.com/dashpay/dash/commit/7c7500864) Also stop asking other peers for a TX when ProcessTxLockRequest fails (#2529)
+- [`19a6f718d`](https://github.com/dashpay/dash/commit/19a6f718d) Don't respond with getdata for legacy inv types when spork15 is active (#2528)
+- [`22dcec71a`](https://github.com/dashpay/dash/commit/22dcec71a) Punish nodes which keep requesting and then rejecting blocks (#2518)
+- [`a18ca49a2`](https://github.com/dashpay/dash/commit/a18ca49a2) Disconnect peers with version < 70212 after DIP3 activation via BIP9 (#2497)
+- [`a57e9dea7`](https://github.com/dashpay/dash/commit/a57e9dea7) Fix filtering of the lock votes for SPV nodes. (#2468)
+- [`c6cf4d9a4`](https://github.com/dashpay/dash/commit/c6cf4d9a4) Relay txes through MN network faster than through regular nodes (#2397)
+- [`e66c4e184`](https://github.com/dashpay/dash/commit/e66c4e184) Don't revert to INV based block announcements when the previous block is the devnet genesis block (#2388)
+- [`b5142ee2c`](https://github.com/dashpay/dash/commit/b5142ee2c) Implement RemoveAskFor to indicate that we're not interested in an item anymore (#2384)
+- [`53e12b7b4`](https://github.com/dashpay/dash/commit/53e12b7b4) Don't bail out from ProcessMasternodeConnections in regtest (#2368)
+- [`31759a44d`](https://github.com/dashpay/dash/commit/31759a44d) Fix tx inv throughput (#2300)
+- [`9d90b4fa4`](https://github.com/dashpay/dash/commit/9d90b4fa4) Honor filterInventoryKnown for non-tx/non-block items (#2292)
+- [`6764dafec`](https://github.com/dashpay/dash/commit/6764dafec) Skip initial masternode list sync if spork 15 is active
+- [`fced9a4b8`](https://github.com/dashpay/dash/commit/fced9a4b8) Ban peers that send us MNLISTDIFF messages
+- [`d3ac86206`](https://github.com/dashpay/dash/commit/d3ac86206) Implement GETMNLISTDIFF and MNLISTDIFF P2P messages
+- [`40eee1775`](https://github.com/dashpay/dash/commit/40eee1775) Fix sync in regtest (again) (#2241)
+- [`c4ee2c89e`](https://github.com/dashpay/dash/commit/c4ee2c89e) Fix mnsync in regtest (#2202)
+
+### Mining
+- [`f96563462`](https://github.com/dashpay/dash/commit/f96563462) Fix check for nTemporaryTestnetForkDIP3Height (#2508)
+- [`80656038f`](https://github.com/dashpay/dash/commit/80656038f) Bump nTemporaryTestnetForkHeight to 274000 (#2498)
+- [`1c25356ff`](https://github.com/dashpay/dash/commit/1c25356ff) Allow to use low difficulty and higher block rewards for devnet (#2369)
+- [`3cc4ac137`](https://github.com/dashpay/dash/commit/3cc4ac137) Fix crash bug with duplicate inputs within a transaction (#2302)
+- [`e6b699bc2`](https://github.com/dashpay/dash/commit/e6b699bc2) Enforce MN and superblock payments in same block
+- [`c7f75afdd`](https://github.com/dashpay/dash/commit/c7f75afdd) Fix nulldummy tests by creating correct DIP4 coinbase transactions
+- [`bcc071957`](https://github.com/dashpay/dash/commit/bcc071957) Calculate and enforce DIP4 masternodes merkle root in CbTx
+- [`0a086898f`](https://github.com/dashpay/dash/commit/0a086898f) Implement and enforce CbTx with correct block height and deprecate BIP34
+
+### RPC
+- [`a22f1bffe`](https://github.com/dashpay/dash/commit/a22f1bffe) Remove support for "0" as an alternative to "" when the default is requested (#2622) (#2624)
+- [`18e1edabf`](https://github.com/dashpay/dash/commit/18e1edabf) Backport 2618 to v0.13.0.x (#2619)
+- [`0dce846d5`](https://github.com/dashpay/dash/commit/0dce846d5) Add an option to use specific address as a source of funds in protx rpc commands (otherwise use payoutAddress/operatorPayoutAddress) (#2581)
+- [`e71ea29e6`](https://github.com/dashpay/dash/commit/e71ea29e6) Add ownerAddr and votingAddr to CDeterministicMNState::ToJson (#2571)
+- [`999a51907`](https://github.com/dashpay/dash/commit/999a51907) Fix optional revocation reason parameter for "protx revoke" and a few help strings (#2568)
+- [`c08926146`](https://github.com/dashpay/dash/commit/c08926146) Unify "protx list" options (#2559)
+- [`e9f7142ed`](https://github.com/dashpay/dash/commit/e9f7142ed) Bump PROTOCOL_VERSION and DMN_PROTO_VERSION to 70213 (#2557)
+- [`818f0f464`](https://github.com/dashpay/dash/commit/818f0f464) Allow consuming specific UTXO in gobject prepare command (#2482)
+- [`1270b7122`](https://github.com/dashpay/dash/commit/1270b7122) Use a verbosity instead of two verbose parameters (#2506)
+- [`f6f6d075d`](https://github.com/dashpay/dash/commit/f6f6d075d) Still support "protx list" and "protx diff" when wallet is disabled at compile time (#2511)
+- [`5a3f64310`](https://github.com/dashpay/dash/commit/5a3f64310) Deserialize CFinalCommitmentTxPayload instead of CFinalCommitment in TxToJSON (#2510)
+- [`5da4c9728`](https://github.com/dashpay/dash/commit/5da4c9728) Use "registered" as default for "protx list" (#2513)
+- [`fc6d651c4`](https://github.com/dashpay/dash/commit/fc6d651c4) Fix crashes in "protx" RPCs when wallet is disabled (#2509)
+- [`ba49a4a16`](https://github.com/dashpay/dash/commit/ba49a4a16) Trivial: protx fund_register RPC help corrections (#2502)
+- [`45421b1a3`](https://github.com/dashpay/dash/commit/45421b1a3) Add IS parameter for gobject prepare (#2452)
+- [`2ba1ff521`](https://github.com/dashpay/dash/commit/2ba1ff521) Use ParseFixedPoint instead of ParseDoubleV in "protx register" commands (#2458)
+- [`e049f9c1e`](https://github.com/dashpay/dash/commit/e049f9c1e) fix protx register rpc help (#2461)
+- [`eb2103760`](https://github.com/dashpay/dash/commit/eb2103760) trivail, clarifies help text for protx register (#2462)
+- [`76e93c7d7`](https://github.com/dashpay/dash/commit/76e93c7d7) Corrections to incorrect syntax in RPC help (#2466)
+- [`3c1f44c3a`](https://github.com/dashpay/dash/commit/3c1f44c3a) Make sure protx_update_registrar adds enough funds for the fees
+- [`d130f25ac`](https://github.com/dashpay/dash/commit/d130f25ac) Fix check for number of params to protx_update_service (#2443)
+- [`adf9c87e2`](https://github.com/dashpay/dash/commit/adf9c87e2) Fix protx/bls rpc help (#2438)
+- [`579c83e88`](https://github.com/dashpay/dash/commit/579c83e88) Add coinbase_payload to getblocktemplate help (#2437)
+- [`3685c85e7`](https://github.com/dashpay/dash/commit/3685c85e7) Show BIP9 progress in getblockchaininfo (#2435)
+- [`da3e3db4d`](https://github.com/dashpay/dash/commit/da3e3db4d) Fix sub-command help for masternode, gobject and protx rpcs (#2425)
+- [`adad3fcfe`](https://github.com/dashpay/dash/commit/adad3fcfe) RPC: protx help corrections (#2422)
+- [`1d56dffda`](https://github.com/dashpay/dash/commit/1d56dffda) Unify help display logic for various "complex" rpc commands (#2415)
+- [`02442673d`](https://github.com/dashpay/dash/commit/02442673d) Trivial: Correct protx diff RPC help (#2410)
+- [`1f56600c4`](https://github.com/dashpay/dash/commit/1f56600c4) Trivial: Protx operator reward clarification (#2407)
+- [`7011fec1b`](https://github.com/dashpay/dash/commit/7011fec1b) RPC: Add help details for the bls RPC (#2403)
+- [`50f133ad0`](https://github.com/dashpay/dash/commit/50f133ad0) Add merkle tree and coinbase transaction to the `protx diff` rpc command (#2392)
+- [`25b6dae9e`](https://github.com/dashpay/dash/commit/25b6dae9e) Code style and RPC help string cleanups for DIP2/DIP3 (#2379)
+- [`0ad2906c5`](https://github.com/dashpay/dash/commit/0ad2906c5) Clarify addlocked description in getbalance RPC (#2364)
+- [`547b81dd0`](https://github.com/dashpay/dash/commit/547b81dd0) log `gobject prepare` params (#2317)
+- [`d932d2c4e`](https://github.com/dashpay/dash/commit/d932d2c4e) Add instantlock field to getrawtransaction rpc output (#2314)
+- [`c3d6b0651`](https://github.com/dashpay/dash/commit/c3d6b0651) Remove redundant check for unknown commands in masternode RPC (#2279)
+- [`44706dc88`](https://github.com/dashpay/dash/commit/44706dc88) Implement projection of MN reward winners in "masternode winners"
+- [`2d8f1244c`](https://github.com/dashpay/dash/commit/2d8f1244c) Implement 'masternode info <proTxHash>' RPC
+- [`e2a9dbbce`](https://github.com/dashpay/dash/commit/e2a9dbbce) Better "masternode status" for deterministic masternodes
+- [`50ac6fb3a`](https://github.com/dashpay/dash/commit/50ac6fb3a) Throw exception when trying to invoke start-xxx RPC in deterministic mode
+- [`58aa81364`](https://github.com/dashpay/dash/commit/58aa81364) Implement "protx revoke" RPC
+- [`185416b97`](https://github.com/dashpay/dash/commit/185416b97) Implement "protx update_registrar" RPC
+- [`32951f795`](https://github.com/dashpay/dash/commit/32951f795) Implement "protx update_service" RPC
+- [`5e3abeca2`](https://github.com/dashpay/dash/commit/5e3abeca2) Implement "protx list" RPC
+- [`c77242346`](https://github.com/dashpay/dash/commit/c77242346) Implement "protx register" RPC
+- [`1c2565804`](https://github.com/dashpay/dash/commit/1c2565804) Refactor `masternode` and `gobject` RPCs to support `help command subCommand` syntax (#2240)
+- [`fb4d301a2`](https://github.com/dashpay/dash/commit/fb4d301a2) Add extraPayloadSize/extraPayload fields to RPC help
+- [`2997d6d26`](https://github.com/dashpay/dash/commit/2997d6d26) add compressed option to `masternode genkey` (#2232)
+- [`98ed90cbb`](https://github.com/dashpay/dash/commit/98ed90cbb) adds rpc calls for `setprivatesendrounds` and `setprivatesendamount` (#2230)
+- [`50eb98d90`](https://github.com/dashpay/dash/commit/50eb98d90) Prepare for DIP3 operator reward payments and switch to array in getblocktemplate (#2216)
+- [`a959f60aa`](https://github.com/dashpay/dash/commit/a959f60aa) De-duplicate "gobject vote-alias" and "gobject "vote-many" code (#2217)
+- [`566fa5ec3`](https://github.com/dashpay/dash/commit/566fa5ec3) Add support for "help command subCommand" (#2210)
+- [`4cd969e3d`](https://github.com/dashpay/dash/commit/4cd969e3d) Add `previousbits` field to `getblocktemplate` output (#2201)
+- [`ac30196bc`](https://github.com/dashpay/dash/commit/ac30196bc) Show some info about the wallet dumped via dumpwallet (#2191)
+
+### LLMQ and Deterministic Masternodes
+- [`a3b01dfbe`](https://github.com/dashpay/dash/commit/a3b01dfbe) Gracefully shutdown on evodb inconsistency instead of crashing (#2611) (#2620)
+- [`3861c6a82`](https://github.com/dashpay/dash/commit/3861c6a82) Add BIP9 deployment for DIP3 on mainnet (#2585)
+- [`587911b36`](https://github.com/dashpay/dash/commit/587911b36) Fix IsBlockPayeeValid (#2577)
+- [`3c30a6aff`](https://github.com/dashpay/dash/commit/3c30a6aff) Add missing masternodeblsprivkey help text (#2569)
+- [`378dadd0f`](https://github.com/dashpay/dash/commit/378dadd0f) Ensure EvoDB consistency for quorum commitments by storing the best block hash (#2537)
+- [`2127a426b`](https://github.com/dashpay/dash/commit/2127a426b) Further refactoring of CQuorumBlockProcessor (#2545)
+- [`1522656d6`](https://github.com/dashpay/dash/commit/1522656d6) Correctly handle spent collaterals for MNs that were registered in the same block (#2553)
+- [`583035337`](https://github.com/dashpay/dash/commit/583035337) Track operator key changes in mempool and handle conflicts (#2540)
+- [`88f7bf0d8`](https://github.com/dashpay/dash/commit/88f7bf0d8) Don't delete/add values to the unique property map when it's null (#2538)
+- [`15414dac2`](https://github.com/dashpay/dash/commit/15414dac2) Refactor CQuorumBlockProcessor and CDeterministicMNManager (#2536)
+- [`d9b28fe1a`](https://github.com/dashpay/dash/commit/d9b28fe1a) Introduce dummy (ping-like) contributions for the dummy DKG (#2542)
+- [`df0d0cce7`](https://github.com/dashpay/dash/commit/df0d0cce7) Watch for changes in operator key and disable local MN (#2541)
+- [`511dc3714`](https://github.com/dashpay/dash/commit/511dc3714) Remove ProTxs from mempool that refer to a ProRegTx for which the collateral was spent (#2539)
+- [`225c2135e`](https://github.com/dashpay/dash/commit/225c2135e) Allow skipping of MN payments with zero duffs (#2534)
+- [`60867978d`](https://github.com/dashpay/dash/commit/60867978d) Avoid printing DIP3/DIP4 related logs twice (#2525)
+- [`7037f7c99`](https://github.com/dashpay/dash/commit/7037f7c99) Bail out from GetBlockTxOuts in case nBlockHeight is above tip+1 (#2523)
+- [`022491420`](https://github.com/dashpay/dash/commit/022491420) Print the state object when ProcessSpecialTxsInBlock fails in ConnectBlock (#2516)
+- [`812834dc5`](https://github.com/dashpay/dash/commit/812834dc5) Put height into mined commitments and use it instead of the special handling of quorumVvecHash (#2501)
+- [`a4f5ba38b`](https://github.com/dashpay/dash/commit/a4f5ba38b)  Implement CDummyDKG and CDummyCommitment until we have the real DKG merged (#2492)
+- [`66612cc4b`](https://github.com/dashpay/dash/commit/66612cc4b) Add 0 entry to vTxSigOps when adding quorum commitments (#2489)
+- [`f5beeafa1`](https://github.com/dashpay/dash/commit/f5beeafa1) Also restart MNs which didn't have the collateral moved, but do it later (#2483)
+- [`0123517b4`](https://github.com/dashpay/dash/commit/0123517b4) Implement PoSe based on information from LLMQ commitments (#2478)
+- [`22b5952c5`](https://github.com/dashpay/dash/commit/22b5952c5) Implement and enforce DIP6 commitments (#2477)
+- [`d40a5ce31`](https://github.com/dashpay/dash/commit/d40a5ce31)  Properly initialize confirmedHash in CSimplifiedMNListEntry (#2479)
+- [`5ffc31bce`](https://github.com/dashpay/dash/commit/5ffc31bce) Forbid version=0 in special TXs (#2473)
+- [`85157f9a9`](https://github.com/dashpay/dash/commit/85157f9a9) Few trivial fixes for DIP2/DIP3 (#2474)
+- [`b5947f299`](https://github.com/dashpay/dash/commit/b5947f299) Implement BuildSimplifiedDiff in CDeterministicMNList
+- [`6edad3745`](https://github.com/dashpay/dash/commit/6edad3745) Use ForEachMN and GetMN in BuildDiff instead of directly accessing mnMap
+- [`83aac461b`](https://github.com/dashpay/dash/commit/83aac461b) Allow P2SH/multisig addresses for operator rewards
+- [`f5864254c`](https://github.com/dashpay/dash/commit/f5864254c) Do not use keyIDCollateralAddress anymore when spork15 is active
+- [`5ccf556f3`](https://github.com/dashpay/dash/commit/5ccf556f3) GetMasternodeInfo with payee argument should do nothing when DIP3 is active
+- [`927e8bd79`](https://github.com/dashpay/dash/commit/927e8bd79) Also forbid reusing collateral key for owner/voting keys
+- [`826e7d063`](https://github.com/dashpay/dash/commit/826e7d063) Move internal collateral check to the else branch of the external collateral check
+- [`dc404e755`](https://github.com/dashpay/dash/commit/dc404e755) Allow P2SH for payout scripts
+- [`9adf8ad73`](https://github.com/dashpay/dash/commit/9adf8ad73) Remove restriction that forced use of same addresses for payout and collateral
+- [`7c1f11089`](https://github.com/dashpay/dash/commit/7c1f11089) Revert #2441 and retry fixing (#2444)
+- [`6761fa49f`](https://github.com/dashpay/dash/commit/6761fa49f) More checks for tx type
+- [`b84369663`](https://github.com/dashpay/dash/commit/b84369663) Be more specific about tx version in conditions
+- [`c975a986b`](https://github.com/dashpay/dash/commit/c975a986b) no cs_main in specialtxes
+- [`8bd5b231b`](https://github.com/dashpay/dash/commit/8bd5b231b) Log mempool payload errors instead of crashing via assert
+- [`658b7afd1`](https://github.com/dashpay/dash/commit/658b7afd1) Make error messages re payload a bit more specific
+- [`153afb906`](https://github.com/dashpay/dash/commit/153afb906) Restart MNs in DIP3 tests even if collateral has not moved (#2441)
+- [`4ad2f647c`](https://github.com/dashpay/dash/commit/4ad2f647c) Use proTxHash instead of outpoint when calculating masternode scores (#2440)
+- [`c27e62935`](https://github.com/dashpay/dash/commit/c27e62935) Allow reusing of external collaterals in DIP3 (#2427)
+- [`9da9d575a`](https://github.com/dashpay/dash/commit/9da9d575a) Allow collaterals for non-DIP3 MNs which were created after DIP3/BIP9 activation (#2412)
+- [`30a2b283a`](https://github.com/dashpay/dash/commit/30a2b283a) Sign ProRegTx collaterals with a string message instead of payload hash, split `protx register` into `prepare`/`submit` (#2395)
+- [`e34701295`](https://github.com/dashpay/dash/commit/e34701295) Fix crash when deterministic MN list is empty and keep paying superblocks in this case (#2387)
+- [`28a6007a4`](https://github.com/dashpay/dash/commit/28a6007a4) Prepare DIP3 for testnet and reuse DIP3 deployment for autoix deployment (#2389)
+- [`e3df91082`](https://github.com/dashpay/dash/commit/e3df91082) Allow referencing other TX outputs for ProRegTx collateral (#2366)
+- [`fdfb07742`](https://github.com/dashpay/dash/commit/fdfb07742) Update ProRegTx serialization order (#2378)
+- [`eaa856eb7`](https://github.com/dashpay/dash/commit/eaa856eb7) Remove nProtocolVersion and add mode/type fields to DIP3 (#2358)
+- [`c9d274518`](https://github.com/dashpay/dash/commit/c9d274518) Use BLS keys for the DIP3 operator key (#2352)
+- [`eaef90202`](https://github.com/dashpay/dash/commit/eaef90202) Don't use boost range adaptors in CDeterministicMNList (#2327)
+- [`6adc236d0`](https://github.com/dashpay/dash/commit/6adc236d0) Only use dataDir in CEvoDB when not in-memory (#2291)
+- [`8a878bfcf`](https://github.com/dashpay/dash/commit/8a878bfcf) Call InitializeCurrentBlockTip and activeMasternodeManager->Init after importing has finished (#2286)
+- [`6b3d65028`](https://github.com/dashpay/dash/commit/6b3d65028) After DIP3 activation, allow voting with voting keys stored in your wallet (#2281)
+- [`d8247dfff`](https://github.com/dashpay/dash/commit/d8247dfff) Use refactored payment logic when spork15 is active
+- [`60002b7dd`](https://github.com/dashpay/dash/commit/60002b7dd) Payout and enforce operator reward payments
+- [`2c481f0f8`](https://github.com/dashpay/dash/commit/2c481f0f8) Implement deterministic version of CMasternodePayments::IsScheduled
+- [`19fbf8ab7`](https://github.com/dashpay/dash/commit/19fbf8ab7) Move cs_main lock from CMasternode::UpdateLastPaid to CMasternodeMan
+- [`dc7292afa`](https://github.com/dashpay/dash/commit/dc7292afa) Implement new MN payments logic and add compatibility code
+- [`d4530eb7d`](https://github.com/dashpay/dash/commit/d4530eb7d) Put all masternodes in MASTERNODE_ENABLED state when spork15 is active
+- [`31b4f8354`](https://github.com/dashpay/dash/commit/31b4f8354) Forbid starting of legacy masternodes with non matching ProTx collateral values
+- [`5050a9205`](https://github.com/dashpay/dash/commit/5050a9205) Add compatibility code for FindRandomNotInVec and GetMasternodeScores
+- [`cc73422f8`](https://github.com/dashpay/dash/commit/cc73422f8) Add methods to add/remove (non-)deterministic MNs
+- [`7d14566bc`](https://github.com/dashpay/dash/commit/7d14566bc) Add compatibility code to CMasternodeMan so that old code is still compatible
+- [`27e8b48a6`](https://github.com/dashpay/dash/commit/27e8b48a6) Stop executing legacy MN list code when spork 15 is activated
+- [`d90b13996`](https://github.com/dashpay/dash/commit/d90b13996) Implement CActiveDeterministicMasternodeManager
+- [`a5e65aa37`](https://github.com/dashpay/dash/commit/a5e65aa37) Erase mnListCache entry on UndoBlock (#2254)
+- [`88e7888de`](https://github.com/dashpay/dash/commit/88e7888de) Try using cache in GetListForBlock before reading from disk (#2253)
+- [`9653af2f3`](https://github.com/dashpay/dash/commit/9653af2f3) Classes, validation and update logic for CProUpRevTX
+- [`1c68d1107`](https://github.com/dashpay/dash/commit/1c68d1107) Classes, validation and update logic for CProUpRegTX
+- [`8aca3b040`](https://github.com/dashpay/dash/commit/8aca3b040) Also check duplicate addresses for CProUpServTX in CTxMemPool
+- [`923fd6739`](https://github.com/dashpay/dash/commit/923fd6739) Implement CProUpServTx logic in CDeterministicMNManager
+- [`6ec0d7aea`](https://github.com/dashpay/dash/commit/6ec0d7aea) Classes and basic validation of ProUpServTx
+- [`255403e92`](https://github.com/dashpay/dash/commit/255403e92) Include proTx data in json formatted transactions
+- [`25545fc1e`](https://github.com/dashpay/dash/commit/25545fc1e) Split keyIDMasternode into keyIDOwner/keyIDOperator/keyIDVoting (#2248)
+- [`2c172873a`](https://github.com/dashpay/dash/commit/2c172873a) Don't allow non-ProTx masternode collaterals after DIP3 activation
+- [`9e8a86714`](https://github.com/dashpay/dash/commit/9e8a86714) Implementation of deterministic MNs list
+- [`76fd30894`](https://github.com/dashpay/dash/commit/76fd30894) Automatically lock ProTx collaterals when TX is added/loaded to wallet
+- [`cdd723ede`](https://github.com/dashpay/dash/commit/cdd723ede) Conflict handling for ProRegTx in mempool
+- [`958b84ace`](https://github.com/dashpay/dash/commit/958b84ace) Implementation of ProRegTx with basic validation (no processing)
+- [`c9a72e888`](https://github.com/dashpay/dash/commit/c9a72e888) Introduce CEvoDB for all evo related things, e.g. DIP3
+- [`4531f6b89`](https://github.com/dashpay/dash/commit/4531f6b89) Implement CDBTransaction and CScopedDBTransaction
+- [`e225cebcd`](https://github.com/dashpay/dash/commit/e225cebcd) Use previous block for CheckSpecialTx (#2243)
+- [`b92bd8997`](https://github.com/dashpay/dash/commit/b92bd8997) Fix mninfo search by payee (#2233)
+- [`8af7f6223`](https://github.com/dashpay/dash/commit/8af7f6223) Account for extraPayload when calculating fees in FundTransaction
+- [`b606bde9a`](https://github.com/dashpay/dash/commit/b606bde9a) Support version 3 transaction serialization in mininode.py
+- [`61bbe54ab`](https://github.com/dashpay/dash/commit/61bbe54ab) Add Get-/SetTxPayload helpers
+- [`cebf71bbc`](https://github.com/dashpay/dash/commit/cebf71bbc) Stubs for special TX validation and processing
+- [`d6c5a72e2`](https://github.com/dashpay/dash/commit/d6c5a72e2) Basic validation of version 3 TXs in CheckTransaction
+- [`a3c4ee3fd`](https://github.com/dashpay/dash/commit/a3c4ee3fd) DIP2 changes to CTransaction and CMutableTransaction
+- [`d20100ecd`](https://github.com/dashpay/dash/commit/d20100ecd) DIP0003 deployment
+- [`4d3518fe0`](https://github.com/dashpay/dash/commit/4d3518fe0) Refactor MN payee logic in preparation for DIP3 (#2215)
+- [`d946f21bd`](https://github.com/dashpay/dash/commit/d946f21bd) Masternode related refactorings in preparation of DIP3 (#2212)
+
+### PrivateSend
+- [`07309f0ec`](https://github.com/dashpay/dash/commit/07309f0ec) Allow up to MASTERNODE_MAX_MIXING_TXES (5) DSTXes per MN in a row (#2552)
+- [`ed53fce47`](https://github.com/dashpay/dash/commit/ed53fce47) Revert "Apply similar logic to vecMasternodesUsed" (#2503)
+- [`69bffed72`](https://github.com/dashpay/dash/commit/69bffed72) Do not sort resulting vector in SelectCoinsGroupedByAddresses (#2493)
+- [`bb11f1a63`](https://github.com/dashpay/dash/commit/bb11f1a63) Fix recent changes in DSA conditions (#2494)
+- [`6480ad1d5`](https://github.com/dashpay/dash/commit/6480ad1d5) Should check dsq queue regardless of the mixing state (#2491)
+- [`67483cd34`](https://github.com/dashpay/dash/commit/67483cd34) Fix dsq/dsa conditions (#2487)
+- [`9d4df466b`](https://github.com/dashpay/dash/commit/9d4df466b) Fix CreateDenominated failure for addresses with huge amount of inputs (#2486)
+- [`2b400f74b`](https://github.com/dashpay/dash/commit/2b400f74b) Base dsq/dstx thresholold on total number of up to date masternodes (#2465)
+- [`262454791`](https://github.com/dashpay/dash/commit/262454791) Add 5th denom, drop deprecated logic and bump min PS version (#2318)
+- [`23f169c44`](https://github.com/dashpay/dash/commit/23f169c44) Drop custom PS logic for guessing fees etc. from SelectCoins (#2371)
+- [`f7b0b5759`](https://github.com/dashpay/dash/commit/f7b0b5759) Pick rounds with the most inputs available to mix first (#2278)
+- [`727e940c0`](https://github.com/dashpay/dash/commit/727e940c0) Fix recently introduced PS bugs (#2330)
+- [`85a958a36`](https://github.com/dashpay/dash/commit/85a958a36) Drop dummy copy constructors in CPrivateSend*Session (#2305)
+- [`c6a0c5541`](https://github.com/dashpay/dash/commit/c6a0c5541) A couple of small fixes for mixing collaterals (#2294)
+- [`d192d642f`](https://github.com/dashpay/dash/commit/d192d642f) Move heavy coin selection out of the loop in SubmitDenominate (#2274)
+- [`28e0476f4`](https://github.com/dashpay/dash/commit/28e0476f4) Squash two logic branches in SubmitDenominate into one (#2270)
+- [`9b6eb4765`](https://github.com/dashpay/dash/commit/9b6eb4765) Include inputs with max rounds in SelectCoinsDark/SelectCoinsByDenominations (#2277)
+- [`55d7bb900`](https://github.com/dashpay/dash/commit/55d7bb900) Add an option to disable popups for PS mixing txes (#2272)
+- [`38ccfef3b`](https://github.com/dashpay/dash/commit/38ccfef3b) Identify PS collateral payments in transaction list a bit more accurate (#2271)
+- [`ad31dbbd7`](https://github.com/dashpay/dash/commit/ad31dbbd7) Add more variance to coin selection in PS mixing (#2261)
+- [`8c9cb2909`](https://github.com/dashpay/dash/commit/8c9cb2909) Revert 2075 (#2259)
+- [`b164bcc7a`](https://github.com/dashpay/dash/commit/b164bcc7a) Split PS into Manager and Session and allow running multiple mixing sessions in parallel (client side) (#2203)
+- [`d4d11476a`](https://github.com/dashpay/dash/commit/d4d11476a) Fix typo and grammar in PS error message (#2199)
+- [`a83ab5501`](https://github.com/dashpay/dash/commit/a83ab5501) Fix wallet lock check in DoAutomaticDenominating (#2196)
+- [`30fa8bc33`](https://github.com/dashpay/dash/commit/30fa8bc33) Make sure pwalletMain is not null whenever it's used in PS client (#2190)
+- [`3c89983db`](https://github.com/dashpay/dash/commit/3c89983db) Remove DarksendConfig (#2132)
+- [`43091a3ef`](https://github.com/dashpay/dash/commit/43091a3ef) PrivateSend Enhancement: Up default round count to 4 and allow user to mix up to 16 rounds (#2128)
+
+### InstantSend
+- [`35550a3f9`](https://github.com/dashpay/dash/commit/35550a3f9) Add quorumModifierHash to instant send lock vote (#2505)
+- [`fa8f4a10c`](https://github.com/dashpay/dash/commit/fa8f4a10c)  Include masternodeProTxHash in CTxLockVote (#2484)
+- [`624e50949`](https://github.com/dashpay/dash/commit/624e50949) Remove few leftovers of `-instantsenddepth`
+- [`733cd9512`](https://github.com/dashpay/dash/commit/733cd9512) Remove global fDIP0003ActiveAtTip and fix wrong use of VersionBitsState in auto IX (#2380)
+- [`5454bea37`](https://github.com/dashpay/dash/commit/5454bea37) Automatic InstantSend locks for "simple" transactions (#2140)
+- [`1e74bcace`](https://github.com/dashpay/dash/commit/1e74bcace) [ZMQ] Notify when an IS double spend is attempted (#2262)
+- [`6bcd868de`](https://github.com/dashpay/dash/commit/6bcd868de) Fix lockedByInstantSend initialization (#2197)
+- [`0a6f47323`](https://github.com/dashpay/dash/commit/0a6f47323) Remove dummy confirmations in RPC API and GUI for InstantSend transactions (#2040)
+- [`ace980834`](https://github.com/dashpay/dash/commit/ace980834) Extend Bloom Filter support to InstantSend related messages (#2184)
+- [`2c0d4c9d7`](https://github.com/dashpay/dash/commit/2c0d4c9d7) Save/load InstantSend cache (#2051)
+
+### Sporks
+- [`33f78d70e`](https://github.com/dashpay/dash/commit/33f78d70e) Do not accept sporks with nTimeSigned way too far into the future (#2578)
+- [`6c4b3ed8d`](https://github.com/dashpay/dash/commit/6c4b3ed8d) Load sporks before checking blockchain (#2573)
+- [`d94092b60`](https://github.com/dashpay/dash/commit/d94092b60) Fix spork propagation while in IBD and fix spork integration tests (#2533)
+- [`43e757bee`](https://github.com/dashpay/dash/commit/43e757bee) Amend SERIALIZATION_VERSION_STRING string for spork cache (#2339)
+- [`f7ab6c469`](https://github.com/dashpay/dash/commit/f7ab6c469) M-of-N-like sporks (#2288)
+- [`c2958733e`](https://github.com/dashpay/dash/commit/c2958733e) CSporkManager::Clear() should not alter sporkPubKeyID and sporkPrivKey (#2313)
+- [`8c0dca282`](https://github.com/dashpay/dash/commit/8c0dca282) Add versioning to spork cache (#2312)
+- [`5461e92bf`](https://github.com/dashpay/dash/commit/5461e92bf) Add spork to control deterministic MN lists activation
+- [`73c2ddde7`](https://github.com/dashpay/dash/commit/73c2ddde7) extract sporkmanager from sporkmessage (#2234)
+- [`1767e3457`](https://github.com/dashpay/dash/commit/1767e3457) Save/load spork cache (#2206)
+- [`075ca0903`](https://github.com/dashpay/dash/commit/075ca0903) Protect CSporkManager with critical section (#2213)
+
+### Governance
+- [`222e5b4f7`](https://github.com/dashpay/dash/commit/222e5b4f7) Remove proposal/funding votes from MNs that changed the voting key (#2570)
+- [`5185dd5b7`](https://github.com/dashpay/dash/commit/5185dd5b7) Use correct time field when removing pre-DIP3 votes (#2535)
+- [`d2ca9edde`](https://github.com/dashpay/dash/commit/d2ca9edde) Fix multiple issues with governance voting after spork15 activation (#2526)
+- [`08dc17871`](https://github.com/dashpay/dash/commit/08dc17871) Drop pre-DIP3 votes from current votes per MN per object (#2524)
+- [`0c1b683a0`](https://github.com/dashpay/dash/commit/0c1b683a0) Clear votes which were created before spork15 activation and use operator key for non-funding votes (#2512)
+- [`da4b5fb16`](https://github.com/dashpay/dash/commit/da4b5fb16) Remove an unused function from governance object collateral code (#2480)
+- [`8deb8e90f`](https://github.com/dashpay/dash/commit/8deb8e90f) Modernize Gov Methods (#2326)
+- [`0471fa884`](https://github.com/dashpay/dash/commit/0471fa884) Drop MAX_GOVERNANCE_OBJECT_DATA_SIZE (and maxgovobjdatasize in rpc) (#2298)
+- [`737353c84`](https://github.com/dashpay/dash/commit/737353c84) Fix IsBlockValueValid/IsOldBudgetBlockValueValid (#2276)
+- [`a5643f899`](https://github.com/dashpay/dash/commit/a5643f899) Switch RequestGovernanceObjectVotes from pointers to hashes (#2189)
+- [`0e689341d`](https://github.com/dashpay/dash/commit/0e689341d) Implement Governance ZMQ notification messages (#2160)
+
+### GUI
+- [`858bb52ad`](https://github.com/dashpay/dash/commit/858bb52ad) Show correct operator payee address in DIP3 MN list GUI (#2563)
+- [`190863722`](https://github.com/dashpay/dash/commit/190863722) Remove legacy MN list tabs on spork15 activation (#2567)
+- [`3e97b0cbd`](https://github.com/dashpay/dash/commit/3e97b0cbd) Make sure that we can get inputType and fUseInstantSend regardless of the way recipients are sorted (#2550)
+- [`1a7c29b97`](https://github.com/dashpay/dash/commit/1a7c29b97) Revert "Sort recipients in SendCoins dialog via BIP69 rule (#2546)" (#2549)
+- [`ca0aec2a3`](https://github.com/dashpay/dash/commit/ca0aec2a3) Match recipients with txouts by scriptPubKey in reassignAmounts() (#2548)
+- [`09730e1c5`](https://github.com/dashpay/dash/commit/09730e1c5) Bail out from update methods in MasternodeList when shutdown is requested (#2551)
+- [`18cd5965c`](https://github.com/dashpay/dash/commit/18cd5965c) Sort recipients in SendCoins dialog via BIP69 rule (#2546)
+- [`9100c69eb`](https://github.com/dashpay/dash/commit/9100c69eb) Allow filtering by proTxHash on DIP3 MN tab (#2532)
+- [`216119921`](https://github.com/dashpay/dash/commit/216119921) Fix wrong total MN count in UI and "masternode count" RPC (#2527)
+- [`8f8878a94`](https://github.com/dashpay/dash/commit/8f8878a94) Add dummy/hidden column to carry the proTxHash per MN list entry... (#2530)
+- [`a4ea816b2`](https://github.com/dashpay/dash/commit/a4ea816b2) use aqua gui theme (#2472)
+- [`aa495405b`](https://github.com/dashpay/dash/commit/aa495405b) [GUI] Realign tx filter widgets (#2485)
+- [`f4ef388de`](https://github.com/dashpay/dash/commit/f4ef388de) Update PS help text for the new denom (#2471)
+- [`7cabbadef`](https://github.com/dashpay/dash/commit/7cabbadef) Implement context menu and extra info on double-click for DIP3 masternode list (#2459)
+- [`9232a455c`](https://github.com/dashpay/dash/commit/9232a455c) Do not hold cs_main while emitting messages in WalletModel::prepareTransaction (#2463)
+- [`cf2b547b7`](https://github.com/dashpay/dash/commit/cf2b547b7) Implement tab for DIP3 MN list (#2454)
+- [`46462d682`](https://github.com/dashpay/dash/commit/46462d682) Add a column for IS lock status on Transactions tab (#2433)
+- [`5ecd91b05`](https://github.com/dashpay/dash/commit/5ecd91b05) Fix ps collateral/denom creation tx category confusion (#2430)
+- [`4a78b161f`](https://github.com/dashpay/dash/commit/4a78b161f) PrivateSend spending txes should have "outgoing" icon on overview screen (#2396)
+- [`d7e210341`](https://github.com/dashpay/dash/commit/d7e210341) Fixes inaccurate round count in CoinControlDialog (#2137)
+
+### Cleanups/Tests/Docs/Other
+- [`b5670c475`](https://github.com/dashpay/dash/commit/b5670c475) Set CLIENT_VERSION_IS_RELEASE to true (#2591)
+- [`a05eeb21e`](https://github.com/dashpay/dash/commit/a05eeb21e) Update immer to c89819df92191d6969a6a22c88c72943b8e25016 (#2626)
+- [`10b3736bd`](https://github.com/dashpay/dash/commit/10b3736bd) [0.13.0.x] Translations201901 (#2592)
+- [`34d2a6038`](https://github.com/dashpay/dash/commit/34d2a6038) Release notes 0.13.0.0 draft (#2583)
+- [`c950a8f51`](https://github.com/dashpay/dash/commit/c950a8f51) Merge v0.12.3.4 commits into develop (#2582)
+- [`6dfceaba5`](https://github.com/dashpay/dash/commit/6dfceaba5) Force FlushStateToDisk on ConnectTip/DisconnectTip while not in IBD (#2560)
+- [`552d9089e`](https://github.com/dashpay/dash/commit/552d9089e) Update testnet seeds to point to MNs that are on the new chain (#2558)
+- [`63b58b1e9`](https://github.com/dashpay/dash/commit/63b58b1e9) Reintroduce BLSInit to correctly set secure alloctor callbacks (#2543)
+- [`cbd030352`](https://github.com/dashpay/dash/commit/cbd030352) Serialize the block header in CBlockHeader::GetHash() (#2531)
+- [`3a6bd8d23`](https://github.com/dashpay/dash/commit/3a6bd8d23) Call ProcessTick every second, handle tick cooldown inside (#2522)
+- [`973a7f6dd`](https://github.com/dashpay/dash/commit/973a7f6dd) Fix GUI warnings in debug.log (#2521)
+- [`c248c48e4`](https://github.com/dashpay/dash/commit/c248c48e4) Try to fix a few sporadic instant send failures in DIP3 tests  (#2500)
+- [`7a709b81d`](https://github.com/dashpay/dash/commit/7a709b81d) Perform less instant send tests in DIP3 tests (#2499)
+- [`245c3220e`](https://github.com/dashpay/dash/commit/245c3220e) Sync blocks before creating TXs (#2496)
+- [`65528e9e7`](https://github.com/dashpay/dash/commit/65528e9e7) Bump masternodeman cache version (#2467)
+- [`6c190d1bb`](https://github.com/dashpay/dash/commit/6c190d1bb) Fix make deploy error on macos (#2475)
+- [`df7d12b41`](https://github.com/dashpay/dash/commit/df7d12b41) Add univalue test for real numbers (#2460)
+- [`614ff70b4`](https://github.com/dashpay/dash/commit/614ff70b4) Let ccache compress the cache by itself instead of compressing ccache.tar (#2456)
+- [`40fa1bb49`](https://github.com/dashpay/dash/commit/40fa1bb49) Add platform dependent include_directories in CMakeLists.txt (#2455)
+- [`12aba2592`](https://github.com/dashpay/dash/commit/12aba2592) Updating translations for de, es, fi, nl, pt, sk, zh_CN, zh_TW (#2451)
+- [`52bf5a6b0`](https://github.com/dashpay/dash/commit/52bf5a6b0) Install libxkbcommon0 in gitian-linux.yml
+- [`fefe34250`](https://github.com/dashpay/dash/commit/fefe34250) Update manpages
+- [`c60687fe6`](https://github.com/dashpay/dash/commit/c60687fe6) Sleep longer between attempts in sync_blocks
+- [`88498ba13`](https://github.com/dashpay/dash/commit/88498ba13) Apply suggestions from code review
+- [`91af72b18`](https://github.com/dashpay/dash/commit/91af72b18) Allow to specify how log to sleep between attempts in wait_until
+- [`f65e74682`](https://github.com/dashpay/dash/commit/f65e74682) Pass "-parallel=3" to reduce load on Travis nodes while testing
+- [`3c99d9e35`](https://github.com/dashpay/dash/commit/3c99d9e35) Fix test_fail_create_protx in DIP3 tests
+- [`4de70f0ac`](https://github.com/dashpay/dash/commit/4de70f0ac) Test P2SH/multisig payee addresses in DIP3 tests
+- [`5fc4072ca`](https://github.com/dashpay/dash/commit/5fc4072ca) Parallel ASN resolve and allow passing of input file names to makeseeds.py (#2432)
+- [`76a38f6ce`](https://github.com/dashpay/dash/commit/76a38f6ce)  Update defaultAssumeValid, nMinimumChainWork and checkpoints (#2428)
+- [`0e9ad207a`](https://github.com/dashpay/dash/commit/0e9ad207a) Update hardcoded seeds (#2429)
+- [`42ee369b1`](https://github.com/dashpay/dash/commit/42ee369b1) [Formatting] masternodelist.* clang+manual format (#2426)
+- [`e961c7134`](https://github.com/dashpay/dash/commit/e961c7134) Translations 201811 (#2249)
+- [`f0df5bffa`](https://github.com/dashpay/dash/commit/f0df5bffa) Clang evo folder and activemasternode.* (#2418)
+- [`98bdf35f9`](https://github.com/dashpay/dash/commit/98bdf35f9) bump PS copyright (#2417)
+- [`e9bb822c1`](https://github.com/dashpay/dash/commit/e9bb822c1) Clang format PrivateSend files (#2373)
+- [`bea590958`](https://github.com/dashpay/dash/commit/bea590958) Fix auto-IS tests (#2414)
+- [`f03629d6d`](https://github.com/dashpay/dash/commit/f03629d6d) Explicitly specify which branch of Wine to install (#2411)
+- [`5e829a3b1`](https://github.com/dashpay/dash/commit/5e829a3b1) Update Chia bls-signature to latest version (#2409)
+- [`51addf9a0`](https://github.com/dashpay/dash/commit/51addf9a0) Fix p2p-instantsend.py test (#2408)
+- [`7e8f07bb9`](https://github.com/dashpay/dash/commit/7e8f07bb9) A couple of fixes for shutdown sequence (#2406)
+- [`9c455caea`](https://github.com/dashpay/dash/commit/9c455caea) A couple of fixes for init steps (#2405)
+- [`6560ac64b`](https://github.com/dashpay/dash/commit/6560ac64b) Properly escape $ in Jenkinsfile.gitian (#2404)
+- [`70eb710b1`](https://github.com/dashpay/dash/commit/70eb710b1) Undefine DOUBLE after include Chia BLS headers (#2400)
+- [`052af81b4`](https://github.com/dashpay/dash/commit/052af81b4) Ensure correct order of destruction for BLS secure allocator (#2401)
+- [`c8804ea5a`](https://github.com/dashpay/dash/commit/c8804ea5a) Do not ignore patches in depends (#2399)
+- [`13f2eb449`](https://github.com/dashpay/dash/commit/13f2eb449) Force fvisibility=hidden when compiling on macos (#2398)
+- [`9eb9c99d5`](https://github.com/dashpay/dash/commit/9eb9c99d5) Bump version to 0.13.0 (#2386)
+- [`8f9b004ca`](https://github.com/dashpay/dash/commit/8f9b004ca) Support "fast" mode when calling sync_masternodes (#2383)
+- [`fcea333ba`](https://github.com/dashpay/dash/commit/fcea333ba) Rewrite handling of too long depends builds in .travis.yml (#2385)
+- [`d1debfc26`](https://github.com/dashpay/dash/commit/d1debfc26) Implement mt_pooled_secure_allocator and use it for BLS secure allocation (#2375)
+- [`0692de1c5`](https://github.com/dashpay/dash/commit/0692de1c5) Fix prepare_masternodes/create_masternodes in DashTestFramework (#2382)
+- [`6433a944a`](https://github.com/dashpay/dash/commit/6433a944a) [Trivial] typo Groupped -> Grouped (#2374)
+- [`59932401b`](https://github.com/dashpay/dash/commit/59932401b) Change internal references of Darksend to PrivateSend (#2372)
+- [`e3046adb3`](https://github.com/dashpay/dash/commit/e3046adb3) Clear devNetParams and mimic behavior of other param types (#2367)
+- [`de426e962`](https://github.com/dashpay/dash/commit/de426e962) Give tail calls enough time to print errors (#2376)
+- [`0402240a2`](https://github.com/dashpay/dash/commit/0402240a2) Bump CMAKE_CXX_STANDARD to 14 in CMakeLists.txt (#2377)
+- [`3c9237aa4`](https://github.com/dashpay/dash/commit/3c9237aa4) Use VersionBitsState instead of VersionBitsTipState to avoid cs_main lock (#2370)
+- [`c4351fd32`](https://github.com/dashpay/dash/commit/c4351fd32) revert 737, DEFAULT_TRANSACTION_MAXFEE = 0.1 * COIN (#2362)
+- [`1c9ed7806`](https://github.com/dashpay/dash/commit/1c9ed7806) GDB automation with Python script to measure memory usage in dashd (#1609)
+- [`d998dc13e`](https://github.com/dashpay/dash/commit/d998dc13e) Add cmake to non-mac gitian descriptors (#2360)
+- [`266dd3232`](https://github.com/dashpay/dash/commit/266dd3232) mkdir -p to allow re-start of failed chia build (#2359)
+- [`11a0cbf84`](https://github.com/dashpay/dash/commit/11a0cbf84) InstantSend-related tests refactoring (#2333)
+- [`3313bbd51`](https://github.com/dashpay/dash/commit/3313bbd51) Backport bitcoin #13623 Migrate gitian-build.sh to python (#2319)
+- [`7b76bbb57`](https://github.com/dashpay/dash/commit/7b76bbb57)  Update Chia BLS libs to latest master (#2357)
+- [`e2de632f8`](https://github.com/dashpay/dash/commit/e2de632f8) Move handling of `size != SerSize` into SetBuf/GetBuf (#2356)
+- [`81d60bc28`](https://github.com/dashpay/dash/commit/81d60bc28) Fix the issue with transaction amount precision in IS tests (#2353)
+- [`a45055384`](https://github.com/dashpay/dash/commit/a45055384) Fix qt configure to detect clang version correctly (#2344)
+- [`b99d94a0f`](https://github.com/dashpay/dash/commit/b99d94a0f) Minor build documentation updates (#2343)
+- [`464191698`](https://github.com/dashpay/dash/commit/464191698) Review fixes
+- [`9c8e4ac76`](https://github.com/dashpay/dash/commit/9c8e4ac76) Move bls stuff from crypto/ to bls/
+- [`bed1ded8b`](https://github.com/dashpay/dash/commit/bed1ded8b) Remove duplicated check (#2336)
+- [`89f744d06`](https://github.com/dashpay/dash/commit/89f744d06) pack of small cleanup fixes / optimizations (#2334)
+- [`9603c5290`](https://github.com/dashpay/dash/commit/9603c5290) Trivial: Codestyle fixes in InstantSend code (#2332)
+- [`90ad75911`](https://github.com/dashpay/dash/commit/90ad75911) Fix auto-IS and tests (#2331)
+- [`b3fc236af`](https://github.com/dashpay/dash/commit/b3fc236af) Fix mnodeman.cs vs cs_vPendingMasternodes vs cs_main deadlock (#2200)
+- [`80fd096b0`](https://github.com/dashpay/dash/commit/80fd096b0) Add ECDSA benchmarks
+- [`78675d9bb`](https://github.com/dashpay/dash/commit/78675d9bb) Add BLS and DKG benchmarks
+- [`3ee27c168`](https://github.com/dashpay/dash/commit/3ee27c168) Add highly parallelized worker/helper for BLS/DKG calculations
+- [`aa3b0aa8a`](https://github.com/dashpay/dash/commit/aa3b0aa8a) Add simple helpers/wrappers for BLS+AES based integrated encryption schemes (IES)
+- [`9ccf6f584`](https://github.com/dashpay/dash/commit/9ccf6f584) Implement wrappers around Chia BLS lib
+- [`3039d44d3`](https://github.com/dashpay/dash/commit/3039d44d3) Add Chia bls-signatures library to depends
+- [`f3dcb6916`](https://github.com/dashpay/dash/commit/f3dcb6916) Add cmake to ci/Dockerfile.builder
+- [`057d7445e`](https://github.com/dashpay/dash/commit/057d7445e) Add libgmp to depends
+- [`b0d0093d7`](https://github.com/dashpay/dash/commit/b0d0093d7) Add helper to rename all threads of a ctpl::thread_pool
+- [`47a162255`](https://github.com/dashpay/dash/commit/47a162255) Add ctpl header only library
+- [`407baccec`](https://github.com/dashpay/dash/commit/407baccec) Remove obsolete build-openbsd.md (#2328)
+- [`8a1b51356`](https://github.com/dashpay/dash/commit/8a1b51356) Backport: Fix Qt build with XCode (for depends) (#2325)
+- [`a5aca049d`](https://github.com/dashpay/dash/commit/a5aca049d) rename vars in mnsync to make more sense (#2308)
+- [`ee6a5a33b`](https://github.com/dashpay/dash/commit/ee6a5a33b) Gov cleanup + copyright bump (#2324)
+- [`d7e5f02ea`](https://github.com/dashpay/dash/commit/d7e5f02ea) Update build documentation (#2323)
+- [`bd8c54d12`](https://github.com/dashpay/dash/commit/bd8c54d12) A bit more verbosity for some critical errors (#2316)
+- [`a4ff2a19a`](https://github.com/dashpay/dash/commit/a4ff2a19a) Fix some warnings and do a couple of other trivial cleanups (#2315)
+- [`07208a4ae`](https://github.com/dashpay/dash/commit/07208a4ae) document spork system with doxygen comments (#2301)
+- [`2c1a17909`](https://github.com/dashpay/dash/commit/2c1a17909) cleanup: remove unused vars, includes, functions (#2306)
+- [`3d48824b4`](https://github.com/dashpay/dash/commit/3d48824b4) Update .clang-format to more accurately show the actual style (#2299)
+- [`8ea40102c`](https://github.com/dashpay/dash/commit/8ea40102c) Remove leftover RBF code from BTC (#2297)
+- [`76599aad3`](https://github.com/dashpay/dash/commit/76599aad3) Drop (pre-)70208 compatibility code (#2295)
+- [`016681cd3`](https://github.com/dashpay/dash/commit/016681cd3) Add support for serialization of bitsets and tuples (#2293)
+- [`2a95dd30c`](https://github.com/dashpay/dash/commit/2a95dd30c) Fix locking issues in DIP3 unit tests (#2285)
+- [`47ca06ab3`](https://github.com/dashpay/dash/commit/47ca06ab3) DIP3 integration tests (#2280)
+- [`ad6c2893c`](https://github.com/dashpay/dash/commit/ad6c2893c) Docs - Update Core version number in readme files (#2267)
+- [`bc7924d41`](https://github.com/dashpay/dash/commit/bc7924d41) Add unit tests for DIP3 and DIP4
+- [`d653ace99`](https://github.com/dashpay/dash/commit/d653ace99) Update CbTx in TestChainSetup
+- [`9674be8f9`](https://github.com/dashpay/dash/commit/9674be8f9) Refactor TestChain100Setup to allow different test chain setups
+- [`cb37c3972`](https://github.com/dashpay/dash/commit/cb37c3972) Bump PROTOCOL_VERSION to 70211, bump MIN_* protocols to 70210 (#2256)
+- [`b99886532`](https://github.com/dashpay/dash/commit/b99886532) add link for developer-notes in contributing (#2260)
+- [`fded838c9`](https://github.com/dashpay/dash/commit/fded838c9) RPC folder: Cleaned up brackets on if, while, for, BOOST_FOREACH. Some whitespace fixes (#2257)
+- [`5295c78cc`](https://github.com/dashpay/dash/commit/5295c78cc) Fix typo in "penalty" (#2247)
+- [`c566ce75d`](https://github.com/dashpay/dash/commit/c566ce75d) Update copyright in specialtx.h/cpp
+- [`e002c50b0`](https://github.com/dashpay/dash/commit/e002c50b0) Add "immer" functional/immutable containers library (#2244)
+- [`799e3c312`](https://github.com/dashpay/dash/commit/799e3c312) Perform Jenkins builds in /dash-src all the time to fix caching issues (#2242)
+- [`b6896387a`](https://github.com/dashpay/dash/commit/b6896387a) Move DIP1 transaction size checks out of ContextualCheckBlock and use ContextualCheckTransaction instead (#2238)
+- [`e415fd049`](https://github.com/dashpay/dash/commit/e415fd049) Revert CMasternodePayments::IsTransactionValid to the logic before the recent refactorings (#2237)
+- [`8da88ecf6`](https://github.com/dashpay/dash/commit/8da88ecf6) Don't crash when formatting in logging throws exceptions (#2231)
+- [`2e06f8133`](https://github.com/dashpay/dash/commit/2e06f8133) fix missed format parameter (#2229)
+- [`3d654b981`](https://github.com/dashpay/dash/commit/3d654b981) Build bionic base image in Jenkinsfile.gitian & update docs (#2226)
+- [`c09f57bd7`](https://github.com/dashpay/dash/commit/c09f57bd7) Backport move to Ubuntu Bionic and GCC7 in Gitian builds (#2225)
+- [`7cf9572c2`](https://github.com/dashpay/dash/commit/7cf9572c2) Backport Bitcoin #11881: Remove Python2 support (#2224)
+- [`633879cd2`](https://github.com/dashpay/dash/commit/633879cd2) Only use version 1 and 2 transactions for sighash_tests (#2219)
+- [`2d4e18537`](https://github.com/dashpay/dash/commit/2d4e18537) Some useful commits from the DIP3 PR in regard to integration tests (#2218)
+- [`106bab1ae`](https://github.com/dashpay/dash/commit/106bab1ae) Add new ParseXXX methods to easily parse UniValue values (#2211)
+- [`c4c610783`](https://github.com/dashpay/dash/commit/c4c610783) Use C++14 standard when building (#2209)
+- [`589a77013`](https://github.com/dashpay/dash/commit/589a77013) Correction to release date for 0.12.0 (#2205)
+- [`96435288f`](https://github.com/dashpay/dash/commit/96435288f) Move block template specific stuff from CBlock to CBlockTemplate (#2195)
+- [`3d002c946`](https://github.com/dashpay/dash/commit/3d002c946) Fix active masternode task schedule (#2193)
+- [`65b904526`](https://github.com/dashpay/dash/commit/65b904526) Add helpers GetSentinelString() and GetDaemonString() to CMasternodePing (#2192)
+- [`eb202e812`](https://github.com/dashpay/dash/commit/eb202e812) Use ccache in gitian builds (#2185)
+- [`b47617325`](https://github.com/dashpay/dash/commit/b47617325) Install python3 in gitian builds (#2182)
+- [`7a85e24c3`](https://github.com/dashpay/dash/commit/7a85e24c3) Remove deprecated gitian-rpi2.yml descriptor (#2183)
+- [`1681d6366`](https://github.com/dashpay/dash/commit/1681d6366) Replace Dash-specific threads with Dash-specific scheduled tasks (#2043)
+- [`dac090964`](https://github.com/dashpay/dash/commit/dac090964) remove dashpay.io dns seed entry (#2181)
+- [`753c2436b`](https://github.com/dashpay/dash/commit/753c2436b) Fix MissingPropertyException on Jenkins when no cache was found (#2180)
+- [`f3e380659`](https://github.com/dashpay/dash/commit/f3e380659) Move to in-docker CI builds and add Jenkins support (#2178)
+- [`23dde9f12`](https://github.com/dashpay/dash/commit/23dde9f12) Remove a few annoying debug prints from CMasternodeMan (#2179)
+- [`5036d7dfc`](https://github.com/dashpay/dash/commit/5036d7dfc) depends: Update Qt download url (#2177)
+- [`e23339d6f`](https://github.com/dashpay/dash/commit/e23339d6f) use nullptr in Dash-specific code (#2166)
+- [`42c193df0`](https://github.com/dashpay/dash/commit/42c193df0) replace map count/insert w/emplace in instantx.cpp (#2165)
+- [`fd70a1eb9`](https://github.com/dashpay/dash/commit/fd70a1eb9) iterator cleanup in several places (#2164)
+- [`df1be90ce`](https://github.com/dashpay/dash/commit/df1be90ce)  Update links to obsolete documentation (#2162)
+- [`448e92f4a`](https://github.com/dashpay/dash/commit/448e92f4a) GetOutPointPrivateSendRounds readability (#2149)
+- [`6da2837bd`](https://github.com/dashpay/dash/commit/6da2837bd) InstantSend Integration tests (#2141)
+- [`8ee9333bc`](https://github.com/dashpay/dash/commit/8ee9333bc) remove boost dependency from Dash-specific code (#2072)
+- [`a527845e4`](https://github.com/dashpay/dash/commit/a527845e4) Bump to 0.12.4.0 pre-release (#2167)
+
+Credits
+=======
+
+Thanks to everyone who directly contributed to this release:
+
+- Alexander Block
+- UdjinM6
+- PastaPastaPasta
+- gladcow
+- Nathan Marley
+- thephez
+- strophy
+- PaulieD
+- InhumanPerfection
+- Spencer Lievens
+- -k
+- Salisbury
+- Solar Designer
+- Oleg Girko
+- Anton Suprunchuk
+
+As well as everyone that submitted issues, reviewed pull requests or helped translating on
+[Transifex](https://www.transifex.com/projects/p/dash/).
+
+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.4](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.4.md) released Dec/14/2018
+- [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
+- [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 Aug/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 709ab6d3e03297534b40f0f7ad0bb14028fdb81b Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 12 Feb 2019 22:50:22 +0300
Subject: [PATCH 14/28] Minimal fix for litemode vs bad-protx-key-not-same
 issue (#2694)

---
 src/evo/providertx.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/evo/providertx.cpp b/src/evo/providertx.cpp
index c7e7df0dc6fa..8f2f34a520fd 100644
--- a/src/evo/providertx.cpp
+++ b/src/evo/providertx.cpp
@@ -186,7 +186,7 @@ bool CheckProRegTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValid
             return state.DoS(10, false, REJECT_DUPLICATE, "bad-protx-dup-key");
         }
 
-        if (!deterministicMNManager->IsDeterministicMNsSporkActive(pindexPrev->nHeight)) {
+        if (!fLiteMode && !deterministicMNManager->IsDeterministicMNsSporkActive(pindexPrev->nHeight)) {
             if (ptx.keyIDOwner != ptx.keyIDVoting) {
                 return state.DoS(10, false, REJECT_INVALID, "bad-protx-key-not-same");
             }
@@ -330,7 +330,7 @@ bool CheckProUpRegTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CVal
             }
         }
 
-        if (!deterministicMNManager->IsDeterministicMNsSporkActive(pindexPrev->nHeight)) {
+        if (!fLiteMode && !deterministicMNManager->IsDeterministicMNsSporkActive(pindexPrev->nHeight)) {
             if (dmn->pdmnState->keyIDOwner != ptx.keyIDVoting) {
                 return state.DoS(10, false, REJECT_INVALID, "bad-protx-key-not-same");
             }

From 18f087b2737b01b7539419afe72050a6a18104e2 Mon Sep 17 00:00:00 2001
From: Felix Yan <felixonmars@archlinux.org>
Date: Sun, 17 Feb 2019 19:40:24 +0800
Subject: [PATCH 15/28] Fix some typos in doc/guide-startmany.md (#2711)

---
 doc/guide-startmany.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/guide-startmany.md b/doc/guide-startmany.md
index d5aee4a43010..5e68e22a64f2 100644
--- a/doc/guide-startmany.md
+++ b/doc/guide-startmany.md
@@ -38,9 +38,9 @@ Remember... this is local. Make sure your QT is not running.
 
 Create the `masternode.conf` file in the same directory as your `wallet.dat`.
 
-Copy the masternode private key and correspondig collateral output transaction that holds the 1000 DASH.
+Copy the masternode private key and corresponding collateral output transaction that holds the 1000 DASH.
 
-*Note: The masternode priviate key is **not** the same as a wallet private key. **Never** put your wallet private key in the masternode.conf file. That is almost equivalent to putting your 1000 DASH on the remote server and defeats the purpose of a hot/cold setup.*
+*Note: The masternode private key is **not** the same as a wallet private key. **Never** put your wallet private key in the masternode.conf file. That is almost equivalent to putting your 1000 DASH on the remote server and defeats the purpose of a hot/cold setup.*
 
 ### Get the collateral output
 
@@ -55,7 +55,7 @@ Make note of the hash (which is your collateral_output) and index.
 ### Enter your Masternode details into your masternode.conf file
 [From the dash github repo](https://github.com/dashpay/dash/blob/master/doc/masternode_conf.md)
 
-`masternode.conf` format is a space seperated text file. Each line consisting of an alias, IP address followed by port, masternode private key, collateral output transaction id and collateral output index.
+`masternode.conf` format is a space separated text file. Each line consisting of an alias, IP address followed by port, masternode private key, collateral output transaction id and collateral output index.
 
 ```
 alias ipaddress:port masternode_private_key collateral_output collateral_output_index

From 1cc47ebcd07f1d2571c067a29e0e4d5e20c71419 Mon Sep 17 00:00:00 2001
From: PastaPastaPasta <pasta@dashboost.org>
Date: Tue, 12 Feb 2019 13:50:07 -0600
Subject: [PATCH 16/28] Backport #14701: build: Add CLIENT_VERSION_BUILD to
 CFBundleGetInfoString (#2687)

8e209340c85fc2493d7d1d7affe7e316bb613cbd build: Add CLIENT_VERSION_BUILD to CFBundleGetInfoString (fanquake)

Pull request description:

  As mentioned in #14697, if you download the `0.17.0.1` dmg, and inspect the `.app` bundle, the version in the GetInfo string reads `0.17.0`, which is confusing given you're expecting `0.17.0.1`:
  <img width="391" alt="0 17 0 1" src="https://user-images.githubusercontent.com/863730/48300032-fbb54b00-e510-11e8-9bcd-77e1fffffc63.png">

  This PR adds `CLIENT_VERSION_BUILD` to the string, so that the full version number is displayed, i.e:
  <img width="327" alt="this pr" src="https://user-images.githubusercontent.com/863730/48300015-7893f500-e510-11e8-98b9-80424719a082.png">

Tree-SHA512: f553253d03283639cc4dda00c8004b5c63ae2b489762e5e8c666166e71b14e672792c1df678f87484d51d153b5781c5ec1b145774096600f504833024ae8baea
---
 share/qt/Info.plist.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/share/qt/Info.plist.in b/share/qt/Info.plist.in
index 6db46b192fa3..41f37eb43cb9 100644
--- a/share/qt/Info.plist.in
+++ b/share/qt/Info.plist.in
@@ -17,7 +17,7 @@
   <string>APPL</string>
 
   <key>CFBundleGetInfoString</key>
-  <string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@, Copyright © 2009-@COPYRIGHT_YEAR@ The Bitcoin Core developers, 2014-@COPYRIGHT_YEAR@ @COPYRIGHT_HOLDERS_FINAL@</string>
+  <string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@.@CLIENT_VERSION_BUILD@, Copyright © 2009-@COPYRIGHT_YEAR@ The Bitcoin Core developers, 2014-@COPYRIGHT_YEAR@ @COPYRIGHT_HOLDERS_FINAL@</string>
 
   <key>CFBundleShortVersionString</key>
   <string>@CLIENT_VERSION_MAJOR@.@CLIENT_VERSION_MINOR@.@CLIENT_VERSION_REVISION@</string>

From e75f971b90b5973d9f8eb6a0d4df2e924d5b604e Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 12 Feb 2019 22:51:50 +0300
Subject: [PATCH 17/28] Do not process blocks in CDeterministicMNManager before
 dip3 activation (#2698)

* Do not process blocks in CDeterministicMNManager before dip3 activation

This should save us some cpu/disk on initial sync/reindex

* Write initial snapshot on dip3 activation
---
 src/evo/deterministicmns.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/evo/deterministicmns.cpp b/src/evo/deterministicmns.cpp
index 6f664c05a11e..a93965f1b12d 100644
--- a/src/evo/deterministicmns.cpp
+++ b/src/evo/deterministicmns.cpp
@@ -438,6 +438,13 @@ CDeterministicMNManager::CDeterministicMNManager(CEvoDB& _evoDb) :
 
 bool CDeterministicMNManager::ProcessBlock(const CBlock& block, const CBlockIndex* pindex, CValidationState& _state)
 {
+    AssertLockHeld(cs_main);
+
+    bool fDIP0003Active = VersionBitsState(pindex->pprev, Params().GetConsensus(), Consensus::DEPLOYMENT_DIP0003, versionbitscache) == THRESHOLD_ACTIVE;
+    if (!fDIP0003Active) {
+        return true;
+    }
+
     LOCK(cs);
 
     int nHeight = pindex->nHeight;
@@ -457,7 +464,7 @@ bool CDeterministicMNManager::ProcessBlock(const CBlock& block, const CBlockInde
     CDeterministicMNListDiff diff = oldList.BuildDiff(newList);
 
     evoDb.Write(std::make_pair(DB_LIST_DIFF, diff.blockHash), diff);
-    if ((nHeight % SNAPSHOT_LIST_PERIOD) == 0) {
+    if ((nHeight % SNAPSHOT_LIST_PERIOD) == 0 || oldList.GetHeight() == -1) {
         evoDb.Write(std::make_pair(DB_LIST_SNAPSHOT, diff.blockHash), newList);
         LogPrintf("CDeterministicMNManager::%s -- Wrote snapshot. nHeight=%d, mapCurMNs.allMNsCount=%d\n",
             __func__, nHeight, newList.GetAllMNsCount());

From 9e233f391d9df63ae2d1998df847c06be06f172e Mon Sep 17 00:00:00 2001
From: Alexander Block <ablock84@gmail.com>
Date: Tue, 12 Feb 2019 20:52:06 +0100
Subject: [PATCH 18/28] Fix incorrect usage of begin() when genesis block is
 requested in "protx diff" (#2699)

* Fix incorrect usage of begin() when genesis block is requested in "protx diff"

.begin() on mapBlockIndex does NOT return the genesis block, but just the
block with lowest hash.

The fix is to use chainActive[0] to get the genesis block.

* Update src/evo/simplifiedmns.cpp

Co-Authored-By: codablock <ablock84@gmail.com>
---
 src/evo/simplifiedmns.cpp | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/evo/simplifiedmns.cpp b/src/evo/simplifiedmns.cpp
index 875c46dea5b3..6ac8d3b33994 100644
--- a/src/evo/simplifiedmns.cpp
+++ b/src/evo/simplifiedmns.cpp
@@ -119,25 +119,27 @@ bool BuildSimplifiedMNListDiff(const uint256& baseBlockHash, const uint256& bloc
     AssertLockHeld(cs_main);
     mnListDiffRet = CSimplifiedMNListDiff();
 
-    BlockMap::iterator baseBlockIt = mapBlockIndex.begin();
+    const CBlockIndex* baseBlockIndex = chainActive.Genesis();
     if (!baseBlockHash.IsNull()) {
-        baseBlockIt = mapBlockIndex.find(baseBlockHash);
+        auto it = mapBlockIndex.find(baseBlockHash);
+        if (it == mapBlockIndex.end()) {
+            errorRet = strprintf("block %s not found", baseBlockHash.ToString());
+            return false;
+        }
+        baseBlockIndex = it->second;
     }
     auto blockIt = mapBlockIndex.find(blockHash);
-    if (baseBlockIt == mapBlockIndex.end()) {
-        errorRet = strprintf("block %s not found", baseBlockHash.ToString());
-        return false;
-    }
     if (blockIt == mapBlockIndex.end()) {
         errorRet = strprintf("block %s not found", blockHash.ToString());
         return false;
     }
+    const CBlockIndex* blockIndex = blockIt->second;
 
-    if (!chainActive.Contains(baseBlockIt->second) || !chainActive.Contains(blockIt->second)) {
+    if (!chainActive.Contains(baseBlockIndex) || !chainActive.Contains(blockIndex)) {
         errorRet = strprintf("block %s and %s are not in the same chain", baseBlockHash.ToString(), blockHash.ToString());
         return false;
     }
-    if (baseBlockIt->second->nHeight > blockIt->second->nHeight) {
+    if (baseBlockIndex->nHeight > blockIndex->nHeight) {
         errorRet = strprintf("base block %s is higher then block %s", baseBlockHash.ToString(), blockHash.ToString());
         return false;
     }
@@ -150,7 +152,7 @@ bool BuildSimplifiedMNListDiff(const uint256& baseBlockHash, const uint256& bloc
 
     // TODO store coinbase TX in CBlockIndex
     CBlock block;
-    if (!ReadBlockFromDisk(block, blockIt->second, Params().GetConsensus())) {
+    if (!ReadBlockFromDisk(block, blockIndex, Params().GetConsensus())) {
         errorRet = strprintf("failed to read block %s from disk", blockHash.ToString());
         return false;
     }

From f868fbc78780f8a8dfb31c15a43236a76f5c0f0f Mon Sep 17 00:00:00 2001
From: Alexander Block <ablock84@gmail.com>
Date: Fri, 1 Mar 2019 16:30:30 +0100
Subject: [PATCH 19/28] Stop g_connman first before deleting it (#2734)

---
 src/init.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/init.cpp b/src/init.cpp
index 92e94a383ec2..2e880a6d3548 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -256,6 +256,10 @@ void PrepareShutdown()
     MapPort(false);
     UnregisterValidationInterface(peerLogic.get());
     peerLogic.reset();
+    if (g_connman) {
+        // make sure to stop all threads before g_connman is reset to nullptr as these threads might still be accessing it
+        g_connman->Stop();
+    }
     g_connman.reset();
 
     if (!fLiteMode && !fRPCInWarmup) {

From 43612a2720a04f67e1807706d0b15d46d06a3de7 Mon Sep 17 00:00:00 2001
From: Alexander Block <ablock84@gmail.com>
Date: Mon, 4 Mar 2019 07:52:14 +0100
Subject: [PATCH 20/28] Only include selected TX types into CMerkleBlock
 (#2737)

It was reported on iOS that CMerkleBlock sometimes included the dummy
quorum commitments introduced with v13, which led to banning of nodes as
these were not supported/expected there.

We should in general only include TXs here that are of interest for SPV
nodes, so we should maintain the list of allowed TX types.
---
 src/merkleblock.cpp | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/merkleblock.cpp b/src/merkleblock.cpp
index e453561733eb..d9edd382e350 100644
--- a/src/merkleblock.cpp
+++ b/src/merkleblock.cpp
@@ -19,10 +19,24 @@ CMerkleBlock::CMerkleBlock(const CBlock& block, CBloomFilter& filter)
     vMatch.reserve(block.vtx.size());
     vHashes.reserve(block.vtx.size());
 
+    const static std::set<int> allowedTxTypes = {
+            TRANSACTION_NORMAL,
+            TRANSACTION_PROVIDER_REGISTER,
+            TRANSACTION_PROVIDER_UPDATE_SERVICE,
+            TRANSACTION_PROVIDER_UPDATE_REGISTRAR,
+            TRANSACTION_PROVIDER_UPDATE_REVOKE,
+            TRANSACTION_COINBASE,
+    };
+
     for (unsigned int i = 0; i < block.vtx.size(); i++)
     {
-        const uint256& hash = block.vtx[i]->GetHash();
-        if (filter.IsRelevantAndUpdate(*block.vtx[i]))
+        const auto& tx = *block.vtx[i];
+        if (tx.nVersion == 3 && !allowedTxTypes.count(tx.nType)) {
+            continue;
+        }
+
+        const uint256& hash = tx.GetHash();
+        if (filter.IsRelevantAndUpdate(tx))
         {
             vMatch.push_back(true);
             vMatchedTxn.push_back(std::make_pair(i, hash));

From a11e2f9eba6abcd9e032100d62b327339e6d4b01 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 6 Mar 2019 10:01:03 +0300
Subject: [PATCH 21/28] Add collateraladdress into masternode/protx list rpc
 output (#2740)

---
 src/evo/deterministicmns.cpp |  9 +++++++++
 src/rpc/masternode.cpp       | 15 +++++++++++++--
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/evo/deterministicmns.cpp b/src/evo/deterministicmns.cpp
index a93965f1b12d..99e59a919cf6 100644
--- a/src/evo/deterministicmns.cpp
+++ b/src/evo/deterministicmns.cpp
@@ -83,6 +83,15 @@ void CDeterministicMN::ToJson(UniValue& obj) const
     obj.push_back(Pair("proTxHash", proTxHash.ToString()));
     obj.push_back(Pair("collateralHash", collateralOutpoint.hash.ToString()));
     obj.push_back(Pair("collateralIndex", (int)collateralOutpoint.n));
+
+    Coin coin;
+    if (GetUTXOCoin(collateralOutpoint, coin)) {
+        CTxDestination dest;
+        if (ExtractDestination(coin.out.scriptPubKey, dest)) {
+            obj.push_back(Pair("collateralAddress", CBitcoinAddress(dest).ToString()));
+        }
+    }
+
     obj.push_back(Pair("operatorReward", (double)nOperatorReward / 100));
     obj.push_back(Pair("state", stateObj));
 }
diff --git a/src/rpc/masternode.cpp b/src/rpc/masternode.cpp
index dafc9ae4beae..52a54294334c 100644
--- a/src/rpc/masternode.cpp
+++ b/src/rpc/masternode.cpp
@@ -890,17 +890,26 @@ UniValue masternodelist(const JSONRPCRequest& request)
             std::string strOutpoint = mnpair.first.ToStringShort();
 
             CScript payeeScript;
+            std::string collateralAddressStr = "UNKNOWN";
             if (deterministicMNManager->IsDeterministicMNsSporkActive()) {
                 auto dmn = deterministicMNManager->GetListAtChainTip().GetMNByCollateral(mn.outpoint);
                 if (dmn) {
                     payeeScript = dmn->pdmnState->scriptPayout;
+                    Coin coin;
+                    if (GetUTXOCoin(dmn->collateralOutpoint, coin)) {
+                        CTxDestination collateralDest;
+                        if (ExtractDestination(coin.out.scriptPubKey, collateralDest)) {
+                            collateralAddressStr = CBitcoinAddress(collateralDest).ToString();
+                        }
+                    }
                 }
             } else {
                 payeeScript = GetScriptForDestination(mn.keyIDCollateralAddress);
+                collateralAddressStr = CBitcoinAddress(mn.keyIDCollateralAddress).ToString();
             }
 
             CTxDestination payeeDest;
-            std::string payeeStr = "UNKOWN";
+            std::string payeeStr = "UNKNOWN";
             if (ExtractDestination(payeeScript, payeeDest)) {
                 payeeStr = CBitcoinAddress(payeeDest).ToString();
             }
@@ -965,7 +974,8 @@ UniValue masternodelist(const JSONRPCRequest& request)
                                (int64_t)mn.lastPing.sigTime << " " <<
                                (int64_t)(mn.lastPing.sigTime - mn.sigTime) << " " <<
                                mn.GetLastPaidTime() << " " <<
-                               mn.GetLastPaidBlock();
+                               mn.GetLastPaidBlock() << " " <<
+                               collateralAddressStr;
                 std::string strInfo = streamInfo.str();
                 if (strFilter !="" && strInfo.find(strFilter) == std::string::npos &&
                     strOutpoint.find(strFilter) == std::string::npos) continue;
@@ -983,6 +993,7 @@ UniValue masternodelist(const JSONRPCRequest& request)
                 objMN.push_back(Pair("lastpaidblock", mn.GetLastPaidBlock()));
                 objMN.push_back(Pair("owneraddress", CBitcoinAddress(mn.keyIDOwner).ToString()));
                 objMN.push_back(Pair("votingaddress", CBitcoinAddress(mn.keyIDVoting).ToString()));
+                objMN.push_back(Pair("collateraladdress", collateralAddressStr));
                 obj.push_back(Pair(strOutpoint, objMN));
             } else if (strMode == "keyid") {
                 if (strFilter !="" && strOutpoint.find(strFilter) == std::string::npos) continue;

From 0364e033a7f0c081d3bfa4ab725b28f1ffbdab3a Mon Sep 17 00:00:00 2001
From: Alexander Block <ablock84@gmail.com>
Date: Wed, 6 Mar 2019 20:45:39 +0100
Subject: [PATCH 22/28] Implement 2-stage commit for CEvoDB to avoid
 inconsistencies after crashes (#2744)

* Let Commit() return void

The boolean return value will loose its meaning in the next commit

* Implement 2-stage commits for CDBTransaction and CScopedDBTransaction

CDBTransaction is changed to allow CDBBatch, CDBWrapper and other
CDBTransactions as parent instead of just CDBWrapper. This in turn allows
to implement multi-staged commits in CEvoDB.

We now have the "current transaction" which is started and ended (commit
or rollback) for each call to Connect-/DisconnectBlock. When the current
transaction is committed, it moves its contents into the "root transaction"
instead of directly writing to CDBWrapper.

CommitRootTransaction() then handles the final commitment to CDBWrapper. It
is called at the same time when the chainstate is flushed to disk, which
guarantees consistency between chainstate and CEvoDB.

* Allow to efficiently move values into parent transactions to avoid copies

When CDBTransaction<CDBTransaction<...>>::Commit() is called, we can avoid
copying values from this transaction to the parent transaction and instead
pass values by rvalue and let the contents be moved.

* Revert "Force FlushStateToDisk on ConnectTip/DisconnectTip while not in IBD (#2560)"

This reverts commit 6dfceaba5ac58311ce684987c84ee66d54e2bf1f.
---
 src/dbwrapper.h    | 89 ++++++++++++++++++++++++++++------------------
 src/evo/evodb.cpp  | 13 ++++++-
 src/evo/evodb.h    | 23 ++++++++----
 src/validation.cpp | 13 +++----
 4 files changed, 89 insertions(+), 49 deletions(-)

diff --git a/src/dbwrapper.h b/src/dbwrapper.h
index 500da8380632..a4e0cbac3ac5 100644
--- a/src/dbwrapper.h
+++ b/src/dbwrapper.h
@@ -344,14 +344,16 @@ class CDBWrapper
 
 };
 
+template<typename Parent, typename CommitTarget>
 class CDBTransaction {
-private:
-    CDBWrapper &db;
+protected:
+    Parent &parent;
+    CommitTarget &commitTarget;
 
     struct KeyHolder {
         virtual ~KeyHolder() = default;
         virtual bool Less(const KeyHolder &b) const = 0;
-        virtual void Erase(CDBBatch &batch) = 0;
+        virtual void Erase(CommitTarget &commitTarget) = 0;
     };
     typedef std::unique_ptr<KeyHolder> KeyHolderPtr;
 
@@ -364,15 +366,15 @@ class CDBTransaction {
             auto *b2 = dynamic_cast<const KeyHolderImpl<K>*>(&b);
             return key < b2->key;
         }
-        virtual void Erase(CDBBatch &batch) {
-            batch.Erase(key);
+        virtual void Erase(CommitTarget &commitTarget) {
+            commitTarget.Erase(key);
         }
         K key;
     };
 
     struct KeyValueHolder {
         virtual ~KeyValueHolder() = default;
-        virtual void Write(CDBBatch &batch) = 0;
+        virtual void Write(CommitTarget &parent) = 0;
     };
     typedef std::unique_ptr<KeyValueHolder> KeyValueHolderPtr;
 
@@ -381,8 +383,13 @@ class CDBTransaction {
         KeyValueHolderImpl(const KeyHolderImpl<K> &_key, const V &_value)
                 : key(_key),
                   value(_value) { }
-        virtual void Write(CDBBatch &batch) {
-            batch.Write(key.key, value);
+        KeyValueHolderImpl(const KeyHolderImpl<K> &_key, V &&_value)
+                : key(_key),
+                  value(std::forward<V>(_value)) { }
+        virtual void Write(CommitTarget &commitTarget) {
+            // we're moving the value instead of copying it. This means that Write() can only be called once per
+            // KeyValueHolderImpl instance. Commit() clears the write maps, so this ok.
+            commitTarget.Write(key.key, std::move(value));
         }
         const KeyHolderImpl<K> &key;
         V value;
@@ -422,22 +429,34 @@ class CDBTransaction {
         return getMapForType<K>(deletes, create);
     }
 
-public:
-    CDBTransaction(CDBWrapper &_db) : db(_db) {}
-
-    template <typename K, typename V>
-    void Write(const K& key, const V& value) {
-        KeyHolderPtr k(new KeyHolderImpl<K>(key));
-        KeyHolderImpl<K>* k2 = dynamic_cast<KeyHolderImpl<K>*>(k.get());
-        KeyValueHolderPtr kv(new KeyValueHolderImpl<K,V>(*k2, value));
+    template <typename K, typename KV>
+    void writeImpl(KeyHolderImpl<K>* k, KV&& kv) {
+        auto k2 = KeyHolderPtr(k);
 
         KeyValueMap *ds = getDeletesMap<K>(false);
         if (ds)
-            ds->erase(k);
+            ds->erase(k2);
 
         KeyValueMap *ws = getWritesMap<K>(true);
-        ws->erase(k);
-        ws->emplace(std::make_pair(std::move(k), std::move(kv)));
+        ws->erase(k2);
+        ws->emplace(std::make_pair(std::move(k2), std::forward<KV>(kv)));
+    }
+
+public:
+    CDBTransaction(Parent &_parent, CommitTarget &_commitTarget) : parent(_parent), commitTarget(_commitTarget) {}
+
+    template <typename K, typename V>
+    void Write(const K& key, const V& v) {
+        auto k = new KeyHolderImpl<K>(key);
+        auto kv = std::make_unique<KeyValueHolderImpl<K, V>>(*k, v);
+        writeImpl(k, std::move(kv));
+    }
+
+    template <typename K, typename V>
+    void Write(const K& key, V&& v) {
+        auto k = new KeyHolderImpl<K>(key);
+        auto kv = std::make_unique<KeyValueHolderImpl<K, typename std::remove_reference<V>::type>>(*k, std::forward<V>(v));
+        writeImpl(k, std::move(kv));
     }
 
     template <typename K, typename V>
@@ -450,7 +469,7 @@ class CDBTransaction {
 
         KeyValueMap *ws = getWritesMap<K>(false);
         if (ws) {
-            KeyValueMap::iterator it = ws->find(k);
+            auto it = ws->find(k);
             if (it != ws->end()) {
                 auto *impl = dynamic_cast<KeyValueHolderImpl<K, V> *>(it->second.get());
                 if (!impl)
@@ -460,7 +479,7 @@ class CDBTransaction {
             }
         }
 
-        return db.Read(key, value);
+        return parent.Read(key, value);
     }
 
     template <typename K>
@@ -475,7 +494,7 @@ class CDBTransaction {
         if (ws && ws->count(k))
             return true;
 
-        return db.Exists(key);
+        return parent.Exists(key);
     }
 
     template <typename K>
@@ -494,21 +513,18 @@ class CDBTransaction {
         deletes.clear();
     }
 
-    bool Commit() {
-        CDBBatch batch(db);
+    void Commit() {
         for (auto &p : deletes) {
             for (auto &p2 : p.second) {
-                p2.first->Erase(batch);
+                p2.first->Erase(commitTarget);
             }
         }
         for (auto &p : writes) {
             for (auto &p2 : p.second) {
-                p2.second->Write(batch);
+                p2.second->Write(commitTarget);
             }
         }
-        bool ret = db.WriteBatch(batch, true);
         Clear();
-        return ret;
     }
 
     bool IsClean() {
@@ -516,26 +532,29 @@ class CDBTransaction {
     }
 };
 
+template<typename Parent, typename CommitTarget>
 class CScopedDBTransaction {
+public:
+    typedef CDBTransaction<Parent, CommitTarget> Transaction;
+
 private:
-    CDBTransaction &dbTransaction;
+    Transaction &dbTransaction;
     std::function<void ()> commitHandler;
     std::function<void ()> rollbackHandler;
     bool didCommitOrRollback{};
 
 public:
-    CScopedDBTransaction(CDBTransaction &dbTx) : dbTransaction(dbTx) {}
+    CScopedDBTransaction(Transaction &dbTx) : dbTransaction(dbTx) {}
     ~CScopedDBTransaction() {
         if (!didCommitOrRollback)
             Rollback();
     }
-    bool Commit() {
+    void Commit() {
         assert(!didCommitOrRollback);
         didCommitOrRollback = true;
-        bool result = dbTransaction.Commit();
+        dbTransaction.Commit();
         if (commitHandler)
             commitHandler();
-        return result;
     }
     void Rollback() {
         assert(!didCommitOrRollback);
@@ -545,9 +564,9 @@ class CScopedDBTransaction {
             rollbackHandler();
     }
 
-    static std::unique_ptr<CScopedDBTransaction> Begin(CDBTransaction &dbTx) {
+    static std::unique_ptr<CScopedDBTransaction<Parent, CommitTarget>> Begin(Transaction &dbTx) {
         assert(dbTx.IsClean());
-        return std::unique_ptr<CScopedDBTransaction>(new CScopedDBTransaction(dbTx));
+        return std::make_unique<CScopedDBTransaction<Parent, CommitTarget>>(dbTx);
     }
 
     void SetCommitHandler(const std::function<void ()> &h) {
diff --git a/src/evo/evodb.cpp b/src/evo/evodb.cpp
index b041be3d99dd..138353dbae7a 100644
--- a/src/evo/evodb.cpp
+++ b/src/evo/evodb.cpp
@@ -8,10 +8,21 @@ CEvoDB* evoDb;
 
 CEvoDB::CEvoDB(size_t nCacheSize, bool fMemory, bool fWipe) :
     db(fMemory ? "" : (GetDataDir() / "evodb"), nCacheSize, fMemory, fWipe),
-    dbTransaction(db)
+    rootBatch(db),
+    rootDBTransaction(db, rootBatch),
+    curDBTransaction(rootDBTransaction, rootDBTransaction)
 {
 }
 
+bool CEvoDB::CommitRootTransaction()
+{
+    assert(curDBTransaction.IsClean());
+    rootDBTransaction.Commit();
+    bool ret = db.WriteBatch(rootBatch);
+    rootBatch.Clear();
+    return ret;
+}
+
 bool CEvoDB::VerifyBestBlock(const uint256& hash)
 {
     // Make sure evodb is consistent.
diff --git a/src/evo/evodb.h b/src/evo/evodb.h
index 2506264c04c7..b7fef6d78cac 100644
--- a/src/evo/evodb.h
+++ b/src/evo/evodb.h
@@ -16,15 +16,22 @@ class CEvoDB
 private:
     CCriticalSection cs;
     CDBWrapper db;
-    CDBTransaction dbTransaction;
+
+    typedef CDBTransaction<CDBWrapper, CDBBatch> RootTransaction;
+    typedef CDBTransaction<RootTransaction, RootTransaction> CurTransaction;
+    typedef CScopedDBTransaction<RootTransaction, RootTransaction> ScopedTransaction;
+
+    CDBBatch rootBatch;
+    RootTransaction rootDBTransaction;
+    CurTransaction curDBTransaction;
 
 public:
     CEvoDB(size_t nCacheSize, bool fMemory = false, bool fWipe = false);
 
-    std::unique_ptr<CScopedDBTransaction> BeginTransaction()
+    std::unique_ptr<ScopedTransaction> BeginTransaction()
     {
         LOCK(cs);
-        auto t = CScopedDBTransaction::Begin(dbTransaction);
+        auto t = ScopedTransaction::Begin(curDBTransaction);
         return t;
     }
 
@@ -32,28 +39,28 @@ class CEvoDB
     bool Read(const K& key, V& value)
     {
         LOCK(cs);
-        return dbTransaction.Read(key, value);
+        return curDBTransaction.Read(key, value);
     }
 
     template <typename K, typename V>
     void Write(const K& key, const V& value)
     {
         LOCK(cs);
-        dbTransaction.Write(key, value);
+        curDBTransaction.Write(key, value);
     }
 
     template <typename K>
     bool Exists(const K& key)
     {
         LOCK(cs);
-        return dbTransaction.Exists(key);
+        return curDBTransaction.Exists(key);
     }
 
     template <typename K>
     void Erase(const K& key)
     {
         LOCK(cs);
-        dbTransaction.Erase(key);
+        curDBTransaction.Erase(key);
     }
 
     CDBWrapper& GetRawDB()
@@ -61,6 +68,8 @@ class CEvoDB
         return db;
     }
 
+    bool CommitRootTransaction();
+
     bool VerifyBestBlock(const uint256& hash);
     void WriteBestBlock(const uint256& hash);
 };
diff --git a/src/validation.cpp b/src/validation.cpp
index 2435f2040051..bfa560c463de 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -2414,6 +2414,9 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode, int n
         // Flush the chainstate (which may refer to block index entries).
         if (!pcoinsTip->Flush())
             return AbortNode(state, "Failed to write to coin database");
+        if (!evoDb->CommitRootTransaction()) {
+            return AbortNode(state, "Failed to commit EvoDB");
+        }
         nLastFlush = nNow;
     }
     if (fDoFullFlush || ((mode == FLUSH_STATE_ALWAYS || mode == FLUSH_STATE_PERIODIC) && nNow > nLastSetChain + (int64_t)DATABASE_WRITE_INTERVAL * 1000000)) {
@@ -2519,12 +2522,11 @@ bool static DisconnectTip(CValidationState& state, const CChainParams& chainpara
             return error("DisconnectTip(): DisconnectBlock %s failed", pindexDelete->GetBlockHash().ToString());
         bool flushed = view.Flush();
         assert(flushed);
-        bool committed = dbTx->Commit();
-        assert(committed);
+        dbTx->Commit();
     }
     LogPrint("bench", "- Disconnect block: %.2fms\n", (GetTimeMicros() - nStart) * 0.001);
     // Write the chain state to disk, if necessary.
-    if (!FlushStateToDisk(state, IsInitialBlockDownload() ? FLUSH_STATE_IF_NEEDED : FLUSH_STATE_ALWAYS))
+    if (!FlushStateToDisk(state, FLUSH_STATE_IF_NEEDED))
         return false;
     // Resurrect mempool transactions from the disconnected block.
     std::vector<uint256> vHashUpdate;
@@ -2609,13 +2611,12 @@ bool static ConnectTip(CValidationState& state, const CChainParams& chainparams,
         LogPrint("bench", "  - Connect total: %.2fms [%.2fs]\n", (nTime3 - nTime2) * 0.001, nTimeConnectTotal * 0.000001);
         bool flushed = view.Flush();
         assert(flushed);
-        bool committed = dbTx->Commit();
-        assert(committed);
+        dbTx->Commit();
     }
     int64_t nTime4 = GetTimeMicros(); nTimeFlush += nTime4 - nTime3;
     LogPrint("bench", "  - Flush: %.2fms [%.2fs]\n", (nTime4 - nTime3) * 0.001, nTimeFlush * 0.000001);
     // Write the chain state to disk, if necessary.
-    if (!FlushStateToDisk(state, IsInitialBlockDownload() ? FLUSH_STATE_IF_NEEDED : FLUSH_STATE_ALWAYS))
+    if (!FlushStateToDisk(state, FLUSH_STATE_IF_NEEDED))
         return false;
     int64_t nTime5 = GetTimeMicros(); nTimeChainState += nTime5 - nTime4;
     LogPrint("bench", "  - Writing chainstate: %.2fms [%.2fs]\n", (nTime5 - nTime4) * 0.001, nTimeChainState * 0.000001);

From 25222b37866851e224d354f346417a5bf27cf196 Mon Sep 17 00:00:00 2001
From: Alexander Block <ablock84@gmail.com>
Date: Wed, 6 Mar 2019 20:45:53 +0100
Subject: [PATCH 23/28] Make -masternodeblsprivkey mandatory when -masternode
 is given (#2745)

---
 src/init.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index 2e880a6d3548..81b3a133bd43 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1967,7 +1967,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
                 return InitError(_("Invalid masternodeblsprivkey. Please see documenation."));
             }
         } else {
-            InitWarning(_("You should specify a masternodeblsprivkey in the configuration. Please see documentation for help."));
+            return InitError(_("You must specify a masternodeblsprivkey in the configuration. Please see documentation for help."));
         }
 
         // init and register activeMasternodeManager

From 6374dce99e40cd409e1db04bbfd7a200f60aff64 Mon Sep 17 00:00:00 2001
From: Alexander Block <ablock84@gmail.com>
Date: Thu, 7 Mar 2019 14:29:24 +0100
Subject: [PATCH 24/28] Fix error message for invalid voting addresses (#2747)

---
 src/rpc/rpcevo.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpc/rpcevo.cpp b/src/rpc/rpcevo.cpp
index 37a36a51a66a..b83c6cea0450 100644
--- a/src/rpc/rpcevo.cpp
+++ b/src/rpc/rpcevo.cpp
@@ -693,7 +693,7 @@ UniValue protx_update_registrar(const JSONRPCRequest& request)
         ptx.pubKeyOperator = ParseBLSPubKey(request.params[2].get_str(), "operator BLS address");
     }
     if (request.params[3].get_str() != "") {
-        ptx.keyIDVoting = ParsePubKeyIDFromAddress(request.params[3].get_str(), "operator address");
+        ptx.keyIDVoting = ParsePubKeyIDFromAddress(request.params[3].get_str(), "voting address");
     }
 
     CBitcoinAddress payoutAddress(request.params[4].get_str());

From 9dd16cdbe7cf15ad9e46b337181662962b31542d Mon Sep 17 00:00:00 2001
From: PastaPastaPasta <pasta@dashboost.org>
Date: Fri, 8 Mar 2019 07:21:33 +0000
Subject: [PATCH 25/28] Bump minChainWork and AssumeValid to block #1033120
 (#2750)

---
 src/chainparams.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 77f215fad8cb..688a64fcf6f1 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -237,10 +237,10 @@ class CMainParams : public CChainParams {
         consensus.vDeployments[Consensus::DEPLOYMENT_DIP0003].nThreshold = 3226; // 80% of 4032
 
         // The best chain should have at least this much work.
-        consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000cca0a6a35241029410f"); // 967800
+        consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000112df08fc9f0ca551d0d"); // 1033120
 
         // By default assume that the signatures in ancestors of this block are valid.
-        consensus.defaultAssumeValid = uint256S("0x0000000000000024e26c7df7e46d673724d223cf4ca2b2adc21297cc095600f4"); // 967800
+        consensus.defaultAssumeValid = uint256S("0x0000000000000012d041eff8ea278d1dafe5df44f2cdd4afa17e262a0dd3ba45"); // 1033120
 
         /**
          * The message start string is designed to be unlikely to occur in normal data.

From fbcb61475af20cb57b040d90709aa485a6ab7763 Mon Sep 17 00:00:00 2001
From: Alexander Block <ablock84@gmail.com>
Date: Fri, 8 Mar 2019 19:21:50 +0100
Subject: [PATCH 26/28] [0.13.x] Bump version to 0.13.2 and add release notes
 (#2749)

* Bump version to 0.13.2

* Add release notes for 0.13.2.0

* Update credits

* Add #2750 to changelog

* Update doc/release-notes.md

Co-Authored-By: codablock <ablock84@gmail.com>
---
 configure.ac                                  |   2 +-
 doc/Doxyfile                                  |   2 +-
 doc/release-notes.md                          | 105 ++++++++-----
 .../dash/release-notes-0.13.1.md              | 144 ++++++++++++++++++
 src/clientversion.h                           |   2 +-
 5 files changed, 213 insertions(+), 42 deletions(-)
 create mode 100644 doc/release-notes/dash/release-notes-0.13.1.md

diff --git a/configure.ac b/configure.ac
index b875969814f4..65d7051337f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
 AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 13)
-define(_CLIENT_VERSION_REVISION, 1)
+define(_CLIENT_VERSION_REVISION, 2)
 define(_CLIENT_VERSION_BUILD, 0)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2018)
diff --git a/doc/Doxyfile b/doc/Doxyfile
index 4cad2d4a44a8..7b6f9021c617 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.13.1.0
+PROJECT_NUMBER         = 0.13.2.0
 
 # 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/doc/release-notes.md b/doc/release-notes.md
index 84c033707e82..7b4c9ae46e04 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -1,4 +1,4 @@
-Dash Core version 0.13.1.0
+Dash Core version 0.13.2.0
 ==========================
 
 Release is now available from:
@@ -26,7 +26,7 @@ have to reindex (start with -reindex-chainstate or -reindex) to make sure
 your wallet has all the new data synced (only if you were using version < 0.13).
 
 Note that there is no protocol bump in this version and thus active masternodes
-updating from v0.13.0.0 do not require any additional actions (no need to issue
+updating from v0.13.0.0 or v0.13.1.0 do not require any additional actions (no need to issue
 `masternode start` command).
 
 Downgrade warning
@@ -34,71 +34,97 @@ Downgrade warning
 
 ### Downgrade to a version < 0.13.0.0
 
-Downgrading to a version smaller than 0.13 is only supported as long as DIP2/DIP3
-has not been activated. Activation will happen when enough miners signal compatibility
-through a BIP9 (bit 3) deployment.
+Downgrading to a version smaller than 0.13 is not supported anymore as DIP2/DIP3 has activated
+on mainnet and testnet.
 
-### Downgrade to 0.13.0.0
+### Downgrade to 0.13.0.0 or 0.13.1.0
 
-Downgrading to 0.13.0.0 is fully supported but is not recommended unless you have some serious issues with 0.13.1.0.
+Downgrading to 0.13.0.0 is fully supported but is not recommended unless you have some serious issues with 0.13.2.0.
 
 Notable changes
 ===============
 
-DIP0003 block signaling
------------------------
-Miners running v0.13.1.0 are going to signal DIP3 regardles of the readiness of the corresponding masternode.
-With 70%+ masternodes already running on v0.13.0.0 we believe it's safe to slightly speed up the migration
-this way. This is fully backwards compatible and no update is required for (non-mining) nodes running on v0.13.0.0.
-
-GUI changes
------------
-Masternodes tab has a new checkbox that should filter masternode list by using keys stored in the wallet.
-This should make it much easier for masternode owners to find their masternodes in the list.
+Providing "masternodeblsprivkey" is now mandatory when the node is launched as a masternode ("masternode=1")
+------------------------------------------------------------------------
+In previous versions, "masternodeblsprivkey" was not mandatory as these versions had to function with and without DIP3
+activation. Now that DIP3 has activated on mainnet and testnet, we can make "masternodeblsprivkey" mandatory when
+configuring and running a masternode. Please note that your masternode will fail to start when "masternodeblsprivkey"
+is not specified. This also means that 0.13.2.0 will only work with masternodes which have already registered their
+DIP3 masternode. This enforcement was added to catch misconfigurations of masternodes which would otherwise stay
+unnoticed until spork 15 activation and thus surprise and hurt masternode owners.
+
+Fix for consistency issues after sudden stopping of node
+--------------------------------------------------------
+Previous versions resulted in inconsistency between the chainstate and evodb when the node crashed or otherwise suddenly
+stopped (e.g. power failure). This should be fixed in 0.13.2.0. 
+
+Fix for litemode nodes to not reject specific DIP3 transactions
+---------------------------------------------------------------
+Previous versions might cause litemode nodes to reject the mainnet chain after spork 15 activation. This is due to a
+consensus rule being less strict in one specific case when spork 15 is active. Litemode nodes can not know about the
+change in consensus rules as they have no knowledge about sporks. In 0.13.2.0, when litemode is enabled, we default to the
+behaviour of activated spork15 in this specific case, which fixes the issue. The restriction will be completely removed
+in the next major release.
+
+Fix incorrect behavior for "protx diff" and the P2P message "GETMNLISTDIFF"
+---------------------------------------------------------------------------
+Both were responding with errors when "0" was used as base block hash. DIP4 defines "0" to be equivalent with the
+genesis block, so that it's easy for peers to request the full masternode list.
+This is mostly important for SPV nodes (e.g. mobile wallets) which need the masternode list. Right now, all nodes in
+the network will respond with an error when "0" is provided in  "GETMNLISTDIFF". Until enough masternodes have upgraded
+to 0.13.2.0, SPV nodes should use the full genesis hash to circumvent the error.
+
+Exclusion of LLMQ quorum commitments from partial blocks
+--------------------------------------------------------
+SPV nodes are generally not interested in non-financial special transactions in blocks, so we're omitting them now when
+sending partial/filtered blocks to SPV clients. This currently only filters LLMQ quorum commitments, which also caused
+some SPV implementations to ban nodes as they were not able to process these. DIP3 transactions (ProRegTx, ProUpRegTx, ...)
+are not affected and are still included in partial/filtered blocks as these might also move funds. 
 
 RPC changes
 -----------
-There is a new RPC command `getspecialtxes` which returns an array of special transactions found in the specified
-block with different level of verbosity. Also, various `protx` commands show extended help text for each parameter
-now (instead of referencing `protx register`).
+`masternode list json` and `protx list` will now include the collateral address of masternodes.
 
 Bug fixes/Other improvements
 ----------------------------
 There are few bug fixes in this release:
-- Block size should be calculated correctly for blocks with quorum commitments when constructing new block;
-- Special transactions should be checked for mempool acceptance at the right time (nodes could ban each other
-in some rare cases otherwise);
-- Signature verification and processing of special transactions is decoupled to avoid any potential issues.
+- Fixed a crash on shutdown
+- Fixed a misleading error message in the RPC "protx update_registrar"  
+- Slightly speed up initial sync by not running DIP3 logic in old blocks
+- Add build number (CLIENT_VERSION_BUILD) to MacOS bundle information 
 
- 0.13.1.0 Change log
+ 0.13.2.0 Change log
 ===================
 
-See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.13.0.0...dashpay:v0.13.1.0).
+See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.13.1.0...dashpay:v0.13.2.0).
 
 ### Backports
 
-- [`da5a861c0`](https://github.com/dashpay/dash/commit/da5a861c0) Change the way invalid ProTxes are handled in `addUnchecked` and `existsProviderTxConflict` (#2691)
-- [`6ada90c11`](https://github.com/dashpay/dash/commit/6ada90c11) Call existsProviderTxConflict after CheckSpecialTx (#2690)
-- [`23eb70cb7`](https://github.com/dashpay/dash/commit/23eb70cb7) Add getspecialtxes rpc (#2668)
-- [`023f8a01a`](https://github.com/dashpay/dash/commit/023f8a01a) Fix bench log for payee and special txes (#2678)
-- [`8961a6acc`](https://github.com/dashpay/dash/commit/8961a6acc) Stop checking MN protocol version before signalling DIP3 (#2684)
-- [`e18916386`](https://github.com/dashpay/dash/commit/e18916386) Add missing help text for `operatorPayoutAddress` (#2679)
-- [`0d8cc0761`](https://github.com/dashpay/dash/commit/0d8cc0761) Invoke CheckSpecialTx after all normal TX checks have passed (#2673)
-- [`592210daf`](https://github.com/dashpay/dash/commit/592210daf) Bump block stats when adding commitment tx into block (#2654)
-- [`070ad103f`](https://github.com/dashpay/dash/commit/070ad103f) Wait for script checks to finish before messing with txes in Dash-specific way (#2652)
-- [`3a3586d5a`](https://github.com/dashpay/dash/commit/3a3586d5a) Use helper function to produce help text for params of `protx` rpcs (#2649)
-- [`332e0361c`](https://github.com/dashpay/dash/commit/332e0361c) Add checkbox to show only masternodes the wallet has keys for (#2627)
+- [`2516a6e19`](https://github.com/dashpay/dash/commit/2516a6e19) Bump version to 0.13.2
+- [`6374dce99`](https://github.com/dashpay/dash/commit/6374dce99) Fix error message for invalid voting addresses (#2747)
+- [`25222b378`](https://github.com/dashpay/dash/commit/25222b378) Make -masternodeblsprivkey mandatory when -masternode is given (#2745)
+- [`0364e033a`](https://github.com/dashpay/dash/commit/0364e033a) Implement 2-stage commit for CEvoDB to avoid inconsistencies after crashes (#2744)
+- [`a11e2f9eb`](https://github.com/dashpay/dash/commit/a11e2f9eb) Add collateraladdress into masternode/protx list rpc output (#2740)
+- [`43612a272`](https://github.com/dashpay/dash/commit/43612a272) Only include selected TX types into CMerkleBlock (#2737)
+- [`f868fbc78`](https://github.com/dashpay/dash/commit/f868fbc78) Stop g_connman first before deleting it (#2734)
+- [`9e233f391`](https://github.com/dashpay/dash/commit/9e233f391) Fix incorrect usage of begin() when genesis block is requested in "protx diff" (#2699)
+- [`e75f971b9`](https://github.com/dashpay/dash/commit/e75f971b9) Do not process blocks in CDeterministicMNManager before dip3 activation (#2698)
+- [`1cc47ebcd`](https://github.com/dashpay/dash/commit/1cc47ebcd) Backport #14701: build: Add CLIENT_VERSION_BUILD to CFBundleGetInfoString (#2687)
 
 ### Other
 
-- [`bd0de4876`](https://github.com/dashpay/dash/commit/bd0de4876) Bump version to 0.13.1 (#2686)
+- [`9dd16cdbe`](https://github.com/dashpay/dash/commit/9dd16cdbe) Bump minChainWork and AssumeValid to block #1033120 (#2750)
+- [`18f087b27`](https://github.com/dashpay/dash/commit/18f087b27) Fix some typos in doc/guide-startmany.md (#2711)
+- [`709ab6d3e`](https://github.com/dashpay/dash/commit/709ab6d3e) Minimal fix for litemode vs bad-protx-key-not-same issue (#2694)
 
 Credits
 =======
 
 Thanks to everyone who directly contributed to this release:
 
-- Alexander Block
+- Alexander Block (codablock)
+- Felix Yan (felixonmars)
+- PastaPastaPasta
 - UdjinM6
 
 As well as everyone that submitted issues and reviewed pull requests.
@@ -126,6 +152,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.13.1.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.13.1.0.md) released Feb/9/2019
 - [v0.13.0.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.13.0.0.md) released Jan/14/2019
 - [v0.12.3.4](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.4.md) released Dec/14/2018
 - [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
diff --git a/doc/release-notes/dash/release-notes-0.13.1.md b/doc/release-notes/dash/release-notes-0.13.1.md
new file mode 100644
index 000000000000..84c033707e82
--- /dev/null
+++ b/doc/release-notes/dash/release-notes-0.13.1.md
@@ -0,0 +1,144 @@
+Dash Core version 0.13.1.0
+==========================
+
+Release is now available from:
+
+  <https://www.dash.org/downloads/#wallets>
+
+This is a new minor version release, bringing various bugfixes and other improvements.
+
+Please report bugs using the issue tracker at github:
+
+  <https://github.com/dashpay/dash/issues>
+
+
+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). If you upgrade after DIP0003 activation you will
+have to reindex (start with -reindex-chainstate or -reindex) to make sure
+your wallet has all the new data synced (only if you were using version < 0.13).
+
+Note that there is no protocol bump in this version and thus active masternodes
+updating from v0.13.0.0 do not require any additional actions (no need to issue
+`masternode start` command).
+
+Downgrade warning
+-----------------
+
+### Downgrade to a version < 0.13.0.0
+
+Downgrading to a version smaller than 0.13 is only supported as long as DIP2/DIP3
+has not been activated. Activation will happen when enough miners signal compatibility
+through a BIP9 (bit 3) deployment.
+
+### Downgrade to 0.13.0.0
+
+Downgrading to 0.13.0.0 is fully supported but is not recommended unless you have some serious issues with 0.13.1.0.
+
+Notable changes
+===============
+
+DIP0003 block signaling
+-----------------------
+Miners running v0.13.1.0 are going to signal DIP3 regardles of the readiness of the corresponding masternode.
+With 70%+ masternodes already running on v0.13.0.0 we believe it's safe to slightly speed up the migration
+this way. This is fully backwards compatible and no update is required for (non-mining) nodes running on v0.13.0.0.
+
+GUI changes
+-----------
+Masternodes tab has a new checkbox that should filter masternode list by using keys stored in the wallet.
+This should make it much easier for masternode owners to find their masternodes in the list.
+
+RPC changes
+-----------
+There is a new RPC command `getspecialtxes` which returns an array of special transactions found in the specified
+block with different level of verbosity. Also, various `protx` commands show extended help text for each parameter
+now (instead of referencing `protx register`).
+
+Bug fixes/Other improvements
+----------------------------
+There are few bug fixes in this release:
+- Block size should be calculated correctly for blocks with quorum commitments when constructing new block;
+- Special transactions should be checked for mempool acceptance at the right time (nodes could ban each other
+in some rare cases otherwise);
+- Signature verification and processing of special transactions is decoupled to avoid any potential issues.
+
+ 0.13.1.0 Change log
+===================
+
+See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.13.0.0...dashpay:v0.13.1.0).
+
+### Backports
+
+- [`da5a861c0`](https://github.com/dashpay/dash/commit/da5a861c0) Change the way invalid ProTxes are handled in `addUnchecked` and `existsProviderTxConflict` (#2691)
+- [`6ada90c11`](https://github.com/dashpay/dash/commit/6ada90c11) Call existsProviderTxConflict after CheckSpecialTx (#2690)
+- [`23eb70cb7`](https://github.com/dashpay/dash/commit/23eb70cb7) Add getspecialtxes rpc (#2668)
+- [`023f8a01a`](https://github.com/dashpay/dash/commit/023f8a01a) Fix bench log for payee and special txes (#2678)
+- [`8961a6acc`](https://github.com/dashpay/dash/commit/8961a6acc) Stop checking MN protocol version before signalling DIP3 (#2684)
+- [`e18916386`](https://github.com/dashpay/dash/commit/e18916386) Add missing help text for `operatorPayoutAddress` (#2679)
+- [`0d8cc0761`](https://github.com/dashpay/dash/commit/0d8cc0761) Invoke CheckSpecialTx after all normal TX checks have passed (#2673)
+- [`592210daf`](https://github.com/dashpay/dash/commit/592210daf) Bump block stats when adding commitment tx into block (#2654)
+- [`070ad103f`](https://github.com/dashpay/dash/commit/070ad103f) Wait for script checks to finish before messing with txes in Dash-specific way (#2652)
+- [`3a3586d5a`](https://github.com/dashpay/dash/commit/3a3586d5a) Use helper function to produce help text for params of `protx` rpcs (#2649)
+- [`332e0361c`](https://github.com/dashpay/dash/commit/332e0361c) Add checkbox to show only masternodes the wallet has keys for (#2627)
+
+### Other
+
+- [`bd0de4876`](https://github.com/dashpay/dash/commit/bd0de4876) Bump version to 0.13.1 (#2686)
+
+Credits
+=======
+
+Thanks to everyone who directly contributed to this release:
+
+- Alexander Block
+- UdjinM6
+
+As well as everyone that 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.13.0.0](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.13.0.0.md) released Jan/14/2019
+- [v0.12.3.4](https://github.com/dashpay/dash/blob/master/doc/release-notes/dash/release-notes-0.12.3.4.md) released Dec/14/2018
+- [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
+- [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 Aug/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
+
diff --git a/src/clientversion.h b/src/clientversion.h
index 599b8c26110f..575fffb5174e 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -16,7 +16,7 @@
 //! These need to be macros, as clientversion.cpp's and dash*-res.rc's voodoo requires it
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 13
-#define CLIENT_VERSION_REVISION 1
+#define CLIENT_VERSION_REVISION 2
 #define CLIENT_VERSION_BUILD 0
 
 //! Set to true for release, false for prerelease or test build

From 548a489188b791a5ee1197541dea5a1dcf3b2e8f Mon Sep 17 00:00:00 2001
From: Alexander Block <ablock84@gmail.com>
Date: Tue, 12 Mar 2019 13:42:11 +0100
Subject: [PATCH 27/28] Move IS block filtering into ConnectBlock (#2766)

---
 src/validation.cpp | 58 ++++++++++++++++++++++------------------------
 1 file changed, 28 insertions(+), 30 deletions(-)

diff --git a/src/validation.cpp b/src/validation.cpp
index bfa560c463de..804b748878f0 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -2222,13 +2222,40 @@ static bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockInd
                      pindex->GetBlockHash().ToString(), FormatStateMessage(state));
     }
 
-    // DASH : MODIFIED TO CHECK MASTERNODE PAYMENTS AND SUPERBLOCKS
+    // DASH
 
     // It's possible that we simply don't have enough data and this could fail
     // (i.e. block itself could be a correct one and we need to store it),
     // that's why this is in ConnectBlock. Could be the other way around however -
     // the peer who sent us this block is missing some data and wasn't able
     // to recognize that block is actually invalid.
+
+    // DASH : CHECK TRANSACTIONS FOR INSTANTSEND
+
+    if (sporkManager.IsSporkActive(SPORK_3_INSTANTSEND_BLOCK_FILTERING)) {
+        // Require other nodes to comply, send them some data in case they are missing it.
+        for (const auto& tx : block.vtx) {
+            // skip txes that have no inputs
+            if (tx->vin.empty()) continue;
+            // LOOK FOR TRANSACTION LOCK IN OUR MAP OF OUTPOINTS
+            for (const auto& txin : tx->vin) {
+                uint256 hashLocked;
+                if (instantsend.GetLockedOutPointTxHash(txin.prevout, hashLocked) && hashLocked != tx->GetHash()) {
+                    // The node which relayed this should switch to correct chain.
+                    // TODO: relay instantsend data/proof.
+                    LOCK(cs_main);
+                    mapRejectedBlocks.insert(std::make_pair(block.GetHash(), GetTime()));
+                    return state.DoS(10, error("ConnectBlock(DASH): transaction %s conflicts with transaction lock %s", tx->GetHash().ToString(), hashLocked.ToString()),
+                                     REJECT_INVALID, "conflict-tx-lock");
+                }
+            }
+        }
+    } else {
+        LogPrintf("ConnectBlock(DASH): spork is off, skipping transaction locking checks\n");
+    }
+
+    // DASH : MODIFIED TO CHECK MASTERNODE PAYMENTS AND SUPERBLOCKS
+
     // TODO: resync data (both ways?) and try to reprocess this block later.
     CAmount blockReward = nFees + GetBlockSubsidy(pindex->pprev->nBits, pindex->pprev->nHeight, chainparams.GetConsensus());
     std::string strError = "";
@@ -3271,35 +3298,6 @@ bool CheckBlock(const CBlock& block, CValidationState& state, const Consensus::P
         if (block.vtx[i]->IsCoinBase())
             return state.DoS(100, false, REJECT_INVALID, "bad-cb-multiple", false, "more than one coinbase");
 
-
-    // DASH : CHECK TRANSACTIONS FOR INSTANTSEND
-
-    if(sporkManager.IsSporkActive(SPORK_3_INSTANTSEND_BLOCK_FILTERING)) {
-        // We should never accept block which conflicts with completed transaction lock,
-        // that's why this is in CheckBlock unlike coinbase payee/amount.
-        // Require other nodes to comply, send them some data in case they are missing it.
-        for(const auto& tx : block.vtx) {
-            // skip coinbase, it has no inputs
-            if (tx->IsCoinBase()) continue;
-            // LOOK FOR TRANSACTION LOCK IN OUR MAP OF OUTPOINTS
-            for (const auto& txin : tx->vin) {
-                uint256 hashLocked;
-                if(instantsend.GetLockedOutPointTxHash(txin.prevout, hashLocked) && hashLocked != tx->GetHash()) {
-                    // The node which relayed this will have to switch later,
-                    // relaying instantsend data won't help it.
-                    LOCK(cs_main);
-                    mapRejectedBlocks.insert(std::make_pair(block.GetHash(), GetTime()));
-                    return state.DoS(100, false, REJECT_INVALID, "conflict-tx-lock", false, 
-                                     strprintf("transaction %s conflicts with transaction lock %s", tx->GetHash().ToString(), hashLocked.ToString()));
-                }
-            }
-        }
-    } else {
-        LogPrintf("CheckBlock(DASH): spork is off, skipping transaction locking checks\n");
-    }
-
-    // END DASH
-
     // Check transactions
     for (const auto& tx : block.vtx)
         if (!CheckTransaction(*tx, state))

From 4570079e53ad859c571aeac3f132cf2969888e14 Mon Sep 17 00:00:00 2001
From: Alexander Block <ablock84@gmail.com>
Date: Wed, 13 Mar 2019 16:01:05 +0100
Subject: [PATCH 28/28] Add missing entry to changelog (#2769)

Also move "Bump version to 0.13.2" to other
---
 doc/release-notes.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 7b4c9ae46e04..500ab253a3a9 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -100,7 +100,7 @@ See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.13.1.0.
 
 ### Backports
 
-- [`2516a6e19`](https://github.com/dashpay/dash/commit/2516a6e19) Bump version to 0.13.2
+- [`548a48918`](https://github.com/dashpay/dash/commit/548a48918) Move IS block filtering into ConnectBlock (#2766)
 - [`6374dce99`](https://github.com/dashpay/dash/commit/6374dce99) Fix error message for invalid voting addresses (#2747)
 - [`25222b378`](https://github.com/dashpay/dash/commit/25222b378) Make -masternodeblsprivkey mandatory when -masternode is given (#2745)
 - [`0364e033a`](https://github.com/dashpay/dash/commit/0364e033a) Implement 2-stage commit for CEvoDB to avoid inconsistencies after crashes (#2744)
@@ -113,6 +113,7 @@ See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.13.1.0.
 
 ### Other
 
+- [`2516a6e19`](https://github.com/dashpay/dash/commit/2516a6e19) Bump version to 0.13.2
 - [`9dd16cdbe`](https://github.com/dashpay/dash/commit/9dd16cdbe) Bump minChainWork and AssumeValid to block #1033120 (#2750)
 - [`18f087b27`](https://github.com/dashpay/dash/commit/18f087b27) Fix some typos in doc/guide-startmany.md (#2711)
 - [`709ab6d3e`](https://github.com/dashpay/dash/commit/709ab6d3e) Minimal fix for litemode vs bad-protx-key-not-same issue (#2694)
