Skip to content
Blockchain Association of Cameroon
BAC-L0-FOUND-1093 h

Consensus families and finality

Proof of work, proof of stake, BFT: what each family buys, at what price, and what "finalised" means in each case.

  • Compare probabilistic and deterministic finality
  • Relate proposer selection to the security model
  • Identify the reorganisation condition in each family

A transaction "seen in a block" is not necessarily a final transaction. In this workshop you learn what "finalised" means in three major consensus families: proof of work, proof of stake and BFT-style protocols. You will see how the way a block proposer is chosen determines the security model, and which precise condition triggers a chain reorganisation in each family. By the end you will be able to read a claim such as "6 confirmations" or "block finalised" and say exactly what it guarantees and what it does not.

Lessons 1/4 · 15 min

What does "final" mean?

A payment that vanishes

Kofi sells phones in Douala. A customer sends him 500 units on a blockchain (fictitious figures). A few minutes later the payment shows in Kofi's wallet, inside a brand-new block. He hands over the phone. An hour later the payment is gone from the chain: the block containing it was abandoned by the network. There was no bug. Kofi took "seen in a block" for "final". They are two different things.

The words, one by one

  • Block: a batch of transactions that the network accepts together. Each block contains the hash of its parent (workshop 104), which forms a chain.
  • Fork: two different blocks naming the same parent. A common, honest cause: two proposers produce a block almost at the same time, and network latency (workshop 107) stops each from seeing the other in time.
  • Fork-choice rule: the rule each node applies to name the "tip" of the chain it follows. Every node applies the same rule, but they do not necessarily see the same blocks at the same instant.
  • Reorganisation (reorg): a node abandons its current branch for another one its rule judges better. The abandoned blocks become stale blocks (often called "orphans" in everyday usage). Their transactions go back to waiting, unless the new branch already contains them (you will meet that waiting queue, the mempool, in workshop 110).
  • Finality: the point after which a block will no longer be reverted, under stated assumptions.

Two kinds of finality

Probabilistic finality: the more blocks are stacked on top of yours, the less likely a competing branch replaces it. The probability falls with each block, but it is never exactly zero. This is Bitcoin's case.

Deterministic finality: the protocol contains an explicit step that declares a block finalised. After that step, reverting the block requires breaking the protocol's security assumption (for example "more than one third of validators act maliciously"). This is the case of BFT protocols such as Tendermint/CometBFT.

QuestionProbabilisticDeterministic
When is it "final"?When the risk becomes negligible for youWhen the protocol declares it
Nature of the guaranteeA probability that decreasesAll-or-nothing, under an assumption
Who sets the risk level?The receiver (how many confirmations to wait)The protocol

Worked example: counting confirmations

A transaction enters the block at height 800. While block 800 is the tip, it has 1 confirmation. When the tip is block 805, it has 6 (block 800 and the five after it). A confirmation is simply the number of blocks, its own included, at the end of the branch that contains the transaction. The number "6" used for Bitcoin is a widespread habit, not a protocol rule: each receiver picks a threshold according to the value at stake.

What this does NOT guarantee

  • Deterministic finality is not unconditional: if the assumption (for example "fewer than one third faulty") is false, the guarantee falls.
  • "Finalised" says nothing about the real world: a finalised payment is still a payment sent to the wrong address if you made a mistake.
  • The word "finalised" shown by a node reflects what that node has seen. An eclipsed node (workshop 107) can show you a false version of the chain.

Recap

A block is a proposal; finality is a judgement about the risk of it being replaced. Probabilistic: the risk decays. Deterministic: the protocol reduces it to a stated assumption.

Lessons 2/4 · 20 min

Proof of work: the hash lottery

Who proposes the next block?

In an open network anyone can show up. You cannot choose "node number 3": an attacker would create a thousand free identities. Bitcoin, described in Satoshi Nakamoto's paper (Bitcoin: A Peer-to-Peer Electronic Cash System), answers with a lottery: for a block to be valid, the hash of its header must be below a target. Finding a nonce that achieves this takes repeated tries (try it with the miner tool below this text; hashes come from workshop 104). The proposer is whoever wins the lottery; their chance is proportional to their share of the total hash power. The cost is hardware and electricity, not an identity.

