Skip to content

Commit b407ad7

Browse files
authored
Merge pull request #71 from metalicjames/master-0.10.1.0
v0.10.1.0 lowS signatures
2 parents df16eda + af200c1 commit b407ad7

11 files changed

Lines changed: 47 additions & 26 deletions

share/setup.nsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ SetCompressor /SOLID lzma
55

66
# General Symbol Definitions
77
!define REGKEY "SOFTWARE\$(^Name)"
8-
!define VERSION 0.10.0.2
8+
!define VERSION 0.10.1.0
99
!define COMPANY "Vertcoin project"
1010
!define URL https://www.vertcoin.org/
1111

src/bitcoinrpc.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,18 +214,18 @@ static const CRPCCommand vRPCCommands[] =
214214
{ "getinfo", &getinfo, true, false, false },
215215
{ "getmininginfo", &getmininginfo, true, false, false },
216216
{ "getnewaddress", &getnewaddress, true, false, true },
217-
{ "getnewstealthaddress", &getnewstealthaddress, false, false, true },
217+
//{ "getnewstealthaddress", &getnewstealthaddress, false, false, true },
218218
{ "getaccountaddress", &getaccountaddress, true, false, true },
219219
{ "setaccount", &setaccount, true, false, true },
220220
{ "getaccount", &getaccount, false, false, true },
221221
{ "getaddressesbyaccount", &getaddressesbyaccount, true, false, true },
222222
{ "sendtoaddress", &sendtoaddress, false, false, true },
223-
{ "sendtostealthaddress", &sendtostealthaddress, false, false, true },
223+
// { "sendtostealthaddress", &sendtostealthaddress, false, false, true },
224224
{ "getreceivedbyaddress", &getreceivedbyaddress, false, false, true },
225225
{ "getreceivedbyaccount", &getreceivedbyaccount, false, false, true },
226226
{ "listreceivedbyaddress", &listreceivedbyaddress, false, false, true },
227-
{ "liststealthaddress", &liststealthaddress, false, false, true },
228-
{ "resetprikeystatus", &resetprikeystatus, false, false, true },
227+
//{ "liststealthaddress", &liststealthaddress, false, false, true },
228+
//{ "resetprikeystatus", &resetprikeystatus, false, false, true },
229229
{ "listreceivedbyaccount", &listreceivedbyaccount, false, false, true },
230230
{ "backupwallet", &backupwallet, true, false, true },
231231
{ "keypoolrefill", &keypoolrefill, true, false, true },
@@ -237,7 +237,7 @@ static const CRPCCommand vRPCCommands[] =
237237
{ "getbalance", &getbalance, false, false, true },
238238
{ "move", &movecmd, false, false, true },
239239
{ "sendfrom", &sendfrom, false, false, true },
240-
{ "sendstealthfrom", &sendstealthfrom, false, false, true },
240+
//{ "sendstealthfrom", &sendstealthfrom, false, false, true },
241241
{ "sendmany", &sendmany, false, false, true },
242242
{ "addmultisigaddress", &addmultisigaddress, false, false, true },
243243
{ "createmultisig", &createmultisig, true, true , false },
@@ -260,7 +260,7 @@ static const CRPCCommand vRPCCommands[] =
260260
{ "dumpprivkey", &dumpprivkey, true, false, true },
261261
{ "importprivkey", &importprivkey, false, false, true },
262262
{ "importaddress", &importaddress, false, false, true },
263-
{ "importstealthaddress", &importstealthaddress, false, false, true },
263+
//{ "importstealthaddress", &importstealthaddress, false, false, true },
264264
{ "listunspent", &listunspent, false, false, true },
265265
{ "getrawtransaction", &getrawtransaction, false, false, false },
266266
{ "createrawtransaction", &createrawtransaction, false, false, false },

