Skip to content

Commit

Permalink
INSN v1.0.2.0 Release
Browse files Browse the repository at this point in the history
Chain restart & update
  • Loading branch information
CryptoCoderz committed May 9, 2017
1 parent 4706a96 commit 6c3178c
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 89 deletions.
2 changes: 1 addition & 1 deletion INSaNE-v3.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = INSaNe-qt
VERSION = 1.0.1.0
VERSION = 1.0.2.0
INCLUDEPATH += src src/json src/qt src/qt/plugins/mrichtexteditor
QT += core gui widgets network printsupport
DEFINES += ENABLE_WALLET
Expand Down
5 changes: 3 additions & 2 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,12 @@ class CMainParams : public CChainParams {
base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x88)(0xB2)(0x1E).convert_to_container<std::vector<unsigned char> >();
base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x88)(0xAD)(0xE4).convert_to_container<std::vector<unsigned char> >();

vSeeds.push_back(CDNSSeedData("Seed1", "insane.cryptocoderz.com"));
vSeeds.push_back(CDNSSeedData("thecryptochat.net", "195.74.52.227"));
vSeeds.push_back(CDNSSeedData("cryptocoderz.com", "insane.cryptocoderz.com"));
convertSeed6(vFixedSeeds, pnSeed6_main, ARRAYLEN(pnSeed6_main));

nPoolMaxTransactions = 3;
strDarksendPoolDummyAddress = "IN9pnsexEyBtNUMut8dV1KRNfHtJf6YbvA";
strDarksendPoolDummyAddress = "iN9pnsexEyBtNUMut8dV1KRNfHtJf6YbvA";
nEndPoWBlock = 0x7fffffff;
nStartPoSBlock = 0;
}
Expand Down
8 changes: 3 additions & 5 deletions src/checkpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ namespace Checkpoints
static MapCheckpoints mapCheckpoints =
boost::assign::map_list_of
(0, Params().HashGenesisBlock() )
(2, uint256("0x9c7888f0cdebcea0193ccb4890838ab39a409826f266bc709cea7372bac45da3"))
(11, uint256("0x78a2dd592fc58299565335cb212396f60a60bd93efe54aa560f0aebfb3e1aa97"))
(80, uint256("0xab72f3712be3fb55b876fe742f4683dbbc3d4955cc0276f20ceb6d931aa3bac8"))
(200, uint256("0x0a560ca85825f1dcc48875ada1647edfc21bd7ca34aac720e29e6150608b5d97"))
(220, uint256("0xa1350b59e69c3b90ac274612e28a0f61b16bcbe2f06575067e5fedfe464cc02b"))
(2, uint256("0x2cb4de1dbfc14b3b71692f747e07e973f1d58328bf54fb709b27818b7a04f337"))
(11, uint256("0xf3cc6f9b42186759abdf5c7a0716bd9da77681a5c2c88b6a88cb91cfc16350f6"))
(90, uint256("0xdd46ec748365a09494f00c03ea9d6e24956df3adafcfe8f4939cd7b61445748f"))
;

// TestNet has no checkpoints
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 1
#define CLIENT_VERSION_REVISION 2
#define CLIENT_VERSION_BUILD 0

// Set to true for release, false for prerelease or test build
Expand Down
16 changes: 15 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1480,6 +1480,13 @@ int64_t GetProofOfWorkReward(int nHeight, int64_t nFees)
if(rand1 <= 8000 && nHeight > nReservePhaseEnd) // 8% Chance of superblock
nSubsidy = nSuperPoWReward;

// hardCap v2.1
else if(pindexBest->nMoneySupply > MAX_SINGLE_TX)
{
LogPrint("MINEOUT", "GetProofOfWorkReward(): create=%s nFees=%d\n", FormatMoney(nFees), nFees);
return nFees;
}

LogPrint("creation", "GetProofOfWorkReward() : create=%s nSubsidy=%d\n", FormatMoney(nSubsidy), nSubsidy);
return nSubsidy + nFees;
}
Expand All @@ -1504,6 +1511,13 @@ int64_t GetProofOfStakeReward(const CBlockIndex* pindexPrev, int64_t nCoinAge, i
if(rand1 <= 8000) // 8% Chance of superblock
nSubsidy = nCoinAge * COIN_SPRB_REWARD * 33 / (365 * 33 + 8);

// hardCap v2.1
else if(pindexBest->nMoneySupply > MAX_SINGLE_TX)
{
LogPrint("MINEOUT", "GetProofOfStakeReward(): create=%s nFees=%d\n", FormatMoney(nFees), nFees);
return nFees;
}

LogPrint("creation", "GetProofOfStakeReward(): create=%s nCoinAge=%d\n", FormatMoney(nSubsidy), nCoinAge);
return nSubsidy + nFees;
}
Expand Down Expand Up @@ -1555,7 +1569,7 @@ unsigned int Terminal_Velocity_RateX(const CBlockIndex* pindexLast, bool fProofO
int64_t prevPoW = 0; // hybrid value
int64_t prevPoS = 0; // hybrid value
// Check for blocks to index | Allowing for initial chain start
if (pindexLast->nHeight < scanheight+84)
if (pindexLast->nHeight < scanheight+114)
return bnTerminalVelocity.GetCompact(); // can't index prevblock
// Set prev blocks...
const CBlockIndex* pindexPrev = pindexLast;
Expand Down
4 changes: 2 additions & 2 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static const int64_t DARKSEND_COLLATERAL = (0.01*COIN);
/** Darksend pool values */
static const int64_t DARKSEND_POOL_MAX = (4999.99*COIN);
/** Velocity toggle block */
static const int64_t VELOCITY_TOGGLE = 90; // Implementation of the Velocity system into the chain.
static const int64_t VELOCITY_TOGGLE = 120; // Implementation of the Velocity system into the chain.
/** Velocity retarget toggle block */
static const int64_t VELOCITY_TDIFF = 0; // Use Velocity's retargetting method.
/** Protocol toggle */
Expand Down Expand Up @@ -132,7 +132,7 @@ static const unsigned int nNonceTest = 0;
/** Genesis block subsidy */
static const int64_t nGenesisBlockReward = 1 * COIN;
/** Reserve block subsidy */
static const int64_t nBlockRewardReserve = 1840000 * COIN; //
static const int64_t nBlockRewardReserve = 1840010 * COIN; //
/** Starting block subsidy */
static const int64_t nBlockPoWReward = 1 * COIN;
/** Superblock subsidy */
Expand Down
29 changes: 0 additions & 29 deletions src/masternode genkey.txt

This file was deleted.

52 changes: 16 additions & 36 deletions src/rpcmining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,52 +88,32 @@ Value getmininginfo(const Array& params, bool fHelp)
nWeight = pwalletMain->GetStakeWeight();

// Define block rewards
int64_t nRewardPoW = (int64_t)GetProofOfWorkReward(pindexBest->pprev, 0);
int64_t nRewardPoW = (uint64_t)GetProofOfWorkReward(nBestHeight, 0);
int64_t nRewardPoS = (int64_t)GetProofOfStakeReward(pindexBest->pprev, 0, 0);

Object obj, diff, weight;
obj.push_back(Pair("blocks", (int)nBestHeight));
obj.push_back(Pair("currentblocksize",(uint64_t)nLastBlockSize));
obj.push_back(Pair("currentblocktx",(uint64_t)nLastBlockTx));

if(pindexBest->nHeight < Params().EndPoWBlock()) // TODO: add check for proof-of-work not started
{
diff.push_back(Pair("PoW-difficulty", GetDifficulty()));
obj.push_back(Pair("PoW-blockvalue", (int64_t)nRewardPoW));
obj.push_back(Pair("netmhashps", GetPoWMHashPS()));
}
else
{
diff.push_back(Pair("PoW-difficulty", "PoW-disabled"));
obj.push_back(Pair("PoW-blockvalue", "PoW-disabled"));
obj.push_back(Pair("netmhashps", "PoW-disabled"));
}

if(pindexBest->nHeight > Params().StartPoSBlock()) // TODO: add check for proof-of-stake stopped
{
diff.push_back(Pair("PoS-difficulty", GetDifficulty(GetLastBlockIndex(pindexBest, true))));
obj.push_back(Pair("PoS-blockvalue", (int64_t)nRewardPoS));
weight.push_back(Pair("weightminimum", (uint64_t)nWeight));
weight.push_back(Pair("weightmaximum", (uint64_t)0));
weight.push_back(Pair("combinedweight", (uint64_t)nWeight));
obj.push_back(Pair("stakeweight", weight));
obj.push_back(Pair("netstakeweight", GetPoSKernelPS()));
diff.push_back(Pair("search-interval", (int)nLastCoinStakeSearchInterval));
}
else
{
diff.push_back(Pair("PoS-difficulty", "PoS-disabled"));
obj.push_back(Pair("PoS-blockvalue", "PoS-disabled"));
weight.push_back(Pair("weightminimum", "PoS-disabled"));
weight.push_back(Pair("weightmaximum", "PoS-disabled"));
weight.push_back(Pair("combinedweight", "PoS-disabled"));
obj.push_back(Pair("stakeweight", "PoS-disabled"));
obj.push_back(Pair("netstakeweight", "PoS-disabled"));
diff.push_back(Pair("search-interval", "PoS-disabled"));
}
diff.push_back(Pair("proof-of-work", GetDifficulty()));
diff.push_back(Pair("proof-of-stake", GetDifficulty(GetLastBlockIndex(pindexBest, true))));
diff.push_back(Pair("search-interval", (int)nLastCoinStakeSearchInterval));
obj.push_back(Pair("difficulty", diff));

obj.push_back(Pair("blockvalue-PoS", nRewardPoS));
obj.push_back(Pair("blockvalue-PoW", nRewardPoW));
obj.push_back(Pair("netmhashps", GetPoWMHashPS()));
obj.push_back(Pair("netstakeweight", GetPoSKernelPS()));
obj.push_back(Pair("errors", GetWarnings("statusbar")));
obj.push_back(Pair("pooledtx", (uint64_t)mempool.size()));

weight.push_back(Pair("minimum", (uint64_t)nWeight));
weight.push_back(Pair("maximum", (uint64_t)0));
weight.push_back(Pair("combined", (uint64_t)nWeight));
obj.push_back(Pair("stakeweight", weight));

obj.push_back(Pair("stakeinterest", (uint64_t)COIN_YEAR_REWARD));
obj.push_back(Pair("testnet", TestNet()));
return obj;
}
Expand Down
6 changes: 3 additions & 3 deletions src/rpcmisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ Value getinfo(const Array& params, bool fHelp)
obj.push_back(Pair("proxy", (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
obj.push_back(Pair("ip", GetLocalAddress(NULL).ToStringIP()));

//diff.push_back(Pair("proof-of-work", GetDifficulty()));
//diff.push_back(Pair("proof-of-stake", GetDifficulty(GetLastBlockIndex(pindexBest, true))));
obj.push_back(Pair("difficulty", GetDifficulty(GetLastBlockIndex(pindexBest, true))));
diff.push_back(Pair("proof-of-work", GetDifficulty()));
diff.push_back(Pair("proof-of-stake", GetDifficulty(GetLastBlockIndex(pindexBest, true))));
obj.push_back(Pair("difficulty", diff));

obj.push_back(Pair("testnet", TestNet()));
#ifdef ENABLE_WALLET
Expand Down
2 changes: 1 addition & 1 deletion src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ void ReadConfigFile(map<string, string>& mapSettingsRet,
fprintf(ConfFile, "rpcport=10257\n");
fprintf(ConfFile, "rpcconnect=127.0.0.1\n");
fprintf(ConfFile, "rpcallowip=127.0.0.1\n");
fprintf(ConfFile, "addnode=149.56.66.5\n");
fprintf(ConfFile, "addnode=195.74.52.227\n");
fprintf(ConfFile, "addnode=149.56.66.5\n");
fprintf(ConfFile, "addnode=74.208.43.97\n");
fprintf(ConfFile, "addnode=164.132.176.100\n");
Expand Down
2 changes: 1 addition & 1 deletion src/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const std::string CLIENT_NAME("Insanity");
#define GIT_ARCHIVE 1
#ifdef GIT_ARCHIVE
# define GIT_COMMIT_ID "Membrane-1"
# define GIT_COMMIT_DATE "May 5, 2017" //$Format:%cD
# define GIT_COMMIT_DATE "May 7, 2017" //$Format:%cD
#endif

#define BUILD_DESC_FROM_COMMIT(maj,min,rev,build,commit) \
Expand Down
14 changes: 7 additions & 7 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,31 @@ static const int DATABASE_VERSION = 70509;
// network protocol versioning
//
// 61403 introduces updated net code which fixes several bugs/issues
static const int PROTOCOL_VERSION = 62002;
static const int PROTOCOL_VERSION = 62004;

// intial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;

// disconnect from peers older than this proto version
static const int MIN_PEER_PROTO_VERSION = 62002;
static const int MIN_PEER_PROTO_VERSION = 62004;

// minimum peer version accepted by DarkSendPool
static const int MIN_POOL_PEER_PROTO_VERSION = 62002;
static const int MIN_INSTANTX_PROTO_VERSION = 62002;
static const int MIN_POOL_PEER_PROTO_VERSION = 62004;
static const int MIN_INSTANTX_PROTO_VERSION = 62004;

//! minimum peer version that can receive masternode payments
// V1 - Last protocol version before update
// V2 - Newest protocol version
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 62002;
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 62002;
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 62004;
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 62004;

// nTime field added to CAddress, starting with this version;
// if possible, avoid requesting addresses nodes older than this
static const int CADDR_TIME_VERSION = 31402;

// only request blocks from nodes outside this range of versions
static const int NOBLKS_VERSION_START = 0;
static const int NOBLKS_VERSION_END = 62001;
static const int NOBLKS_VERSION_END = 62003;

// BIP 0031, pong message, is enabled for all versions AFTER this one
static const int BIP0031_VERSION = 60000;
Expand Down

0 comments on commit 6c3178c

Please sign in to comment.