Checkpoints in Bitcoin
Sequentia’s history is pinned into Bitcoin. To rewrite Sequentia’s past, you would first have to rewrite Bitcoin’s.
The weak spot of proof of stake
Rewriting Bitcoin’s history means redoing its proof of work, which costs real energy. Rewriting a proof-of-stake chain’s history costs nothing but signatures. That leaves a specific attack open.
People who staked in the past and have since withdrawn their coins still hold their old keys, and have nothing left to lose. An attacker who buys enough of those keys can sign an alternative history starting from a point in the past, at no cost. This is called posterior corruption, or a long-range attack.
A node that has been online all along is not fooled: it already finalized the real history and rejects anything that forks below it. The node at risk is one that joins, or rejoins after a long absence. It is shown two histories, both carrying valid signatures, and has no way of its own to tell which is real.
Nobody can prove that an old key was destroyed. So the defence has to come from somewhere else.
Write it into Bitcoin
Anyone can make a Bitcoin transaction that records the hash of a Sequentia block. Once that transaction is buried deep in Bitcoin, about 2,016 blocks or two weeks, a Sequentia node that already has the recorded block on its chain treats it as final and rejects any fork below it. Even a longer one. Even one with valid signatures.
The new node from the example now has an objective reference. The real history is the one whose blocks are recorded in Bitcoin.
Three properties make this safe.
It only confirms what the node checked itself. A checkpoint locks in history the node has already validated. It cannot make a node accept something invalid.
Everyone sees the same checkpoints. Other proof-of-stake chains use checkpoints that each node sets locally, from whatever it happened to see. Here the checkpoint is in Bitcoin, the same for every node that reads the same Bitcoin chain.
Anchoring still comes first. If the Bitcoin block holding a checkpoint is itself reorganised away, the checkpoint is void.
Whitepaper 11.1, 11.3Closer to objectivity
Bitcoin’s security is objective: the correct history can be determined from the data and the rules alone, regardless of when or how a node synchronises. Proof-of-stake systems usually settle for weak subjectivity, where the answer depends on messages received from other nodes within a certain time.
Sequentia’s checkpoints are, in the whitepaper’s word, inter-subjective: shared by every node that queries the same Bitcoin chain, not established independently by each. Bitcoin is the common reference, which turns weak subjectivity into something much closer to objectivity.
The depth of two weeks is chosen because nodes may prune history older than a consolidated checkpoint, and would lose crucial information if Bitcoin reorganised deeper than that. A two-week Bitcoin reorganisation would be so extraordinary that the whole ecosystem would need manual intervention anyway.
Checkpoints nobody has to authorise
Checkpoints are permissionless. There is no checkpoint authority, no special key and no federation. Any user, exchange or staker who wants the history pinned can pay for a Bitcoin transaction and pin it.
A second, simpler mechanism covers the one case a Bitcoin checkpoint cannot: a brand-new node fed a false history from the very first block, before it has validated anything. Node software can ship with a known block hash at a known height. A peer presenting a different block at that height is lying, and is disconnected.
Why leaving takes two weeks
A checkpoint protects history only once it is buried. So there is a window in which recent history is not yet pinned, and the keys that signed it must still have something to lose.
Without a further rule, a staker could sign a block and withdraw in the next one, and their keys would be worthless to them, and for sale, from that moment.
So leaving is a two-step operation:
- The stake moves into an unbonding output. It stops counting as stake immediately.
- That output can be spent only after Bitcoin has advanced 2,016 blocks.
That is the same depth a checkpoint needs, measured in the same unit, Bitcoin blocks. By the time the coins are free, any history those keys could have signed lies behind a consolidated checkpoint.
Whitepaper 11.5Details of the two-step exit
A staking output can only be spent into another staking output or into an unbonding output of the same key. The 2,016 blocks are counted from the Bitcoin block anchored by the Sequentia block that created the unbonding output.
Counting both periods in Bitcoin blocks means the two cannot drift apart if Sequentia’s own pace changes.
Only the network fee may be paid out of the stake before then, up to 1% of the staking outputs spent. The fee can also be paid from other funds, in any asset the node accepts, in which case the whole stake waits in the unbonding output.
Whitepaper 11.6Checkpoints and blocks made during a stall
A checkpoint is the one way a branch of sub-quorum blocks can become final. It locks whatever block stands on the node’s chain at the recorded height, whether or not that block carries a full certificate.
This requires that no fully certified branch reach the node during the two weeks the checkpoint takes to consolidate. In practice that means either the whole network was unable to reach a quorum for two weeks, in which case locking that history is the intended outcome, or a network partition of the same length, an exceptional case that would probably need human operators.
Synchronous, asynchronous, or neither
Consensus protocols are usually sorted into two camps.
Synchronous protocols assume messages arrive within a known time. A node that has been offline may wake up, find everything “old”, reject it, and fork away.
Asynchronous protocols wait until enough participants have acknowledged a block. They never fork that way, but they can stall.
Sequentia is asynchronous with an exception: when a stall lasts longer than a period measured by Bitcoin, the escape rule applies. And the escape rule does not bring back the forking problem, because blocks made under it always lose to fully certified ones.
Read further
- Staking without inflation
- Never stuck
- Whitepaper, Principle 11