# Mining

> How Pearl mining differs from Bitcoin's: no nonce, matrix multiplication under unpredictable noise, tile tickets, a work-scaled target, a ~60 KB certificate.

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

[Mining](https://pearlcodex.com/glossary/#mining) decides who gets to add the next block. Everyone who wants to try does costly work, and the work works like a lottery: more work, more tickets, more chances to win the block and its reward.

In Bitcoin the work is hashing: guess a number, hash, check, repeat, trillions of times a second. The guesses are useless once the block is found.

Pearl’s work is **matrix multiplication**, the arithmetic at the heart of AI models. That’s Pearl’s big idea, [proof of useful work](https://pearlcodex.com/glossary/#proof-of-useful-work): the same operations that serve an AI model can also mine a block. This group explains exactly how, byte by byte, and is honest about where the “useful” part ends.

## Try it

Side by side: a Bitcoin miner trying nonces, and a Pearl miner turning matrix work into tickets.

_Interactive: Nonces vs tickets. Try it on the page: <https://pearlcodex.com/technical/mining/>_

## How does Bitcoin mine?

A Bitcoin miner builds an 80-byte header that ends with a 4-byte [nonce](https://pearlcodex.com/glossary/#nonce). It hashes the header, and if the hash, read as a number, is below the target, the block is won. If not, it changes the nonce and tries again. Each try is one “hash”, and that’s what Bitcoin’s hashrate counts.

The proof is the header itself: anyone can hash it once and see the small number.

## What does a Pearl miner do instead?

Pearl’s header has no nonce, and its hash is never compared with the target. Instead, in plain words:

1. **Choose two matrices**

   Any two grids of whole numbers from −64 to 64. In the official miner, they are an AI model’s activations and weights.

2. **Add noise nobody could predict**

   Hashes of the block template and of the two matrices become [seeds](https://pearlcodex.com/glossary/#noise-seed), and the seeds become [noise](https://pearlcodex.com/glossary/#low-rank-noise) that is added to both matrices. Change anything and the noise changes.

3. **Multiply, and keep a diary per tile**

   The output is cut into small [tiles](https://pearlcodex.com/glossary/#tile) (128 cells each in the reference miner and in the real blocks checked for this site). Every 128 steps along the multiplication, each tile’s running sums are folded into a 64-byte diary, its [transcript](https://pearlcodex.com/glossary/#transcript).

4. **Every tile is a lottery ticket**

   A BLAKE3 hash of the diary is the tile’s [ticket](https://pearlcodex.com/glossary/#ticket). It wins if it’s at most the target times the work the tile cost.

5. **Prove the winner**

   The winning tile becomes a [certificate](https://pearlcodex.com/glossary/#certificate): about 60 KB, mostly a zero-knowledge proof that any node checks in milliseconds.

6. **Peel off the noise**

   The noise is cheap to remove, so the miner can recover the product of its original matrices: the useful answer.

_One loop, two puzzles. Bitcoin’s guesses are hashes of the header; Pearl’s tickets are hashes of matrix work, and only the winner needs a proof._

| Topic                    | Bitcoin                    | Pearl                                                | Explained in                                                             |
| ------------------------ | -------------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------ |
| The work                 | SHA-256 hashing of headers | Multiplying noisy integer matrices                   | [Read more](https://pearlcodex.com/technical/mining/the-puzzle/)         |
| Fresh attempts from      | The nonce (and extranonce) | New matrices or a new template, which give new noise | [Read more](https://pearlcodex.com/technical/mining/noise-seeds/)        |
| Compared with the target | The block hash             | A BLAKE3 ticket, against target × the tile’s work    | [Read more](https://pearlcodex.com/technical/mining/tickets-and-target/) |
| The proof                | The 80-byte header itself  | A certificate of about 60 KB                         | [Read more](https://pearlcodex.com/technical/mining/the-certificate/)    |
| Hardware                 | SHA-256 chips (ASICs)      | GPUs, the same chips that run AI models              |                                                                          |
| Hashrate counts          | Hashes                     | Multiply-accumulates                                 | [Read more](https://pearlcodex.com/technical/mining/hashrate/)           |

## Why can’t a Pearl miner cheat?

Three guards, each with its own page:

- **Unpredictable noise.** The noise depends on the block being mined and on fingerprints of both matrices, so no one can multiply in advance or reuse an old product. See [noise seeds](https://pearlcodex.com/technical/mining/noise-seeds/).
- **Tickets watch the whole multiplication.** A ticket hashes the running sums at every checkpoint, not just the final answer, so known shortcuts cost as much as doing the work. That’s an argued conjecture, not a proof. See [tickets and target](https://pearlcodex.com/technical/mining/tickets-and-target/).
- **A fixed price per multiply-accumulate.** The winning bar is scaled by each tile’s work, and since block 96,251 a [rank penalty](https://pearlcodex.com/technical/mining/rank-penalty/) stops miners buying an easier bar with bigger noise rank.

## Is the work really useful?

It _can_ be. Pearl’s official miner plugs into vLLM, a popular engine for running AI language models, and mines inside the model’s own large matrix multiplications. After mining, it removes the noise and the model carries on with the layer’s output. (The integer math is exact; whether the GPU’s floating-point version is bit-for-bit exact is an open question.) See [useful output](https://pearlcodex.com/technical/mining/useful-output/).

But the rules don’t check usefulness, and can’t. A certificate proves that some matrices were honestly multiplied, not what they meant. Random numbers pass just as well as an AI layer; Pearl’s own reference CPU miner uses random matrices. A 2026 study reported that the most widely used third-party miner contains no AI inference code at all. How much of Pearl’s mining does useful work is an open question.

> **Pearl vs Bitcoin**
>
> Bitcoin’s proof of work is the header: one SHA256d, compare with the target. Pearl’s header has no nonce, its block hash is never compared with anything, and the proof of work is a separate certificate in front of the block. Pearl keeps Bitcoin’s lottery logic (more work, more tickets, a target retuned to keep blocks steady) but changes what a ticket is.

## What’s in this group?

| Page                                                                              | What you’ll learn                                                                       |
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| [The puzzle](https://pearlcodex.com/technical/mining/the-puzzle/)                 | The whole mining process, step by step, with a toy you can run.                         |
| [Noise seeds](https://pearlcodex.com/technical/mining/noise-seeds/)               | The job key, matrix fingerprints, salted seeds, and why the miner can’t pick its noise. |
| [Tickets and target](https://pearlcodex.com/technical/mining/tickets-and-target/) | The tile diary, the BLAKE3 ticket, the scaled target, and a real block’s check.         |
| [The certificate](https://pearlcodex.com/technical/mining/the-certificate/)       | What the zero-knowledge proof says, who builds it, how big and fast it is.              |
| [Rank penalty](https://pearlcodex.com/technical/mining/rank-penalty/)             | The block 96,251 rule, and why it penalizes more noise, not less.                       |
| [Useful output](https://pearlcodex.com/technical/mining/useful-output/)           | Removing the noise, mining inside vLLM, overhead claims and the usefulness gap.         |
| [Hashrate](https://pearlcodex.com/technical/mining/hashrate/)                     | Why one “hash” on Pearl is one multiply-accumulate.                                     |
| [Pools](https://pearlcodex.com/technical/mining/pools/)                           | Shares, the gateway, pools seen on mainnet, and solo mining.                            |

The math underneath (matrices, rank, tiles, cheap verification) is in [matrix math](https://pearlcodex.com/technical/math/).

- **Matrix entries:** \[−64, 64] whole numbers
- **Noise rank:** 128 minimum since 96,251
- **Reference tile:** 2 × 64 one ticket = 128 cells
- **Diary checkpoint:** every 128 steps along the shared dimension
- **Proof:** 59,560 bytes per block
- **Verify:** 7–21 ms measured on an Apple M5 Max CPU

> **Note: Only the integer scheme is live**
>
> Everything here describes the integer scheme mainnet runs today, with certificate version 3. Pearl Research Labs have published a floating-point (FP8) design that would replace most of these steps with a version 4 certificate. It is not live at v1.5.5.

## In this group

1. [The puzzle](https://pearlcodex.com/technical/mining/the-puzzle/): Mining one Pearl block, step by step, with every intermediate value
2. [Noise seeds](https://pearlcodex.com/technical/mining/noise-seeds/): Commit first, then roll the dice
3. [Tickets and target](https://pearlcodex.com/technical/mining/tickets-and-target/): A diary per tile, a BLAKE3 ticket, and a bar scaled by work
4. [The certificate](https://pearlcodex.com/technical/mining/the-certificate/): From a winning tile to a proof anyone can check in milliseconds
5. [Rank penalty](https://pearlcodex.com/technical/mining/rank-penalty/): More noise buys a stricter bar, not an easier one
6. [Useful output](https://pearlcodex.com/technical/mining/useful-output/): Getting the real answer back, and the honest limits of “useful”
7. [Hashrate](https://pearlcodex.com/technical/mining/hashrate/): On Pearl, one “hash” is one multiply-accumulate
8. [Pools](https://pearlcodex.com/technical/mining/pools/): Shares, a gateway that proves, and who mines Pearl today

## In short

- Mining decides who adds the next block. Bitcoin miners hash headers with different nonces; Pearl miners multiply matrices, the main arithmetic of AI models.
- Before multiplying, the miner adds noise that nobody can predict until the block and the matrices are fixed, so old work can’t be reused.
- Every small tile of the product is a lottery ticket: a BLAKE3 hash of the tile’s running sums. It wins if it’s at most the target times the work the tile cost.
- A winning tile is turned into a \~60 KB zero-knowledge certificate that any node checks in milliseconds, without seeing the matrices.
- The noise is cheap to remove, so a miner can recover the product it actually wanted, for example an AI layer’s output. But consensus doesn’t check usefulness: random matrices pass too.

## Read the code

- [The reference CPU miner, end to end](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/zk-pow/src/ffi/mine.rs#L19-L128) `zk-pow/src/ffi/mine.rs:19-128`
- [Mining inside an AI model's matrix multiplications](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/miner/vllm-miner/src/vllm_miner/gemm_operators.py#L94-L217) `miner/vllm-miner/src/vllm_miner/gemm_operators.py:94-217`
- [The node's proof-of-work check verifies 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`
- [The ticket must be at most the scaled target](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/zk-pow/src/api/sanity_checks.rs#L150-L159) `zk-pow/src/api/sanity_checks.rs:150-159`

## 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](https://pearlresearch.ai/research/int-whitepaper)
- [Proof of Useful Work from the Ground Up (Pearl Research Labs blog)](https://pearlresearch.ai/research/blog/proof-of-useful-work)

### Papers

- [Komargodski and Weinstein, proofs of useful work from matrix multiplication (arXiv 2504.09971)](https://arxiv.org/abs/2504.09971)
- [Basu, Usefulness Gap (arXiv 2606.04819)](https://arxiv.org/abs/2606.04819)
