# Blocks

> A field-by-field tour of Pearl's real 108-byte header, how it differs from Bitcoin's 80 bytes, and a raw block's layout: certificate, header, transactions.

Source: https://pearlcodex.com/technical/block/ · Last updated: 2026-10-21 · Checked against Pearl's source code at v1.5.5

A [block](https://pearlcodex.com/glossary/#block) is a batch of transactions with a short summary on top. That summary is the [block header](https://pearlcodex.com/glossary/#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.

_Interactive: Header explorer. Try it on the page: <https://pearlcodex.com/technical/block/>_

## What’s in a header?

Here are the 108 bytes of block 130,827, colored by field. Hover over or tap 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, offset 0   | 0x20000000 · int32 LE. BIP-9 style 0x20000000 since block 1; no consensus meaning in Pearl.                                                                                 |
| Previous block (`header.prevBlock`)         | 32, offset 4  | eb555c52c695cfa0b2ad27f0d1f96ca55f1dc32d864e13218b4bd9041b969c99 · Hash of the parent block, stored byte-reversed; shown in display order.                                  |
| Merkle root (`header.merkleRoot`)           | 32, offset 36 | c6c21c0c4204b9f39e17d7f79811aff53eac88ea0d80fcdeffdad96ba3fa8963 · Root of the SHA256d Merkle tree of this block’s txids, stored byte-reversed.                             |
| Time (`header.timestamp`)                   | 4, offset 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, offset 72  | 0x176af3a6 · Compact target. Difficulty 40,157,376.49. The certificate's jackpot hash (not this header's hash) must meet it.                                                |
| Proof commitment (`header.proofCommitment`) | 32, offset 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:

