Skip to content

Commit

Permalink
v2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
IttriumCore committed Jan 9, 2019
1 parent b6da639 commit 64130da
Show file tree
Hide file tree
Showing 81 changed files with 335 additions and 404 deletions.
4 changes: 4 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

set -e
srcdir="$(dirname $0)"
cd "$srcdir"
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 2)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 3)
define(_CLIENT_VERSION_MINOR, 1)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2018)
Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# a) creates 3 nodes, with an empty chain (no blocks).
# b) node0 mines a block
# c) node1 mines 32 blocks, so now node 0 has 60001XIT node 1 has 4250XIT node2 has none.
# d) node0 sends 601 XITto node2, in two transactions (301 XIT then 300 XIT.
# d) node0 sends 601 XIT to node2, in two transactions (301 XIT then 300 XIT.
# e) node0 mines a block, collects the fee on the second transaction
# f) node1 mines 16 blocks, to mature node0's just-mined block
# g) check that node0 has 100-21, node2 has 21
Expand Down
1 change: 1 addition & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ libbitcoin_server_a_SOURCES = \
rpcrawtransaction.cpp \
rpcserver.cpp \
script/sigcache.cpp \
sporkdb.cpp \
timedata.cpp \
txdb.cpp \
txmempool.cpp \
Expand Down
2 changes: 1 addition & 1 deletion src/accumulatormap.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) 2017 The PIVX developers
// Copyright (c) 2018 The Ittrium Core Developers
// Copyright (c) 2018-2019 The Ittrium developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
1 change: 1 addition & 0 deletions src/accumulatormap.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (c) 2017 The PIVX developers
// Copyright (c) 2018-2019 The Ittrium developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef XIT_ACCUMULATORMAP_H
Expand Down
6 changes: 3 additions & 3 deletions src/accumulators.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) 2017 The PIVX developers
// Copyright (c) 2018 The Ittrium Core developers
// Copyright (c) 2018-2019 The Ittrium developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

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

//make sure this block is eligible for accumulation
if (pindex->GetBlockHeader().nVersion < Params().Zerocoin_HeaderVersion()) {
if (pindex->nHeight < Params().Zerocoin_StartHeight()) {
pindex = chainActive[pindex->nHeight + 1];
continue;
}
Expand Down
29 changes: 7 additions & 22 deletions src/activemasternode.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2014-2016 The Dash developers
// Copyright (c) 2015-2018 The PIVX developers
// Copyright (c) 2017-2018 The Ittrium developers
// Copyright (c) 2015-2017 The PIVX developer
// Copyright (c) 2018-2019 The Ittrium developerss
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -69,17 +69,9 @@ void CActiveMasternode::ManageStatus()
service = CService(strMasterNodeAddr);
}

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

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

Expand Down Expand Up @@ -268,17 +260,10 @@ bool CActiveMasternode::Register(std::string strService, std::string strKeyMaste
}

CService service = CService(strService);
if (Params().NetworkID() == CBaseChainParams::MAIN) {
if (service.GetPort() != 39993) {
errorMessage = strprintf("Invalid port %u for masternode %s - only 39993 is supported on mainnet.", service.GetPort(), strService);
LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
return false;
}
} else if (service.GetPort() == 39993) {
errorMessage = strprintf("Invalid port %u for masternode %s - 39993 is only supported on mainnet.", service.GetPort(), strService);
LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);

// The service needs the correct default port to work properly
if(!CMasternodeBroadcast::CheckDefaultPort(strService, errorMessage, "CActiveMasternode::Register()"))
return false;
}

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

Expand Down
6 changes: 3 additions & 3 deletions src/activemasternode.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2015-2016 The Dash developers
// Copyright (c) 2014-2016 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2018-2019 The Ittrium developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
8 changes: 7 additions & 1 deletion src/chain.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2015-2018 The PIVX developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2018-2019 The Ittrium developerss
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -373,6 +374,11 @@ class CBlockIndex
nFlags |= BLOCK_STAKE_MODIFIER;
}

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

