Chapter 04 · Beginner guide
Blocks and the chain
Pages of the ledger, glued together by hashes
On this page 7 sections
Transactions don’t enter the ledger one at a time. They’re collected into batches, and each batch is a blockBlock: A batch of transactions added to the chain together, with a header that links it to the block before and a certificate that proves the mining work..
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.
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 transactionCoinbase transaction: The first transaction in every block. It has no real inputs: it creates the block's new PRL and pays them, plus the fees, to the miner., which pays the miner.
The header is the block’s summary card. At 108 bytes, it’s tiny, and it holds six things:
- Version: a number inherited from Bitcoin for signaling upgrades. Pearl’s rules don’t currently depend on it.
- Previous block: the fingerprint of the block before this one.
- Merkle root: one fingerprint that covers every transaction in the block.
- Time: when the miner says the block was made.
- Bits: the difficulty target, written in a compact form.
- 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 hashHash: The output of a hash function: a short, fixed-size fingerprint of some data, usually shown in hexadecimal. is a fingerprint of some data, made by a hash functionHash function: A function that turns any data into a fixed-size fingerprint. The same input always gives the same output, a tiny change gives a completely different one, and you can't work backwards.. Pearl’s block fingerprints use SHA256dSHA256d: SHA-256 applied twice: the hash of the hash. Pearl's block hashes, transaction IDs, Merkle roots and proof commitments all use it., 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.
The Merkle rootMerkle root: One 32-byte hash that sums up every transaction in a block, made by hashing them in pairs up a Merkle tree. It sits in the header, so changing any transaction changes the block. 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.
How do blocks link together?
Each header holds the hash of the previous block. The block hashBlock hash: A block's ID: the double SHA-256 of its 108-byte header. On Pearl it looks random, because it is never compared with the target. 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 blockchainBlockchain: The ledger itself: a chain of blocks, each holding a batch of transactions and pointing to the block before it by its hash. Changing an old block breaks every link after it..
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:
-
The Merkle root changes
The edited transaction has a new hash, so the root over all the block’s transactions changes too.
-
The block hash changes
The root sits in the header, so the header’s hash changes. The block now has a new ID.
-
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.
-
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 confirmationConfirmation: The block holding your transaction counts as one confirmation, and each block added on top counts as one more. The more confirmations, the harder it is to undo.. 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 blockGenesis block: Block 0, written into the software rather than mined. Pearl's is dated 27 April 2026, pays no reward, and quotes a Bitcoin block hash to show it wasn't made earlier.. 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.