1

What is the minimum number of peers required to securely synchronize my local blockchain copy?

8

One! Your full node will check every transaction and every block for validity while synchronizing. You therefore can be sure that whatever blockchain data your node accepts follows all rules of Bitcoin. If you are provided the correct blockchain, a single node will be able to provide all data for you to catch up with the network's blockchain tip.

That said, your node will accept any data that follows all rules of Bitcoin. If an attacker knew that you were going to synchronize from scratch, they managed to sybil your node, they could attack you in two ways. First, they could withhold data from you, i.e. not give you the complete blockchain. The attacker could use this to set you up for a doublespend, by sending you money that they've already sent somewhere else in a block that they didn't tell you about. This is easy to defend against, by requiring confirmation before accepting payments or by verifying your local blockchain tip against the network's via third party resources such as blockchain explorers.

The second attack would entail feeding you a series of blocks that are not part of the most-work blockchain. This would require an immense amount of work as the blocks would have to adhere to the current network's difficulty level to pass your full node's verification. These blocks would have to be tailored to an attack on you, to include one or more transactions that send money to you that the attacker wants you to be believe to be valid. Mining valid blocks that are not part of the most-work chain is an investment on par of finding the same number of blocks in the most-work chain. Unless you're routinely accepting very large payments with few confirmations, you are not a likely target to such an attack on the Bitcoin blockchain.q Note that some altcoins have very low difficulty levels and the cost of creating valid blocks would therefore be significantly lower.

The latter two scenarios are why generally Bitcoin nodes will connect to eight peers (and SPV nodes usually to four) and compare all of these peers' information about their best blockchain tip. Your node will still only download each piece of blockchain data a single time (as it can verify that it is part of the most-work blockchain).

  • Thanks, please, do you have any doc source to understand in deep how the synchronization process is done and how it is difficult to make a fake blockchain even with only one peer source? – Noureddine Jul 18 '17 at 6:29
  • @Noureddine: The protection doesn't stem from how the data is exchanged, but rather that all data is checked by each node. Perhaps these will be of interest: bitcoin.stackexchange.com/a/21092/5406, bitcoin.stackexchange.com/a/10351/5406, bitcoin.stackexchange.com/q/12427/5406, bitcoin.stackexchange.com/q/148/5406 – Murch Jul 18 '17 at 14:52
  • If you sync with only 1 peer, you are trusting that 1 peer to give you the history of the correct chain. Typical full nodes connect to 8 or more peers, that increases the chances that your node is connecting to the right chain and that it's coming to a consensus amongst its connected peers. – ooomid Sep 26 '18 at 13:11
  • @ooomid: Thank you, I realized that my previous answer was too brief to properly communicate the point I was trying to make. I've reworked parts of my answer. – Murch Sep 26 '18 at 16:46

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.