§ 12

§ 12 · Networking

Nodes

The computers that check every rule for themselves

A 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, 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.

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 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 against the target times the tile’s work. See 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.

  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.

  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.

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, for valid transactions not yet in a block.

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

Kinds of Pearl node
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 is still a full validator. It just can’t hand old blocks to newcomers. A light client trusts that the most-work chain of valid headers holds valid transactions; it’s covered on light clients.

How does a node say what it offers?

With 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.2 introduces itself to peers as /pearlwire:0.5.0/pearld:1.5.2/.

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?

Think of your answer first, then check it.

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.

Code: the proof-of-work check

From validate.go (node/blockchain/validate.go:309-339 at v1.5.2, on GitHub). 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 (node/zkpow/verify.go:114-188 at v1.5.2, on GitHub) checks the certificate’s block hash and proof commitment against the header, then hands the proof to the Rust verifier.

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.