Fork-choice rule: cumulative work

Nodes follow the valid branch with the most cumulative work, meaning the sum of the work (the inverse of the target) of all its blocks since genesis. In the simple case where difficulty does not change, this amounts to the longest branch; but the real rule is "most work", not "most blocks".

Reorganisation condition in proof of work: a node reorganises as soon as it receives a valid branch whose cumulative work exceeds that of its current branch. No vote, no permission message: it is a plain comparison.

Example: the current chain is G-A-B (work 1 per block: total 2). A miner secretly produces C' on A (G-A-C': total 2), then D' on C' (G-A-C'-D': total 3). As soon as D' is published, every node switches to the C'-D' branch. B becomes stale and its transactions go back to waiting. Try it in the fork-sim tool: add blocks to each branch and watch which tip is selected.

Why finality is probabilistic

Take an attacker controlling a share q of the hash power, against honest miners holding p = 1 − q. First model, heavily simplified (random walk): the probability that the attacker ever catches up from z blocks behind is (q/p)^z if q < p, and 1 otherwise. This model strongly underestimates the risk: it ignores the lead the attacker gains while the honest miners mine their z blocks. It is only for seeing the exponential decay in z, never for setting a threshold.

The calculation in Nakamoto's paper (section 11) accounts for that progress, using a Poisson distribution. Convention used here: z is the number of blocks added after the transaction's block, so c confirmations (lesson 1, own block included) correspond to z = c − 1. The values below are those of the paper's formula, compared with the simplified model:

Attacker share qzSimplified model (q/p)^zPaper's formula
10%111.1%20.5%
10%21.2%5.1%
10%30.14%1.3%
10%60.00019%0.024%
30%218.4%44.6%
30%60.62%13.2%
45%266.9%87.8%
45%630%76.6%

Reading: with 10% of the power and the paper's formula, you need z = 5 (6 confirmations) to get below 0.1% (about 0.09%); with 30%, six blocks after the transaction still leave a 13% risk; with 45%, they leave roughly a three-in-four chance of reversal. These figures assume the paper's attacker (mining in secret from the block before the transaction, with constant power); later analyses refine the exact formula and the counting conventions, which we do not reproduce. The right number of confirmations depends on the value at stake and on the power an attacker can assemble.

The 51% attack

If q exceeds 50%, (q/p)^z is no longer below 1: the attacker eventually catches up from any deficit. They can then rewrite their own recent payments (double spend) and refuse to include certain transactions (censorship). No number of confirmations then bounds the probability of reversal (it tends to 1): depth only raises the cost of the attack (for example how long the power must be rented), and it is that cost which must exceed the expected gain (see the security exercise). They cannot forge someone else's signature, spend funds that are not theirs, or change the validity rules that full nodes apply: their invalid blocks would simply be rejected.

What this does NOT guarantee

  • Proof of work does not guarantee immediate agreement: honest forks happen regularly.
  • It does not say the selected branch is the "true" one in any moral sense: it is the most costly one to produce.
  • The 50% threshold is a landmark that holds when blocks are rare relative to propagation time: with high network delay the tolerated share of power falls. Strategies such as selfish mining can also make a smaller coalition profitable, so 49% is not "safe".

Recap

Proposer: the winner of the hash lottery. Reorganisation: a valid branch with more cumulative work. Finality: probabilistic, growing with depth.

Interactive tool

Toy miner (proof of work)

Finds the smallest nonce whose SHA-256 digest of "data + nonce" starts with hex zeros. Each extra zero multiplies the average work by 16.

The hashed text is exactly the data followed by the decimal nonce (no separator). The search runs in slices, so the page stays responsive.

Interactive tool

Fork simulator

Add blocks on any branch. The best chain is the one with the highest cumulative work from the genesis G.

  • G
    • B1+1cumulative work 1
      • B2+2cumulative work 3· stale
        • B4+1cumulative work 4· tip· stale
      • B3+1cumulative work 2
        • B5+3cumulative work 5· tip★ best tip

