How does a bitcoin node protects against connecting to a node with a forged block chain? How does it say: "Ok, I just got this block chain and it is a valid/legit one" ?

1 Answer 1


Any chain that's not valid according to the agreed rules of Bitcoin is outright rejected. So any chain that created Bitcoins out of nowhere, spent the same Bitcoins twice, or anything like that is rejected just by testing the chain against those rules.

So the next question is among the many possible valid chains, how do you pick the one to consider authoritative. And the answer is two-fold:

  1. You consider valid the chain that would require the most computational work to create.

  2. You don't rely on the results of blocks that are too close to the end of the chain.

So that means that an attacker who wants to convince you that the wrong chain is valid has to do more computational work than all the Bitcoin miners put together, and must continue to do so until the blocks he's trying to convince you to accept are deep in the chain.

So say you require six confirmations to accept a transaction. An attacker has to produce a chain with six blocks after the block including that transaction that's longer than the chain that doesn't include that transaction. To do so, he'd have to give up the opportunity to mine six blocks (around $35,000) and he'd have to outpace all the Bitcoin miners in the world put together for about an hour.

  • 1
    Worth noting this doesn't apply to BIP37 SPV clients, who can be deceived into believing anything and can not validate the information they see.
    – Claris
    Commented Sep 4, 2015 at 7:06
  • The problem with this is time. It can take up to an hour for you to be 100% sure that your transaction really made to the block chain, correct? This is a problem not present with Ripple, correct?
    – Peter Mel
    Commented Sep 4, 2015 at 7:40
  • 2
    @PeterMel The longer you wait, the more sure you are. You're never really 100% sure. For many practical cases, zero confirmations is sufficient, and for many more, one (typically ten minutes) is sufficient. "Large" Bitcoin transactions do take around an hour before people are willing to rely on them. Ripple can provide a comparable level of confidence much more quickly. Commented Sep 4, 2015 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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