Skip to content

Commit 4ecc327

Browse files
committed
Sync issue fix
Seed node update. Fix issue with df04016. Unsuitable Dash-specific code removed. Checkpoint update. Progress feedback improved.
1 parent b9e9f99 commit 4ecc327

File tree

6 files changed

+54
-21
lines changed

6 files changed

+54
-21
lines changed

contrib/seeds/nodes_main.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1+
45.84.0.125:41319
12
45.124.64.164:41319
3+
46.105.181.190:41319
4+
74.208.160.38:41319
5+
77.73.66.229:41319
6+
80.211.88.234:41319
7+
81.169.215.168:41319
28
85.214.65.60:41319
39
91.200.100.209:41319
410
95.216.143.13:41319
5-
104.140.22.62:41319
611
104.206.241.183:41319
7-
107.172.248.127:41319
812
107.174.203.97:41319
13+
107.175.31.173:41319
914
145.239.184.91:41319
1015
159.69.189.185:41319
16+
192.3.80.58:41319
1117
195.201.226.128:41319
18+
213.59.123.142:41319
1219
217.160.60.76:41319

contrib/seeds/nodes_test.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
81.169.215.168:41319
12
85.214.65.60:41419
23
95.216.143.13:41419
34
107.174.203.97:41419
5+
159.69.189.185:41419
6+
185.122.58.44:41419
47
195.201.226.128:41419

