learn-blockchain-with-phoebe / Leader session 4 of 6
Learn Blockchain with Phoebe · Leader session 4 of 6

Who agrees, and how

Everything so far works on one machine, and on one machine a chain is a tamper evident log. Useful, well understood, and available from a database with a hash column. The part that is genuinely different starts when several machines hold the register, each can add to it, and no one of them is in charge. Two of them will eventually extend it at the same moment with different entries, both results will be perfectly valid, and something has to decide. Tonight is how that decision is made, what it costs, and the four questions hiding inside the word decentralised.

🟡 Foundations Anyone being sold a chain Anyone who has to sign off on one 45 min
0-3 · Welcome 3-16 · Two valid chains 16-24 · Finality 24-45 · The spectrum, build-along and Q&A
Part 0

One copy is a log. Several copies is a problem.

Session 2 ended on an uncomfortable note: on a register held by one organisation, tamper evidence buys almost nothing against an insider, because the insider can rebuild the evidence. The answer was other copies. That answer creates a new difficulty of its own, because copies drift, and two honest parties can produce two different and equally valid versions of the same register without anybody doing anything wrong.

Live = presented in the 45 minutes Self-study = the full depth, after class 🔍 Every diagram zooms

★ What you walk out with tonight. Why two valid chains can exist at the same time and why that is normal rather than a fault. The reason the rule for choosing between them has to be mechanical, and what the usual rule buys and costs. Finality as something that grows rather than something that arrives. And four questions to ask whenever somebody says decentralised, because the word answers none of them on its own.

LiveWhat several copies are actually for4 min▶

A hash chain detects an alteration by recomputing. That works whether the register is held by one party or a hundred. What one party cannot provide is a second opinion: if the only copy is rewritten consistently, recomputation finds nothing, because the copy agrees with itself perfectly.

Several independent copies turn a private edit into a visible disagreement. The chain provides the comparison and the copies provide something to compare against. Everything difficult about this session follows from that arrangement, because independent copies do not stay identical by themselves.

Real world

Suppose the port authority, a buyer and an insurer each keep the Harbourgate register. The port authority adds an inspection at the same moment the buyer adds a release. Neither is cheating and neither is offline. For a short period there are two registers, each internally consistent, each with a different sixth entry.

Self-studyThe words that will keep coming back4 min▶
  • Fork. Two valid continuations of the same register existing at once. Normal, frequent, and not a fault.
  • Consensus rule. The mechanical test every holder applies to decide which branch is the accepted one.
  • Longest chain wins. The usual rule, stated over the work accumulated in a branch rather than a raw count of entries.
  • Reorganisation. What happens to the losing branch: its entries leave the accepted history, having never been invalid.
  • Finality. How settled an entry is. A quantity that grows with depth, not a state that is reached.
  • Depth. How many blocks sit after an entry. The only thing that changes as an entry ages.
  • Permissionless. Anyone may write without being admitted first.
  • Permissioned. Only admitted parties may write, and somebody admits them.
  • Governance. Who can change the rules themselves, which is a separate question from who may use them.
Part 1 · covers forks and the rule

Two valid chains, and nothing wrong with either

13 min live

A fork is not an attack and not a bug. It is what happens when two holders of the same register each add an entry before hearing about the other. Run verification on both results and both come back clean, because both are correctly hashed and correctly linked. The structure that makes tampering visible has nothing at all to say about which of two honest histories is the real one.

Two holders extend the same register before either hears about the other SHARED HISTORY, BLOCKS 0 TO 3 block 0 block 1 block 2 block 3 BRANCH A the port authority adds two entries block 4 block 5 BRANCH B the buyer adds one entry block 4 BRANCH A 6 blocks, verify: ok BRANCH B 5 blocks, verify: ok The rule selects A It is longer, and that is the whole of the reason. Nothing is broken, and nothing was wrong with the losing branch. Both branches are correctly hashed and correctly linked, so the structure itself has no opinion about which history is real. The entry in branch B leaves the accepted history the moment the rule is applied, and it was never invalid for a second.
🔍 Click to zoom - the shared blocks are identical in both branches, which is why a fork is a split rather than two separate registers.
Live Two real branches of the Harbourgate register, both built and verified in this page.

