Skip to content

Commit 64130da

Browse files
committed
v2.1.0
1 parent b6da639 commit 64130da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+335
-404
lines changed

autogen.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/bin/sh
2+
# Copyright (c) 2013-2016 The Bitcoin Core developers
3+
# Distributed under the MIT software license, see the accompanying
4+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
5+
26
set -e
37
srcdir="$(dirname $0)"
48
cd "$srcdir"

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
22
AC_PREREQ([2.60])
33
define(_CLIENT_VERSION_MAJOR, 2)
4-
define(_CLIENT_VERSION_MINOR, 0)
5-
define(_CLIENT_VERSION_REVISION, 3)
4+
define(_CLIENT_VERSION_MINOR, 1)
5+
define(_CLIENT_VERSION_REVISION, 0)
66
define(_CLIENT_VERSION_BUILD, 0)
77
define(_CLIENT_VERSION_IS_RELEASE, true)
88
define(_COPYRIGHT_YEAR, 2018)

qa/rpc-tests/wallet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# a) creates 3 nodes, with an empty chain (no blocks).
1010
# b) node0 mines a block
1111
# c) node1 mines 32 blocks, so now node 0 has 60001XIT node 1 has 4250XIT node2 has none.
12-
# d) node0 sends 601 XITto node2, in two transactions (301 XIT then 300 XIT.
12+
# d) node0 sends 601 XIT to node2, in two transactions (301 XIT then 300 XIT.
1313
# e) node0 mines a block, collects the fee on the second transaction
1414
# f) node1 mines 16 blocks, to mature node0's just-mined block
1515
# g) check that node0 has 100-21, node2 has 21

src/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ libbitcoin_server_a_SOURCES = \
216216
rpcrawtransaction.cpp \
217217
rpcserver.cpp \
218218
script/sigcache.cpp \
219+
sporkdb.cpp \
219220
timedata.cpp \
220221
txdb.cpp \
221222
txmempool.cpp \

src/accumulatormap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright (c) 2017 The PIVX developers
2-
// Copyright (c) 2018 The Ittrium Core Developers
2+
// Copyright (c) 2018-2019 The Ittrium developers
33
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

src/accumulatormap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright (c) 2017 The PIVX developers
2+
// Copyright (c) 2018-2019 The Ittrium developers
23
// Distributed under the MIT software license, see the accompanying
34
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
45
#ifndef XIT_ACCUMULATORMAP_H

src/accumulators.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright (c) 2017 The PIVX developers
2-
// Copyright (c) 2018 The Ittrium Core developers
2+
// Copyright (c) 2018-2019 The Ittrium developers
33
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

@@ -155,7 +155,7 @@ bool EraseCheckpoints(int nStartHeight, int nEndHeight)
155155
//Get checkpoint value for a specific block height
156156
bool CalculateAccumulatorCheckpoint(int nHeight, uint256& nCheckpoint)
157157
{
158-
if (nHeight <= chainActive.Height() && chainActive[nHeight]->GetBlockHeader().nVersion < Params().Zerocoin_HeaderVersion()) {
158+
if (nHeight < Params().Zerocoin_StartHeight()) {
159159
nCheckpoint = 0;
160160
return true;
161161
}
@@ -189,7 +189,7 @@ bool CalculateAccumulatorCheckpoint(int nHeight, uint256& nCheckpoint)
189189
}
190190

191191
//make sure this block is eligible for accumulation
192-
if (pindex->GetBlockHeader().nVersion < Params().Zerocoin_HeaderVersion()) {
192+
if (pindex->nHeight < Params().Zerocoin_StartHeight()) {
193193
pindex = chainActive[pindex->nHeight + 1];
194194
continue;
195195
}

src/activemasternode.cpp

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) 2014-2016 The Dash developers
2-
// Copyright (c) 2015-2018 The PIVX developers
3-
// Copyright (c) 2017-2018 The Ittrium developers
2+
// Copyright (c) 2015-2017 The PIVX developer
3+
// Copyright (c) 2018-2019 The Ittrium developerss
44
// Distributed under the MIT/X11 software license, see the accompanying
55
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
66

@@ -69,17 +69,9 @@ void CActiveMasternode::ManageStatus()
6969
service = CService(strMasterNodeAddr);
7070
}
7171

