Q&A-1Define safety and liveness for a blockchain protocol.
Answer
I'd pin the model first: n validators, up to f Byzantine, partially synchronous network, quorum 2f+1 (or 2/3 stake). Safety: no two honest nodes finalize conflicting blocks. Liveness: a valid transaction eventually finalizes when the network is synchronous and a quorum is online. Those are the two properties; the tension is that under partition you can't always have both.
Mechanism: quorum intersection. Any two 2f+1 quorums in n=3f+1 overlap in at least f+1 nodes, so at least one honest node is in both. If that honest node locks or votes once, conflicting finality would require it to double-vote or >f Byzantine. That's why safety holds even if the network splits. Liveness needs 2/3 online and messages delivered within timeout; if not, the protocol stalls rather than risk conflicting finality. If you try to keep liveness during a partition by lowering quorum, you break safety: two sides could each finalize.
Concrete trace: Tendermint with n=4, f=1, quorum=3. Partition {A,B} vs {C,D}. Neither side has 3 votes, so no block commits. Safety holds; liveness lost. If the split is {A,B,C} vs {D}, the 3-validator side commits, D cannot. When healed, D must sync to the finalized chain. If D signed a conflicting block, that's a double-vote, slashable.
| Protocol | Finality | Quorum | Partition behavior |
|---|---|---|---|
| Tendermint | absolute at commit | 2f+1 of 3f+1 | halts if no quorum |
| Casper FFG | absolute after 2 epochs (~12.8 min) | 2/3 stake | finality stalls; fork choice may reorg before finality |
| Bitcoin | probabilistic, 6 confirmations | longest chain | keeps producing, reorg risk |
Ethereum's Casper FFG finalizes after two epochs, each 6.4 min (32 slots * 12s), so ~12.8 min. Before that, LMD GHOST fork choice can reorg. Bitcoin is probabilistic: 6 confirmations, reorg probability drops with depth. So absolute vs probabilistic finality is the design choice.
Failure modes: double-vote, surround vote (Casper), long-range attack. Detection: slashing proofs from signed votes; finality stall >2 epochs. Cost: slashing loses stake; stall halts withdrawals and exchange deposits.
Trade-off: absolute finality (Tendermint, Casper FFG) halts on partition, good for settlement. Probabilistic (Bitcoin) keeps liveness, good for high-throughput but reorg risk. Choose based on whether you need irreversible settlement or continuous progress.
Recovery: authenticated by signed quorum certificates. A light client verifies a finality proof signed by 2/3; a rejoining validator uses a weak subjectivity checkpoint. That's the answer.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.