Skip to content

Commit 16b6ecf

Browse files
alejandromgkdevfsc
authored andcommitted
Production network (#13)
* Shellscript to setup MNs (#12) * Update chain params * Update checkpoint and minimum chain work * Add checkpoint and update min chain work. * Update DSN seeds IPs
1 parent 97438f1 commit 16b6ecf

File tree

3 files changed

+37
-36
lines changed

3 files changed

+37
-36
lines changed

src/chainparams.cpp

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919

2020
//#define FIND_GENESIS
2121

22-
#define GENESIS_MERKLE_ROOT "0x7423812b7d53095daa5f9a5111562c948f7190612d76b43305d3168fda91f787"
22+
#define GENESIS_MERKLE_ROOT "0xf3939e4de05e537431ef32bbebd9bc7c4e701f7205d72016f04686557af58dbf"
2323

24-
#define MAINNET_GENESIS_HASH "0x0000094606e5eaee14095756b185b4b8f1992ae2eba9f317f86528a78068c891"
25-
#define MAINNET_GENESIS_NONCE 180293UL
26-
#define MAINNET_GENESIS_TIMESTAMP 1517255884UL
24+
#define MAINNET_GENESIS_HASH "0x00000354655ff039a51273fe61d3b493bd2897fe6c16f732dbc4ae19f04b789e"
25+
#define MAINNET_GENESIS_NONCE 340503UL
26+
#define MAINNET_GENESIS_TIMESTAMP 1517541873UL
2727

28-
#define TESTNET_GENESIS_HASH "0x00000e913af46dbb97b5d6576bafce2b1de2518bf5b400fb5cf29e62215d0255"
29-
#define TESTNET_GENESIS_NONCE 1643913UL
30-
#define TESTNET_GENESIS_TIMESTAMP 1517255968UL
28+
#define TESTNET_GENESIS_HASH "0x00000da63bd9478b655ef6bf1bf76cd9af05202ab68643f9091e049b2b5280ed"
29+
#define TESTNET_GENESIS_NONCE 2279587UL
30+
#define TESTNET_GENESIS_TIMESTAMP 1517541975UL
3131

32-
#define REGTEST_GENESIS_HASH "0x2fed3c8bf417d2f183a1999ef9be84f5f38e7c96d5cfcaf3d5f3f47a1b9cefb4"
33-
#define REGTEST_GENESIS_NONCE 6UL
34-
#define REGTEST_GENESIS_TIMESTAMP 1517256614UL
32+
#define REGTEST_GENESIS_HASH "0x084c58211fe102add2fb5c3976f14f997e3c27a3a6fd5ab15a1929f7b5db9d95"
33+
#define REGTEST_GENESIS_NONCE 1UL
34+
#define REGTEST_GENESIS_TIMESTAMP 1517542062UL
3535

3636
static CBlock CreateGenesisBlock(const char* pszTimestamp, const CScript& genesisOutputScript, uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward, const Consensus::Params& consensus)
3737
{
@@ -53,7 +53,7 @@ static CBlock CreateGenesisBlock(const char* pszTimestamp, const CScript& genesi
5353
genesis.hashMerkleRoot = BlockMerkleRoot(genesis);
5454

5555
#ifdef FIND_GENESIS
56-
if (true && (genesis.GetHash() != consensus.hashGenesisBlock)) {
56+
if (false && (genesis.GetHash() != consensus.hashGenesisBlock)) {
5757
std::cout << "Begin calculating Genesis Block:" << std::endl;
5858
LogPrintf("Calculating Genesis Block:\n");
5959
arith_uint256 hashTarget = arith_uint256().SetCompact(genesis.nBits);
@@ -97,8 +97,8 @@ static CBlock CreateGenesisBlock(const char* pszTimestamp, const CScript& genesi
9797
*/
9898
static CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward, const Consensus::Params& consensus)
9999
{
100-
const char* pszTimestamp = "Bitcoin Block #506705: 0000000000000000004a345102e752900bcd1f8b73895584e592ba2acb4da00f";
101-
const CScript genesisOutputScript = CScript() << ParseHex("0423a5469388190915d88b3fa266ea3177f11738bd815bafcdd51f50ffc431cd19d78664320cf3b661c22aaf8227dd10b3c88f0562ed97a48e3e4376df42f787f2") << OP_CHECKSIG;
100+
const char* pszTimestamp = "Bitcoin Block #507202: 0000000000000000002dcf88ad7fece8694caf75124ba181e29ce38c76b7c378";
101+
const CScript genesisOutputScript = CScript() << ParseHex("0411345e927d2d3abb85541e23b211f5b9019f2b240fb9bd4b1c44234993639293846cfc74154d293a3bf7ba74592f5f358127c0062a621d3b153089d0f5bb84e5") << OP_CHECKSIG;
102102
return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, nBits, nVersion, genesisReward, consensus);
103103
}
104104

@@ -163,10 +163,10 @@ class CMainParams : public CChainParams {
163163
consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nThreshold = 3226; // 80% of 4032
164164

165165
// The best chain should have at least this much work.
166-
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000000015f015f0"); // 350
166+
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000000000183bd5351b7866"); // 7200
167167

168168
// By default assume that the signatures in ancestors of this block are valid.
169-
consensus.defaultAssumeValid = uint256S("0x00000f8c86ebfc0ceec96b8b84804e1b27a5736756ab0963150201a65c349696"); // 350
169+
consensus.defaultAssumeValid = uint256S("0x00000000000b7d73439cae777bae147b8daaee692a9e5e06fd8466749de39465"); // 7200
170170

171171
/**
172172
* The message start string is designed to be unlikely to occur in normal data.
@@ -177,7 +177,7 @@ class CMainParams : public CChainParams {
177177
pchMessageStart[1] = 0xe5;
178178
pchMessageStart[2] = 0x61;
179179
pchMessageStart[3] = 0x2c;
180-
vAlertPubKey = ParseHex("04334a5d3978977e42df6b2263772ffe8e83dec6890e70896edb906e8130b574e2889a0ac660822069d4f4491c497944cdccbf37adc20de8956d1c34661e409486");
180+
vAlertPubKey = ParseHex("048403ac4a7059cfca5700f8f11c6790880f0ea482c9419e5d0c3fcd9ec186a295502acd665709f8aad00963667317ba5b6dd47f16a507011649922d99af5647eb");
181181
nDefaultPort = 7112;
182182
nMaxTipAge = 6 * 60 * 60; // ~144 blocks behind -> 2 x fork detection time, was 24 * 60 * 60 in bitcoin
183183
nDelayGetHeadersTime = 24 * 60 * 60;
@@ -190,8 +190,8 @@ class CMainParams : public CChainParams {
190190

191191

192192
vSeeds.clear();
193-
//vSeeds.push_back(CDNSSeedData("paccoin.io", "dnsseed1.paccoin.io"));
194-
//vSeeds.push_back(CDNSSeedData("paccoin.io", "dnsseed2.paccoin.io"));
193+
vSeeds.push_back(CDNSSeedData("paccoin.io", "dnsseed1.paccoin.io"));
194+
vSeeds.push_back(CDNSSeedData("paccoin.io", "dnsseed2.paccoin.io"));
195195

196196
// Paccoin addresses start with 'P'
197197
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,55);
@@ -217,15 +217,16 @@ class CMainParams : public CChainParams {
217217

218218
nPoolMaxTransactions = 3;
219219
nFulfilledRequestExpireTime = 60*60; // fulfilled requests expire in 1 hour
220-
strSporkPubKey = "04c5af054ea2d81fcb17e950462511180adc6ea7129a3a80ab76b172ca25234ecaff45d75d6b0a76b04af3a051118160796ee2bf3dc3fb863093285bb1995f6823";
220+
strSporkPubKey = "04f42382c824f2e63a9c6e6a54f24b5ce6baaee23057fb22a3a92b42b817a249d39d4275456a02911ced24e21c39fc85cb08b24efa8f44a0221f1863d59e918a31";
221221

222222
checkpointData = (CCheckpointData) {
223223
boost::assign::map_list_of
224-
( 350, uint256S("0x00000f8c86ebfc0ceec96b8b84804e1b27a5736756ab0963150201a65c349696")),
225-
1517270913, // * UNIX timestamp of last checkpoint block
224+
( 100, uint256S("0x000005065df82218140bc7c59cfd6913eaa5a88f3255ccc977c546cb0beb9ff0")),
225+
( 7250, uint256S("0x00000000000b7d73439cae777bae147b8daaee692a9e5e06fd8466749de39465")),
226+
1517696635, // * UNIX timestamp of last checkpoint block
226227
0, // * total number of transactions between genesis and last checkpoint
227228
// (the tx=... number in the SetBestChain debug.log lines)
228-
500 // * estimated number of transactions per day after checkpoint
229+
1000 // * estimated number of transactions per day after checkpoint
229230
};
230231
}
231232
};
@@ -286,13 +287,13 @@ class CTestNetParams : public CChainParams {
286287
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000000000100010"); //4000
287288

288289
// By default assume that the signatures in ancestors of this block are valid.
289-
consensus.defaultAssumeValid = uint256S("0x00000e913af46dbb97b5d6576bafce2b1de2518bf5b400fb5cf29e62215d0255"); //4000
290+
consensus.defaultAssumeValid = uint256S("0x00000da63bd9478b655ef6bf1bf76cd9af05202ab68643f9091e049b2b5280ed"); //4000
290291

291292
pchMessageStart[0] = 0x9b;
292293
pchMessageStart[1] = 0x2f;
293294
pchMessageStart[2] = 0xfa;
294295
pchMessageStart[3] = 0xe3;
295-
vAlertPubKey = ParseHex("04f2fe3b262198838374a844f0bce94a9775bd2a80380cf51bfc12bcd5eb947c51eebcd3299830413b17de240bbf975acc3100c8e6532b370540894f605e7f9673");
296+
vAlertPubKey = ParseHex("04b519c957b53ce4eecb9a466d169c3a73385434a1ededdec795361a57bf1a7529d82e646c1d32df8cfdbaf5a4e96b82fd78b39335198b3850bb0af6c0884a6928");
296297
nDefaultPort = 17112;
297298
nMaxTipAge = 0x7fffffff; // allow mining on top of old blocks for testnet
298299
nDelayGetHeadersTime = 24 * 60 * 60;
@@ -331,12 +332,12 @@ class CTestNetParams : public CChainParams {
331332

332333
nPoolMaxTransactions = 3;
333334
nFulfilledRequestExpireTime = 5*60; // fulfilled requests expire in 5 minutes
334-
strSporkPubKey = "042f3818bfc23bbe0eb26edba2c975e71bbdac8ac8c05170b4c3a7de48ef2bb8242d8afab00a7666dd10ee2ab12c40bd383d0848603a7ea1b1558bfa63eea3a743";
335+
strSporkPubKey = "04be5a40f024fdf62a45efa46262a37339bd40a3d89bcdba623d1be325583027de51b066db19038974b608d058ee4e44dc062a8aa6c862ed380d36f760fcd0946b";
335336

336337
checkpointData = (CCheckpointData) {
337338
boost::assign::map_list_of
338-
( 0, uint256S("0x00000e913af46dbb97b5d6576bafce2b1de2518bf5b400fb5cf29e62215d0255")),
339-
1517255968, // * UNIX timestamp of last checkpoint block
339+
( 0, uint256S("0x00000da63bd9478b655ef6bf1bf76cd9af05202ab68643f9091e049b2b5280ed")),
340+
1517541975, // * UNIX timestamp of last checkpoint block
340341
0, // * total number of transactions between genesis and last checkpoint
341342
// (the tx=... number in the SetBestChain debug.log lines)
342343
250 // * estimated number of transactions per day after checkpoint
@@ -392,10 +393,10 @@ class CRegTestParams : public CChainParams {
392393
consensus.vDeployments[Consensus::DEPLOYMENT_DIP0001].nTimeout = 999999999999ULL;
393394

394395
// The best chain should have at least this much work.
395-
consensus.nMinimumChainWork = uint256S("0x00");
396+
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000000000100010");
396397

397398
// By default assume that the signatures in ancestors of this block are valid.
398-
consensus.defaultAssumeValid = uint256S("0x00");
399+
consensus.defaultAssumeValid = uint256S("0x084c58211fe102add2fb5c3976f14f997e3c27a3a6fd5ab15a1929f7b5db9d95");
399400

400401
pchMessageStart[0] = 0x96;
401402
pchMessageStart[1] = 0xa6;
@@ -424,7 +425,7 @@ class CRegTestParams : public CChainParams {
424425

425426
checkpointData = (CCheckpointData){
426427
boost::assign::map_list_of
427-
( 0, uint256S("0x2fed3c8bf417d2f183a1999ef9be84f5f38e7c96d5cfcaf3d5f3f47a1b9cefb4")),
428+
( 0, uint256S("0x084c58211fe102add2fb5c3976f14f997e3c27a3a6fd5ab15a1929f7b5db9d95")),
428429
0,
429430
0,
430431
0

src/chainparamsseeds.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
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,0x36,0xf4,0x4f,0x8c}, 7112},
12-
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0xd1,0x57,0x08}, 7112}
11+
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0xfa,0xfb,0xb8}, 7112},
12+
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x3d,0xfc,0x8a}, 7112}
1313
};
1414

1515
static SeedSpec6 pnSeed6_test[] = {
16-
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0xd4,0x74,0x44}, 17111},
17-
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0xd4,0xfd,0x8e}, 17111}
16+
//{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0xd4,0x74,0x44}, 17111},
17+
//{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x22,0xd4,0xfd,0x8e}, 17111}
1818
};
1919
#endif // PAC_CHAINPARAMSSEEDS_H

src/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* network protocol versioning
1111
*/
1212

13-
static const int PROTOCOL_VERSION = 70211;
13+
static const int PROTOCOL_VERSION = 70212;
1414

1515
//! initial proto version, to be increased after version/verack negotiation
1616
static const int INIT_PROTO_VERSION = 209;
@@ -19,7 +19,7 @@ static const int INIT_PROTO_VERSION = 209;
1919
static const int GETHEADERS_VERSION = 70077;
2020

2121
//! disconnect from peers older than this proto version
22-
static const int MIN_PEER_PROTO_VERSION = PROTOCOL_VERSION;
22+
static const int MIN_PEER_PROTO_VERSION = 70212;
2323

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

0 commit comments

Comments
 (0)