2

I setup a new node for my custom altcoin. I cloned and compiled altcoin in my ubuntu server machine. I have generated genesis block and added checkpoints for first two blocks..

I am able to connect to two nodes running in mac and unix, but new blocks are not downloaded and synced by the node. Why is this happening?

Here is my chainparams.cpp

class CMainParams : public CChainParams {
public:
    CMainParams() {
        strNetworkID = "main";
        consensus.nSubsidyHalvingInterval = 100000;
        consensus.BIP34Height = 710000;
        consensus.BIP34Hash = uint256S("e6024058338254100b68f794f3a5d14f9b9a7f0bfb68bf302d63c47c027b64ca");
        consensus.BIP65Height = 918684; // bab3041e8977e0dc3eeff63fe707b92bde1dd449d8efafb248c27c8264cc311a
        consensus.BIP66Height = 811879; // 7aceee012833fa8952f8835d8b1b3ae233cd6ab08fdb27a771d2bd7bdc491894
        consensus.powLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); 
        consensus.nPowTargetTimespan = 3.5 * 24 * 60 * 60; // 3.5 days
        consensus.nPowTargetSpacing = 2.5 * 60;
        consensus.fPowAllowMinDifficultyBlocks = false;
        consensus.fPowNoRetargeting = false;
        consensus.nRuleChangeActivationThreshold = 6048; // 75% of 8064
        consensus.nMinerConfirmationWindow = 8064; // nPowTargetTimespan / nPowTargetSpacing * 4
        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008
        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008

        // Deployment of BIP68, BIP112, and BIP113.
        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0;
        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1485561600; // January 28, 2017
        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1517356801; // January 31st, 2018

        // Deployment of SegWit (BIP141, BIP143, and BIP147)
        consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].bit = 1;
        consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 1485561600; // January 28, 2017
        consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1517356801; // January 31st, 2018

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

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

        /**
         * The message start string is designed to be unlikely to occur in normal data.
         * The characters are rarely used upper ASCII, not valid as UTF-8, and produce
         * a large 32-bit integer with any alignment.
         */
        pchMessageStart[0] = 0xfb;
        pchMessageStart[1] = 0xc0;
        pchMessageStart[2] = 0xb6;
        pchMessageStart[3] = 0xdb;
        nDefaultPort = 26201;
        nPruneAfterHeight = 100000;

        genesis = CreateGenesisBlock(1518803474, 4251767 , 0x1e0ffff0, 1, 1000 * COIN);
        consensus.hashGenesisBlock = genesis.GetHash();



        //printf("Genesis hash:  %s\n", consensus.hashGenesisBlock.ToString().c_str());
        //printf("Merkel root:  %s\n", genesis.hashMerkleRoot.ToString().c_str());


        assert(consensus.hashGenesisBlock == uint256S("0xe6024058338254100b68f794f3a5d14f9b9a7f0bfb68bf302d63c47c027b64ca"));
        assert(genesis.hashMerkleRoot == uint256S("0x29b1458191d86739ff3ef0f179c0927a95cb89fa054e3e2a41dfe843ee0acc42"));

        // Note that of those with the service bits flag, most only support a subset of possible options
        //vSeeds.emplace_back("dnsseed.citizenshipcoin.org", true);
        //vSeeds.emplace_back("dnsseed.thrasher.io", true);
        //vSeeds.emplace_back("dnsseed.litecointools.com", true);
        //vSeeds.emplace_back("dnsseed.litecoinpool.org", true);
        //vSeeds.emplace_back("dnsseed.koin-project.com", false);

        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,11);
        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
        base58Prefixes[SCRIPT_ADDRESS2] = std::vector<unsigned char>(1,50);
        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,176);
        base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x88, 0xB2, 0x1E};
        base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x88, 0xAD, 0xE4};

        vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main));

        fDefaultConsistencyChecks = false;
        fRequireStandard = true;
        fMineBlocksOnDemand = false;

        checkpointData = (CCheckpointData) {
            {
                { 0, uint256S("0xe6024058338254100b68f794f3a5d14f9b9a7f0bfb68bf302d63c47c027b64ca")},
                { 1, uint256S("0xb531f9d60406ca40b36e96233ab4243401696652bacba1dac0d67a0a93394216")},
                { 2, uint256S("0xa0e32c5522a08f54cbe2ad28b6a5168f424da9b68dea3fd18ae7742a87692a60")},
            /*  { 23420, uint256S("0xd80fdf9ca81afd0bd2b2a90ac3a9fe547da58f2530ec874e978fce0b5101b507")},
                { 50000, uint256S("0x69dc37eb029b68f075a5012dcc0419c127672adb4f3a32882b2b3e71d07a20a6")},
                { 80000, uint256S("0x4fcb7c02f676a300503f49c764a89955a8f920b46a8cbecb4867182ecdb2e90a")},
                {120000, uint256S("0xbd9d26924f05f6daa7f0155f32828ec89e8e29cee9e7121b026a7a3552ac6131")},
                {161500, uint256S("0xdbe89880474f4bb4f75c227c77ba1cdc024991123b28b8418dbbf7798471ff43")},
                {179620, uint256S("0x2ad9c65c990ac00426d18e446e0fd7be2ffa69e9a7dcb28358a50b2b78b9f709")},
                {240000, uint256S("0x7140d1c4b4c2157ca217ee7636f24c9c73db39c4590c4e6eab2e3ea1555088aa")},
                {383640, uint256S("0x2b6809f094a9215bafc65eb3f110a35127a34be94b7d0590a096c3f126c6f364")},
                {409004, uint256S("0x487518d663d9f1fa08611d9395ad74d982b667fbdc0e77e9cf39b4f1355908a3")},
                {456000, uint256S("0xbf34f71cc6366cd487930d06be22f897e34ca6a40501ac7d401be32456372004")},
                {638902, uint256S("0x15238656e8ec63d28de29a8c75fcf3a5819afc953dcd9cc45cecc53baec74f38")},
                {721000, uint256S("0x198a7b4de1df9478e2463bd99d75b714eab235a2e63e741641dc8a759a9840e5")}, */
            }
        };

        chainTxData = ChainTxData{
            // Data as of block 59c9b9d3fec105bdc716d84caa7579503d5b05b73618d0bf2d5fa639f780a011 (height 1353397).
            1516406833, // * UNIX timestamp of last known number of transactions
            19831879,  // * total number of transactions between genesis and that timestamp
                    //   (the tx=... number in the SetBestChain debug.log lines)
            0.06     // * estimated number of transactions per second after that timestamp
        };
    }
};

