Skip to content

Commit

Permalink
relaunch genesis, correct a few errors
Browse files Browse the repository at this point in the history
  • Loading branch information
barrystyle committed Aug 10, 2019
1 parent 0c2887a commit 0160d0e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 32 deletions.
32 changes: 7 additions & 25 deletions src/chainparams.cpp
Expand Up @@ -81,7 +81,7 @@ class CMainParams : public CChainParams {
consensus.BIP34Hash = uint256S("0x000012844c804516ed35b07f163eec8dbbdd83a7263e3c023821efbaf934c41f");
consensus.BIP65Height = 0;
consensus.BIP66Height = 0;
consensus.powLimit = uint256S("0x3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.powLimit = uint256S("0x001fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.nPowTargetTimespan = 60 * 60;
consensus.nPowTargetSpacing = 60;
consensus.nZawyLwmaAveragingWindow = 90;
Expand All @@ -103,11 +103,11 @@ class CMainParams : public CChainParams {
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = Consensus::BIP9Deployment::ALWAYS_ACTIVE;
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;

// // The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000005e1ee53499");
// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000000000000000");

// By default assume that the signatures in ancestors of this block are valid.
// consensus.defaultAssumeValid = uint256S("0x0000003377bf4a931b31e102900a879c2f17e4694a893d78ae87d7b13cce331f"); // 8000
consensus.defaultAssumeValid = uint256S("0x0000000000000000000000000000000000000000000000000000000000000000");

/**
* The message start string is designed to be unlikely to occur in normal data.
Expand All @@ -121,20 +121,10 @@ class CMainParams : public CChainParams {
nDefaultPort = 1604;
nPruneAfterHeight = 1000;

genesis = CreateGenesisBlock(1565128501, 339318, 0x1e3fffff, 1, 50 * COIN);

genesis = CreateGenesisBlock(1565437888, 5127, 0x1f1fffff, 1, 50 * COIN);
consensus.hashGenesisBlock = genesis.GetHash();
assert(consensus.hashGenesisBlock == uint256S("0x00000153e335e7ec9802faeb525b5aa06c3c36443b40ee59530b4a711446500c"));
assert(genesis.hashMerkleRoot == uint256S("0x0f731961f3a2d0ed7639e5f1f18e0f6e83a987bd29b75ce88df259974db08959"));



// Note that of those which support the service bits prefix, most only support a subset of
// possible options.
// This is fine at runtime as we'll fall back to using them as a oneshot if they dont support the
// service bits we want, but we should get them updated to support all service bits wanted by any
// release ASAP to avoid it where possible.
vSeeds.emplace_back("dnsseed.lightbit.xyz");
assert(consensus.hashGenesisBlock == uint256S("001a37ca994627042609a8ff350c446b935bb912069c37ec543fbdb0a5ed77b3"));
assert(genesis.hashMerkleRoot == uint256S("0f731961f3a2d0ed7639e5f1f18e0f6e83a987bd29b75ce88df259974db08959"));

base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,48); // L
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,30); // D
Expand All @@ -151,17 +141,9 @@ class CMainParams : public CChainParams {
fMineBlocksOnDemand = false;

checkpointData = {
{
{8000, uint256S("0x")},
}
};

chainTxData = ChainTxData{
// Data as of block 0000000964082a93fee1273eb4ac2b4d28c77bea41283160eae91e8dbe80e377 (height 8423)
1562959497, // * UNIX timestamp of last known number of transactions
13728, // * total number of transactions between genesis and that timestamp
// (the tx=... number in the SetBestChain debug.log lines)
0.0273 // * estimated number of transactions per second after that timestamp
};
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/chainparamsbase.cpp
Expand Up @@ -33,7 +33,7 @@ class CBaseMainParams : public CBaseChainParams
public:
CBaseMainParams()
{
nRPCPort = 19707;
nRPCPort = 1605;
}
};

Expand Down
3 changes: 1 addition & 2 deletions src/chainparamsseeds.h
Expand Up @@ -8,8 +8,7 @@
* IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.
*/
static SeedSpec6 pnSeed6_main[] = {
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xca,0xb6,0x6d,0x93}, 19706},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2d,0x4c,0xd4,0x76}, 19706}
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x63,0x10,0xd7,0x29}, 1604}
};

static SeedSpec6 pnSeed6_test[] = {};
Expand Down
2 changes: 1 addition & 1 deletion src/net.cpp
Expand Up @@ -1759,7 +1759,7 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
return;

// Add seed nodes if DNS seeds are all down (an infrastructure attack?).
if (addrman.size() == 0 && (GetTime() - nStart > 60)) {
if (addrman.size() == 0 && (GetTime() - nStart > 5)) {
static bool done = false;
if (!done) {
LogPrintf("Adding fixed seed nodes as DNS doesn't seem to be available.\n");
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/server.cpp
Expand Up @@ -519,7 +519,7 @@ std::string HelpExampleCli(const std::string& methodname, const std::string& arg
std::string HelpExampleRpc(const std::string& methodname, const std::string& args)
{
return "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", "
"\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:19707/\n";
"\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:1605/\n";
}

void RPCSetTimerInterfaceIfUnset(RPCTimerInterface *iface)
Expand Down
4 changes: 2 additions & 2 deletions src/version.h
Expand Up @@ -9,7 +9,7 @@
* network protocol versioning
*/

static const int PROTOCOL_VERSION = 70015;
static const int PROTOCOL_VERSION = 70016;

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

//! disconnect from peers older than this proto version
static const int MIN_PEER_PROTO_VERSION = GETHEADERS_VERSION;
static const int MIN_PEER_PROTO_VERSION = 70016;

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

0 comments on commit 0160d0e

Please sign in to comment.