src/checkpoints.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,20 @@ namespace Checkpoints
3939
( 24200, uint256("0xd7ed819858011474c8b0cae4ad0b9bdbb745becc4c386bc22d1220cc5a4d1787"))
4040
( 65000, uint256("0x9e673a69c35a423f736ab66f9a195d7c42f979847a729c0f3cef2c0b8b9d0289"))
4141
( 84065, uint256("0xa904170a5a98109b2909379d9bc03ef97a6b44d5dafbc9084b8699b0cba5aa98"))
42-
( 228023, uint256("0x15c94667a9e941359d2ee6527e2876db1b5e7510a5ded3885ca02e7e0f516b51"))
42+
( 228023, uint256("0x15c94667a9e941359d2ee6527e2876db1b5e7510a5ded3885ca02e7e0f516b51"))
4343
( 346992, uint256("0xf1714fa4c7990f4b3d472eb22132891ccd3c7ad7208e2d1ab15bde68854fb0ee"))
4444
( 347269, uint256("0xfa1e592b7ea2aa97c5f20ccd7c40f3aaaeb31d1232c978847a79f28f83b6c22a"))
4545
( 430000, uint256("0x2f5703cf7b6f956b84fd49948cbf49dc164cfcb5a7b55903b1c4f53bc7851611"))
4646
( 516999, uint256("0x572ed47da461743bcae526542053e7bc532de299345e4f51d77786f2870b7b28"))
4747
( 627610, uint256("0x6000a787f2d8bb77d4f491a423241a4cc8439d862ca6cec6851aba4c79ccfedc"))
48+
( 667269, uint256("0x330f7d1523e855712656820207b2443ba18ffbcd05448417d437a047545aa02c"))
4849
;
4950
static const CCheckpointData data = {
5051
&mapCheckpoints,
51-
1481263875, // * UNIX timestamp of last checkpoint block
52-
2134630, // * total number of transactions between genesis and last checkpoint
52+
1487219226, // * UNIX timestamp of last checkpoint block
53+
2199818, // * total number of transactions between genesis and last checkpoint
5354
// (the tx=... number in the SetBestChain debug.log lines)
54-
450.0 // * estimated number of transactions per day after checkpoint
55+
360.0 // * estimated number of transactions per day after checkpoint
5556
};
5657

5758
static MapCheckpoints mapCheckpointsTestnet =

src/clientversion.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
99
#define CLIENT_VERSION_MAJOR 0
1010
#define CLIENT_VERSION_MINOR 10
11-
#define CLIENT_VERSION_REVISION 0
12-
#define CLIENT_VERSION_BUILD 2
11+
#define CLIENT_VERSION_REVISION 1
12+
#define CLIENT_VERSION_BUILD 0
1313

1414
// Set to true for release, false for prerelease or test build
1515
#define CLIENT_VERSION_IS_RELEASE true
1616

1717
// Copyright year (2009-this)
1818
// Todo: update this when changing our copyright comments in the source
19-
#define COPYRIGHT_YEAR 2016
19+
#define COPYRIGHT_YEAR 2017
2020

2121
// Converts the parameter X to a string after macro replacement on X has been performed.
2222
// Don't merge these into one macro!

src/key.cpp

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,28 @@ class CECKey {
194194
}
195195

196196
bool Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) {
197+
vchSig.clear();
198+
ECDSA_SIG *sig = ECDSA_do_sign((unsigned char*)&hash, sizeof(hash), pkey);
199+
if (sig == NULL)
200+
return false;
201+
BN_CTX *ctx = BN_CTX_new();
202+
BN_CTX_start(ctx);
203+
const EC_GROUP *group = EC_KEY_get0_group(pkey);
204+
BIGNUM *order = BN_CTX_get(ctx);
205+
BIGNUM *halforder = BN_CTX_get(ctx);
206+
EC_GROUP_get_order(group, order, ctx);
207+
BN_rshift1(halforder, order);
208+
if (BN_cmp(sig->s, halforder) > 0) {
209+
// enforce low S values, by negating the value (modulo the order) if above order/2.
210+
BN_sub(sig->s, order, sig->s);
211+
}
212+
BN_CTX_end(ctx);
213+
BN_CTX_free(ctx);
197214
unsigned int nSize = ECDSA_size(pkey);
198215
vchSig.resize(nSize); // Make sure it is big enough
199-
assert(ECDSA_sign(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], &nSize, pkey));
216+
unsigned char *pos = &vchSig[0];
217+
nSize = i2d_ECDSA_SIG(sig, &pos);
218+
ECDSA_SIG_free(sig);
200219
vchSig.resize(nSize); // Shrink to fit actual size
201220
return true;
202221
}