...

...
LiveWhy the rule has to be mechanical4 min▶

Every holder of the register has to reach the same answer, alone, from the data in front of them, without asking anyone. Any rule that needs judgement needs a judge, and a judge is the administrator the arrangement exists to do without. So the rule must be computable, deterministic, and take no input beyond the branches themselves.

That requirement rules out everything a reasonable person would prefer. Not the branch with the more plausible entry, not the branch from the more reputable party, not the branch a majority of people think is fairer. Those are all better answers and none of them can be evaluated identically by strangers.

LiveWhat longest chain wins buys, and what it costs4 min▶

What it buys is convergence with no coordination at all. Holders who cannot talk to each other, who came online at different times, and who saw the branches in a different order still end on the same history, because they are all applying the same arithmetic to the same data.

What it costs is that no entry is ever certainly permanent. An entry you saw a minute ago can leave the accepted history when a longer branch appears, and the rule will discard it without hesitation. A count of entries would be trivial to inflate, so the rule is normally stated over the work accumulated in a branch rather than the number of blocks in it, which is where session 3 rejoins this one: a branch is expensive to extend precisely so that the longest one is hard to manufacture.

Self-studyForks that are disagreements about the rules4 min▶

Everything above is an accidental fork, resolved automatically because both sides apply the same rule. There is a second kind, where the holders stop agreeing about what the rule is. One group changes the required format, or the difficulty, or who is admitted, and the other group declines.

No consensus rule can settle that, because the parties are no longer running the same test. The register simply becomes two registers with a shared past and separate futures, and which one anybody uses is a social question rather than a computable one. It is the clearest demonstration that the mechanism decides between histories, never between people.

Part 2 · covers finality

Finality grows. It does not arrive.

8 min live

Ask when an entry becomes permanent and the honest answer is that it does not. What changes as the register grows past an entry is how much work removing it would take, and that is a quantity rather than an event. Nothing in the structure emits a signal saying the matter is closed, and any system that waits for one waits forever.

Nothing announces that an entry is settled. Only its depth changes. block 0 5 blocks after it block 1 4 blocks after it block 2 3 blocks after it block 3 2 blocks after it block 4 1 block after it block 5 nothing after it dearest to remove cheapest to remove What removing an entry takes Every block after it has to be redone. At difficulty 3 each block costs a mean of 4,115 attempts over 120 trials. What never happens No message arrives saying an entry is now final. Depth is the only thing that changes, and it changes gradually. Finality is a probability that grows, not a fact that arrives. A business rule picks a depth it can live with and accepts the risk that remains, because nothing else is on offer.
🔍 Click to zoom - the newest entry is always the least settled, and it is usually the one somebody has a live reason to change.
LiveWhy nobody can hand you a receipt4 min▶

Displacing an entry means producing a branch that wins the rule, which means redoing that entry's block and every block after it, each at the price session 3 measured. The further back the entry sits, the more blocks that is, and the more expensive the whole exercise becomes. That is a curve, not a threshold.

So there is no depth at which the system declares an entry safe, and any number you adopt is a decision about risk appetite rather than a fact you have been told. Different businesses reading the same register choose different depths for a release of goods and for a routine note, and both are being reasonable.

LiveWhat that means for a process that reads the register3 min▶

A process that acts the instant an entry appears has inherited the reorganisation risk without noticing. The entry may be removed afterwards, the process will not be consulted, and whatever it did in response has already happened in the physical world.

The fix is unglamorous: decide the depth required before acting, write it into the procedure, and make it different for actions that cannot be undone. Releasing a consignment from a cold store is not the same class of decision as recording that somebody looked at it.

Self-studyWhere the disagreement really is4 min▶