Here is by debug.log

2018-02-23 19:05:47 Citizenshipcoin version v0.15.1.0-75a93c0-dirty
2018-02-23 19:05:47 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2018-02-23 19:05:47 Assuming ancestors of block a0e32c5522a08f54cbe2ad28b6a5168f424da9b68dea3fd18ae7742a87692a60 have valid signatures.
2018-02-23 19:05:47 Setting nMinimumChainWork=0000000000000000000000000000000000000000000000000000000000300030
2018-02-23 19:05:47 Using the 'standard' SHA256 implementation
2018-02-23 19:05:47 Using RdRand as an additional entropy source
2018-02-23 19:05:47 Default data directory /home/ubuntu/.citizenshipcoin
2018-02-23 19:05:47 Using data directory /home/ubuntu/.citizenshipcoin
2018-02-23 19:05:47 Using config file /home/ubuntu/.citizenshipcoin/citizenshipcoin.conf
2018-02-23 19:05:47 Using at most 125 automatic connections (1024 file descriptors available)
2018-02-23 19:05:47 Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2018-02-23 19:05:47 Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2018-02-23 19:05:47 Using 0 threads for script verification
2018-02-23 19:05:47 HTTP: creating work queue of depth 16
2018-02-23 19:05:47 No rpcpassword set - using random cookie authentication
2018-02-23 19:05:47 Generated RPC authentication cookie /home/ubuntu/.citizenshipcoin/.cookie
2018-02-23 19:05:47 HTTP: starting 4 worker threads
2018-02-23 19:05:47 Cache configuration:
2018-02-23 19:05:47 * Using 2.0MiB for block index database
2018-02-23 19:05:47 * Using 8.0MiB for chain state database
2018-02-23 19:05:47 * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2018-02-23 19:05:47 init message: Loading block index...
2018-02-23 19:05:47 Opening LevelDB in /home/ubuntu/.citizenshipcoin/blocks/index
2018-02-23 19:05:47 scheduler thread start
2018-02-23 19:05:47 Opened LevelDB successfully
2018-02-23 19:05:47 Using obfuscation key for /home/ubuntu/.citizenshipcoin/blocks/index: 0000000000000000
2018-02-23 19:05:47 LoadBlockIndexDB: last block file = 0
2018-02-23 19:05:47 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=1, size=279, heights=0...0, time=2018-02-16...2018-02-16)
2018-02-23 19:05:47 Checking all blk files are present...
2018-02-23 19:05:47 LoadBlockIndexDB: transaction index disabled
2018-02-23 19:05:47 Opening LevelDB in /home/ubuntu/.citizenshipcoin/chainstate
2018-02-23 19:05:47 Opened LevelDB successfully
2018-02-23 19:05:47 Using obfuscation key for /home/ubuntu/.citizenshipcoin/chainstate: 4d403349b0ea8d57
2018-02-23 19:05:47 Loaded best chain: hashBestChain=e6024058338254100b68f794f3a5d14f9b9a7f0bfb68bf302d63c47c027b64ca height=0 date=2018-02-16 17:51:14 progress=0.000000
2018-02-23 19:05:47 init message: Rewinding blocks...
2018-02-23 19:05:47 init message: Verifying blocks...
2018-02-23 19:05:47  block index              16ms
2018-02-23 19:05:47 No wallet support compiled in!
2018-02-23 19:05:47 mapBlockIndex.size() = 1
2018-02-23 19:05:47 nBestHeight = 0
2018-02-23 19:05:47 Bound to [::]:26201
2018-02-23 19:05:47 Bound to 0.0.0.0:26201
2018-02-23 19:05:47 init message: Loading P2P addresses...
2018-02-23 19:05:47 Loaded 0 addresses from peers.dat  0ms
2018-02-23 19:05:47 init message: Loading banlist...
2018-02-23 19:05:47 init message: Starting network threads...
2018-02-23 19:05:47 init message: Done loading
2018-02-23 19:05:47 opencon thread start
2018-02-23 19:05:47 addcon thread start
2018-02-23 19:05:47 msghand thread start
2018-02-23 19:05:47 dnsseed thread start
2018-02-23 19:05:47 Loading addresses from DNS seeds (could take a while)
2018-02-23 19:05:47 0 addresses found from DNS seeds
2018-02-23 19:05:47 dnsseed thread exit
2018-02-23 19:05:47 net thread start
2018-02-23 19:05:47 torcontrol thread start
2018-02-23 19:05:47 Imported mempool transactions from disk: 0 successes, 0 failed, 0 expired
2018-02-23 19:05:48 receive version message: /LitecoinCore:0.15.1/: version 70015, blocks=0, us=13.59.89.11:26201, peer=0
2018-02-23 19:06:37 receive version message: /LitecoinCore:0.15.1/: version 70015, blocks=2, us=13.59.89.11:26201, peer=1
2018-02-23 19:15:32 Potential stale tip detected, will try using extra outbound peer (last tip update: 540 seconds ago)
2018-02-23 19:18:32 Potential stale tip detected, will try using extra outbound peer (last tip update: 720 seconds ago)