src/makefile.mingw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ LIBS= \
4747

4848
DEFS=-D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE
4949
DEBUGFLAGS=-g
50-
CFLAGS= -mthreads -O2 -std=c++14 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
50+
CFLAGS= -mthreads -O2 -std=c++11 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
5151
# enable: ASLR, DEP and large address aware
5252
LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat -static
5353

src/makefile.unix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ DEBUGFLAGS=-g
105105

106106
# CXXFLAGS can be specified on the make command line, so we use xCXXFLAGS that only
107107
# adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work.
108-
xCXXFLAGS=-O2 -std=c++14 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \
108+
xCXXFLAGS=-O2 -std=c++11 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \
109109
$(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS)
110110

111111

src/qt/bitcoingui.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@ void BitcoinGUI::createActions()
200200
addressBookAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5));
201201
tabGroup->addAction(addressBookAction);
202202

203-
stealthAddressAction = new QAction(QIcon(":/icons/stealth_addresses"), tr("&Stealth Addresses"), this);
203+
/*stealthAddressAction = new QAction(QIcon(":/icons/stealth_addresses"), tr("&Stealth Addresses"), this);
204204
stealthAddressAction->setStatusTip(tr("Show the list of stealth addresses for receiving payments"));
205205
stealthAddressAction->setToolTip(stealthAddressAction->statusTip());
206206
stealthAddressAction->setCheckable(true);
207207
stealthAddressAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6));
208-
tabGroup->addAction(stealthAddressAction);
208+
tabGroup->addAction(stealthAddressAction);*/
209209

210210
connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
211211
connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage()));
@@ -217,8 +217,8 @@ void BitcoinGUI::createActions()
217217
connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage()));
218218
connect(addressBookAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
219219
connect(addressBookAction, SIGNAL(triggered()), this, SLOT(gotoAddressBookPage()));
220-
connect(stealthAddressAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
221-
connect(stealthAddressAction, SIGNAL(triggered()), this, SLOT(gotoStealthAddressPage()));
220+
//connect(stealthAddressAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
221+
//connect(stealthAddressAction, SIGNAL(triggered()), this, SLOT(gotoStealthAddressPage()));
222222

223223
quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this);
224224
quitAction->setStatusTip(tr("Quit application"));
@@ -301,7 +301,7 @@ void BitcoinGUI::createToolBars()
301301
toolbar->addAction(overviewAction);
302302
toolbar->addAction(sendCoinsAction);
303303
toolbar->addAction(receiveCoinsAction);
304-
toolbar->addAction(stealthAddressAction);
304+
//toolbar->addAction(stealthAddressAction);
305305
toolbar->addAction(historyAction);
306306
toolbar->addAction(addressBookAction);
307307
}
@@ -380,7 +380,7 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
380380
signMessageAction->setEnabled(enabled);
381381
verifyMessageAction->setEnabled(enabled);
382382
addressBookAction->setEnabled(enabled);
383-
stealthAddressAction->setEnabled(enabled);
383+
//stealthAddressAction->setEnabled(enabled);
384384

385385
}
386386

src/wallet.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,8 @@ bool CWallet::CreateTransaction(const vector<pair<pair<pair<CScript, int64>, ec_
14051405
dPriority /= nBytes;
14061406

14071407
// Check that enough fee is included
1408-
bool fAllowFree = CTransaction::AllowFree(dPriority);
1408+
//bool fAllowFree = CTransaction::AllowFree(dPriority);
1409+
bool fAllowFree = false;
14091410
int64 nMinFee = wtxNew.GetMinFee(1, fAllowFree, GMF_SEND);
14101411

14111412
if (nFeeRet < nMinFee)

vertcoin-qt-mingw32.static.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
TEMPLATE = app
22
TARGET = vertcoin-qt
33
macx:TARGET = "Vertcoin-Qt"
4-
VERSION = 0.10.0.2
4+
VERSION = 0.10.1.0
55
INCLUDEPATH += src src/json src/qt
66
QT += core gui network
77
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

0 commit comments

Comments
 (0)