72-
if (Params().NetworkID() == CBaseChainParams::MAIN) {
73-
if (service.GetPort() != 39993) {
74-
notCapableReason = strprintf("Invalid port: %u - only 39993 is supported on mainnet.", service.GetPort());
75-
LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason);
76-
return;
77-
}
78-
} else if (service.GetPort() == 39993) {
79-
notCapableReason = strprintf("Invalid port: %u - 39993 is only supported on mainnet.", service.GetPort());
80-
LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason);
72+
// The service needs the correct default port to work properly
73+
if(!CMasternodeBroadcast::CheckDefaultPort(strMasterNodeAddr, errorMessage, "CActiveMasternode::ManageStatus()"))
8174
return;
82-
}
8375

8476
LogPrintf("CActiveMasternode::ManageStatus() - Checking inbound connection to '%s'\n", service.ToString());
8577

@@ -268,17 +260,10 @@ bool CActiveMasternode::Register(std::string strService, std::string strKeyMaste
268260
}
269261

270262
CService service = CService(strService);
271-
if (Params().NetworkID() == CBaseChainParams::MAIN) {
272-
if (service.GetPort() != 39993) {
273-
errorMessage = strprintf("Invalid port %u for masternode %s - only 39993 is supported on mainnet.", service.GetPort(), strService);
274-
LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
275-
return false;
276-
}
277-
} else if (service.GetPort() == 39993) {
278-
errorMessage = strprintf("Invalid port %u for masternode %s - 39993 is only supported on mainnet.", service.GetPort(), strService);
279-
LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
263+
264+
// The service needs the correct default port to work properly
265+
if(!CMasternodeBroadcast::CheckDefaultPort(strService, errorMessage, "CActiveMasternode::Register()"))
280266
return false;
281-
}
282267

283268
addrman.Add(CAddress(service), CNetAddr("127.0.0.1"), 2 * 60 * 60);
284269

src/activemasternode.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (c) 2009-2010 Satoshi Nakamoto
2-
// Copyright (c) 2009-2012 The Bitcoin developers
3-
// Copyright (c) 2015-2016 The Dash developers
1+
// Copyright (c) 2014-2016 The Dash developers
2+
// Copyright (c) 2015-2017 The PIVX developers
3+
// Copyright (c) 2018-2019 The Ittrium developers
44
// Distributed under the MIT/X11 software license, see the accompanying
55
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
66

src/chain.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) 2009-2010 Satoshi Nakamoto
22
// Copyright (c) 2009-2014 The Bitcoin developers
3-
// Copyright (c) 2015-2018 The PIVX developers
3+
// Copyright (c) 2015-2017 The PIVX developers
4+
// Copyright (c) 2018-2019 The Ittrium developerss
45
// Distributed under the MIT software license, see the accompanying
56
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
67

@@ -373,6 +374,11 @@ class CBlockIndex
373374
nFlags |= BLOCK_STAKE_MODIFIER;
374375
}
375376

377+
/**
378+
* Returns true if there are nRequired or more blocks of minVersion or above
379+
* in the last Params().ToCheckBlockUpgradeMajority() blocks, starting at pstart
380+
* and going backwards.
381+
*/
376382
static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned int nRequired);
377383

378384
std::string ToString() const

src/chainparams.cpp

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Copyright (c) 2009-2014 The Bitcoin developers
33
// Copyright (c) 2014-2015 The Dash developers
44
// Copyright (c) 2015-2017 The PIVX developers
5-
// Copyright (c) 2017-2018 The Ittrium developers
5+
// Copyright (c) 2018-2019 The Ittrium developerss
66
// Distributed under the MIT software license, see the accompanying
77
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
88

