04 / 13

Chapter 04 · Beginner guide

Blocks and the chain

Pages of the ledger, glued together by hashes

Transactions don’t enter the ledger one at a time. They’re collected into batches, and each batch is a block.

On Pearl, a new block arrives roughly every 194 seconds. Each one is like a new page glued to the end of a book, and the glue is what makes the history so hard to change.

What is in a block?

Three parts, in this order.

Certificateabout 60 KB · proof of the mining workHeader108 bytesTransactionsthe payments, coinbase firstsizes not to scale
A Pearl block, simplified. The certificate travels in front of the header; the transactions follow.

The certificate is the proof that the miner did the required work. It’s about 60 kilobytes, and a later page explains what’s inside.

The transactions are the payments, starting with a special one, the coinbase transaction, which pays the miner.

The header is the block’s summary card. At 108 bytes, it’s tiny, and it holds six things:

  1. Version: a number inherited from Bitcoin for signaling upgrades. Pearl’s rules don’t currently depend on it.
  2. Previous block: the fingerprint of the block before this one.
  3. Merkle root: one fingerprint that covers every transaction in the block.
  4. Time: when the miner says the block was made.
  5. Bits: the difficulty target, written in a compact form.
  6. Proof commitment: a fingerprint of the certificate’s public part, which ties the mining work to this exact header.

Fingerprints keep coming up. Time to say what they are.

What is a hash?

A hash is a fingerprint of some data, made by a hash function. Pearl’s block fingerprints use SHA256d, which is the SHA-256 function applied twice.

A good hash function has three properties:

  • The same input always gives the same hash.
  • Change the input even slightly, and the hash changes completely.
  • You can’t work backwards from a hash to the input.

Try it. Type anything below, then change a single letter and watch the whole fingerprint change.

Hash playground

Change one letter and the whole fingerprint changes

SHA256d SHA-256 twice: txids, block hashes

2ec32b953f6a93c4a34869c936e7af1e9ca052bad616574340af3f60b184215f

Avalanche SHA256d · 256 bits

122 of 256 bits changed

compared with “pearl”

Runs in your browser · nothing is sent src/lib/hash.ts · raw output order

The Merkle root uses the same trick on a larger scale. The transactions are hashed in pairs, then the pair-hashes are hashed in pairs, and so on, until a single hash is left at the top. Change any transaction and the root changes.

Each header holds the hash of the previous block. The block hash itself, the block’s ID, is simply the hash of its 108-byte header.

So every block points back to its parent, and that one to its parent, all the way to the very first block. That’s the chain in blockchain.

Block 100prev: 9c1e…hash: 4b7a…Block 101prev: 4b7a…hash: e05d…Block 102prev: e05d…hash: 21f3…
Each header carries the previous block's hash, so the blocks form a chain. Simplified: real hashes are 64 hex characters.

Why is rewriting history so hard?

Suppose someone wants to erase a payment they made last week. They edit the transaction in its old block. Here’s what follows:

  1. The Merkle root changes

    The edited transaction has a new hash, so the root over all the block’s transactions changes too.

  2. The block hash changes

    The root sits in the header, so the header’s hash changes. The block now has a new ID.

  3. The next block no longer matches

    Its “previous block” field still holds the old ID. The link is broken, and so is every link after it.

  4. Everything after must be redone

    To repair the chain, the cheater must rebuild every later block, including all the mining work, and catch up with the rest of the network while it keeps adding new blocks.

That last step is what makes it hopeless. The honest network keeps mining, so the cheater has to out-work everyone else combined just to draw level.

Make a guess

Someone changes one transaction in block 100,000. Which blocks stop fitting into the chain?

Think of your answer first, then check it.

Answer Block 100,000 and every block after it.

The change gives block 100,000 a new hash. Block 100,001 still points to the old one, so it no longer fits, and neither does anything built on it. Every honest node just keeps its original copy.

What is a confirmation?

When your payment lands in a block, it has one confirmation. Each block added on top adds one more.

More confirmations mean more work stacked on top of your payment, so it’s harder to undo. For a small payment, one or two may be plenty. For a large one, people often wait for more.

What if two miners find a block at once?

It happens. Two miners each find a valid block at about the same moment, and for a short while the network has two competing versions of the newest page.

Nodes resolve it by following the branch with the most total work behind it. As soon as one branch gets another block on top, everyone switches to it. The losing block is dropped, its transactions go back to waiting, and they usually make it into the next block anyway.

This is why newly mined coins must wait 100 blocks before they can be spent: in case their block is the one that gets dropped.

Where did the chain begin?

Every chain needs a first block, the genesis block. Pearl’s is dated 27 April 2026, 09:00 UTC.

It paid no reward at all. Its built-in message quotes the hash of Bitcoin block 946,842, which was mined only hours earlier, as proof that Pearl’s history couldn’t have been prepared in advance.

Pearl’s software also has a few block hashes built in along the way, called checkpoints, one every 10,000 blocks up to block 120,000. A node refuses any history that disagrees with them.

So blocks lock payments in place, and the chain makes the past expensive to change. But who gets to write each new block? That’s mining, and it’s next.

Beginner guide

Suggested

Up and down arrows move through the results, Enter opens one, Escape closes. Anywhere on the site, slash or Command K opens this search, and the square brackets [ and ] go to the previous and next page.