I created two altcoin peers and they can add blocks to genesis block. However their blockchains do not sync with each other!

The only way let the block merge is to stop a peer and restart the peer.

Is there any solution? Thanks..

  • 1
    Are the two peers connected to each other? Do they have any way of finding out about each other? If not, have you tried adding your own DNS seed in chainparams.cpp, or using the -addnode option? – Nick ODell Mar 20 '15 at 4:13
  • I tested it using two local virtual machines. These two VMware can ping with each other. Also, I tried using -addnode option.. – moshaholo Mar 20 '15 at 13:16
  • Are they actually connected, though? Does debug.log show successful connections, or does wireshark show traffic on port 9333? – Nick ODell Mar 20 '15 at 19:24
  • @NickODell Yes, they are connected. Bitcoin-cli getpeerinfo show my connected peer.. The peer on one vm is, the peer on another vm is – moshaholo Mar 20 '15 at 19:47
  • How fast is each node mining blocks? If each is mining blocks fast enough it could take some time to reorganize. Depending on your difficulty algorithm it can take anywhere from 1 blocks to a few thousand to retarget and give the node enough time between blocks to reorganize if needed. Try only mining with one node to start. If that is the problem you can make for a smoother launch by increasing the starting difficulty or the frequency at which it retargets. – Mullick Mar 23 '15 at 4:43

Solution found!
Bitcoin client use checkpoints to prevent 51% attack. What are checkpoints?

Modifying checkpoints in chainparams.cpp solve this sync problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.