@@ -67,6 +67,7 @@ static Checkpoints::MapCheckpoints mapCheckpoints =
6767
(99879, uint256("0x09f07b93863c421d8826ef7eafb1610237f2f817820ac2ab6ee2c1e1793de3d6"))
6868
(100439, uint256("0xe733ee2c2139fc2acc545f4c8291c12aa1ef92809648b362384d4df705420222"))
6969
(120000, uint256("0xe71bfd9b83553901ff9044c7a7b572de6b5a2f577691603319d6dccbfbf921666"));
70+
//(151259, uint256("0x"));
7071

7172
static const Checkpoints::CCheckpointData data = {
7273
&mapCheckpoints,
@@ -134,6 +135,16 @@ class CMainParams : public CChainParams
134135
nModifierUpdateBlock = 1; //***CHECK-->615800***
135136
nMaxMoneyOut = 33000000 * COIN;
136137

138+
/** Height or Time Based Activations **/
139+
nModifierUpdateBlock = 0;
140+
nZerocoinStartHeight = 151301;
141+
nZerocoinStartTime = 1546486413; // Jan 3, 2019 3:33:33 AM (Happy 10th Birthday Bitcoin!)
142+
nBlockEnforceSerialRange = 151303; //Enforce serial range starting this block
143+
nBlockRecalculateAccumulators = 151304; //Trigger a recalculation of accumulators
144+
nBlockFirstFraudulent = 151302; //First block that bad serials emerged
145+
nBlockLastGoodCheckpoint = 151259; //Last valid accumulator checkpoint
146+
nBlockEnforceInvalidUTXO = 151300; //Start enforcing the invalid UTXO's
147+
137148
/**
138149
block.nTime = 1533333333
139150
block.nNonce = 445453
@@ -165,11 +176,11 @@ class CMainParams : public CChainParams
165176
assert(hashGenesisBlock == uint256("0x000000fdacddaba54eb66a4c09dc795efbfc75fcd0572c99f489424367bc9ec9"));
166177
assert(genesis.hashMerkleRoot == uint256("0xfc052cd7cd34c839bde40a2c9e484ef50c48858667c3d6dd2938b6668479c374"));
167178

168-
vSeeds.push_back(CDNSSeedData("01.ittriumno.de", "01.ittriumno.de"));
169-
vSeeds.push_back(CDNSSeedData("02.ittriumno.de", "02.ittriumno.de"));
170-
vSeeds.push_back(CDNSSeedData("03.ittriumno.de", "03.ittriumno.de"));
171-
vSeeds.push_back(CDNSSeedData("04.ittriumno.de", "04.ittriumno.de"));
172-
vSeeds.push_back(CDNSSeedData("05.ittriumno.de", "05.ittriumno.de"));
179+
vSeeds.push_back(CDNSSeedData("88.99.123.145", "88.99.123.145"));
180+
vSeeds.push_back(CDNSSeedData("02.ittriumno.de", "02.ittriumno.de"));
181+
vSeeds.push_back(CDNSSeedData("03.ittriumno.de", "03.ittriumno.de"));
182+
vSeeds.push_back(CDNSSeedData("04.ittriumno.de", "04.ittriumno.de"));
183+
vSeeds.push_back(CDNSSeedData("05.ittriumno.de", "05.ittriumno.de"));
173184

174185
// Ittrium addresses start with 'i'
175186
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1, 103);
@@ -184,7 +195,7 @@ class CMainParams : public CChainParams
184195
// BIP44 coin type is from https://github.com/satoshilabs/slips/blob/master/slip-0044.md
185196
base58Prefixes[EXT_COIN_TYPE] = boost::assign::list_of(0x80)(0x00)(0x00)(0xde).convert_to_container<std::vector<unsigned char> >();
186197

187-
convertSeed6(vFixedSeeds, pnSeed6_main, ARRAYLEN(pnSeed6_main));
198+
//convertSeed6(vFixedSeeds, pnSeed6_main, ARRAYLEN(pnSeed6_main));
188199

189200
fRequireRPCPassword = true;
190201
fMiningRequiresPeers = true;
@@ -213,14 +224,9 @@ class CMainParams : public CChainParams
213224
nMinZerocoinMintFee = 1 * CENT; //high fee required for zerocoin mints
214225
nMintRequiredConfirmations = 20; //the maximum amount of confirmations until accumulated in 19
215226
nRequiredAccumulation = 1;
216-
nDefaultSecurityLevel = 100; //full security level for accumulators
227+
nDefaultSecurityLevel = 42; //full security level for accumulators
217228
nZerocoinHeaderVersion = 4; //Block headers must be this version once zerocoin is active
218229
nBudget_Fee_Confirmations = 6; // Number of confirmations for the finalization fee
219-
220-
/** Staking Requirements */
221-
nStakeMinStartProtocol = 70911; // Starting protocol version (ActiveProtocol())
222-
nStakeMinConfirmations = 60; // Required number of confirmations
223-
nStakeMinAmount = 5 * COIN; // Minimum required staking amount
224230
}
225231