One position holds that probabilistic finality is a fair trade and possibly the only honest one. Every settlement system in the world is probabilistic underneath, payments are reversed and registrations are corrected, and a mechanism that states its residual risk openly is more truthful than one that hides the same risk behind a legal declaration.

The opposing position is that businesses cannot operate on a history that might be revised, that the word final in commerce means something specific and enforceable, and that a system which never quite provides it has moved the problem to whoever writes the contract. On that view the probability is not a feature but an unpriced liability.

Both are defensible and the choice between them depends on what happens in the physical world when an entry is wrong. Nothing in the mechanism decides it for you.

Part 3 · covers the spectrum

Decentralised is a spectrum, not a switch

9 min live

The word is used as though it named one property with two settings. It names at least four properties, they vary independently, and a system can sit at opposite ends on two of them at once. Asking the four questions separately is the fastest way to find out what is actually being proposed, and it usually takes under a minute.

Four separate questions, and four answers that move independently a register open to anyone a consortium register Who may write an entry and who decides that open to anyone one organisation Who may read the register in full, not a summary someone prepares open to anyone one organisation Who runs the machines that hold copies and how many separate parties do they belong to open to anyone one organisation Who can change the rules the difficulty, the format, the membership open to anyone one organisation Decentralised is a spectrum, not a switch. A system can be open to anyone reading it and closed to all but four organisations writing to it, and both are true at once.
🔍 Click to zoom - the two plotted systems are illustrative shapes, and the point is that the four answers do not have to travel together.
LiveThe four questions, and why each one bites4 min▶

Who may write. The question that decides whether the register records what happened or what one party wanted recorded. If a single organisation may write, the chain is an audit trail of that organisation's own claims, which can still be worth having.

Who may read. Independent verification requires the full register, not a report about it. A party who can only read a summary cannot check anything, and the tamper evidence is doing nothing for them.

Who runs the machines. Copies only count as independent if they are held by parties with different interests. Four machines in one data centre are one copy with extra electricity bills.

Who can change the rules. The quietest and often the most important. Whoever can change the difficulty, the format or the membership list can change what verification even means, and no amount of hashing constrains them.

LiveWhether a permissioned chain is a blockchain at all4 min▶

One side says no, and means it as a technical objection rather than a slight. The hard problem being solved is agreement among parties who have not been vetted and cannot be excluded, and every expensive part of the design exists for that. Admit only approved writers and the problem disappears, along with the need for the mechanism. What is left is a replicated database with hash linked records, which is a fine thing to build and an older one, and calling it a blockchain imports credibility it did not earn.

The other side says yes, and that the objection confuses one implementation with the category. The properties that buyers actually want are a shared history no single member can silently revise, verification each member performs themselves, and a record whose alteration is visible to all of them. A permissioned system delivers those without paying for open membership it does not need, and refusing the name is a purity argument that leaves the useful design without a word for itself.

Both sides are arguing from the same facts about the same systems. The disagreement is about what the word is for, and it is worth knowing which side the person across the table is on before you get to the third slide.

Self-studyDecentralised by design, centralised in practice4 min▶

The four answers describe what a system permits. What actually happens can be very different, because permission is not the same as participation. A register anyone may write to can end up with most of its blocks produced by a handful of parties, simply because producing blocks has a cost and costs favour scale.

So there is a fifth question, harder to answer and more revealing: not who is allowed to participate, but who actually does, and how concentrated that has become. A system open on all four axes and concentrated in practice has the governance profile of the small group doing the work, whatever its rules say.

Part 4 · build-along

Ask the four questions out loud

13 min hands on

No code. Six steps using the live box above and a system you are already being asked to consider. The aim is to leave able to describe a fork without calling it a failure, and to place any proposal on all four tracks in under a minute.

Make a fork and check both halves

Add one entry to each branch in the live box. Both verify clean. Say out loud why that is the expected result rather than a surprise, and what it tells you about what verification can and cannot decide.

