§ 07

§ 07 · Blocks · Overview

Blocks

A 108-byte header, a certificate in front, transactions behind

A block is a batch of transactions with a short summary on top. That summary is the block header, and on Pearl it is exactly 108 bytes long.

The header does two jobs. It links the block to the one before it, so the blocks form a chain. And it pins down everything inside the block, so that changing a single byte anywhere would be noticed.

This page walks through a real header from Pearl’s mainnet, field by field, then shows where the header sits inside a whole block. Each field has its own page.

Try it

Edit any field of a real header. The block hash changes completely, and the link to the next block breaks.

Header explorer

Edit a real header and watch its hash change

4 bytes, shown as hex. No consensus meaning in Pearl.

2026-10-20 16:26:02 UTC

The target, in compact form.

The parent’s hash. This is what chains blocks together.

One hash committing to every transaction in the block.

SHA256d of the certificate’s version and public data (all zeros in genesis, which has no real certificate). Takes the place of Bitcoin’s nonce.

Serialized header 108 bytes
00000020999c961b04d94b8b21134e862dc31d5fa56cf9d1f027adb2a0cf95c6525c55eb6389faa36bd9daffdefc800dea88ac3ef5af1198f7d7179ef3b904420c1cc2c61a96d76aa6f36a174d52a3fd32160cb032e22edf76912f67dfb1b88946a215281f203836c77ae649

Little-endian numbers, and the three hashes stored byte-reversed: that’s why the hex here doesn’t read like the fields above.

Block hash ✓ matches block 130,827

1df2f2c1bf39b1a444e622c1788c11736da2f91f4e9a875a38dc23063c6d45b9

SHA256d of the 108 bytes above, shown byte-reversed. Change any field, even by one second, and it becomes a different hash.

In Pearl, this hash is never compared to the target

Read as a number, this block hash is far above the target, and that’s fine. In Bitcoin a miner changes the nonce until the hash drops under the target. Pearl’s header has no nonce: the winning ticket is a BLAKE3 hash inside the certificate, compared with the target times the work in a tile.

Runs in your browser · nothing is sent src/lib/block.ts · real mainnet headers

What’s in a header?

Here are the 108 bytes of block 130,827, colored by field. Hover a field to see its name and value.

Block 130,827 · header 108 bytes
00000020 999c961b04d94b8b21134e862dc31d5fa56cf9d1f027adb2a0cf95c6525c55eb 6389faa36bd9daffdefc800dea88ac3ef5af1198f7d7179ef3b904420c1cc2c6 1a96d76a a6f36a17 4d52a3fd32160cb032e22edf76912f67dfb1b88946a215281f203836c77ae649
Field Bytes Value
Version header.version 4 @0 0x20000000 int32 LE. BIP-9 style 0x20000000 since block 1; no consensus meaning in Pearl.
Previous block header.prevBlock 32 @4 eb555c52c695cfa0b2ad27f0d1f96ca55f1dc32d864e13218b4bd9041b969c99 Hash of the parent block, stored byte-reversed; shown in display order.
Merkle root header.merkleRoot 32 @36 c6c21c0c4204b9f39e17d7f79811aff53eac88ea0d80fcdeffdad96ba3fa8963 Root of the SHA256d Merkle tree of this block’s txids, stored byte-reversed.
Time header.timestamp 4 @68 1792513562 (2026-10-20 16:26:02 UTC) uint32 LE Unix seconds. Must be at least 1 s after the parent and at most 5 min in the future.
Bits header.bits 4 @72 0x176af3a6 Compact target. Difficulty 40157376.49334089. The certificate's jackpot hash (not this header's hash) must meet it.
Proof commitment header.proofCommitment 32 @76 49e67ac73638201f2815a24689b8b1df672f9176df2ee232b00c1632fda3524d SHA256d(LE32(certificate version) ‖ public data). Replaces Bitcoin’s nonce: Pearl headers have no nonce.
Block hash
1df2f2c1bf39b1a444e622c1788c11736da2f91f4e9a875a38dc23063c6d45b9
Height
130,827
Time
2026-10-20 16:26:02 UTC
Difficulty
40,157,376.49

Six fields, always in this order:

The 108-byte Pearl block header
Field Size Type Description
Version 4 int32 LE A number from Bitcoin’s upgrade-signalling scheme. Pearl enforces nothing with it.
Previous block 32 hash The hash of the parent block’s header. This is the link in the chain.
Merkle root 32 hash One hash that sums up every transaction in the block.
Time 4 uint32 LE When the block was made, in Unix seconds. At least 1 s after the parent, at most 5 minutes in the future.
Bits 4 uint32 LE The target, squeezed into 4 bytes. It sets how hard the block was to win.
Proof commitment 32 hash SHA256d of the certificate’s version and public data. Where Bitcoin has its nonce.

The sizes add up: 4 + 32 + 32 + 4 + 4 + 32 = 108. Pearl’s code builds that number the same way, as 12 bytes of small fields plus three 32-byte hashes.

How do you read those bytes?

Field by field, using block 130,827. Numbers are stored little-endian (smallest byte first), and hashes are stored byte-reversed, exactly as in Bitcoin. So most fields read “backwards”.

Field Bytes in the header What they mean
Version 00000020 0x20000000
Previous block 999c961b…525c55eb reversed: eb555c52…1b969c99, the hash of block 130,826
Merkle root 6389faa3…0c1cc2c6 reversed: c6c21c0c…a3fa8963, a summary of the block’s 6 transactions
Time 1a96d76a 0x6ad7961a = 1,792,513,562 = 2026-10-20 16:26:02 UTC
Bits a6f36a17 0x176af3a6, difficulty 40,157,376.49
Proof commitment 4d52a3fd…c77ae649 SHA256d(03000000 ‖ the certificate’s 164 bytes of public data)

