Long-range attack

On this page 7

A long-range attack is an attack on proof-of-stake blockchains in which an adversary uses private keys that once controlled significant stake to build an alternative chain from a point far in the past, then presents that forged history as the legitimate one. Among consensus mechanisms, it is a threat specific to stake-based designs, because creating blocks there costs almost nothing in physical resources.

The attack does not target nodes that stay continuously online. Its victims are new nodes and nodes returning after a long absence, which must choose between competing histories without having observed the real chain grow. Modern protocols defend against it mainly with weak subjectivity checkpoints and finality rules.

How a long-range attack works

The attack exploits the fact that validator keys remain valid cryptographically even after their owners have withdrawn the stake. Once the stake is gone, the former validator has nothing left to lose by signing conflicting blocks for a period in which it was still part of the validator set.

  1. The attacker acquires keys that controlled a large share of stake at some past block, either by buying them from former validators or by holding that stake earlier and withdrawing it.
  2. Starting from that past block, the attacker produces a fork that diverges from the real history, signing blocks as if those keys were still active.
  3. On the fork, the attacker can redistribute stake to itself, which lets it dominate block production for the rest of the forged chain.
  4. The forged chain is presented to a node that is syncing from scratch, which may accept it if the client has no external reference point.

In proof of work, the same rewrite would require redoing all the work since the fork point, which is economically prohibitive. In proof of stake, the cost of producing old blocks is close to zero, so the protocol must rely on social and cryptographic safeguards instead of energy expenditure.

Variants of the attack

Researchers usually distinguish several forms of long-range attack, which differ in which keys are used and how the forged chain gains weight.

VariantMechanismMain condition
Simple long-range attackForged chain uses fake timestamps to appear validClients that do not check block timing
Posterior corruptionOld keys bought from validators who already exitedKeys usable after stake withdrawal
Stake bleedingAttacker accumulates rewards and fees on a hidden forkLong periods without honest participation checks
Costless simulationEntire history regenerated from the genesis blockClients relying only on chain length or weight
Main variants of the long-range attack

Posterior corruption is generally considered the most realistic variant, because former validators have weak incentives to protect keys that no longer hold value. A market for such keys could, in principle, form without any party feeling at direct financial risk.

Defenses used in proof-of-stake protocols

No single mechanism eliminates the long-range attack completely; protocols combine several measures that make it impractical or detectable.

DefenseHow it worksLimitation
Weak subjectivity checkpointsSyncing nodes start from a recent trusted blockRequires an honest source for the checkpoint
Finality gadgetsBlocks finalized by supermajority cannot be revertedProtects online nodes, not fresh clients alone
Unbonding periodsStake stays slashable for weeks after exitProtection ends when the period expires
Key-evolving signaturesKeys are updated and old versions erasedDepends on validators actually deleting keys
Density and timing rulesForks with sparse early participation are rejectedAdds complexity to fork choice
Common defenses and what they protect against

The concept of weak subjectivity is central. A node that has been offline for longer than the weak subjectivity period, typically weeks to a few months depending on validator churn and protocol parameters, must obtain a recent checkpoint from a trusted source such as a block explorer, a friend’s node or the client distribution itself. Ethereum and many CometBFT-based networks follow this model, while the Ouroboros family adds chain density rules designed to let fresh nodes distinguish the honest chain.

The long-range attack is often confused with other threats to consensus. The key distinction is how far back the attacker reaches and whose resources are used.

AttackTime horizonResource required
Long-range attackMonths or years into the pastOld keys with historical stake
51% attackRecent blocksCurrent majority of hash rate or stake
Nothing-at-stake problemLive forks at the chain tipValidators signing on several forks
Short-range reorganizationA few blocksTemporary control of block production
Selfish miningOngoingSignificant hash rate in proof of work
How the long-range attack differs from neighboring threats

The nothing-at-stake problem and the long-range attack share a root cause: signing in proof of stake is costless. Slashing addresses the first effectively, since live equivocation can be punished; it addresses the second only partially, because stake that has already left the system cannot be slashed.

Practical risk and common misconceptions

For established networks with active communities, a successful long-range attack is considered unlikely in practice, because node operators, exchanges and explorers would immediately notice a competing history. The risk is higher for small or young networks, chains with low validator participation, and light clients that sync without checkpoints.

  • It does not allow stealing coins on the real chain; it only deceives nodes that adopt the forged history.
  • Finality alone is not enough for a node that was never online to see the finalized blocks.
  • Weak subjectivity is not a centralization failure; it is an explicit, limited trust assumption that each operator can verify through several sources.
  • Key hygiene matters after exit: validators should securely destroy retired keys to reduce the market for posterior corruption.

Understanding it simply

Imagine a club where former members still own old signature stamps. Someone collects those stamps and writes a fake history of the club. In that fake book, the forger ends up owning everything.

People who attend every meeting know the book is false. A newcomer, however, cannot tell which book is real. The fix is simple. Newcomers ask trusted members for a recent page and only accept books that match it.

Applied in practice

A staking service provider brings a new validator node online for a proof-of-stake network. Instead of syncing from the genesis block and trusting whatever chain peers present, the operator uses checkpoint sync from a recent finalized block. The operator then compares that block’s hash against two independent explorers and a node run by a partner company.

Months later, the team decommissions three validators. The team waits for the full unbonding period to expire, then wipes the signing keys from hardware security modules and records the deletion. These steps mean that the provider’s nodes cannot be fooled by a forged history, and its retired keys cannot be sold to support posterior corruption.