# Nodes

> What a Pearl node does: pearld, the checks it runs on every block (the costly proof check last), what it stores, and full, pruned and light nodes.

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

A [node](https://pearlcodex.com/glossary/#node) is any computer running Pearl’s rules and talking to other nodes. It keeps its own copy of the blockchain, checks every new block and transaction against the rules, and passes on what passes.

Nobody tells a node what’s valid. That’s the whole point: each one checks for itself, so a block that breaks a rule is simply ignored, however many miners or companies stand behind it.

Most Pearl nodes run [pearld](https://pearlcodex.com/glossary/#pearld), the reference node from Pearl Research Labs. It is written in Go and derived from btcd, a Bitcoin node, so much of what it does will look familiar. What’s new is mostly about the certificate.

## Try it

Edit a field of a real header and watch the block hash change. A node recomputes this hash, and much more, for every block it receives.

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

## What does a full node check?

Everything, for every block. Here are the checks grouped by topic, not in strict order: pearld runs cheap ones, such as the Merkle root and the coinbase layout, before the expensive proof check, because “certificate verification is compute intensive”. Any failure ends the check, and the block is thrown away:

1. **Certificate and proof of work**

   The target in the header’s bits must be positive and within Pearl’s limit. The certificate must be at most 65,000 bytes and must name this exact block: its block hash equals the header’s, and the header’s proof commitment equals SHA256d of the certificate’s version and public data. Then the zero-knowledge proof is verified, which includes checking the [ticket](https://pearlcodex.com/glossary/#ticket) against the target times the tile’s work. See [certificate](https://pearlcodex.com/technical/block/certificate/).

2. **Time**

   The timestamp may be at most 5 minutes past the node’s network-adjusted time, and at least 1 second after the parent’s. See [timestamps](https://pearlcodex.com/technical/difficulty/timestamps/).

3. **Place in the chain**

   The header must link to a known parent, its bits must equal what WTEMA computes from the parent, it must match any checkpoint at its height, and it may not fork the chain below the latest checkpoint.

4. **Rules for this height**

   The certificate version must be the one this height requires (V1, V2 or V3), dense-only and the rank penalty apply where they’re active. See [forks and upgrades](https://pearlcodex.com/technical/blockchain/forks-and-upgrades/).

5. **The block body**

   At most 1,000,000 vbytes (header and transactions; the certificate doesn’t count). The first transaction, and only the first, is a coinbase that starts with the height. The Merkle root and witness commitment match.

6. **Every transaction**

   Only Taproot, P2MR and OP_RETURN outputs; every input exists, isn’t spent twice and has a valid signature or script; coinbase outputs are at least 100 blocks old when spent; and the coinbase claims no more than subsidy plus fees. See [transactions](https://pearlcodex.com/technical/transaction/).

> **Note: How long does a certificate take to check?**
>
> In the research for this site, verifying one certificate took 7–21 ms on an Apple M5 Max CPU. The proof verifier is Rust code that pearld calls through a build option named `zkpow`; the official pearld builds include it.

## What does a node store?

Full blocks, laid out as they travel: certificate first, then the 108-byte header, then the transactions. pearld writes them into block files on disk, each record starting with the network’s magic bytes: one of the few places “PRLM” appears at all.

Certificates add up. Each is about 59,768 bytes today, so 130,827 blocks carry roughly 7.8 GB of certificates before counting a single transaction. Many blocks are almost nothing else: in a 200-block scan ending on 20 October 2026, 53% held only the coinbase.

That’s why sizes disagree. Block 130,827 is 64,379 bytes on disk and on explorers, but its consensus size is only 2,795 vbytes, because the 1,000,000-vbyte limit leaves the certificate out.

Besides blocks, a node keeps the set of unspent outputs, so it can check spends quickly, and a waiting room, the [mempool](https://pearlcodex.com/glossary/#mempool), for valid transactions not yet in a block.

## Full, pruned and light: what’s the difference?

| Topic        | Bitcoin                                     | Pearl                                                                                 |
| ------------ | ------------------------------------------- | ------------------------------------------------------------------------------------- |
| Full node    | Checks everything; keeps every block        | Same, and verifies every certificate                                                  |
| Pruned node  | Checks everything; deletes old blocks       | Same; stops advertising NODE_NETWORK                                                  |
| Light client | Downloads 80-byte headers; checks each hash | Downloads headers with certificates; verifies each proof; keeps only 108-byte headers |

A [pruned node](https://pearlcodex.com/glossary/#pruned-node) is still a full validator. It just can’t hand old blocks to newcomers. A [light client](https://pearlcodex.com/glossary/#light-client) trusts that the most-work chain of valid headers holds valid transactions; it’s covered on [light clients](https://pearlcodex.com/technical/networking/light-clients/).

## How does a node say what it offers?

With [service flags](https://pearlcodex.com/glossary/#service-flags), a number in its `version` message where each bit is a promise. pearld’s default is **`0xc4d`**:

| Bit | Value | Flag                   | Means                                        |
| --- | ----- | ---------------------- | -------------------------------------------- |
| 0   | 1     | `NODE_NETWORK`         | Can serve every block                        |
| 2   | 4     | `NODE_BLOOM`           | Answers BIP-37 bloom-filter requests         |
| 3   | 8     | `NODE_WITNESS`         | Serves blocks with witness data              |
| 6   | 64    | `NODE_COMPACT_FILTERS` | Serves BIP-157/158 filters for light clients |
| 10  | 1,024 | `NODE_NETWORK_LIMITED` | Can serve recent blocks                      |
| 11  | 2,048 | `NODE_P2P_V2`          | Speaks BIP-324 encrypted transport           |

1 + 4 + 8 + 64 + 1,024 + 2,048 = 3,149 = `0xc4d`. Operators can switch off bloom filters and compact filters, and pruning clears `NODE_NETWORK`.

## What else runs next to pearld?

- **Oyster**, the wallet daemon, is a separate program that talks to a node. Its RPC port is 44207.
- **pearld’s own RPC** listens on 44107 for local commands like `getblock` and `getdifficulty`.
- **The light client** lives in the same repository, in `spv/`, derived from the Neutrino light client.

pearld 1.5.5 introduces itself to peers as `/pearlwire:0.5.0/pearld:1.5.5/`.

**Make a guess:** A miner sends a block whose certificate is perfect but whose coinbase claims 1 grain too much. How far does it get?

**Answer:** Through every header check, then rejected at the transaction stage.

The certificate, time, chain-position and fork-rule checks all pass. Only when the node totals the fees and compares the coinbase with subsidy plus fees does it fail, with `ErrBadCoinbaseValue`. The work behind it is wasted: no node keeps an invalid block.

> **Pearl vs Bitcoin**
>
> A Bitcoin node checks proof of work by hashing an 80-byte header and comparing the result with the target: one hash. A Pearl node verifies a zero-knowledge proof of about 60 KB per block, in milliseconds, and never compares the block hash with anything. The rest of the checklist (timestamps aside) is Bitcoin’s: Merkle root, witness commitment, BIP-34 height, script validation, coinbase maturity, subsidy plus fees. Pearl’s block-size limit leaves the certificate out, so explorers’ sizes and consensus vsize differ a lot.

**Code: the proof-of-work check**

From [`validate.go`](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/blockchain/validate.go#L309-L339). Note the leftover btcd comment: the hash is not compared with the target any more.

`node/blockchain/validate.go`

```go
target := CompactToBig(header.Bits)
if target.Sign() <= 0 {
	return ruleError(ErrUnexpectedDifficulty, str)
}
if target.Cmp(powLimit) > 0 {
	return ruleError(ErrUnexpectedDifficulty, str)
}
if cert == nil {
	return ruleError(ErrCertificateMissing, "certificate is missing")
}
// The block hash must be less than the claimed target unless the flag
// to avoid proof of work checks is set.
if flags&BFNoPoWCheck != BFNoPoWCheck {
	if err := zkpow.VerifyCertificate(header, cert); err != nil {
		return ruleError(ErrHighHash, fmt.Sprintf("certificate verification failed: %v", err))
	}
}
```

[`VerifyCertificate`](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/zkpow/verify.go#L114-L188) checks the certificate’s block hash and proof commitment against the header, then hands the proof to the Rust verifier.

## In short

- A node is a computer running Pearl’s rules. The reference software is pearld, written in Go and derived from btcd, a Bitcoin node.
- A full node checks every block itself: the certificate and its zero-knowledge proof, the header against WTEMA and the timestamp rules, the fork rules for that height, then every transaction.
- Verifying one certificate took 7 to 21 milliseconds on an Apple M5 Max CPU in the research for this site; the shipped pearld binaries include the verifier.
- A node stores full blocks, certificate included, about 60 KB each before any transactions. A pruned node checks everything but deletes old blocks.
- Nodes advertise what they offer with service flags; pearld’s default is 0xc4d: full blocks, bloom filters, witnesses, compact filters, recent blocks and encrypted transport.

## Read the code

- [checkProofOfWork: target limit, then the certificate](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/blockchain/validate.go#L309-L339) `node/blockchain/validate.go:309-339`
- [VerifyCertificate: hash, commitment, then the ZK proof](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/zkpow/verify.go#L114-L188) `node/zkpow/verify.go:114-188`
- [Certificate rules for the block's height](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/blockchain/validate.go#L508-L559) `node/blockchain/validate.go:508-559`
- [The certificate may be at most 65,000 bytes](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/blockchain/validate.go#L360-L370) `node/blockchain/validate.go:360-370`
- [Default service flags](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/server.go#L47-L50) `node/server.go:47-50`
- [Pruning drops NODE_NETWORK](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/server.go#L2919-L2928) `node/server.go:2919-2928`
- [pearld is built with the zkpow tag](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/Taskfile.yml#L41) `Taskfile.yml:41`

## Sources

### Pearl source

- [Pearl source code at v1.5.5](https://github.com/pearl-research-labs/pearl/tree/v1.5.5)
- [btcd, the Go Bitcoin node pearld derives from](https://github.com/btcsuite/btcd)

### Pearl docs

- [Pearl releases (pearld binaries)](https://github.com/pearl-research-labs/pearl/releases)

### Chain data

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