Skip to content

Commit

Permalink
Merge pull request #11 from MasterNodesPro/development
Browse files Browse the repository at this point in the history
Chain Updates to get Wallet Past 10000 Blocks
  • Loading branch information
JSponaugle committed Oct 13, 2018
2 parents 2596ef7 + c6a026d commit 2fde77c
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion configure.ac
@@ -1,7 +1,7 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 1)
define(_CLIENT_VERSION_MINOR, 2)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
Expand Down
6 changes: 5 additions & 1 deletion doc/autoupdate-dl-ubuntu.sh
Expand Up @@ -2,12 +2,16 @@

now=$(date +"%m_%d_%Y")



# Check if is root
if [ "$(whoami)" != "root" ]; then
echo "Script must be run as user: root"
exit -1
fi

apt install unzip

echo && echo "going to root directory"
cd ~/

Expand All @@ -23,7 +27,7 @@ mkdir $now

backuppath=~/mnpcoinbackup/$now

echo && echo "backing up wallet.dat masternode.conf mnpcoin.conf to $(backuppath)"
echo && echo "backing up wallet.dat masternode.conf mnpcoin.conf to ${backuppath}"
cd ../.mnpcoin
cp wallet.dat $backuppath
cp masternode.conf $backuppath
Expand Down
19 changes: 13 additions & 6 deletions src/chainparams.cpp
Expand Up @@ -54,7 +54,7 @@ static void convertSeed6(std::vector<CAddress>& vSeedsOut, const SeedSpec6* data
// + Contains no strange transactions
static Checkpoints::MapCheckpoints mapCheckpoints =
boost::assign::map_list_of
// MNPCoinDevs - RELEASE CHANGE - Checkpoins, timestamp of last checkpoint, total nr. of transactions
// MNPCoinDevs - RELEASE CHANGE - Checkpoints, timestamp of last checkpoint, total nr. of transactions
( 0, uint256("000008da52778c83303c1ece6630d1299e40de5a21c0fea72c23e44a92b02206"))
( 500, uint256("000000002701c3dd7c19922b439f46251bf833a17399f2ed69163a770133eb50"))
( 1000, uint256("00000008cbfeecba65fb88418589b005ac61a547e476a94bb01c3a631eda6c0f"))
Expand All @@ -69,12 +69,19 @@ static Checkpoints::MapCheckpoints mapCheckpoints =
( 20000, uint256("e045aee2480f2a5be795035cb3c380f16d504c1690ca50694df5f9ff3752e62d"))
( 25000, uint256("d6a4a25ed9c6448fd4cf16120ce1a773ede4734e6c14fc2829e40550eb4534c7"))
( 30000, uint256("b99cb0b836152bd3fc52565e0e79162ac125e57d6641534a0e070fd76c8e036e"))
; // First PoW premine block
( 40000, uint256("e36b01f14b1c7761eeef3c1b21b5292261196f42e76d08d23c3a361882a14946"))
( 50000, uint256("d79ad638259f3837ab25769130a518238ef9b6b20653d98df96e602fd1c8ee98"))
( 60000, uint256("fc525d56bb1a724b8ac52f7b8b91e1bbc60fe541e37ed2743f99cfe5d1770e4c"))
( 70000, uint256("d48e8b10fcf64eaa3edc5f873370be16c86ab639f4cd13df2fab9c9e8a1d0742"))
( 80000, uint256("49fb6da4cbc4e834312985bfa44b08537a4c4573bbca6a37626b46e66ea246d6"))
( 90000, uint256("4035ca075e6a5759d15edd9494fd925da415baec9058dd04664b119f7a319fe9"))
( 100000, uint256("0d593545ea7f76f3012d131da70b449218b24a0eaf88db661149b08589f8b925"))
;

static const Checkpoints::CCheckpointData data = {
&mapCheckpoints,
1535017606, // * UNIX timestamp of last checkpoint block
52892, // * total number of transactions between genesis and last checkpoint
1539232472, // * UNIX timestamp of last checkpoint block
194131, // * total number of transactions between genesis and last checkpoint
// (the tx=... number in the SetBestChain debug.log lines)
2000 // * estimated number of transactions per day after checkpoint
};
Expand Down Expand Up @@ -141,9 +148,9 @@ class CMainParams : public CChainParams
nLastPOWBlock = 8000; //
nModifierUpdateBlock = 1100; // Modify block on height
nZerocoinStartHeight = 9900000; // DISABLED FOR NOW TODO Zerocoin start height
nZerocoinStartTime = 1546300800; // Saturday, Jan 1, 2019 00:00:00 AM (GMT)
nZerocoinStartTime = 1609459200; // Jan 1, 2021 00:00:00 AM (GMT)
nBlockEnforceSerialRange = 1; // Enforce serial range starting this block
nBlockRecalculateAccumulators = 100000; // Trigger a recalculation of accumulators
nBlockRecalculateAccumulators = 10000000; // Trigger a recalculation of accumulators
nBlockFirstFraudulent = 1110; // 1110; //First block that bad serials emerged (currently we do not have any) *** TODO ***
nBlockLastGoodCheckpoint = 1001; // Last valid accumulator checkpoint (currently we do not have any) *** TODO ***
nBlockEnforceInvalidUTXO = 1110; // Start enforcing the invalid UTXO's
Expand Down
14 changes: 3 additions & 11 deletions src/main.cpp
Expand Up @@ -6552,19 +6552,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
// it was the one which was commented out
int ActiveProtocol()
{

// SPORK_14 was used for 70910. Leave it 'ON' so they don't see > 70910 nodes. They won't react to SPORK_15
// messages because it's not in their code

/* if (IsSporkActive(SPORK_14_NEW_PROTOCOL_ENFORCEMENT))
if (IsSporkActive(SPORK_14_NEW_PROTOCOL_ENFORCEMENT))
return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT;
*/

// SPORK_15 is used for 70911. Nodes < 70911 don't see it and still get their protocol version via SPORK_14 and their
// own ModifierUpgradeBlock()

if (IsSporkActive(SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2))
return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT;
// if (IsSporkActive(SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2))
// return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT;
return MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT;
}

Expand Down
2 changes: 1 addition & 1 deletion src/spork.h
Expand Up @@ -50,7 +50,7 @@ using namespace boost;
#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT 4070908800 //OFF
#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT 4070908800 //OFF
#define SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT 4070908800 //OFF
//#define SPORK_11_LOCK_INVALID_UTXO_DEFAULT 4070908800 //OFF - NOTE: this is block height not time!
//#define SPORK_11_LOCK_INVALID_UTXO_DEFAULT 4070908800 //OFF - NOTE: this is block height not time!
#define SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT 4070908800 //OFF
#define SPORK_14_NEW_PROTOCOL_ENFORCEMENT_DEFAULT 4070908800 //OFF
#define SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2_DEFAULT 4070908800 //OFF
Expand Down
4 changes: 2 additions & 2 deletions src/version.h
Expand Up @@ -11,7 +11,7 @@
* network protocol versioning
*/

static const int PROTOCOL_VERSION = 70000;
static const int PROTOCOL_VERSION = 70010;

//! initial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;
Expand All @@ -21,7 +21,7 @@ static const int GETHEADERS_VERSION = 70000;

//! disconnect from peers older than this proto version
static const int MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT = 70000;
static const int MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT = 70000;
static const int MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT = 70010;

//! nTime field added to CAddress, starting with this version;
//! if possible, avoid requesting addresses nodes older than this
Expand Down

0 comments on commit 2fde77c

Please sign in to comment.