From a0ca1e71fad8b6ef0493b1b50f2912af7ba40de7 Mon Sep 17 00:00:00 2001 From: James Lovejoy Date: Wed, 15 Feb 2017 23:22:56 -0500 Subject: [PATCH 01/10] Bump version --- share/setup.nsi | 2 +- src/clientversion.h | 8 ++++---- vertcoin-qt-mingw32.static.pro | 2 +- vertcoin-qt.pro | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/share/setup.nsi b/share/setup.nsi index 350538a8444f8..cc59376999781 100644 --- a/share/setup.nsi +++ b/share/setup.nsi @@ -5,7 +5,7 @@ SetCompressor /SOLID lzma # General Symbol Definitions !define REGKEY "SOFTWARE\$(^Name)" -!define VERSION 0.10.0.2 +!define VERSION 0.10.1.0 !define COMPANY "Vertcoin project" !define URL https://www.vertcoin.org/ diff --git a/src/clientversion.h b/src/clientversion.h index e0645df556910..227d7f1903b69 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -8,15 +8,15 @@ // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 10 -#define CLIENT_VERSION_REVISION 0 -#define CLIENT_VERSION_BUILD 2 +#define CLIENT_VERSION_REVISION 1 +#define CLIENT_VERSION_BUILD 0 // Set to true for release, false for prerelease or test build -#define CLIENT_VERSION_IS_RELEASE true +#define CLIENT_VERSION_IS_RELEASE false // Copyright year (2009-this) // Todo: update this when changing our copyright comments in the source -#define COPYRIGHT_YEAR 2016 +#define COPYRIGHT_YEAR 2017 // Converts the parameter X to a string after macro replacement on X has been performed. // Don't merge these into one macro! diff --git a/vertcoin-qt-mingw32.static.pro b/vertcoin-qt-mingw32.static.pro index b6124e3b91bd4..3a114329b9628 100644 --- a/vertcoin-qt-mingw32.static.pro +++ b/vertcoin-qt-mingw32.static.pro @@ -1,7 +1,7 @@ TEMPLATE = app TARGET = vertcoin-qt macx:TARGET = "Vertcoin-Qt" -VERSION = 0.10.0.2 +VERSION = 0.10.1.0 INCLUDEPATH += src src/json src/qt QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets diff --git a/vertcoin-qt.pro b/vertcoin-qt.pro index b2bc9b05ae170..53c04d86c6794 100644 --- a/vertcoin-qt.pro +++ b/vertcoin-qt.pro @@ -1,7 +1,7 @@ TEMPLATE = app TARGET = vertcoin-qt macx:TARGET = "Vertcoin-Qt" -VERSION = 0.10.0.2 +VERSION = 0.10.1.0 INCLUDEPATH += src src/json src/qt QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets From fc3fa5f92d7077a8d0a4bd9017913c25e241208e Mon Sep 17 00:00:00 2001 From: James Lovejoy Date: Wed, 15 Feb 2017 23:27:00 -0500 Subject: [PATCH 02/10] Create only lowS transactions This commit does the same this as this pull: request https://github.com/bitcoin/bitcoin/pull/3016 This is in preparation for a lowS signature enforcement policy coming in the next version --- src/key.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/key.cpp b/src/key.cpp index d2546076bd4ce..bc4c384ca3c68 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -194,9 +194,28 @@ class CECKey { } bool Sign(const uint256 &hash, std::vector& vchSig) { + vchSig.clear(); + ECDSA_SIG *sig = ECDSA_do_sign((unsigned char*)&hash, sizeof(hash), pkey); + if (sig == NULL) + return false; + BN_CTX *ctx = BN_CTX_new(); + BN_CTX_start(ctx); + const EC_GROUP *group = EC_KEY_get0_group(pkey); + BIGNUM *order = BN_CTX_get(ctx); + BIGNUM *halforder = BN_CTX_get(ctx); + EC_GROUP_get_order(group, order, ctx); + BN_rshift1(halforder, order); + if (BN_cmp(sig->s, halforder) > 0) { + // enforce low S values, by negating the value (modulo the order) if above order/2. + BN_sub(sig->s, order, sig->s); + } + BN_CTX_end(ctx); + BN_CTX_free(ctx); unsigned int nSize = ECDSA_size(pkey); vchSig.resize(nSize); // Make sure it is big enough - assert(ECDSA_sign(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], &nSize, pkey)); + unsigned char *pos = &vchSig[0]; + nSize = i2d_ECDSA_SIG(sig, &pos); + ECDSA_SIG_free(sig); vchSig.resize(nSize); // Shrink to fit actual size return true; } From 6623befc9e3cf20d10da7c5b2537cc98cb2424a5 Mon Sep 17 00:00:00 2001 From: James Lovejoy Date: Wed, 15 Feb 2017 23:29:23 -0500 Subject: [PATCH 03/10] Only require C++11 to allow older compilers --- src/makefile.mingw | 2 +- src/makefile.unix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/makefile.mingw b/src/makefile.mingw index e89b2daf0a755..7aee45da7d696 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -59,7 +59,7 @@ LIBS= \ DEFS=-D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE DEBUGFLAGS=-g -CFLAGS= -mthreads -O2 -std=c++14 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) +CFLAGS= -mthreads -O2 -std=c++11 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) # enable: ASLR, DEP and large address aware LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat -static diff --git a/src/makefile.unix b/src/makefile.unix index 4fad9425e6d97..14edac5d414c9 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -105,7 +105,7 @@ DEBUGFLAGS=-g # CXXFLAGS can be specified on the make command line, so we use xCXXFLAGS that only # adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work. -xCXXFLAGS=-O2 -std=c++14 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \ +xCXXFLAGS=-O2 -std=c++11 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \ $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) From 0742d2c0b12eee902b71daeab15146873d2445f6 Mon Sep 17 00:00:00 2001 From: James Lovejoy Date: Wed, 15 Feb 2017 23:35:10 -0500 Subject: [PATCH 04/10] Update checkpoints --- src/checkpoints.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index d705926098933..3d76519551616 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -39,19 +39,20 @@ namespace Checkpoints ( 24200, uint256("0xd7ed819858011474c8b0cae4ad0b9bdbb745becc4c386bc22d1220cc5a4d1787")) ( 65000, uint256("0x9e673a69c35a423f736ab66f9a195d7c42f979847a729c0f3cef2c0b8b9d0289")) ( 84065, uint256("0xa904170a5a98109b2909379d9bc03ef97a6b44d5dafbc9084b8699b0cba5aa98")) - ( 228023, uint256("0x15c94667a9e941359d2ee6527e2876db1b5e7510a5ded3885ca02e7e0f516b51")) + ( 228023, uint256("0x15c94667a9e941359d2ee6527e2876db1b5e7510a5ded3885ca02e7e0f516b51")) ( 346992, uint256("0xf1714fa4c7990f4b3d472eb22132891ccd3c7ad7208e2d1ab15bde68854fb0ee")) ( 347269, uint256("0xfa1e592b7ea2aa97c5f20ccd7c40f3aaaeb31d1232c978847a79f28f83b6c22a")) ( 430000, uint256("0x2f5703cf7b6f956b84fd49948cbf49dc164cfcb5a7b55903b1c4f53bc7851611")) ( 516999, uint256("0x572ed47da461743bcae526542053e7bc532de299345e4f51d77786f2870b7b28")) ( 627610, uint256("0x6000a787f2d8bb77d4f491a423241a4cc8439d862ca6cec6851aba4c79ccfedc")) + ( 667269, uint256("0x330f7d1523e855712656820207b2443ba18ffbcd05448417d437a047545aa02c")) ; static const CCheckpointData data = { &mapCheckpoints, - 1481263875, // * UNIX timestamp of last checkpoint block - 2134630, // * total number of transactions between genesis and last checkpoint + 1487219226, // * UNIX timestamp of last checkpoint block + 2199818, // * total number of transactions between genesis and last checkpoint // (the tx=... number in the SetBestChain debug.log lines) - 450.0 // * estimated number of transactions per day after checkpoint + 360.0 // * estimated number of transactions per day after checkpoint }; static MapCheckpoints mapCheckpointsTestnet = From 478a05365da8acaae56297cf1e131207be80c535 Mon Sep 17 00:00:00 2001 From: James Lovejoy Date: Wed, 15 Feb 2017 23:56:21 -0500 Subject: [PATCH 05/10] Use latest block version --- src/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.h b/src/main.h index dd2faaf60c689..5639027d2b01c 100644 --- a/src/main.h +++ b/src/main.h @@ -479,7 +479,7 @@ class CTransaction public: static int64 nMinTxFee; static int64 nMinRelayTxFee; - static const int CURRENT_VERSION=1; + static const int CURRENT_VERSION=4; int nVersion; std::vector vin; std::vector vout; From 5384d02c56ece82e28a9c42961271f2dc453e125 Mon Sep 17 00:00:00 2001 From: James Lovejoy Date: Thu, 16 Feb 2017 01:39:07 -0500 Subject: [PATCH 06/10] Revert "Use latest block version" This reverts commit 478a05365da8acaae56297cf1e131207be80c535. --- src/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.h b/src/main.h index 5639027d2b01c..dd2faaf60c689 100644 --- a/src/main.h +++ b/src/main.h @@ -479,7 +479,7 @@ class CTransaction public: static int64 nMinTxFee; static int64 nMinRelayTxFee; - static const int CURRENT_VERSION=4; + static const int CURRENT_VERSION=1; int nVersion; std::vector vin; std::vector vout; From dda781bc129e032f66ec3be4cb7819f502f88c00 Mon Sep 17 00:00:00 2001 From: James Lovejoy Date: Sun, 19 Feb 2017 23:54:22 -0500 Subject: [PATCH 07/10] Deprecate stealth addresses --- src/bitcoinrpc.cpp | 10 +++++----- src/qt/bitcoingui.cpp | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index c67f5db119751..b670727745bcd 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -214,18 +214,18 @@ static const CRPCCommand vRPCCommands[] = { "getinfo", &getinfo, true, false, false }, { "getmininginfo", &getmininginfo, true, false, false }, { "getnewaddress", &getnewaddress, true, false, true }, - { "getnewstealthaddress", &getnewstealthaddress, false, false, true }, + //{ "getnewstealthaddress", &getnewstealthaddress, false, false, true }, { "getaccountaddress", &getaccountaddress, true, false, true }, { "setaccount", &setaccount, true, false, true }, { "getaccount", &getaccount, false, false, true }, { "getaddressesbyaccount", &getaddressesbyaccount, true, false, true }, { "sendtoaddress", &sendtoaddress, false, false, true }, - { "sendtostealthaddress", &sendtostealthaddress, false, false, true }, + // { "sendtostealthaddress", &sendtostealthaddress, false, false, true }, { "getreceivedbyaddress", &getreceivedbyaddress, false, false, true }, { "getreceivedbyaccount", &getreceivedbyaccount, false, false, true }, { "listreceivedbyaddress", &listreceivedbyaddress, false, false, true }, - { "liststealthaddress", &liststealthaddress, false, false, true }, - { "resetprikeystatus", &resetprikeystatus, false, false, true }, + //{ "liststealthaddress", &liststealthaddress, false, false, true }, + //{ "resetprikeystatus", &resetprikeystatus, false, false, true }, { "listreceivedbyaccount", &listreceivedbyaccount, false, false, true }, { "backupwallet", &backupwallet, true, false, true }, { "keypoolrefill", &keypoolrefill, true, false, true }, @@ -260,7 +260,7 @@ static const CRPCCommand vRPCCommands[] = { "dumpprivkey", &dumpprivkey, true, false, true }, { "importprivkey", &importprivkey, false, false, true }, { "importaddress", &importaddress, false, false, true }, - { "importstealthaddress", &importstealthaddress, false, false, true }, + //{ "importstealthaddress", &importstealthaddress, false, false, true }, { "listunspent", &listunspent, false, false, true }, { "getrawtransaction", &getrawtransaction, false, false, false }, { "createrawtransaction", &createrawtransaction, false, false, false }, diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 2f7974702c867..d941f183d0cba 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -200,12 +200,12 @@ void BitcoinGUI::createActions() addressBookAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5)); tabGroup->addAction(addressBookAction); - stealthAddressAction = new QAction(QIcon(":/icons/stealth_addresses"), tr("&Stealth Addresses"), this); + /*stealthAddressAction = new QAction(QIcon(":/icons/stealth_addresses"), tr("&Stealth Addresses"), this); stealthAddressAction->setStatusTip(tr("Show the list of stealth addresses for receiving payments")); stealthAddressAction->setToolTip(stealthAddressAction->statusTip()); stealthAddressAction->setCheckable(true); stealthAddressAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6)); - tabGroup->addAction(stealthAddressAction); + tabGroup->addAction(stealthAddressAction);*/ connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage())); @@ -217,8 +217,8 @@ void BitcoinGUI::createActions() connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage())); connect(addressBookAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(addressBookAction, SIGNAL(triggered()), this, SLOT(gotoAddressBookPage())); - connect(stealthAddressAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); - connect(stealthAddressAction, SIGNAL(triggered()), this, SLOT(gotoStealthAddressPage())); + //connect(stealthAddressAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); + //connect(stealthAddressAction, SIGNAL(triggered()), this, SLOT(gotoStealthAddressPage())); quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this); quitAction->setStatusTip(tr("Quit application")); @@ -301,7 +301,7 @@ void BitcoinGUI::createToolBars() toolbar->addAction(overviewAction); toolbar->addAction(sendCoinsAction); toolbar->addAction(receiveCoinsAction); - toolbar->addAction(stealthAddressAction); + //toolbar->addAction(stealthAddressAction); toolbar->addAction(historyAction); toolbar->addAction(addressBookAction); } @@ -380,7 +380,7 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled) signMessageAction->setEnabled(enabled); verifyMessageAction->setEnabled(enabled); addressBookAction->setEnabled(enabled); - stealthAddressAction->setEnabled(enabled); + //stealthAddressAction->setEnabled(enabled); } From eeb819a8d26750dcd65a5aed31c8330225d609e9 Mon Sep 17 00:00:00 2001 From: James Lovejoy Date: Tue, 21 Feb 2017 00:03:11 -0500 Subject: [PATCH 08/10] No longer allow free transactions to be created by the wallet due to policy coming in new version --- src/wallet.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wallet.cpp b/src/wallet.cpp index f036fe81b7500..598087212b8cd 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1405,7 +1405,8 @@ bool CWallet::CreateTransaction(const vector, ec_ dPriority /= nBytes; // Check that enough fee is included - bool fAllowFree = CTransaction::AllowFree(dPriority); + //bool fAllowFree = CTransaction::AllowFree(dPriority); + bool fAllowFree = false; int64 nMinFee = wtxNew.GetMinFee(1, fAllowFree, GMF_SEND); if (nFeeRet < nMinFee) From 54340ffc963278b88ec486de5d19e00df7731627 Mon Sep 17 00:00:00 2001 From: James Lovejoy Date: Tue, 21 Feb 2017 00:03:22 -0500 Subject: [PATCH 09/10] Remove stealth rpc command --- src/bitcoinrpc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index b670727745bcd..4fdb800cd5537 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -237,7 +237,7 @@ static const CRPCCommand vRPCCommands[] = { "getbalance", &getbalance, false, false, true }, { "move", &movecmd, false, false, true }, { "sendfrom", &sendfrom, false, false, true }, - { "sendstealthfrom", &sendstealthfrom, false, false, true }, + //{ "sendstealthfrom", &sendstealthfrom, false, false, true }, { "sendmany", &sendmany, false, false, true }, { "addmultisigaddress", &addmultisigaddress, false, false, true }, { "createmultisig", &createmultisig, true, true , false }, From af200c1b152ac546d04e98005aeafd0333532673 Mon Sep 17 00:00:00 2001 From: James Lovejoy Date: Tue, 21 Feb 2017 12:16:56 -0500 Subject: [PATCH 10/10] Release version --- src/clientversion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clientversion.h b/src/clientversion.h index 227d7f1903b69..77f91d6f311c1 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -12,7 +12,7 @@ #define CLIENT_VERSION_BUILD 0 // Set to true for release, false for prerelease or test build -#define CLIENT_VERSION_IS_RELEASE false +#define CLIENT_VERSION_IS_RELEASE true // Copyright year (2009-this) // Todo: update this when changing our copyright comments in the source