std::string ToString() const
Expand Down
40 changes: 21 additions & 19 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2017-2018 The Ittrium developers
// Copyright (c) 2018-2019 The Ittrium developerss
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -67,6 +67,7 @@ static Checkpoints::MapCheckpoints mapCheckpoints =
(99879, uint256("0x09f07b93863c421d8826ef7eafb1610237f2f817820ac2ab6ee2c1e1793de3d6"))
(100439, uint256("0xe733ee2c2139fc2acc545f4c8291c12aa1ef92809648b362384d4df705420222"))
(120000, uint256("0xe71bfd9b83553901ff9044c7a7b572de6b5a2f577691603319d6dccbfbf921666"));
//(151259, uint256("0x"));

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

/** Height or Time Based Activations **/
nModifierUpdateBlock = 0;
nZerocoinStartHeight = 151301;
nZerocoinStartTime = 1546486413; // Jan 3, 2019 3:33:33 AM (Happy 10th Birthday Bitcoin!)
nBlockEnforceSerialRange = 151303; //Enforce serial range starting this block
nBlockRecalculateAccumulators = 151304; //Trigger a recalculation of accumulators
nBlockFirstFraudulent = 151302; //First block that bad serials emerged
nBlockLastGoodCheckpoint = 151259; //Last valid accumulator checkpoint
nBlockEnforceInvalidUTXO = 151300; //Start enforcing the invalid UTXO's

/**
block.nTime = 1533333333
block.nNonce = 445453
Expand Down Expand Up @@ -165,11 +176,11 @@ class CMainParams : public CChainParams
assert(hashGenesisBlock == uint256("0x000000fdacddaba54eb66a4c09dc795efbfc75fcd0572c99f489424367bc9ec9"));
assert(genesis.hashMerkleRoot == uint256("0xfc052cd7cd34c839bde40a2c9e484ef50c48858667c3d6dd2938b6668479c374"));

vSeeds.push_back(CDNSSeedData("01.ittriumno.de", "01.ittriumno.de"));
vSeeds.push_back(CDNSSeedData("02.ittriumno.de", "02.ittriumno.de"));
vSeeds.push_back(CDNSSeedData("03.ittriumno.de", "03.ittriumno.de"));
vSeeds.push_back(CDNSSeedData("04.ittriumno.de", "04.ittriumno.de"));
vSeeds.push_back(CDNSSeedData("05.ittriumno.de", "05.ittriumno.de"));
vSeeds.push_back(CDNSSeedData("88.99.123.145", "88.99.123.145"));
vSeeds.push_back(CDNSSeedData("02.ittriumno.de", "02.ittriumno.de"));
vSeeds.push_back(CDNSSeedData("03.ittriumno.de", "03.ittriumno.de"));
vSeeds.push_back(CDNSSeedData("04.ittriumno.de", "04.ittriumno.de"));
vSeeds.push_back(CDNSSeedData("05.ittriumno.de", "05.ittriumno.de"));

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

convertSeed6(vFixedSeeds, pnSeed6_main, ARRAYLEN(pnSeed6_main));
//convertSeed6(vFixedSeeds, pnSeed6_main, ARRAYLEN(pnSeed6_main));

fRequireRPCPassword = true;
fMiningRequiresPeers = true;
Expand Down Expand Up @@ -213,14 +224,9 @@ class CMainParams : public CChainParams
nMinZerocoinMintFee = 1 * CENT; //high fee required for zerocoin mints
nMintRequiredConfirmations = 20; //the maximum amount of confirmations until accumulated in 19
nRequiredAccumulation = 1;
nDefaultSecurityLevel = 100; //full security level for accumulators
nDefaultSecurityLevel = 42; //full security level for accumulators
nZerocoinHeaderVersion = 4; //Block headers must be this version once zerocoin is active
nBudget_Fee_Confirmations = 6; // Number of confirmations for the finalization fee

/** Staking Requirements */
nStakeMinStartProtocol = 70911; // Starting protocol version (ActiveProtocol())
nStakeMinConfirmations = 60; // Required number of confirmations
nStakeMinAmount = 5 * COIN; // Minimum required staking amount
}

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

convertSeed6(vFixedSeeds, pnSeed6_test, ARRAYLEN(pnSeed6_test));
//convertSeed6(vFixedSeeds, pnSeed6_test, ARRAYLEN(pnSeed6_test));