Best tip: B5 (cumulative work 5).

Stale blocks (outside the best chain): 2.

Rule: highest cumulative work; on a tie the earlier-listed block keeps it. Blocks outside the best chain are called stale (orphaned): their work is wasted for the selected chain. "Work" here is a small made-up integer.

Lessons 3/4 · 25 min

Stake and BFT: voting instead of mining

Choosing the proposer without burning electricity

In the stake-based (proof of stake) and BFT families, a known set of validators has deposited a stake (locked tokens). The proposer is no longer whoever computes the most: it is picked by a deterministic or pseudo-random rule, weighted by stake. In Tendermint/CometBFT (paper: The latest gossip on BFT consensus), for example, the proposer rotates in an order weighted by each validator's voting power.

The security model therefore changes nature: in proof of work we assume "less than half the hash power is malicious"; in BFT we assume "less than one third of the voting power is malicious" (workshop 108).

The BFT voting round, with numbers

Recall the calculation from workshop 108. With n = 3f + 1 validators, we tolerate f Byzantine faults and a quorum is 2f + 1 votes. For n = 7: f = 2, quorum = 5. A simplified round:

  1. The round's proposer broadcasts a block.
  2. Validators send a first vote (prevote) for that block.
  3. If a quorum (5 of 7) prevoted, they send a second vote (precommit).
  4. If a quorum of precommits is reached, the block is committed for good: this is deterministic finality.

Why two quorums cannot commit two different blocks: two sets of 5 out of 7 must overlap in at least 5 + 5 − 7 = 3 validators, which is f + 1. If at most f = 2 are Byzantine, at least one of the 3 is honest, and an honest validator never votes for two blocks in the same round. So the two quorums cannot name two different blocks. This is safety, here for a simplified round: successive rounds of one height are linked by a locking rule that we omit.

If 3 validators out of 7 are offline, only 4 remain: the quorum of 5 is unreachable. The chain stops: no new block, but no false block either. What is lost is liveness, not safety. Try it in the quorum-sim tool.

Reorganisation condition in BFT

In a BFT protocol with immediate finality there is no normal reorganisation: a committed block is final. For two conflicting blocks to be committed at the same height, more than one third of the voting power must have violated the protocol, typically by signing twice (double signing, or equivocation). A double signature is verifiable evidence and can be punished; not every violation is as easy to prove.

Hybrid chains

Some stake-based chains combine a fork-choice rule (the chain keeps growing even if finalisation lags) with a voting-based finality layer. On Ethereum, the Casper FFG mechanism marks checkpoints as "justified" then "finalised" with a two-thirds vote of the total stake (the exact convention, strict or inclusive, is discussed in workshop 108). Before finalisation, reorganisations are possible; afterwards, reverting one requires that at least one third of the stake be destroyable under the slashing rules. Order of magnitude: finalisation there takes roughly ten minutes, against a few seconds for Tendermint. Polkadot also follows a hybrid scheme: one layer produces blocks and a separate layer finalises them, so its "finalised head" can lag behind its "best head".

The "nothing at stake" problem and slashing

If signing blocks costs nothing, a validator can sign every branch: it always gains something, and forks never resolve. The answer is slashing. Signing two conflicting blocks loses a part of the deposited stake. The stake is therefore not just an entry ticket: it is a hostage.

What this does NOT guarantee

  • BFT safety depends on the "fewer than one third" assumption. Beyond it, no guarantee.
  • If more than one third is offline, the chain stops: safe but not live.
  • Slashing punishes after the fact. It does not return the funds stolen in a successful double spend.
  • A validator whose keys are stolen can be punished for a fault they did not commit: stake comes with key hygiene.

Recap

Proposer: chosen by stake. Finality: deterministic, by a quorum of 2f + 1. Reorganisation: only if more than one third violates the protocol (typically by signing twice). Punishment: the stake is the guarantee.

Interactive tool

BFT quorum simulator

Click a validator to change its state: honest, offline, then Byzantine (malicious or arbitrarily faulty).

Number of validators n

n = 7 · f = ⌊(n−1)/3⌋ = 2 · quorum = 2f+1 = 5

7 honest, 0 offline, 0 Byzantine.

✓ Can decide: 7 honest online validators ≥ quorum 5. The network can gather a quorum and finalise blocks.

✓ Safety guaranteed by the model: 0 Byzantine ≤ f = 2. Any two quorums overlap in at least one honest validator, so no conflicting decisions.

Classic BFT model: n ≥ 3f + 1 validators tolerate up to f faulty ones (offline or Byzantine). A quorum is 2f + 1 votes. Losing liveness = the network stops making progress, but nothing wrong is decided. Losing safety = conflicting decisions become possible, which is worse. Liveness additionally assumes a network that eventually delivers messages. This is only a model: real protocols have other assumptions and thresholds.

Lessons 4/4 · 15 min

Comparing, then deciding

The integrator's question

A shopkeeper, a payment platform or an application developer has to answer a concrete question: how long must I wait before delivering? The answer depends on the consensus family. Here is the workshop's synthesis.

Proof of work (Bitcoin)Stake + vote (hybrid, e.g. Ethereum)Immediate-finality BFT (e.g. CometBFT)
Proposer selectionHash lottery, proportional to powerStake-weighted drawRotation weighted by voting power
Security assumptionLess than ~50% of the power is maliciousLess than one third of the stake is malicious (for finality)Less than one third of the voting power is malicious
Reorganisation conditionValid branch with more cumulative workMore voting weight on the branch, while not finalisedNone normally; only if more than one third violates the protocol (typically by voting twice)
Finality typeProbabilisticDeterministic after finalisationDeterministic as soon as committed
Typical failureReorganisation of growing depthFinalisation delayChain halt (loss of liveness)

This table is simplified: every real network adds details. Some chains follow none of the three models to the letter.

Example: setting a delivery rule

Kofi receives 500 units on a proof-of-work chain. He estimates that a plausible attacker controls at most 10% of the power. With the "paper's formula" column of lesson 2's table (z = c − 1), two confirmations leave about 5% risk, three about 1.3%, five about 0.35%, six about 0.09%. For a 500-unit sale he sets a risk below 1% and decides to wait for five confirmations. For a 50,000-unit sale he would aim below 0.1% and ask for six or more. On a BFT chain he only waits for the block to be committed: "3 confirmations" makes no sense there, since a committed block is already final.

Reading documentation without being fooled

  • "Confirmed" often means included in a block, not final. Check whether the text says "finalised" or "committed by quorum".
  • A node reports the state it knows. If you query a single node and it is eclipsed or lagging, you will read a stale truth.
  • A fast-finality chain is not "safer": it has a different failure model (halting rather than reorganising) and assumes a known set of validators.

What this does NOT guarantee

  • This table does not rank chains from best to worst. The three families buy different things: permissionless openness, finalisation speed, energy cost.
  • A confirmation threshold computed for a 10% attacker is wrong if the attacker can rent or buy 40% of the power, and no depth bounds the probability against a majority (it only raises the cost). A threat model is not a measurement.
  • No number of confirmations protects against a wrong recipient, a scam or a badly designed contract.

Recap

To decide how long to wait: identify the family, find its reorganisation condition, estimate the strongest plausible attacker, then pick the depth or finalisation that makes the attack unprofitable for the value at stake.

Interactive tool

Fork simulator

Add blocks on any branch. The best chain is the one with the highest cumulative work from the genesis G.

  • G
    • B1+1cumulative work 1
      • B2+2cumulative work 3· stale
        • B4+1cumulative work 4· tip· stale
      • B3+1cumulative work 2
        • B5+3cumulative work 5· tip★ best tip

Best tip: B5 (cumulative work 5).

Stale blocks (outside the best chain): 2.

Rule: highest cumulative work; on a tie the earlier-listed block keeps it. Blocks outside the best chain are called stale (orphaned): their work is wasted for the selected chain. "Work" here is a small made-up integer.

Interactive tool

BFT quorum simulator

Click a validator to change its state: honest, offline, then Byzantine (malicious or arbitrarily faulty).

Number of validators n

n = 7 · f = ⌊(n−1)/3⌋ = 2 · quorum = 2f+1 = 5

7 honest, 0 offline, 0 Byzantine.

✓ Can decide: 7 honest online validators ≥ quorum 5. The network can gather a quorum and finalise blocks.

✓ Safety guaranteed by the model: 0 Byzantine ≤ f = 2. Any two quorums overlap in at least one honest validator, so no conflicting decisions.

Classic BFT model: n ≥ 3f + 1 validators tolerate up to f faulty ones (offline or Byzantine). A quorum is 2f + 1 votes. Losing liveness = the network stops making progress, but nothing wrong is decided. Losing safety = conflicting decisions become possible, which is worse. Liveness additionally assumes a network that eventually delivers messages. This is only a model: real protocols have other assumptions and thresholds.

Guided lab

A browser cannot run a real Polkadot or Cosmos node: the exercises below use simulators and data generated for you. They train exactly the reasoning needed on a real network: choosing a branch by cumulative work, computing a quorum, and reading a reorganisation. Work on real test networks is in the independent lab.

A browser is no substitute for a real terminal: this lab trains reading and reasoning; the real hands-on practice is in the independent lab.

A certified account is required

Graded activities record results in your name and are the basis for a credential. They therefore need a complete certified file and a current consent. Filling in the file does not verify your identity; the Secretariat can verify it afterwards ("Verified" badge).

  1. 1.Choose the best chain

    Open the fork-sim tool below this text to practise adding blocks. Then solve the exercise: compute each tip's cumulative work from genesis G, give the id of the best chain's tip and the number of blocks that are not part of it.

    Interactive tool

    Fork simulator

    Add blocks on any branch. The best chain is the one with the highest cumulative work from the genesis G.

    • G
      • B1+1cumulative work 1
        • B2+2cumulative work 3· stale
          • B4+1cumulative work 4· tip· stale
        • B3+1cumulative work 2
          • B5+3cumulative work 5· tip★ best tip

    Best tip: B5 (cumulative work 5).

    Stale blocks (outside the best chain): 2.

    Rule: highest cumulative work; on a tie the earlier-listed block keeps it. Blocks outside the best chain are called stale (orphaned): their work is wasted for the selected chain. "Work" here is a small made-up integer.

  2. 2.Compute a BFT quorum

    Use the quorum-sim tool to see when a quorum becomes unreachable. Then, for the network of n validators shown in the exercise (n = 3f + 1), give f, the quorum size 2f + 1 and the smallest network that tolerates one more Byzantine fault.

    Interactive tool

    BFT quorum simulator

    Click a validator to change its state: honest, offline, then Byzantine (malicious or arbitrarily faulty).

    Number of validators n

    n = 7 · f = ⌊(n−1)/3⌋ = 2 · quorum = 2f+1 = 5

    7 honest, 0 offline, 0 Byzantine.

    ✓ Can decide: 7 honest online validators ≥ quorum 5. The network can gather a quorum and finalise blocks.

    ✓ Safety guaranteed by the model: 0 Byzantine ≤ f = 2. Any two quorums overlap in at least one honest validator, so no conflicting decisions.

    Classic BFT model: n ≥ 3f + 1 validators tolerate up to f faulty ones (offline or Byzantine). A quorum is 2f + 1 votes. Losing liveness = the network stops making progress, but nothing wrong is decided. Losing safety = conflicting decisions become possible, which is worse. Liveness additionally assumes a network that eventually delivers messages. This is only a model: real protocols have other assumptions and thresholds.

  3. 3.Read a reorganisation

    Answer the multiple-choice question describing an event observed on a proof-of-work test chain. First compute each branch's cumulative work, compare them, then rely on each family's reorganisation condition from lessons 2 and 3 to say what happens to the abandoned block's transactions.

Security exercise — How many confirmations for a large deposit?

You are designing the deposit rule of a small community exchange. It accepts deposits on a (fictitious, small) proof-of-work chain and on an immediate-finality BFT chain. The previous developer wrote one rule for both: "credit the customer at 1 confirmation".

A customer deposits 400,000 units (fictitious figures) on the proof-of-work chain. You know that renting enough hash power to exceed half of this small chain is possible, and that the gain from a 400,000-unit double spend clearly exceeds its cost. On the BFT chain, 7 validators are run by distinct organisations.

Check question: which policy is correct? Answer the multiple-choice question that follows this scenario.

Workshop quiz

Eight questions drawn from a larger pool, 70% to pass. It opens once every lab checkpoint is passed. You can retake it: the draw changes.

A certified account is required

Graded activities record results in your name and are the basis for a credential. They therefore need a complete certified file and a current consent. Filling in the file does not verify your identity; the Secretariat can verify it afterwards ("Verified" badge).

Independent lab (outside the site)

Not graded online: do it on your own machine and publish it to your Git repository.

To do on your own machine, outside the site

Write a one-to-two-page note comparing the security assumptions of three real protocols of your choice (for example Bitcoin, a Cosmos chain and a Polkadot chain). For each one:

  1. How is a block's proposer chosen?
  2. Which fork-choice rule is applied?
  3. What is the precise reorganisation condition?
  4. What does "finalised" mean in the official documentation, and how long does it take to reach that state?
  5. What is the security assumption (fraction of power, stake or voting weight)?

If you have access to a Cosmos or Polkadot test network, query a public node. On a CometBFT chain, the latest committed height is already final: note this as an observation (there is no separate "finalised" field). On a hybrid chain such as Polkadot, compare the finalised head with the best head, using the field names from the official documentation. Cite only what you find in the official documentation and give the source; mark anything you infer as "unverified". Notes are assessed on the rigour of the stated assumptions, not on length.

Takeaways

  • "Seen in a block" is not "final": a transaction is final only in the sense of a precise finality rule.
  • Proof of work: proposer by hash lottery, reorganisation as soon as a valid branch has more cumulative work, probabilistic finality.
  • BFT: proposer assigned by voting weight, quorum of 2f + 1 out of 3f + 1, deterministic finality while fewer than one third are faulty.
  • Losing liveness (chain halted) and losing safety (conflicting blocks) are two failures of a different nature.
  • How many confirmations to wait for is a risk decision: it depends on the value at stake and on the strongest plausible attacker.

Common misconceptions

  • Misconception : Six confirmations make a Bitcoin payment permanently irreversible.

    In fact : Six is a habit, not a rule. The probability of reversal decreases with each block but is never zero; if an attacker holds more than half the power, it tends to 1 whatever the depth.

  • Misconception : Deterministic finality means nothing can ever undo the block.

    In fact : It means undoing the block requires breaking the security assumption (for example more than one third of validators signing twice). If the assumption is false, the guarantee falls.

  • Misconception : In proof of work, the branch to follow is the one with the most blocks.

    In fact : It is the one with the most cumulative work. Block count matches work only if difficulty is constant.

  • Misconception : A BFT chain that halts has been hacked.

    In fact : A halt most often means a quorum can no longer be reached (too many validators offline). The protocol chooses to stop rather than risk two conflicting blocks: safety is preserved, liveness is lost.

Glossary

Finality
The point after which a block will no longer be reverted, under stated assumptions. Probabilistic or deterministic.
Reorganisation (reorg)
A node abandons its current branch for another that its fork-choice rule judges better; the abandoned blocks become stale.
Cumulative work
Sum of the work (inverse of the target) of all blocks of a branch since genesis. Used as the fork-choice rule in proof of work.
Quorum
Number of votes needed to decide. In a network of 3f + 1 validators it is 2f + 1; two quorums overlap in at least f + 1 validators.
Safety and liveness
Safety: nothing wrong is decided (no two conflicting blocks). Liveness: the system keeps deciding.
Slashing
Destruction of part of the stake of a validator that committed a provable fault, for example double signing.
Confirmation
Number of blocks, its own included, at the end of the branch containing a transaction. It is not a synonym for finality.