Break the tie deliberately

Give one branch a second entry. Say which branch the rule now selects, what happens to the entry in the other one, and whether anybody did anything wrong at any point.

Name the judge you removed

Propose a better rule for choosing between the two branches, out loud. Then say who would have to evaluate it, and whether every holder of the register could apply it alone and reach the same answer.

Set a depth for a real decision

Pick one action your organisation takes on the strength of a record. Say how many entries deep the record should be before that action is taken, and say what you are accepting by choosing that number rather than a larger one.

Place a real proposal on all four tracks

Take a system somebody has pitched to you. Answer who may write, who may read, who runs the machines, and who can change the rules. Mark any question you cannot answer, because those are the ones to ask on the call.

Count the independent copies, honestly

For the register you have tracked since session 1, count copies held by parties whose interests differ from yours. Machines you pay for do not count. If the number is zero, say what the arrangement is actually providing.

The habit to keep. When somebody says decentralised, do not argue with the word. Ask the four questions in order and write the four answers down. The gap between the answers and the word is the whole of what you needed to know.

Check yourself

Three questions

Two holders each add a different entry to the same register at the same moment, and verification passes on both results. What has gone wrong?

A fork is the normal consequence of independent parties writing without hearing from each other first. Verification tests whether a chain is internally consistent, and both branches are. Choosing between them takes a separate rule, applied identically by every holder.

An entry appeared in the accepted history a few minutes ago. Is it permanent?

Removing an entry means redoing its block and every block after it and producing a branch that wins the rule. Each new block makes that dearer, so confidence grows with depth. No depth turns it into a fact, which is why a business rule has to choose one and accept the risk that remains.

A supplier describes their system as decentralised. What have you learned?

The four questions vary independently. A system can be readable by anyone and writable by one organisation, or run on machines in a single data centre while anyone may read. Until the four answers are written down, the word has described a preference rather than a design.

Before session 5

Homework

Twenty minutes, on a proposal or a system that already exists near you.

Answer the four questions in writing

One line each, for a system someone has proposed or one you already run. Leave the unanswerable ones blank rather than guessing, and bring the blanks.

Write down one entry you would not want reversed

Something your organisation acts on physically and cannot undo. Note what depth you would want behind it, and what you would do while waiting. Session 5 is about the entries that verify perfectly and are wrong anyway.

Covered tonight

What this session covers

✓Why two valid chains can exist at onceA fork is the normal result of independent writers, and both branches verify clean.
✓Why the choosing rule has to be mechanicalEvery holder must reach the same answer alone, so judgement is not available.
✓What longest chain wins buys and costsConvergence with no coordination, paid for with entries that can leave the history.
✓Finality as a probability that growsDepth is the only thing that changes, and no depth is a declaration.
✓The four questions inside the word decentralisedWho may write, who may read, who runs the machines, who can change the rules.
◐Who is permitted to add an entry, and how that is provedSignatures and identity, practitioner session 7.
◐Entries that verify perfectly and are wrong anywaySession 5.
○Any cryptocurrency, price or marketA separate subject in the crypto course, and nothing here is investment advice.
○Key management, rotation and certificate hygieneA discipline of its own, covered in the security and access control courses.
○Named commercial chains and their roadmapsThey move faster than a course can, and none of the mechanism depends on which one.
Take this with you

Cheat sheet

The one sentence. A chain on one machine is a log; the hard part is many machines agreeing with nobody in charge.
A fork. Two valid continuations at once. Normal, frequent, and nobody's fault.
Why mechanical. A rule needing judgement needs a judge, and a judge is the administrator you removed.
Longest chain wins. Convergence without coordination, stated over accumulated work rather than a count.
The cost of that rule. An entry you saw can leave the accepted history, and it was never invalid.
Finality. A probability that grows with depth. No message ever says an entry is final.
The four questions. Who may write, who may read, who runs the machines, who can change the rules.
The fifth question. Not who is allowed to participate, but who actually does.