[ad_1]
What will happen if some of my peers (blue peers) have their chains as follows:
... -> A -> B -> D (main chain)
\-> C
while my other peers (green peers) and I have the following:
... -> A -> B -> D (main chain)
We can get into this situation when the blue peers are connected to some other nodes that considered at some moment chain with the block C as the main. Thus, blue peers received the given block C. However, since for them (blue peers) main chain was the one with B block, they propagated only B to me (and later D), while C was just saved locally as stale block in their stale chain.
Now imagine the following scenario:
1.first comes block E whose parent is C; chains of blue peers looks like this:
... -> A -> B -> D (main chain)
\-> C -> E
In this case blue peers will just increase stale chain and won’t propagate E since its not a part of the main chain.
2.then comes block F whose parent is E; chains of blue peers looks like this:
... -> A -> B -> D
\-> C -> E -> F (main chain)
In this case blue peers will switch to chain with F and since that’s their new main chain, they will propagate F (header message) to us.
The problem here is that upon receiving block F (its header through header message) we will try to validate its parent hash first and since block E is unknown us, we will consider block F as orphaned and reject it. This way we will consider all future blocks as orphaned and reject it. As a consequence of this we will remain completely isolated in the network (me and all my red peers). Even if we connect to some other networks peers now, the situation would stay the same. How is this solved?
[ad_2]
Source link