src/chainparams.cpp

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class CMainParams : public CChainParams {
150150
consensus.nPowTargetSpacing = 6 * 60; // DMS 6 minutes (initial 4 minutes); Bitcoin 10 minutes; Dash 2.5 minutes
151151
consensus.fPowAllowMinDifficultyBlocks = false;
152152
consensus.fPowNoRetargeting = false;
153-
consensus.nPowNTSHeight = 0;
153+
consensus.nPowNTSHeight = 4794; // see commit df04016c84ee09eb716605a962cf05064c7eea9f
154154
consensus.nRuleChangeActivationThreshold = 1916; // 95% of 2016
155155
consensus.nMinerConfirmationWindow = 2016; //relevant to BIP 9 soft fork, see params.h
156156
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
@@ -177,10 +177,10 @@ class CMainParams : public CChainParams {
177177
consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nThreshold = 3226; // 80% of 4032
178178

179179
// The best chain should have at least this much work. Backport "assumed valid blocks" feature from Bitcoin 0.13 https://github.com/dashpay/dash/commit/ccee103a0e6f568f545c4e6b06f6a3e565cdbcb1#diff-64cbe1ad5465e13bc59ee8bb6f3de2e7
180-
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000000000100010"); // TODO
180+
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000000000000045e8fe4cec");
181181

182182
// By default assume that the signatures in ancestors of this block are valid.
183-
consensus.defaultAssumeValid = uint256S("0x00000295f0e654ec4c7ec2e4051acaca0eda31ae2ca2d7a38e56a7875cf457dd"); // 79403
183+
consensus.defaultAssumeValid = uint256S("0x0000000c15de23b822043f7fd7ff4ace4761ec455da710442ef6c1e5035a14d1"); // 103260
184184

185185
/**
186186
* The message start string is designed to be unlikely to occur in normal data.
@@ -263,13 +263,15 @@ class CMainParams : public CChainParams {
263263
( 79403, uint256S("0x00000295f0e654ec4c7ec2e4051acaca0eda31ae2ca2d7a38e56a7875cf457dd")) // 2019-Aug-12
264264
( 86998, uint256S("0x0000000d6ca0904b7ec849283a177b7a25b0ed3c23413c14d9e564bfa4d2514a")) // 2019-Sep-14
265265
( 94707, uint256S("0x000000d52750d7b5cf3e682106b258de7f9c0f66e011e7cf0699b6526a05339d")) // 2019-Oct-18
266+
(100000, uint256S("0x00000095a23b6cc9ec9c0d7385bf4c3705220271d425a203af41163b4600e96d")) // 2019-Nov-10
267+
(103260, uint256S("0x0000000c15de23b822043f7fd7ff4ace4761ec455da710442ef6c1e5035a14d1")) // 2019-Nov-24
266268
};
267269

268270
chainTxData = ChainTxData{
269-
1535270400, // * UNIX timestamp of last known number of transactions
270-
0, // * total number of transactions between genesis and that timestamp
271-
// (the tx=... number in the SetBestChain debug.log lines)
272-
0.1 // * estimated number of transactions per second after that timestamp https://github.com/dashpay/dash/commit/658479355e298307e7d087893c4fd545ab61a0cc#diff-64cbe1ad5465e13bc59ee8bb6f3de2e7
271+
1574599910, // * UNIX timestamp of last known number of transactions
272+
141893, // * total number of transactions between genesis and that timestamp
273+
// (the tx=... number in the UpdateTip debug.log lines)
274+
0.01 // * estimated number of transactions per second after that timestamp
273275
};
274276
}
275277
};
@@ -334,10 +336,10 @@ class CTestNetParams : public CChainParams {
334336
consensus.vDeployments[Consensus::DEPLOYMENT_BIP147].nThreshold = 3226;
335337

336338
// The best chain should have at least this much work.
337-
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000000000100010");
339+
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000000023f5f791");
338340

339341
// By default assume that the signatures in ancestors of this block are valid.
340-
consensus.defaultAssumeValid = uint256S("0x00011741fd5041f21e6309f6479ca5af3dc077516344df8640faf4fd7b948e89");
342+
consensus.defaultAssumeValid = uint256S("0x00003f6631657d5cbad67f3da00c7c3ed5d43d969c419026b32ffd73412348c4"); // 104960
341343

342344
pchMessageStart[0] = 0xce; // same as Dash Testnet
343345
pchMessageStart[1] = 0x44; // D
@@ -399,7 +401,6 @@ class CTestNetParams : public CChainParams {
399401
checkpointData = (CCheckpointData) {
400402
boost::assign::map_list_of
401403
( 0, uint256S("0x00004399a114a034b2f8d742b8e7f018d3cfdec0b25150d0b7e271b63c9cd4ce"))
402-
( 133, uint256S("0x00093b270f3e8b798c6463821fc660583002778ee09d96e6ff99b64d1200f9aa"))
403404
( 4600, uint256S("0x00024d5b6d0aa1cfda1f78360cc85d246bab6c08b9a4684094adfbfc14afee8d"))
404405
( 15000, uint256S("0x0006adc6713cbbdbcb4dfe4de2c6197a5ccfa061aab8abc93c6b12c161197245"))
405406
( 20013, uint256S("0x000db2f24a22ad664156f89734b09326a7b93e824d29d14d7ce9b41b4f4ac2d3"))
@@ -412,13 +413,14 @@ class CTestNetParams : public CChainParams {
412413
( 73989, uint256S("0x0003ecfd52a44d853c3e9967764482a10e6f16dacb0a634dd62d993ef2b22cf8"))
413414
( 86998, uint256S("0x0007fc0bf4654559a160911cb8cabf494ffb1010867a6141ee48bd130812cea0"))
414415
( 94707, uint256S("0x000b602b64a3d1ef2d001bbcb5466ab68a1536e1bcddb193311c64ef14ac628d"))
415-
( 96078, uint256S("0x00011741fd5041f21e6309f6479ca5af3dc077516344df8640faf4fd7b948e89"))
416+
(100000, uint256S("0x00001db74c7881d3294ed79f695085086e80c17c7d042555a569b4440f734e9d"))
417+
(104960, uint256S("0x00003f6631657d5cbad67f3da00c7c3ed5d43d969c419026b32ffd73412348c4"))
416418
};
417419
chainTxData = ChainTxData{
418-
1559127600, // * UNIX timestamp of last known number of transactions
419-
0, // * total number of transactions between genesis and that timestamp
420-
// (the tx=... number in the SetBestChain debug.log lines)
421-
0.01 // * estimated number of transactions per second after that timestamp
420+
1574600128, // * UNIX timestamp of last known number of transactions
421+
105776, // * total number of transactions between genesis and that timestamp
422+
// (the tx=... number in the UpdateTip debug.log lines)
423+
0.003 // * estimated number of transactions per second after that timestamp
422424
};
423425
}
424426
};

src/chainparamsseeds.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,34 @@
88
* IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.
99
*/
1010
static SeedSpec6 pnSeed6_main[] = {
11+
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x54,0x00,0x7d}, 41319},
1112
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x7c,0x40,0xa4}, 41319},
13+
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x69,0xb5,0xbe}, 41319},
14+
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0xd0,0xa0,0x26}, 41319},
15+
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0x49,0x42,0xe5}, 41319},
16+
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xd3,0x58,0xea}, 41319},
17+
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0xa9,0xd7,0xa8}, 41319},
1218
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xd6,0x41,0x3c}, 41319},
1319
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xc8,0x64,0xd1}, 41319},
1420
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd8,0x8f,0x0d}, 41319},
15-
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0x8c,0x16,0x3e}, 41319},
1621
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0xce,0xf1,0xb7}, 41319},
17-
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0xac,0xf8,0x7f}, 41319},
1822
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0xae,0xcb,0x61}, 41319},
23+
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0xaf,0x1f,0xad}, 41319},
1924
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x91,0xef,0xb8,0x5b}, 41319},
2025
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0x45,0xbd,0xb9}, 41319},
26+
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x03,0x50,0x3a}, 41319},
2127
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0xc9,0xe2,0x80}, 41319},
28+
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x3b,0x7b,0x8e}, 41319},
2229
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0xa0,0x3c,0x4c}, 41319}
2330
};
2431

