Skip to content

Instantly share code, notes, and snippets.

/dash.diff Secret

Created January 21, 2018 08:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 12 You must be signed in to fork a gist
  • Save anonymous/bf7ff70904f24db0467bfdd6ad6c62cf to your computer and use it in GitHub Desktop.
Save anonymous/bf7ff70904f24db0467bfdd6ad6c62cf to your computer and use it in GitHub Desktop.
You can apply this diff on commit 8506678d4b7b553dcfa92840f43c6ad9c2148db8
diff --git a/contrib/debian/examples/dash.conf b/contrib/debian/examples/dash.conf
index 12580a2..eab04b8 100644
--- a/contrib/debian/examples/dash.conf
+++ b/contrib/debian/examples/dash.conf
@@ -44,11 +44,11 @@
# Use as many addnode= settings as you like to connect to specific peers
#addnode=69.164.218.197
-#addnode=10.0.0.2:9999
+#addnode=10.0.0.2:10332
# Alternatively use as many connect= settings as you like to connect ONLY to specific peers
#connect=69.164.218.197
-#connect=10.0.0.1:9999
+#connect=10.0.0.1:10332
# Listening mode, enabled by default except when 'connect' is being used
#listen=1
@@ -89,7 +89,7 @@
#rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96
# Listen for RPC connections on this TCP port:
-#rpcport=9998
+rpcport=10333
# You can use Dash or dashd to send commands to Dash/dashd
# running on another host using this option:
diff --git a/contrib/linearize/example-linearize-testnet.cfg b/contrib/linearize/example-linearize-testnet.cfg
index 696ae22..343230d 100644
--- a/contrib/linearize/example-linearize-testnet.cfg
+++ b/contrib/linearize/example-linearize-testnet.cfg
@@ -3,7 +3,7 @@
rpcuser=someuser
rpcpassword=somepassword
host=127.0.0.1
-port=19998
+port=11332
# bootstrap.dat hashlist settings (linearize-hashes)
max_height=3130000
diff --git a/contrib/linearize/example-linearize.cfg b/contrib/linearize/example-linearize.cfg
index 09a66dc..e888932 100644
--- a/contrib/linearize/example-linearize.cfg
+++ b/contrib/linearize/example-linearize.cfg
@@ -3,7 +3,7 @@
rpcuser=someuser
rpcpassword=somepassword
host=127.0.0.1
-port=9998
+port=10332
# bootstrap.dat hashlist settings (linearize-hashes)
max_height=3130000
diff --git a/contrib/linearize/linearize-hashes.py b/contrib/linearize/linearize-hashes.py
index ee87cea..212e474 100755
--- a/contrib/linearize/linearize-hashes.py
+++ b/contrib/linearize/linearize-hashes.py
@@ -96,7 +96,7 @@ if __name__ == '__main__':
if 'host' not in settings:
settings['host'] = '127.0.0.1'
if 'port' not in settings:
- settings['port'] = 9998
+ settings['port'] = 10332
if 'min_height' not in settings:
settings['min_height'] = 0
if 'max_height' not in settings:
diff --git a/contrib/spendfrom/spendfrom.py b/contrib/spendfrom/spendfrom.py
index 51a8422..8963ba1 100755
--- a/contrib/spendfrom/spendfrom.py
+++ b/contrib/spendfrom/spendfrom.py
@@ -67,7 +67,7 @@ def connect_JSON(config):
testnet = config.get('testnet', '0')
testnet = (int(testnet) > 0) # 0/1 in config file, convert to True/False
if not 'rpcport' in config:
- config['rpcport'] = 19998 if testnet else 9998
+ config['rpcport'] = 11332 if testnet else 10332
connect = "http://%s:%s@127.0.0.1:%s"%(config['rpcuser'], config['rpcpassword'], config['rpcport'])
try:
result = ServiceProxy(connect)
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index cf9d4fd..481df9a 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -52,7 +52,7 @@ static CBlock CreateGenesisBlock(const char* pszTimestamp, const CScript& genesi
static CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward)
{
const char* pszTimestamp = "Wired 09/Jan/2014 The Grand Experiment Goes Live: Overstock.com Is Now Accepting Bitcoins";
- const CScript genesisOutputScript = CScript() << ParseHex("040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9") << OP_CHECKSIG;
+ const CScript genesisOutputScript = CScript() << ParseHex("043384710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9") << OP_CHECKSIG;
return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, nBits, nVersion, genesisReward);
}
@@ -117,7 +117,7 @@ public:
consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nThreshold = 3226; // 80% of 4032
// The best chain should have at least this much work.
- consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000100a308553b4863b755"); // 782700
+ consensus.nMinimumChainWork = uint256S("0x00");//uint256S("0x000000000000000000000000000000000000000000000100a308553b4863b755"); // 782700
// By default assume that the signatures in ancestors of this block are valid.
consensus.defaultAssumeValid = uint256S("0x000000000000001c172f518793c3b9e83f202284615592f87fe3506ce964dcd4"); // 782700
@@ -127,29 +127,30 @@ public:
* The characters are rarely used upper ASCII, not valid as UTF-8, and produce
* a large 32-bit integer with any alignment.
*/
- pchMessageStart[0] = 0xbf;
- pchMessageStart[1] = 0x0c;
- pchMessageStart[2] = 0x6b;
- pchMessageStart[3] = 0xbd;
+ pchMessageStart[0] = 0xd1;
+ pchMessageStart[1] = 0xb2;
+ pchMessageStart[2] = 0xa4;
+ pchMessageStart[3] = 0xdc;
vAlertPubKey = ParseHex("048240a8748a80a286b270ba126705ced4f2ce5a7847b3610ea3c06513150dade2a8512ed5ea86320824683fc0818f0ac019214973e677acd1244f6d0571fc5103");
- nDefaultPort = 9999;
- nMaxTipAge = 6 * 60 * 60; // ~144 blocks behind -> 2 x fork detection time, was 24 * 60 * 60 in bitcoin
+ nDefaultPort = 10332;
+ nMaxTipAge = 0x7fffffff; //6 * 60 * 60; // ~144 blocks behind -> 2 x fork detection time, was 24 * 60 * 60 in bitcoin
nDelayGetHeadersTime = 24 * 60 * 60;
nPruneAfterHeight = 100000;
- genesis = CreateGenesisBlock(1390095618, 28917698, 0x1e0ffff0, 1, 50 * COIN);
+ genesis = CreateGenesisBlock(1514547457, 29910985, 0x1e0ffff0, 1, 50 * COIN);
consensus.hashGenesisBlock = genesis.GetHash();
- assert(consensus.hashGenesisBlock == uint256S("0x00000ffd590b1485b3caadc19b22e6379c733355108f107a430458cdf3407ab6"));
- assert(genesis.hashMerkleRoot == uint256S("0xe0028eb9648db56b1ac77cf090b99048a8007e2bb64b68f092c03c7f56a662c7"));
+ assert(consensus.hashGenesisBlock == uint256S("0x00000da14cda2861a86c99ca551e6ea62126fffd1138feb708dc262b656f66e4"));
+ assert(genesis.hashMerkleRoot == uint256S("0xa3bb7f15c718d763400874d21df9ef1196c62aad3b7eb37118e8e1b00dbf8a91"));
- vSeeds.push_back(CDNSSeedData("dash.org", "dnsseed.dash.org"));
- vSeeds.push_back(CDNSSeedData("dashdot.io", "dnsseed.dashdot.io"));
- vSeeds.push_back(CDNSSeedData("masternode.io", "dnsseed.masternode.io"));
- vSeeds.push_back(CDNSSeedData("dashpay.io", "dnsseed.dashpay.io"));
+ vSeeds.push_back(CDNSSeedData("my-very-own-coin.org", "my-very-own-coin.org"));
+ //vSeeds.push_back(CDNSSeedData("dash.org", "dnsseed.dash.org"));
+ //vSeeds.push_back(CDNSSeedData("dashdot.io", "dnsseed.dashdot.io"));
+ //vSeeds.push_back(CDNSSeedData("masternode.io", "dnsseed.masternode.io"));
+ //vSeeds.push_back(CDNSSeedData("dashpay.io", "dnsseed.dashpay.io"));
// Dash addresses start with 'X'
- base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,76);
+ base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,28);
// Dash script addresses start with '7'
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,16);
// Dash private keys start with '7' or 'X'
@@ -164,7 +165,7 @@ public:
vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main));
- fMiningRequiresPeers = true;
+ fMiningRequiresPeers = false;
fDefaultConsistencyChecks = false;
fRequireStandard = true;
fMineBlocksOnDemand = false;
@@ -268,20 +269,20 @@ public:
pchMessageStart[2] = 0xca;
pchMessageStart[3] = 0xff;
vAlertPubKey = ParseHex("04517d8a699cb43d3938d7b24faaff7cda448ca4ea267723ba614784de661949bf632d6304316b244646dea079735b9a6fc4af804efb4752075b9fe2245e14e412");
- nDefaultPort = 19999;
+ nDefaultPort = 19333;
nMaxTipAge = 0x7fffffff; // allow mining on top of old blocks for testnet
nDelayGetHeadersTime = 24 * 60 * 60;
nPruneAfterHeight = 1000;
- genesis = CreateGenesisBlock(1390666206UL, 3861367235UL, 0x1e0ffff0, 1, 50 * COIN);
+ genesis = CreateGenesisBlock(1514547457, 29910985, 0x1e0ffff0, 1, 50 * COIN);
consensus.hashGenesisBlock = genesis.GetHash();
- assert(consensus.hashGenesisBlock == uint256S("0x00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c"));
- assert(genesis.hashMerkleRoot == uint256S("0xe0028eb9648db56b1ac77cf090b99048a8007e2bb64b68f092c03c7f56a662c7"));
+ assert(consensus.hashGenesisBlock == uint256S("0x00000da14cda2861a86c99ca551e6ea62126fffd1138feb708dc262b656f66e4"));
+ assert(genesis.hashMerkleRoot == uint256S("0xa3bb7f15c718d763400874d21df9ef1196c62aad3b7eb37118e8e1b00dbf8a91"));
vFixedSeeds.clear();
vSeeds.clear();
- vSeeds.push_back(CDNSSeedData("dashdot.io", "testnet-seed.dashdot.io"));
- vSeeds.push_back(CDNSSeedData("masternode.io", "test.dnsseed.masternode.io"));
+ //vSeeds.push_back(CDNSSeedData("dashdot.io", "testnet-seed.dashdot.io"));
+ //vSeeds.push_back(CDNSSeedData("masternode.io", "test.dnsseed.masternode.io"));
// Testnet Dash addresses start with 'y'
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,140);
@@ -385,10 +386,11 @@ public:
nDefaultPort = 19994;
nPruneAfterHeight = 1000;
- genesis = CreateGenesisBlock(1417713337, 1096447, 0x207fffff, 1, 50 * COIN);
+
+ genesis = CreateGenesisBlock(1417713338, 29407177, 0x207fffff, 1, 50 * COIN);
consensus.hashGenesisBlock = genesis.GetHash();
- assert(consensus.hashGenesisBlock == uint256S("0x000008ca1832a4baf228eb1553c03d3a2c8e02399550dd6ea8d65cec3ef23d2e"));
- assert(genesis.hashMerkleRoot == uint256S("0xe0028eb9648db56b1ac77cf090b99048a8007e2bb64b68f092c03c7f56a662c7"));
+ //assert(consensus.hashGenesisBlock == uint256S("0x000007f3d9376377833db5dcc54b386f2dbd142f1dc56a8a6564119aeb0f94ce"));
+ //assert(genesis.hashMerkleRoot == uint256S("0xa3bb7f15c718d763400874d21df9ef1196c62aad3b7eb37118e8e1b00dbf8a91"));
vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds.
vSeeds.clear(); //! Regtest mode doesn't have any DNS seeds.
diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp
index eb1fefa..2d1313d 100644
--- a/src/chainparamsbase.cpp
+++ b/src/chainparamsbase.cpp
@@ -32,7 +32,7 @@ class CBaseMainParams : public CBaseChainParams
public:
CBaseMainParams()
{
- nRPCPort = 9998;
+ nRPCPort = 10333;
}
};
static CBaseMainParams mainParams;
@@ -45,7 +45,7 @@ class CBaseTestNetParams : public CBaseChainParams
public:
CBaseTestNetParams()
{
- nRPCPort = 19998;
+ nRPCPort = 11333;
strDataDir = "testnet3";
}
};
@@ -59,7 +59,7 @@ class CBaseRegTestParams : public CBaseChainParams
public:
CBaseRegTestParams()
{
- nRPCPort = 18332;
+ nRPCPort = 18333;
strDataDir = "regtest";
}
};
diff --git a/src/clientversion.h b/src/clientversion.h
index ae26e8b..5deafdf 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -15,9 +15,9 @@
//! These need to be macros, as clientversion.cpp's and dash*-res.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 0
-#define CLIENT_VERSION_MINOR 12
-#define CLIENT_VERSION_REVISION 2
-#define CLIENT_VERSION_BUILD 2
+#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
#define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/miner.cpp b/src/miner.cpp
index 909a6ad..ad4a891 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -424,6 +424,7 @@ void static BitcoinMiner(const CChainParams& chainparams, CConnman& connman)
// on an obsolete chain. In regtest mode we expect to fly solo.
do {
bool fvNodesEmpty = connman.GetNodeCount(CConnman::CONNECTIONS_ALL) == 0;
+ LogPrintf("DashMiner -- loop: fvNodesEmpty: %d, IsInitialBlockDownload: %d, IsSynced:%d \n",!fvNodesEmpty, !IsInitialBlockDownload(), masternodeSync.IsSynced());
if (!fvNodesEmpty && !IsInitialBlockDownload() && masternodeSync.IsSynced())
break;
MilliSleep(1000);
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index c32256c..772cb20 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1383,7 +1383,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
if (inv.type == MSG_BLOCK) {
UpdateBlockAvailability(pfrom->GetId(), inv.hash);
if (!fAlreadyHave && !fImporting && !fReindex && !mapBlocksInFlight.count(inv.hash)) {
- if (chainparams.DelayGetHeadersTime() != 0 && pindexBestHeader->GetBlockTime() < GetAdjustedTime() - chainparams.DelayGetHeadersTime()) {
+ if (false & chainparams.DelayGetHeadersTime() != 0 && pindexBestHeader->GetBlockTime() < GetAdjustedTime() - chainparams.DelayGetHeadersTime()) {
// We are pretty far from being completely synced at the moment. If we would initiate a new
// chain of GETHEADERS/HEADERS now, we may end up downnloading the full chain from multiple
// peers at the same time, slowing down the initial sync. At the same time, we don't know
diff --git a/src/validation.cpp b/src/validation.cpp
index 942ae50..df67f97 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -1298,19 +1298,26 @@ CAmount GetMasternodePayment(int nHeight, CAmount blockValue)
bool IsInitialBlockDownload()
{
static bool lockIBDState = false;
- if (lockIBDState)
+ if (lockIBDState) {
return false;
+ }
if (fImporting || fReindex)
return true;
LOCK(cs_main);
const CChainParams& chainParams = Params();
if (chainActive.Tip() == NULL)
return true;
- if (chainActive.Tip()->nChainWork < UintToArith256(chainParams.GetConsensus().nMinimumChainWork))
+ if (chainActive.Tip()->nChainWork < UintToArith256(chainParams.GetConsensus().nMinimumChainWork)) {
+ LogPrintf("IsInitialBlockDownload: nChainWork\n");
return true;
- if (chainActive.Tip()->GetBlockTime() < (GetTime() - chainParams.MaxTipAge()))
+ }
+ if (chainActive.Tip()->GetBlockTime() < (GetTime() - chainParams.MaxTipAge())) {
+ LogPrintf("IsInitialBlockDownload: GetBlockTime\n");
return true;
+ }
lockIBDState = true;
+
+ LogPrintf("IsInitialBlockDownload: else");
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment