<p>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.</p>

<p>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:</p>

<ol>
<li><p>You consider valid the chain that would require the most computational work to create.</p></li>
<li><p>You don't rely on the results of blocks that are too close to the end of the chain.</p></li>
</ol>

<p>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.</p>

<p>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.</p>

CC BY-SA 3.0
2015-09-04T07:06:12.530Z
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
CC BY-SA 3.0
2015-09-04T07:40:46.153Z
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
CC BY-SA 3.0
2015-09-04T17:26:33.060Z
@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.
David Schwartz
CC BY-SA 3.0
2015-09-04T06:06:30.583Z
2015-09-04T06:06:30.583Z
David Schwartz
<p>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" ?</p>

<blockchain><nodes>
What is the protection against a malicious node with a bad block chain?
Peter Mel
# What is the protection against a malicious node with a bad block chain?

(Asked by: username_0 on 2015-09-04)

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" ?

**Tags:** blockchain, nodes


---

## 1 answers

### Answer by username_1 on 2015-09-04. Score: 9 | Accepted answer

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.

> **Comments:**
> **username_2**: 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.  
> **username_0**: 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?  
> **username_1**: @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.  

---

