Image credit: Original cover graphic created by the author, Anna Parker

People often talk about a blockchain as if it were a mysterious machine. In practice it is a list of records, and each record is called a block. Looking at what a block contains explains most of how the system works, so here is a plain description using Bitcoin as the example.

A block holds transactions

The main content of a block is a list of transactions, such as payments from one address to another. Miners collect pending transactions, check that they follow the network rules, and bundle them together. The size is limited. On Bitcoin the limit is expressed in weight units, which works out to about one to two megabytes in practice, so a block holds a few thousand transactions at most.

A block has a header

Before the transactions comes a small header that describes the block. It includes a version number, a timestamp, a target that sets how hard the block was to produce, a nonce, the hash of the previous block, and a value called the Merkle root.

The link to the previous block

The hash of the previous block is what creates the chain. A hash is a fixed-length fingerprint produced from data. If anyone changes even one character in an old block, its hash changes, which no longer matches what the next block recorded. Every later block would have to be rebuilt to hide the edit, and that is the reason old history is hard to rewrite.

The Merkle root

The Merkle root is a single hash that summarizes all transactions in the block. Transactions are hashed in pairs, the results are paired and hashed again, and the process repeats until one hash remains. This lets a light wallet prove that a transaction is in a block without downloading the entire block.

The nonce and the target

Miners look for a nonce that makes the block header hash fall below the network target. There is no shortcut, so they try many values quickly until one works. Bitcoin adjusts the target every 2,016 blocks so that, on average, a new block arrives about every ten minutes, regardless of how much mining power joins or leaves.

Confirmations

When a transaction first appears in a block, it has one confirmation. Each new block added on top gives it another. Because rewriting several blocks gets harder with every addition, many services wait for about six confirmations, which takes roughly an hour, before treating a large payment as final. Smaller payments often accept fewer.

Why blocks are separate from each other

Splitting the record into blocks makes it easier to verify and share. Each node, which is a computer running the software, receives a new block, checks every transaction and the header rules, and only then adds it. A block that breaks a rule is simply rejected, no matter who produced it.

Where it all started

The first Bitcoin block, called the genesis block, was created on January 3, 2009. Every block since then points back to it through the chain of hashes.

What to take from this

A block is a batch of transactions, a header that describes it, and a hash that ties it to the past. That combination is what lets many strangers agree on one shared history without a central record keeper.

This article is for general education about how the technology works. It is not financial or investment advice.

What a Blockchain Block Actually Contains was originally published in Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.

By

Leave a Reply

Your email address will not be published. Required fields are marked *