I issue getpeerinfo command in my added node,

ipcoin-cli getpeerinfo
[
  {
    "id": 0,
    "addr": "79.137.71.7:65242",
    "addrlocal": "13.59.189.11:26201",
    "addrbind": "172.31.6.242:26201",
    "services": "000000000000000d",
    "relaytxes": true,
    "lastsend": 1519413109,
    "lastrecv": 1519413109,
    "bytessent": 681,
    "bytesrecv": 650,
    "conntime": 1519412748,
    "timeoffset": -3,
    "pingtime": 0.116749,
    "minping": 0.116529,
    "version": 70015,
    "subver": "/LitecoinCore:0.15.1/",
    "inbound": true,
    "addnode": false,
    "startingheight": 0,
    "banscore": 0,
    "synced_headers": -1,
    "synced_blocks": -1,
    "inflight": [
    ],
    "whitelisted": false,
    "bytessent_per_msg": {
      "addr": 55,
      "feefilter": 32,
      "getheaders": 93,
      "ping": 128,
      "pong": 128,
      "sendcmpct": 66,
      "sendheaders": 24,
      "verack": 24,
      "version": 131
    },
    "bytesrecv_per_msg": {
      "feefilter": 32,
      "getaddr": 24,
      "getheaders": 93,
      "ping": 128,
      "pong": 128,
      "sendcmpct": 66,
      "sendheaders": 24,
      "verack": 24,
      "version": 131
    }
  }, 
  {
    "id": 1,
    "addr": "185.199.28.08:56583",
    "addrlocal": "13.59.89.11:26201",
    "addrbind": "172.31.6.242:26201",
    "services": "000000000000000d",
    "relaytxes": true,
    "lastsend": 1519413157,
    "lastrecv": 1519413157,
    "bytessent": 533,
    "bytesrecv": 737,
    "conntime": 1519412797,
    "timeoffset": 0,
    "pingtime": 0.140447,
    "minping": 0.139958,
    "version": 70015,
    "subver": "/LitecoinCore:0.15.1/",
    "inbound": true,
    "addnode": false,
    "startingheight": 2,
    "banscore": 0,
    "synced_headers": -1,
    "synced_blocks": -1,
    "inflight": [
    ],
    "whitelisted": false,
    "bytessent_per_msg": {
      "feefilter": 32,
      "ping": 128,
      "pong": 128,
      "sendcmpct": 66,
      "sendheaders": 24,
      "verack": 24,
      "version": 131
    },
    "bytesrecv_per_msg": {
      "addr": 55,
      "feefilter": 32,
      "getaddr": 24,
      "getheaders": 125,
      "ping": 128,
      "pong": 128,
      "sendcmpct": 66,
      "sendheaders": 24,
      "verack": 24,
      "version": 131
    }
  }

Any help is much appreciated:))

closed as off-topic by Andrew Chow Jul 17 at 17:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about cryptocurrencies or projects that are not Bitcoin, and are not applicable to Bitcoin, are off-topic. For more information, see this meta-discussion." – Andrew Chow
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Thank you. It started to work, after i created more blocks. )) – pbu Feb 23 '18 at 20:44
  • how did u create new blocks exactly? – r0otchixor Apr 17 '18 at 2:20
  • @r0otchixor using generate – pbu Apr 17 '18 at 6:42

Browse other questions tagged or ask your own question.