| Field                                                                        | Size | Type      | Description                                                                                               |
| ---------------------------------------------------------------------------- | ---- | --------- | --------------------------------------------------------------------------------------------------------- |
| [Version](https://pearlcodex.com/technical/block/version/)                   | 4    | int32 LE  | A number from Bitcoin’s upgrade-signalling scheme. Pearl enforces nothing with it.                        |
| [Previous block](https://pearlcodex.com/technical/block/previous-block/)     | 32   | hash      | The hash of the parent block’s header. This is the link in the chain.                                     |
| [Merkle root](https://pearlcodex.com/technical/block/merkle-root/)           | 32   | hash      | One hash that sums up every transaction in the block.                                                     |
| [Time](https://pearlcodex.com/technical/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](https://pearlcodex.com/technical/block/bits/)                         | 4    | uint32 LE | The target, squeezed into 4 bytes. It sets how hard the block was to win.                                 |
| [Proof commitment](https://pearlcodex.com/technical/block/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](https://pearlcodex.com/glossary/#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](https://pearlcodex.com/glossary/#block-hash): `1df2f2c1bf39b1a444e622c1788c11736da2f91f4e9a875a38dc23063c6d45b9`.

$$
\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](https://pearlcodex.com/technical/block/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’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._

| 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 | [Read more](https://pearlcodex.com/technical/block/proof-commitment/) |
| Block hash | SHA256d of the header; must be below the target          | SHA256d of the header; **never compared with the target**               | [Read more](https://pearlcodex.com/technical/block/block-hash/)       |
| 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                    | [Read more](https://pearlcodex.com/technical/block/time/)             |
| Bits       | Retargeted every 2,016 blocks; difficulty 1 = 0x1d00ffff | Retargeted every block; difficulty 1 = 0x1b00ffff                       | [Read more](https://pearlcodex.com/technical/block/bits/)             |

> **Pearl vs Bitcoin: No nonce**
>
> A Bitcoin miner changes the 4-byte nonce and re-hashes the header, billions of times a second, until the hash is below the target. A Pearl header has no nonce at all. Pearl miners multiply matrices, and the winning lottery [ticket](https://pearlcodex.com/glossary/#ticket) lives in the block’s certificate. The header carries only a 32-byte [proof commitment](https://pearlcodex.com/glossary/#proof-commitment) to it. See [mining](https://pearlcodex.com/technical/mining/).

> **Note: The whitepaper says 116 bytes**
>
> Pearl’s INT whitepaper describes a 116-byte header. The code says 108 (4 + 32 + 32 + 4 + 4 + 32), and every real block on the chain is 108. The code wins.

## 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**:

_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](https://pearlcodex.com/glossary/#certificate) comes first: its version, the block hash it proves, 164 bytes of [public data](https://pearlcodex.com/glossary/#public-data), and a zero-knowledge proof of 59,560 bytes. See [certificate](https://pearlcodex.com/technical/block/certificate/).
- Then the 108-byte header.
- Then a [CompactSize](https://pearlcodex.com/glossary/#compact-size) count of transactions, and the transactions themselves, [coinbase](https://pearlcodex.com/glossary/#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?

**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](https://pearlcodex.com/technical/block/version/).

**Code: writing a header, field by field**

From [`writeBlockHeaderBuf`](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/wire/blockheader.go#L184-L215), trimmed. The block hash runs exactly these bytes through SHA-256 twice, in [`BlockHash()`](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/wire/blockheader.go#L43-L48).

`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`](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/wire/msgheaders.go#L18-L41), which encodes `MsgCertificate` and then the header.

## In this group

1. [Version](https://pearlcodex.com/technical/block/version/): Four bytes inherited from Bitcoin that Pearl never checks
2. [Previous block](https://pearlcodex.com/technical/block/previous-block/): The 32 bytes that turn a pile of blocks into a chain
3. [Merkle root](https://pearlcodex.com/technical/block/merkle-root/): One 32-byte hash that vouches for every transaction in the block
4. [Time](https://pearlcodex.com/technical/block/time/): A Unix timestamp that must move forward by at least a second
5. [Bits](https://pearlcodex.com/technical/block/bits/): A 256-bit target squeezed into 4 bytes
6. [Proof commitment](https://pearlcodex.com/technical/block/proof-commitment/): The 32 bytes where Bitcoin keeps its nonce
7. [Block hash](https://pearlcodex.com/technical/block/block-hash/): A block’s ID, and why on Pearl it looks completely random
8. [Certificate](https://pearlcodex.com/technical/block/certificate/): The \~60 KB proof of work that rides in front of every block

## In short

- A Pearl block header is 108 bytes: version, previous block, Merkle root, time, bits and a 32-byte proof commitment. There is no nonce.
- The block hash, the block’s ID, is SHA256d of those 108 bytes. It links the chain, but it is never compared with the target.
- The proof commitment is a hash of the certificate’s public data, so the header pins down the winning ticket without carrying the proof.
- A raw block is laid out certificate first (about 59.8 KB today), then the header, then the transaction count and the transactions.
- The certificate doesn’t count toward the 1,000,000-vbyte block limit, so explorers’ sizes and the consensus size differ.

## Read the code

- [The 108-byte BlockHeader](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/wire/blockheader.go#L14-L41) `node/wire/blockheader.go:14-41`
- [BlockHash, SHA256d of the header](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/wire/blockheader.go#L43-L48) `node/wire/blockheader.go:43-48`
- [Writing the header field by field](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/wire/blockheader.go#L184-L215) `node/wire/blockheader.go:184-215`
- [Certificate first, then the header](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/wire/msgheaders.go#L18-L41) `node/wire/msgheaders.go:18-41`
- [Decoding a raw block](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/wire/msgblock.go#L87-L124) `node/wire/msgblock.go:87-124`

## Sources

### Pearl source

- [Pearl source code at v1.5.5](https://github.com/pearl-research-labs/pearl/tree/v1.5.5)

### Pearl docs

- [Pearl INT whitepaper, §5.1 (block format)](https://pearlresearch.ai/research/int-whitepaper)

### Chain data

- [Pearl Blockbook (raw blocks)](https://blockbook.pearlresearch.ai)