fRequireRPCPassword = true;
fMiningRequiresPeers = false;
Expand All @@ -306,10 +312,6 @@ class CTestNetParams : public CMainParams
//strObfuscationPoolDummyAddress = "";
nStartMasternodePayments = 150;

/** Staking Requirements */
nStakeMinStartProtocol = 70910; // Starting protocol version (ActiveProtocol())
nStakeMinConfirmations = 60; // Required number of confirmations
nStakeMinAmount = 5 * COIN; // Minimum required staking amount
}
const Checkpoints::CCheckpointData& Checkpoints() const
{
Expand Down Expand Up @@ -464,4 +466,4 @@ bool SelectParamsFromCommandLine()

SelectParams(network);
return true;
}
}
24 changes: 12 additions & 12 deletions src/chainparams.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2018 The PIVX Core developers
// Copyright (c) 2018 The Ittrium Core developers
// Copyright (c) 2015-2018 The PIVX developers
// Copyright (c) 2018-2019 The Ittrium developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down Expand Up @@ -61,7 +61,6 @@ class CChainParams
/** Used if GenerateBitcoins is called with a negative number of threads */
int DefaultMinerThreads() const { return nMinerThreads; }
const CBlock& GenesisBlock() const { return genesis; }
bool RequireRPCPassword() const { return fRequireRPCPassword; }
/** Make miner wait to have peers to avoid wasting work */
bool MiningRequiresPeers() const { return fMiningRequiresPeers; }
/** Headers first syncing is disabled */
Expand Down Expand Up @@ -112,12 +111,12 @@ class CChainParams
int ModifierUpgradeBlock() const { return nModifierUpdateBlock; }
int LAST_POW_BLOCK() const { return nLastPOWBlock; }
int Zerocoin_StartHeight() const { return nZerocoinStartHeight; }
int Zerocoin_Block_EnforceSerialRange() const { return nBlockEnforceSerialRange; }
int Zerocoin_Block_RecalculateAccumulators() const { return nBlockRecalculateAccumulators; }
int Zerocoin_Block_FirstFraudulent() const { return nBlockFirstFraudulent; }
int Zerocoin_Block_LastGoodCheckpoint() const { return nBlockLastGoodCheckpoint; }
int Zerocoin_StartTime() const { return nZerocoinStartTime; }

/** Staking Requirements */
int Stake_MinProtocol() const { return nStakeMinStartProtocol; }
int Stake_MinConfirmations() const { return nStakeMinConfirmations; }
CAmount Stake_MinAmount() const { return nStakeMinAmount; }
int Block_Enforce_Invalid() const { return nBlockEnforceInvalidUTXO; }

protected:
CChainParams() {}
Expand Down Expand Up @@ -171,10 +170,11 @@ class CChainParams
int nZerocoinStartHeight;
int nZerocoinStartTime;

/** Staking Requirements */
int nStakeMinStartProtocol;
int nStakeMinConfirmations;
CAmount nStakeMinAmount;
int nBlockEnforceSerialRange;
int nBlockRecalculateAccumulators;
int nBlockFirstFraudulent;
int nBlockLastGoodCheckpoint;
int nBlockEnforceInvalidUTXO;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/checkpoints.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2017-2018 The Ittrium developers
// Copyright (c) 2018-2019 The Ittrium developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
8 changes: 4 additions & 4 deletions src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

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

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

#endif //HAVE_CONFIG_H

Expand All @@ -38,7 +38,7 @@
#define DO_STRINGIZE(X) #X

//! Copyright string used in Windows .rc files
#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"
#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"

/**
* ittriumd-res.rc includes this file, but it cannot cope with real c++ code.
Expand Down
3 changes: 2 additions & 1 deletion src/coincontrol.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2014-2016 The Dash developers
// Copyright (c) 2015-2018 The PIVX developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2018-2019 The Ittrium developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
3 changes: 2 additions & 1 deletion src/coins.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2012-2014 The Bitcoin developers
// Copyright (c) 2015-2018 The PIVX developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2018-2019 The Ittrium developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

Expand Down
Loading

0 comments on commit 64130da

Please sign in to comment.