# Rank penalty

> The block 96,251 soft fork: noise rank at least 128, and a winning bar scaled by 128/r. What it does, why it exists, and the common backwards claim.

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

Pearl’s noise has a setting called its [rank](https://pearlcodex.com/glossary/#rank), written r: roughly, how many independent random ingredients the noise is mixed from. The miner chooses it and declares it in the certificate.

For Pearl’s first 96,250 blocks, a higher rank quietly made mining cheaper. So at block 96,251, on 6 August 2026, a [soft fork](https://pearlcodex.com/glossary/#soft-fork) added the [rank penalty](https://pearlcodex.com/glossary/#rank-penalty): rank must be at least 128, and any rank above that makes the winning bar stricter in exact proportion.

The rule is often described backwards, so this page is precise about which way it goes.

## Try it

Build a noise matrix from a thin random matrix and a ±1 selector. The number of columns in the thin matrix is the rank.

_Interactive: Low-rank noise. Try it on the page: <https://pearlcodex.com/technical/mining/rank-penalty/>_

## What does the rank control?

Two things, and the second is the one that matters here.

1. **How the noise is built.** The noise for A is a random m × r matrix times an r × k selector, so it has rank at most r. See [rank and noise](https://pearlcodex.com/technical/math/rank-and-noise/).
2. **How often each tile’s diary is updated.** A tile folds its running sums into the diary once every r steps along k. So a ticket records k ÷ r checkpoints: 64 at rank 128 with k = 8,192, but only 32 at rank 256.

In the certificate, the rank is a 2-byte little-endian number at offsets 4–5 of the public data. On mainnet it reads `80 00`: rank 128.

## What changed at block 96,251?

Two rules, both enforced by every node from that height:

| Field         | Size | Description                                                                                                            |
| ------------- | ---- | ---------------------------------------------------------------------------------------------------------------------- |
| Minimum rank  | —    | r ≥ **128**. Before the fork, ranks down to 32 were allowed.                                                           |
| Penalized bar | —    | ticket ≤ target × h·w·⌊L/r⌋·**128**, where L = k − (k mod r). This applies on top of the original bar, target × h·w·L. |

Divide the new bar by the old one and the rule becomes clear:

$$
\frac{T \cdot h w \cdot \lfloor L/r \rfloor \cdot 128}{T \cdot h w \cdot L} = \frac{128}{r}
$$

_Exact, because L = k − (k mod r) is always a multiple of r. Neutral at r = 128; stricter above it._

_How high the winning bar is, relative to the original rule, for each rank, since block 96,251. Ranks below 128 are invalid; above 128 the bar shrinks as 128/r. Before the fork, every rank from 32 up got the full bar._

Not every rank fits every k: consensus also requires 16r ≤ k ≤ 4r². At k = 8,192 that leaves 128, 256 and 512 (64 would fit too, but is now below the minimum).

## Why was it needed?

Pearl Research Labs gave the reason in the pull request that added the rule:

> “A proof’s jackpot bound is scaled by the work one attempt costs, and the noise rank divides that work, so mining at a larger rank buys a proportionally easier bound for the same effort. From RankPenaltyForkHeight on, a certificate’s noise rank must be at least 128 and its jackpot must meet a bound scaled by 128/rank, which cancels the advantage.”

In other words, the old bar priced a ticket at h·w·L multiply-accumulates, but at a larger rank a ticket was really cheaper than that. The penalty prices a ticket by its number of checkpoints instead: h·w·(k/r)·128, the same as h·w·k at rank 128.

Why a larger rank makes a ticket cheaper isn’t spelled out. Two explanations both fit, and the research for this site couldn’t tell which one prompted the fork:

- **In theory.** The cuPOW paper’s lower bound on producing a diary shrinks as 1/r, and with fast rectangular matrix multiplication the cost per checkpoint need not grow with r. Fewer checkpoints per ticket means less provable work per ticket.
- **In practice.** On a GPU, the XOR-and-rotate folding runs on ordinary cores once per r multiply-accumulates, beside the tensor cores. A larger r means fewer folds per multiply-accumulate, so more tickets per second for a miner chasing tickets rather than useful output. A public issue in Pearl’s repository shows miners trying rank 256 before the fork.

## A worked example

> **Scenario · made-up numbers: Rank 256, same everything else**
>
> Take block 130,827’s real settings: an 8 × 16 tile, k = 8,192, bits 0x176af3a6. At its actual rank, 128, both bars equal target × 8 × 16 × 8,192 = target × 1,048,576, and its ticket (63% of that) wins.
>
> Now imagine the same tile at rank 256. The original bar is unchanged, target × 1,048,576. The penalized bar is target × 8 × 16 × (8,192 ÷ 256) × 128 = target × 524,288: half. The same ticket, at 63% of the original bar, would be at 126% of the penalized one, and **lose**.

## Which way does it go?

This is where explainers slip. One widely shared description says the fork “imposed a stricter threshold on proofs that use _less_ noise”. The code says the opposite:

| Noise rank  | The backwards claim | What the code does          |
| ----------- | ------------------- | --------------------------- |
| Below 128   | a stricter bar      | **rejected outright**       |
| Exactly 128 | the reference       | the original bar, unchanged |
| Above 128   | not penalized       | a **stricter** bar, × 128/r |

More noise is never rewarded; less noise than 128 isn’t allowed at all.

## Who enforces it?

- **Nodes**, for every block at height 96,251 or above. It’s a soft fork: it only removes blocks that were valid before, so nodes that never upgraded still accept every block the new rules accept.
- **Not in templates.** The rule reads the certificate’s public data, so it’s skipped wherever proof of work isn’t checked, such as block templates.
- **The miner and gateway**, locally. Pearl’s reference miner refuses a configured rank below 128 (“blocks would be rejected by consensus”), and the gateway turns each job’s target into the penalized share target before handing it to the GPU. Pearl’s own CPU miner runs at rank 128.

It also explains a detail of Pearl’s hashrate: one “hash” equals one multiply-accumulate at rank 128. A miner using rank r > 128 needs r/128 multiply-accumulates per hash of credited work. See [hashrate](https://pearlcodex.com/technical/mining/hashrate/).

> **Pearl vs Bitcoin: Pearl-only**
>
> Bitcoin’s work has no tunable shape: a hash is a hash. Pearl lets miners choose matrix sizes, tile shapes and noise rank, so it must price every choice so that none of them buys an easier lottery. The tile’s work factor handles shapes and sizes; the rank penalty handles rank.

**Code: the check and its tests**

From [`sanity_checks.rs`](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/zk-pow/src/api/sanity_checks.rs#L161-L200):

`zk-pow/src/api/sanity_checks.rs`

```rust
pub const PENALTY_BASE_RANK: usize = 128;

pub fn check_rank_penalty(config: &MiningConfiguration, hash_jackpot: &Hash256, nbits: u32) -> Result<()> {
    let rank = config.rank as usize;
    ensure!(rank >= PENALTY_BASE_RANK, "Rank must be >= {PENALTY_BASE_RANK} || r={rank}");
    let adjustment_factor = penalized_adjustment_factor(config);
    ensure!(U256::from_little_endian(hash_jackpot) <= scale_target(nbits, adjustment_factor), /* … */);
    Ok(())
}

fn penalized_adjustment_factor(config: &MiningConfiguration) -> usize {
    let rank = config.rank as usize;
    tile_size(config) * (config.dot_product_length() / rank) * PENALTY_BASE_RANK
}
```

The tests ([`lines 281–302`](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/zk-pow/src/api/sanity_checks.rs#L281-L302)) pin the behaviour: neutral at rank 128, and the bar divided by 2, 4 and 8 at ranks 256, 512 and 1,024. pearld calls the check only from `RankPenaltyForkHeight` on, in [`CheckCertificateRules`](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/blockchain/validate.go#L549-L556).

## In short

- The noise rank r is a miner’s setting: how many independent random columns the noise is built from. It also sets how often a tile’s diary is updated: once every r steps.
- Since the soft fork at block 96,251, two rules apply: r must be at least 128, and the ticket must be at most target × h·w·⌊L/r⌋·128.
- That bound is the old one times 128/r: unchanged at rank 128, half at 256, a quarter at 512. Ranks below 128 are rejected outright.
- The official reason: the noise rank divides the work one ticket really costs, so a larger rank was buying an easier bar for the same effort. The penalty cancels that.
- Some explainers say the fork made the bar stricter for proofs with less noise. That’s backwards: less than 128 is invalid, and more is penalized.

## Read the code

- [check_rank_penalty and the penalized factor](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/zk-pow/src/api/sanity_checks.rs#L161-L200) `zk-pow/src/api/sanity_checks.rs:161-200`
- [Applied from RankPenaltyForkHeight](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/blockchain/validate.go#L549-L556) `node/blockchain/validate.go:549-556`
- [Tests: neutral at 128, ½ at 256, ¼ at 512, ⅛ at 1,024](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/zk-pow/src/api/sanity_checks.rs#L281-L302) `zk-pow/src/api/sanity_checks.rs:281-302`
- [The reference miner refuses a rank below 128](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/miner/miner-base/src/miner_base/settings.py#L40-L48) `miner/miner-base/src/miner_base/settings.py:40-48`
- [The gateway's penalized share target](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/miner/pearl-gateway/src/pearl_gateway/comm/dataclasses.py#L212-L225) `miner/pearl-gateway/src/pearl_gateway/comm/dataclasses.py:212-225`

## Sources

### Pearl source

- [Pearl PR #275: rank-penalty soft fork](https://github.com/pearl-research-labs/pearl/pull/275)
- [Pearl source code at v1.5.5](https://github.com/pearl-research-labs/pearl/tree/v1.5.5)

### Pearl docs

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

### Papers

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