226232
const Checkpoints::CCheckpointData& Checkpoints() const
@@ -291,7 +297,7 @@ class CTestNetParams : public CMainParams
291297
// Testnet ittrium BIP44 coin type is '1' (All coin's testnet default)
292298
base58Prefixes[EXT_COIN_TYPE] = boost::assign::list_of(0x80)(0x00)(0x00)(0x01).convert_to_container<std::vector<unsigned char> >();
293299

294-
convertSeed6(vFixedSeeds, pnSeed6_test, ARRAYLEN(pnSeed6_test));
300+
//convertSeed6(vFixedSeeds, pnSeed6_test, ARRAYLEN(pnSeed6_test));
295301

296302
fRequireRPCPassword = true;
297303
fMiningRequiresPeers = false;
@@ -306,10 +312,6 @@ class CTestNetParams : public CMainParams
306312
//strObfuscationPoolDummyAddress = "";
307313
nStartMasternodePayments = 150;
308314

309-
/** Staking Requirements */
310-
nStakeMinStartProtocol = 70910; // Starting protocol version (ActiveProtocol())
311-
nStakeMinConfirmations = 60; // Required number of confirmations
312-
nStakeMinAmount = 5 * COIN; // Minimum required staking amount
313315
}
314316
const Checkpoints::CCheckpointData& Checkpoints() const
315317
{
@@ -464,4 +466,4 @@ bool SelectParamsFromCommandLine()
464466

465467
SelectParams(network);
466468
return true;
467-
}
469+
}

src/chainparams.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Copyright (c) 2009-2010 Satoshi Nakamoto
22
// Copyright (c) 2009-2014 The Bitcoin developers
33
// Copyright (c) 2014-2015 The Dash developers
4-
// Copyright (c) 2015-2018 The PIVX Core developers
5-
// Copyright (c) 2018 The Ittrium Core developers
4+
// Copyright (c) 2015-2018 The PIVX developers
5+
// Copyright (c) 2018-2019 The Ittrium developers
66
// Distributed under the MIT software license, see the accompanying
77
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
88

@@ -61,7 +61,6 @@ class CChainParams
6161
/** Used if GenerateBitcoins is called with a negative number of threads */
6262
int DefaultMinerThreads() const { return nMinerThreads; }
6363
const CBlock& GenesisBlock() const { return genesis; }
64-
bool RequireRPCPassword() const { return fRequireRPCPassword; }
6564
/** Make miner wait to have peers to avoid wasting work */
6665
bool MiningRequiresPeers() const { return fMiningRequiresPeers; }
6766
/** Headers first syncing is disabled */
@@ -112,12 +111,12 @@ class CChainParams
112111
int ModifierUpgradeBlock() const { return nModifierUpdateBlock; }
113112
int LAST_POW_BLOCK() const { return nLastPOWBlock; }
114113
int Zerocoin_StartHeight() const { return nZerocoinStartHeight; }
114+
int Zerocoin_Block_EnforceSerialRange() const { return nBlockEnforceSerialRange; }
115+
int Zerocoin_Block_RecalculateAccumulators() const { return nBlockRecalculateAccumulators; }
116+
int Zerocoin_Block_FirstFraudulent() const { return nBlockFirstFraudulent; }
117+
int Zerocoin_Block_LastGoodCheckpoint() const { return nBlockLastGoodCheckpoint; }
115118
int Zerocoin_StartTime() const { return nZerocoinStartTime; }
116-
117-
/** Staking Requirements */
118-
int Stake_MinProtocol() const { return nStakeMinStartProtocol; }
119-
int Stake_MinConfirmations() const { return nStakeMinConfirmations; }
120-
CAmount Stake_MinAmount() const { return nStakeMinAmount; }
119+
int Block_Enforce_Invalid() const { return nBlockEnforceInvalidUTXO; }
121120

