Long-Range Attack

Rewriting history from far back with old stake keys, the reason proof-of-stake chains add weak subjectivity.

Basically

A long-range attack uses old digital keys to create a false version of a blockchain’s history. It affects proof-of-stake systems, where signing old blocks again costs almost nothing.

Key Takeaways

  • A long-range attack targets proof-of-stake blockchains by rewriting history from a point far in the past. PoS block production costs nothing once you hold the signing keys.
  • Three variants exist: simple attacks rewrite from genesis, posterior corruption buys old validator keys, and stake grinding manipulates block randomness. All exploit the nothing-at-stake problem unique to PoS.
  • Mitigations include weak subjectivity checkpoints, key-evolving signatures, unbonding delays and finality gadgets. Finality gadgets make reverting finalised blocks economically prohibitive.

What Is a Long-Range Attack?

A long-range attack is a class of attack against proof-of-stake blockchains in which an adversary forks the chain from a point far in the past. The attacker constructs an alternative history that competes with or replaces the canonical chain. Unlike short-range attacks that fork from recent blocks, long-range attacks exploit a fundamental property of PoS: block production does not consume a physical resource, so historical blocks can be re-created at negligible cost.

Proof-of-work systems like Bitcoin require history rewrites to re-mine every block, expending real energy proportional to the accumulated difficulty. An attacker cannot outpace the honest chain without sustained majority hash power. PoS block signing is computationally trivial, and once a validator’s key exists it can sign blocks on any number of competing forks at no marginal cost, a property called “costless simulation” that makes long-range attacks a design constraint every PoS protocol must explicitly address.

No major PoS chain has suffered a successful long-range attack in production. The absence of incidents reflects the effectiveness of deployed mitigations rather than the absence of the vulnerability. Academic research consistently demonstrates that without these defences, PoS chains relying solely on honest-majority assumptions cannot guarantee safety against history revision.

How It Works

Long-range attacks have three main variants. Each exploits a different part of the PoS trust model. All share one root cause: the “work” needed to produce a block is a cryptographic signature, which costs almost nothing to compute.

Simple Attack (Genesis Rewrite)

The simple attack is the most straightforward variant. An attacker who held a majority of stake at or near genesis privately builds an entirely alternative chain from that point forward. PoS block creation is computationally cheap, so the attacker can generate blocks for all intervening slots offline and release the fork once it appears longer or heavier than the canonical chain.

A new node syncing from scratch cannot distinguish the attacker’s chain from the honest chain using protocol rules alone. Both chains appear valid and have valid validator signatures.

Posterior Corruption

Posterior corruption is also called a “founders’ attack”. It is more practical than the simple attack because the attacker does not need to have held majority stake themselves. Instead, the attacker acquires old private keys from validators who have withdrawn their stake and are no longer economically bonded to the network.

Former validators face no slashing risk on their withdrawn stake, so they may sell or leak their keys cheaply. The attacker collects enough old keys to represent a majority of stake at a historical epoch, then uses them to sign a fork from that point. The resulting chain looks legitimate to any node evaluating it from scratch.

Stake Grinding

Stake grinding manipulates the randomness used for leader election rather than rewriting deep history. When selected to produce a block, the attacker tries many possible block contents, varying transactions, timestamps or other malleable fields. The goal is a hash that biases the next random seed in their favour.

The method gives the attacker a disproportionate share of future block production rights, allowing them to extend a private fork faster than the honest chain. Each individual grind provides a small advantage, but the effect compounds over time. Modern PoS protocols use verifiable random functions (VRFs) to make the randomness resistant to grinding.

Why PoW Is Immune

Long-range attacks are unique to PoS because of the asymmetry in block production cost. PoW and PoS therefore place different demands on an attacker.

In PoW, an attacker must sustain a 51% attack in real time and pay ongoing energy costs. In PoS, a historical majority suffices because signatures are free to produce retroactively.

Mitigations

Every production PoS protocol deploys one or more defences against long-range attacks. No single mitigation is universally adopted, and different chains make different trade-offs.

Weak Subjectivity Checkpoints

Weak subjectivity checkpoints are the most widely used defence. Nodes periodically accept a trusted checkpoint, a recent finalised block hash, and refuse to revert beyond it. New nodes must obtain a recent checkpoint from a trusted source before syncing: a friend, a block explorer or the client development team.

