freecoding.school100% FREE · NO SIGNUP
Ledger LandISSUE #9 of 90

consensus · the agreement problem

BlockyVSDouble-Spend Dan
Blocky saysConsensus is how independent nodes agree on the one true ordering of transactions.

With no central authority and a global network, who decides which block comes next? Consensus mechanisms are the rules that let nodes agree — and make cheating expensive. They solve the double-spend problem (you can't spend the same coin twice) by establishing a single canonical history everyone converges on. Proof of Work and Proof of Stake are the two dominant approaches.

Power-ups you unlock

Double-Spend Dan attacks — common mistakes

Boss battleExplain what problem consensus solves that a normal database doesn’t face.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>problem: many nodes, no boss, who picks the next block?
consensus: rules that make agreement cheap and cheating costly
→ one canonical history, no double-spend</pre></body></html>
▶ Open the interactive comic issue
‹ Merkle Trees · Proofs Without The Whole TreeProof Of Work · Mining · Difficulty ›