Blockplain, home page
← Back to home

A blockchain in one page

A blockchain is a shared record that many computers keep copies of. New records are added in batches called blocks, and each block is locked to the one before it, so a change to an old record shows.

Information, not advice.

A shared record

A ledger is a record of transactions: who sent what to whom. Usually one organisation keeps it, such as a bank. A blockchain is a ledger that many computers keep at the same time, each with its own full copy.

When a new computer joins, it asks the others for a copy of the whole record. With so many copies, the record is hard to lose.

Technical detail

NIST's informal definition: blockchains are distributed digital ledgers of cryptographically signed transactions, grouped into blocks. Each block is linked to the previous one after it has been checked and agreed, and new blocks are copied to every copy of the ledger.

Each computer on the network is a node. A full node keeps the whole record and checks new blocks; a lightweight node does not keep a copy and relies on full nodes.

Records go in blocks

A new transaction is sent to the network and waits in a queue. A computer that publishes blocks gathers some waiting transactions into a block and sends it to the others.

Every other computer checks every transaction in that block, and refuses the whole block if any of them breaks the rules.

Technical detail

A block has a header and data. The header usually holds the block number (also called its height), the hash of the previous block's header, a hash of the block's data, a timestamp, the block's size and a nonce. The data is the list of transactions.

The hash of the data is often the root of a Merkle tree: the transactions are hashed in pairs, then those hashes in pairs, until one hash is left.

Each block is locked to the one before

Every block carries the fingerprint of the block before it. Change anything in an old block and its fingerprint changes, so the next block no longer matches it. The change shows. To hide it, every block after it would have to be redone as well.

That is what “tamper evident” means: a change can be seen. The Bank of England's explainer describes it the same way: each block refers to the one before, which links them into a chain.

Try it below: change the words in one block and see which link stops matching. Then redo the next block to hide it, and see the break move along the chain.

Try it

Worked out in your browser. Nothing you type or choose is sent anywhere.

Three blocks. Each one holds some words and the fingerprint of the block before it.

…

Technical detail

Each block's header contains the hash of the previous block's header. The first block, the genesis block, has no previous block; its “previous hash” is usually set to all zeros.

The try-it below is simplified: each block's fingerprint is the SHA-256 of the previous fingerprint and the block's words, worked out in your browser. A real block header holds more fields.

Why the past is hard to rewrite

On some blockchains, publishing a block takes a lot of computing work (see how the computers agree). To rewrite an old block, someone would have to redo that work for it and for every block after it, and then overtake everyone else who is adding new blocks.

So the older a block is, the harder it is to change. That is “tamper resistant”. It is not impossible: see the limits.

Technical detail

The Bitcoin paper: once the work is spent on a block, it cannot be changed without redoing the work; as later blocks are chained after it, changing it means redoing all the blocks after it too.

Where it came from

The ideas behind it are older, but they were put together in a 2008 paper, “Bitcoin: A Peer-to-Peer Electronic Cash System”, published under the name Satoshi Nakamoto. The Bitcoin network started in 2009.

Bitcoin was the first of many blockchains. The same technology is now being tried for other uses than money.

Technical detail

NIST traces the parts to the Paxos agreement protocol (Leslie Lamport, 1989) and a signed chain of documents used as a ledger in 1991.