2532
static SeedSpec6 pnSeed6_test[] = {
33+
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0xa9,0xd7,0xa8}, 41319},
2634
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xd6,0x41,0x3c}, 41419},
2735
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd8,0x8f,0x0d}, 41419},
2836
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0xae,0xcb,0x61}, 41419},
37+
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0x45,0xbd,0xb9}, 41419},
38+
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x7a,0x3a,0x2c}, 41419},
2939
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0xc9,0xe2,0x80}, 41419}
3040
};
3141
#endif // DMS_CHAINPARAMSSEEDS_H

src/pow.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,12 @@ unsigned int static DarkGravityWave(const CBlockIndex* pindexLast, const CBlockH
9393
nPowTargetSpacing = params.nPowTargetSpacing; // normal block interval
9494
}
9595
else {
96-
nPowTargetSpacing = 30; // fast testnet 0..95936
96+
if (Params().NetworkIDString() == CBaseChainParams::MAIN)
97+
nPowTargetSpacing = 4*60; // 4min 0..4793
98+
else if (Params().NetworkIDString() == CBaseChainParams::TESTNET)
99+
nPowTargetSpacing = 30; // fast testnet 0..95936
100+
else
101+
params.nPowTargetSpacing;
97102
}
98103

99104
// make sure we have at least (nPastBlocks + 1) blocks, otherwise just return powLimit

src/validation.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@ CAmount GetMasternodePayment(int nHeight, CAmount blockValue)
13301330
if(nHeight > nMNPIBlock+(nMNPIPeriod* 3)) ret += blockValue / 40; // 81000 - 37.5% ~ 2019-08-19
13311331
if(nHeight > nMNPIBlock+(nMNPIPeriod* 4)) ret += blockValue / 40; // 88000 - 40.0% ~ 2019-09-18
13321332
if(nHeight > nMNPIBlock+(nMNPIPeriod* 5)) ret += blockValue /100; // 95000 - 41.0% ~ 2019-10-19
1333-
if(nHeight > nMNPIBlock+(nMNPIPeriod* 6)) ret += blockValue /100; // 102000 - 42.0% ~ 2019-11
1333+
if(nHeight > nMNPIBlock+(nMNPIPeriod* 6)) ret += blockValue /100; // 102000 - 42.0% ~ 2019-11-19
13341334
if(nHeight > nMNPIBlock+(nMNPIPeriod* 7)) ret += blockValue /100; // 109000 - 43.0% ~ 2019-12
13351335
if(nHeight > nMNPIBlock+(nMNPIPeriod* 8)) ret += blockValue /100; // 116000 - 44.0% ~ 2020-01
13361336
if(nHeight > nMNPIBlock+(nMNPIPeriod* 9)) ret += blockValue /100; // 123000 - 45.0% ~ 2020-02
@@ -3394,6 +3394,7 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
33943394
{
33953395
const int nHeight = pindexPrev == NULL ? 0 : pindexPrev->nHeight + 1;
33963396
// Check proof of work
3397+
/* Dash specific, not used in DMS
33973398
if(Params().NetworkIDString() == CBaseChainParams::MAIN && nHeight <= 68589){
33983399
// architecture issues with DGW v1 and v2)
33993400
unsigned int nBitsNext = GetNextWorkRequired(pindexPrev, &block, consensusParams);
@@ -3407,6 +3408,11 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
34073408
if (block.nBits != GetNextWorkRequired(pindexPrev, &block, consensusParams))
34083409
return state.DoS(100, false, REJECT_INVALID, "bad-diffbits", false, strprintf("incorrect proof of work at %d", nHeight));
34093410
}
3411+
*/
3412+
unsigned int nGnwr = GetNextWorkRequired(pindexPrev, &block, consensusParams);
3413+
//LogPrintf("DEBUG %s at %d (%d: %d , %d)\n", __func__, nHeight, pindexPrev->nHeight, block.nBits, nGnwr); // starts with: nHeight = 1 and pindexPrev->nHeight = 0
3414+
if (block.nBits != nGnwr)
3415+
return state.DoS(100, false, REJECT_INVALID, "bad-diffbits", false, strprintf("incorrect proof of work at %d (%d != %d)", nHeight, block.nBits, nGnwr));
34103416

34113417
// Check timestamp against prev
34123418
if (block.GetBlockTime() <= pindexPrev->GetMedianTimePast())

0 commit comments

Comments
 (0)