122121
protected:
123122
CChainParams() {}
@@ -171,10 +170,11 @@ class CChainParams
171170
int nZerocoinStartHeight;
172171
int nZerocoinStartTime;
173172

174-
/** Staking Requirements */
175-
int nStakeMinStartProtocol;
176-
int nStakeMinConfirmations;
177-
CAmount nStakeMinAmount;
173+
int nBlockEnforceSerialRange;
174+
int nBlockRecalculateAccumulators;
175+
int nBlockFirstFraudulent;
176+
int nBlockLastGoodCheckpoint;
177+
int nBlockEnforceInvalidUTXO;
178178
};
179179

180180
/**

src/checkpoints.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) 2009-2014 The Bitcoin developers
22
// Copyright (c) 2014-2015 The Dash developers
33
// Copyright (c) 2015-2017 The PIVX developers
4-
// Copyright (c) 2017-2018 The Ittrium developers
4+
// Copyright (c) 2018-2019 The Ittrium developers
55
// Distributed under the MIT software license, see the accompanying
66
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
77

src/clientversion.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
//! These need to be macros, as clientversion.cpp's and ittrium*-res.rc's voodoo requires it
1717
#define CLIENT_VERSION_MAJOR 2
18-
#define CLIENT_VERSION_MINOR 0
19-
#define CLIENT_VERSION_REVISION 3
18+
#define CLIENT_VERSION_MINOR 1
19+
#define CLIENT_VERSION_REVISION 0
2020
#define CLIENT_VERSION_BUILD 0
2121

2222
//! Set to true for release, false for prerelease or test build
@@ -26,7 +26,7 @@
2626
* Copyright year (2009-this)
2727
* Todo: update this when changing our copyright comments in the source
2828
*/
29-
#define COPYRIGHT_YEAR 2018
29+
#define COPYRIGHT_YEAR 2019
3030

3131
#endif //HAVE_CONFIG_H
3232

@@ -38,7 +38,7 @@
3838
#define DO_STRINGIZE(X) #X
3939

4040
//! Copyright string used in Windows .rc files
41-
#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers, 2014-" STRINGIZE(COPYRIGHT_YEAR) " The Dash Core Developers, 2015-" STRINGIZE(COPYRIGHT_YEAR) " The PIVX Core Developers, 2017-" STRINGIZE(COPYRIGHT_YEAR) " The Ittrium Core Developers"
41+
#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers, 2014-" STRINGIZE(COPYRIGHT_YEAR) " The Dash Core Developers, 2015-" STRINGIZE(COPYRIGHT_YEAR) " The PIVX Core Developers, 2018-" STRINGIZE(COPYRIGHT_YEAR) " The Ittrium Core Developers"
4242

4343
/**
4444
* ittriumd-res.rc includes this file, but it cannot cope with real c++ code.

src/coincontrol.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) 2011-2013 The Bitcoin developers
22
// Copyright (c) 2014-2016 The Dash developers
3-
// Copyright (c) 2015-2018 The PIVX developers
3+
// Copyright (c) 2015-2017 The PIVX developers
4+
// Copyright (c) 2018-2019 The Ittrium developers
45
// Distributed under the MIT/X11 software license, see the accompanying
56
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
67

src/coins.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright (c) 2012-2014 The Bitcoin developers
2-
// Copyright (c) 2015-2018 The PIVX developers
2+
// Copyright (c) 2015-2017 The PIVX developers
3+
// Copyright (c) 2018-2019 The Ittrium developers
34
// Distributed under the MIT software license, see the accompanying
45
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
56

0 commit comments

Comments
 (0)