Lakshya

Blockchain, Honestly · Chapter 1 of 6

What a blockchain actually is

Built up from a fingerprint, in terms a database person already knows — and the point at which it stops being something you could write yourself.

5 min read2 diagramsAll 6 chapters

Almost everything written about this starts with the phrase “a distributed ledger”, which teaches nothing. This chapter builds it from the bottom, and assumes you know what a database is and nothing else.

One honest note before we start, because this site is built from job-posting data.

Across the 4,556 job descriptions behind the rest of this site, the word “blockchain” appears zero times. So do Solidity and Ethereum. Six job titles contain the word and not one description elaborates.

That corpus is infrastructure, security and AI employers — it contains no banks and no crypto companies, so it is the population least likely to mention it. But it is worth saying plainly: this book is here because the subject is worth understanding, not because the evidence says it is a career bet. The banking book has the honest scorecard on where it is actually deployed.

STEP 1 — A FINGERPRINT. YOU ALREADY USE THESE. A hash is a calculation that turns any input into a fixed-length fingerprint. Same input, same fingerprint, always. Change one character and the fingerprint is completely different. You cannot work backwards to the input. A git commit ID is one. STEP 2 — PUT EACH BLOCK’S FINGERPRINT INSIDE THE NEXT ONE. THAT IS THE WHOLE TRICK. BLOCK 99prev: …a41fthe transactionsits own hash: …7b02BLOCK 100prev: …7b02the transactionsits own hash: …c19dBLOCK 101prev: …c19dthe transactionsits own hash: …35eaBLOCK 102prev: …35eathe transactionsits own hash: …d778 Alter one transaction in block 100 and its hash is no longer …c19d. So block 101’s “prev” is now wrong. Fixing 101 changes ITS hash, so 102 breaks too. The damage cascades forward through every block that follows. APPENDING IS CHEAP You add one record pointing at the current end. Nothing else has to change. REWRITING IS EXPENSIVE And NOT because recomputing hashes is slow — a laptop does that instantly. See the next chapter. SO FAR THIS IS JUST A TAMPER-EVIDENT LOG — AND YOU COULD BUILD IT IN POSTGRES THIS AFTERNOON Add a column to each row holding a hash of that row plus the previous row’s hash. Same property. No blockchain involved. Everything genuinely different comes from the NEXT idea, not this one. Hold that thought — it decides most real design questions.
Read the bottom panel carefully. Everything to that point is a tamper-evident log, which is a normal thing you could build in an afternoon.

The idea that makes it different

A node is just a computer running the blockchain's software and holding a full copy — the equivalent of a database replica. The difference is what it does with that copy.

THE DEFINITION THAT ACTUALLY EXPLAINS SOMETHING POSTGRES WITH REPLICAS One machine is the writer. The copies follow it. If it says “committed”, they copy that — because you configured them to trust it. Fast, cheap, and completely fine when you own all the machines. A BLOCKCHAIN Every copy re-runs and re-checks everything itself, against public rules, and decides for itself which version is real. It trusts nobody’s word. That is what “decentralised” actually means. Not “there is no database”. There is. It is: there is no operator whose say-so the others are required to trust. WHAT THAT BUYS Nobody can quietly edit history or freeze your funds. Every other copy would reject it. WHAT THAT COSTS Over 20,000 Bitcoin machines each store and re-check the ENTIRE history. Forever. AND HERE IS WHEN THAT DIFFERENCE IS IMAGINARY If the participants are five banks who already have signed contracts with each other, they do not have the problem this solves. They can trust an operator. They have lawyers. A shared database with hash-chained rows gives the same tamper-evidence, far more cheaply.
This is the sentence to take away. Almost every sensible design decision in this field follows from asking whether you actually have the problem in the right-hand box.

The question to ask before anyone builds anything

“Who exactly do we not trust?”

If the answer names a real party whose cooperation you need but whose word you cannot take — strangers on the internet, a competitor, a government you do not control — then this architecture is doing something for you.

If the answer is “well, nobody really, but we want an audit trail”, you want a database with hash-chained rows, and you will get real SQL joins, thousands of writes per second, and the ability to delete something when a regulator tells you to.

The banking chapters in this site's other book are, almost entirely, the story of organisations that answered that question badly and spent years finding out.

One more piece of the structure

Each block also stores a Merkle root — a single hash summarising every transaction in that block, computed by hashing them in pairs, then hashing the pairs, up to one value. Why it matters practically: it lets you prove a particular transaction is in a block by supplying a short chain of hashes rather than the whole block. It is the reason a phone wallet can verify a payment without downloading hundreds of gigabytes.

Check yourself

What does a hash chain actually give you?Tamper evidence. Altering an old block changes its fingerprint, which breaks the next block's pointer, and the damage cascades forward through everything after it.
Could you build that in Postgres?Yes, in an afternoon — a column per row holding a hash of that row plus the previous row's hash. That part is not the interesting bit.
What does 'decentralised' actually mean?Not that there is no database. That there is no operator whose say-so the rest of the network is required to trust — every copy re-runs and re-checks everything itself.
What does that property cost?Over 20,000 Bitcoin machines each storing and re-validating the entire history, forever. You pay in redundancy for not needing to trust anyone.
When is the difference imaginary?When the participants already trust each other or have contracts — five banks, three shipping firms. They can trust an operator, so a shared database with hash-chained rows gives the same tamper-evidence far more cheaply.
What is the one question to ask first?Who exactly do we not trust? If the honest answer is 'nobody, we just want an audit trail', you want a database.
← All chaptersConsensus, and what it costs →