Hash all 108 bytes twice with SHA-256 and reverse the result, and you get the block’s ID, its block hash: 1df2f2c1bf39b1a444e622c1788c11736da2f91f4e9a875a38dc23063c6d45b9.

block hash=reverse⁡(SHA256⁡(SHA256⁡(header108)))\text{block hash} = \operatorname{reverse}\big(\operatorname{SHA256}(\operatorname{SHA256}(\text{header}_{108}))\big)
Same algorithm as Bitcoin, over 108 bytes instead of 80. The reverse is only for display.

Notice that the hash doesn’t start with a row of zeros. On Pearl it never does, because the block hash is not what the mining puzzle checks. See block hash.

How is it different from Bitcoin’s header?

The first five fields are Bitcoin’s, byte for byte in format. The last one is new.

Pearl · 108 bytesprevious blockMerkle rootproof commitment04366876108Bitcoin · 80 bytesprevious blockMerkle root← nonce7680
Pearl's 108-byte header and Bitcoin's 80-byte header, drawn to scale. The first 76 bytes have the same layout; Pearl swaps Bitcoin's 4-byte nonce for a 32-byte proof commitment.
Header, side by side
Topic Bitcoin Pearl Explained in
Size 80 bytes 108 bytes
Last field Nonce, 4 bytes, ground by miners Proof commitment, 32 bytes, a hash of the certificate’s public data
Block hash SHA256d of the header; must be below the target SHA256d of the header; never compared with the target
Time rule After the median of 11 blocks, up to 2 hours ahead At least 1 s after the parent, up to 5 minutes ahead
Bits Retargeted every 2,016 blocks; difficulty 1 = 0x1d00ffff Retargeted every block; difficulty 1 = 0x1b00ffff

Where does the header sit in a block?

Not at the start. On the wire and on disk, a Pearl block is laid out certificate first:

certificateversion · hash · public data · proofheader108 Bntransactionscoinbase first59,768 bytesbytes 59,768–59,8754,502 bytesbyte 0 →
A raw Pearl block, schematic and not to scale. Block 130,827 is 64,379 bytes: a 59,768-byte certificate, the 108-byte header, a 1-byte transaction count and 4,502 bytes of transactions.
  • The certificate comes first: its version, the block hash it proves, 164 bytes of public data, and a zero-knowledge proof of 59,560 bytes. See certificate.
  • Then the 108-byte header.
  • Then a CompactSize count of transactions, and the transactions themselves, coinbase first, in the same format as Bitcoin’s (with witness data).

Headers travel the same way between nodes: each header in a headers message is preceded by its certificate (or by an empty 00000000 when certificates weren’t asked for), at most 100 per message. A node verifies every certificate as it syncs headers.

Make a guess

Block 130,827 is 64,379 bytes on disk. Does it use 64,379 of the 1,000,000 units of block space?

Think of your answer first, then check it.

Answer No: its consensus size is only 2,795 vbytes.

The block size limit counts the header and the transactions (with the witness discount), but not the certificate. Pearl’s code says so directly: the certificate is “proof metadata, not block data”. So a coinbase-only block that explorers list at about 60 KB is almost empty as far as the 1,000,000-vbyte limit is concerned.

What does a node check in the header?

When a block arrives, a node checks every header field against the rules:

  • Previous block must be a block it knows, and the new block’s height is one more.
  • Merkle root must match the transactions actually in the block.
  • Time must be at least 1 second after the parent’s and at most 5 minutes ahead of the network-adjusted clock.
  • Bits must equal the value the difficulty rule (WTEMA) computes from the parent.
  • Proof commitment must equal SHA256d of the certificate’s version and public data, and the certificate must name this header’s hash.
  • The certificate’s proof must verify, and its ticket must beat the target scaled by the tile’s work.

The version field is the one thing nobody checks. See version.

Code: writing a header, field by field

From writeBlockHeaderBuf (node/wire/blockheader.go:184-215 at v1.5.2, on GitHub), trimmed. The block hash runs exactly these bytes through SHA-256 twice, in BlockHash() (node/wire/blockheader.go:43-48 at v1.5.2, on GitHub).

node/wire/blockheader.go Go
littleEndian.PutUint32(buf[:4], uint32(bh.Version))   // 4 bytes
w.Write(bh.PrevBlock[:])                               // 32 bytes, internal order
w.Write(bh.MerkleRoot[:])                              // 32 bytes, internal order
littleEndian.PutUint32(buf[:4], uint32(bh.Timestamp.Unix()))
littleEndian.PutUint32(buf[:4], bh.Bits)
w.Write(bh.ProofCommitment[:])                         // 32 bytes: no nonce

The certificate-first order is in MsgHeader (node/wire/msgheaders.go:18-41 at v1.5.2, on GitHub), which encodes MsgCertificate and then the header.

In this group

  1. 07.01 Version Four bytes inherited from Bitcoin that Pearl never checks
  2. 07.02 Previous block The 32 bytes that turn a pile of blocks into a chain
  3. 07.03 Merkle root One 32-byte hash that vouches for every transaction in the block
  4. 07.04 Time A Unix timestamp that must move forward by at least a second
  5. 07.05 Bits A 256-bit target squeezed into 4 bytes
  6. 07.06 Proof commitment The 32 bytes where Bitcoin keeps its nonce
  7. 07.07 Block hash A block's ID, and why on Pearl it looks completely random
  8. 07.08 Certificate The ~60 KB proof of work that rides in front of every block

The codex

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.