Long Range Attack is an attack behavior that attacker make a conflict point on a historic block in order to construct a private chain and overtake the legal main chain.
This attack is seem to be only appeared in Proof of Stake-based blockchain theoretically due to the weak subjectivity and costless simulation of such consensus algorithm.
Long Range Attack 是一种在历史区块上制造分叉链的攻击行为，其主要是利用私链来替换主链进行获利行为。
Steps to launching
The actual steps to lauch Long Range Attack is as follow:
The attacker works privately on a block at some height(e.g.
Nis the current height of mainchain) to build a conflicting sidechain with a fraction
qof total amount of coins being staked on the mainchain at that height. And he modifies his client to disable any incoming or outgoing client connections.
- Than the attacker starts minting blocks, copying each block’s transactions from the mainchain in order. He will have mined every block and gain the coinstake reward from that since no one else is on the private chain, althogh he may wait for serverl rounds to produce a block(i.e. every round he has a probability
qto validate a block and the
qwill be increasing for the block rewards and transaction fees).
- Repeat step 2 until the height of sidechain catches up with the mainchain, the attacker broadcast his private chain to the network and tempt other clients to accept it. Eventually the private chain wiil be valid and rewrite history of old mainchain.
The attack is successful dependent on whether the sidechain caught up with the mainchain or not.
Long Range Attack的攻击流程如上所示，该攻击是否成功主要取决于私链的长度能否大于主链。一般而言，主链上的区块生成速率是比私链的生成速率大，但基于一些理论假设则该攻击仍然有可能发生。
Long Range Attack has not been happened in reality, but we can not consider it never appear. There is an expectation leading to this situation if the mainchain can not generate blocks in an expected way that some validators skip to validate blocks. It decreases the rate of generating block while the rate on sidechain increases gradually since the attacker gains all the block rewards and transaction fees.
尽管现实中还没有出现过Long Range Attack的例子，但在理论上有其存在的可能。如果主链上的出块速率不固定，则主链的区块生成速率有可能慢于私链的生成速率，因为私链的区块生成速率会随着攻击者的权益占比的增加而增大。这就有可能导致攻击成功。