Ethereum defines a “weak subjectivity period” during which a checkpoint remains valid. Nodes that have been offline longer than this period must fetch a fresh checkpoint before resuming. These checkpoints turn long-range forks into protocol violations that honest nodes simply ignore, but add a weak trust assumption: you must trust at least one source of checkpoint information.

Key-Evolving Signatures (KES)

Cardano’s Ouroboros Praos protocol prominently uses key-evolving signatures. The validator’s signing key is divided into time periods, evolves forward after each period and securely erases the old version. Even if a current key is compromised, the attacker cannot recover past-period keys, making it cryptographically impossible to forge signatures on historical blocks.

Cardano’s KES keys evolve every 129,600 slots. They can evolve up to 62 times before the validator must register a new operational certificate.

Unbonding Delays

Cosmos-SDK chains enforce a 21-day unbonding period during which validators remain slashable after they stop validating. Ethereum imposes a variable withdrawal queue. These delays stop validators from immediately selling their keys after exiting, raising the cost of posterior corruption.

The unbonding period must be longer than the weak subjectivity period for the defence to be effective. A window for posterior corruption opens if validators can exit faster than nodes refresh their checkpoints.

Finality Gadgets

Protocols like Ethereum’s Casper FFG provide economic finality: reverting a finalised block requires destroying at least one-third of all staked ETH. At current staking levels, this amounts to billions of dollars, making the attack economically prohibitive for any recently finalised block. Byzantine fault tolerant protocols like Tendermint, used by Cosmos, achieve instant finality: once two-thirds of validators sign a block, it cannot be reverted at all.

Bitcoin-Anchored Checkpointing

Babylon Labs pioneered this emerging approach, which timestamps PoS checkpoints into Bitcoin’s PoW chain. Bitcoin’s cost-of-rewrite becomes an external trust anchor, so reverting a PoS checkpoint confirmed on Bitcoin would also require rewriting the Bitcoin chain. PoS chains can therefore benefit from Bitcoin’s security without requiring their own PoW.

Why It Matters

Long-range attacks are a fundamental design challenge for any PoS system. Replacing PoW with PoS is not a drop-in swap because the security model changes in subtle but important ways. You can use these attacks to evaluate the security guarantees of different blockchain architectures.

Systems like Spark that operate as a layer 2 on Bitcoin largely inherit the long-range attack problem from the base layer’s consensus mechanism. Bitcoin’s proof-of-work provides strong protection against history rewriting, and layer-2 protocols anchor their state to Bitcoin’s chain. A PoW base layer therefore offers a key security advantage over relying purely on PoS assumptions.

Mitigations for long-range attacks also affect payment finality. Weak subjectivity checkpoints introduce a trust assumption that pure PoW chains avoid, unbonding delays reduce capital efficiency for validators, and key-evolving signatures add operational complexity. Each PoS chain makes its own trade-off among these options, so you need to assess long-range attacks when evaluating those choices.

New Node Vulnerability

Nodes syncing from scratch are the primary target. Without a recent checkpoint, they cannot distinguish an attacker’s chain from the honest chain, making the initial sync process an important trust boundary for PoS networks. You must obtain a fresh checkpoint from a trusted source when you start a node after an extended period offline.

Checkpoint Centralisation

Weak subjectivity checkpoints solve the long-range attack problem but introduce their own trust assumption. Centralised checkpoint distribution, such as most users relying on a single block explorer, makes the checkpoint provider a target for attack or censorship. Decentralising checkpoint distribution remains an active area of research.

Key Storage After Exit

Former validators should securely destroy their old signing keys even after unbonding. Protocols that do not enforce key destruction through mechanisms like KES rely on validators following best practices voluntarily. In practice, key material may persist in backups, cloud storage or compromised infrastructure long after a validator exits.

Interaction with Other Attacks

Long-range attacks can compound with other PoS vulnerabilities. Combined with the nothing-at-stake problem, an attacker can sign blocks on multiple forks simultaneously. Combined with a chain reorganisation, they can attempt to reverse finalised transactions, so you need to consider these interactions when assessing the overall security of a PoS network.

The glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.

0

← All 1876 glossary terms