# Target and difficulty

> Pearl's target, bits and difficulty: what each one is, how bits become a target and a difficulty, why difficulty 1 is 0x1b00ffff, and how the bar moves.

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

Mining is a lottery. Miners buy tickets with work, and a ticket wins if its number is small enough. The [target](https://pearlcodex.com/glossary/#target) is that “small enough”: a 256-bit number that a winning ticket must not exceed.

The target is the knob that sets the pace. Lower it and winning tickets get rarer, so blocks take longer. Raise it and they come faster. Pearl turns this knob a tiny bit after every block, to keep about one block every 194 seconds.

[Difficulty](https://pearlcodex.com/glossary/#difficulty) is the same knob, written for humans: one friendly number that says how many times harder today’s target is than the easiest one allowed.

## Try it

Type a bits value and see the target it stands for and its difficulty. Start with block 130,827’s `0x176af3a6`, then try `0x1b00ffff`.

_Interactive: Bits, target and difficulty. Try it on the page: <https://pearlcodex.com/technical/difficulty/>_

## Why does a blockchain need a target at all?

Because mining power never sits still. If the bar were fixed, twice as many GPUs would mean blocks twice as fast, and half as many would mean blocks twice as slow.

A moving target fixes that. When blocks come too quickly, the target shrinks and tickets need to be smaller. When they come too slowly, it grows. The pace stays near 194 seconds whatever the miners do, and so does the schedule of new coins, which counts blocks.

## What does the target judge on Pearl?

Not the block hash. This is the biggest difference from Bitcoin. A Pearl block hash is a big, random-looking number, nowhere near the target.

The target judges a [ticket](https://pearlcodex.com/glossary/#ticket) inside the block’s [certificate](https://pearlcodex.com/glossary/#certificate): a BLAKE3 hash of one tile of the miner’s matrix work. And the bar is scaled by how much work that tile cost:

$$
\text{ticket} \le \text{target} \times h \cdot w \cdot L
$$

_h·w is the number of cells in the tile and L the length of each cell’s sum. Block 130,827: 8 × 16 × 8,192 = 1,048,576._

Scaling the bar by the tile’s work means a big tile and a small tile cost the same per unit of work to win with. The whole check, with real numbers, is on [tickets and target](https://pearlcodex.com/technical/mining/tickets-and-target/).

## How do bits, target and difficulty fit together?

They are three views of one number.

_One value, three views. The header stores bits; nodes decode it to a 256-bit target; explorers show it as a difficulty. Block 130,827._

- **[Bits](https://pearlcodex.com/glossary/#bits)** is how the header stores the target: 4 bytes, an exponent and three digits, like scientific notation. Decoding it by hand is on [bits](https://pearlcodex.com/technical/block/bits/).
- **Target** is the real 256-bit number nodes compare with.
- **Difficulty** divides the easiest target by the current one:

$$
\text{difficulty} = \frac{\text{target}(\texttt{0x1b00ffff})}{\text{target}(\text{bits})}
$$

Same formula as Bitcoin, different reference

Bigger difficulty, smaller target, harder block. Here is how it climbed on Pearl’s mainnet:

| Block   | Bits         | Difficulty          |
| ------- | ------------ | ------------------- |
| 0 and 1 | `0x1b00ffff` | 1.00000000          |
| 2       | `0x1b00ffea` | 1.00032054          |
| 2,017   | `0x1b008475` | 1.93267274          |
| 10,000  | `0x1a0ab2a8` | 23.92961877         |
| 100,000 | `0x1800c4ef` | 21,808,883.27997620 |
| 120,000 | `0x180089e0` | 31,150,692.72892112 |
| 130,827 | `0x176af3a6` | 40,157,376.49334089 |

The live figure right now is 40.16 million.

## What is the easiest target allowed?

Pearl’s [proof-of-work limit](https://pearlcodex.com/glossary/#pow-limit) is 2²⁰⁸ − 1: a target with 48 leading zero bits. No block may have a bigger target.

In compact form that limit becomes **0x1b00ffff**, which decodes to `0xffff × 2¹⁹²`, a hair below 2²⁰⁸ − 1. That value is the reference for “difficulty 1”. Pearl’s genesis block and block 1 used it.

> **Pearl vs Bitcoin**
>
> Bitcoin’s difficulty 1 is bits `0x1d00ffff`, target `0xffff × 2²⁰⁸`. Pearl’s is `0x1b00ffff`, target `0xffff × 2¹⁹²`: 2¹⁶ = 65,536 times smaller. So “difficulty 1” means far more work on Pearl, and the two difficulty numbers can’t be compared directly. Bitcoin’s `0x1d00ffff` is above Pearl’s limit, and a header carrying it is rejected. Bitcoin also compares the target with the block hash itself and retunes it every 2,016 blocks; Pearl compares it with a ticket in the certificate and retunes it after every block.

## How much work does a difficulty stand for?

On average, a block at difficulty 1 takes about 281,479,271,743,489 attempts’ worth of work: 2²⁵⁶ divided by the target. Each step of difficulty adds the same again. So block 130,827, at difficulty 40,157,376.49, stood for about 1.13 × 10²² units of work.

Because Pearl scales each ticket’s bar by its tile’s work, that unit works out to roughly one multiply-accumulate. That’s an inference from the design rather than a number Pearl publishes, and it’s the basis of Pearl’s “hashrate”. See [chain work](https://pearlcodex.com/technical/difficulty/chain-work/).

## Who moves the target?

Nobody, by hand. Every node runs the same rule, [WTEMA](https://pearlcodex.com/glossary/#wtema), after every block. If the last block took longer than 194 seconds, the target grows a little. If it was quicker, it shrinks a little. Each step is tiny: one second off schedule moves the target by one part in 604,800.

**Make a guess:** Mining power suddenly doubles and stays that way. After one hour, how much higher is the difficulty?

**Answer:** About 0.6%.

In a simple model where every block arrives exactly when the mining power predicts, about 38 blocks arrive in that hour, each roughly 97 seconds early, and each nudges the target down a hair. The difficulty is up 0.61%. After one day it’s up about 13%, and it reaches half of the needed rise after about 4.85 days. That patience is deliberate: it keeps luck and timestamp games from yanking the difficulty around. The details are on [WTEMA](https://pearlcodex.com/technical/difficulty/wtema/).

The rule only works if block times are honest enough, which is why Pearl’s [timestamp rules](https://pearlcodex.com/technical/difficulty/timestamps/) are strict. And when chains compete, the target also decides which one wins: nodes follow the one with the most [chain work](https://pearlcodex.com/technical/difficulty/chain-work/).

**Why difficulty 1 is 0x1b00ffff and not exactly 2²⁰⁸ − 1**

The compact format keeps only three bytes of mantissa and always rounds down. 2²⁰⁸ − 1 is 26 bytes of `ff`. Its top byte has the high bit set, which the format reads as a minus sign, so the encoder adds a leading `00`: the number is now 27 bytes long (exponent `0x1b`) and its top three bytes are `00 ff ff`. That gives `0x1b00ffff`, which decodes to `0xffff × 2¹⁹²`. Pearl’s code stores both: `PowLimit` (the exact limit a target is checked against, in [`params.go`](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/chaincfg/params.go#L27-L29)) and `PowLimitBits` (the compact form used for genesis and as the difficulty reference). The difficulty explorers show comes from [`getDifficultyRatio`](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/rpcserver.go#L1038-L1054):

`node/rpcserver.go`

```go
max := blockchain.CompactToBig(params.PowLimitBits)   // 0x1b00ffff on mainnet
target := blockchain.CompactToBig(bits)
difficulty := new(big.Rat).SetFrac(max, target)
outString := difficulty.FloatString(8)
```

## In this group

1. [WTEMA](https://pearlcodex.com/technical/difficulty/wtema/): The rule that retunes the difficulty after every single block
2. [Timestamps](https://pearlcodex.com/technical/difficulty/timestamps/): Why a miner’s clock matters when difficulty moves every block
3. [Chain work](https://pearlcodex.com/technical/difficulty/chain-work/): Adding up the expected effort behind a chain

## In short

- The target is the bar a winning ticket must get under. A smaller target means a harder block.
- Bits stores the target in 4 bytes; difficulty compares it with the easiest target allowed, bits 0x1b00ffff, which is difficulty 1.
- On 20 October 2026, block 130,827 had bits 0x176af3a6: difficulty 40,157,376.49, about 40 million times harder than block 1.
- On Pearl the target judges a BLAKE3 ticket inside the certificate, scaled by the work its tile cost. The block hash is never compared with it.
- The target is retuned after every block by WTEMA, so that blocks keep coming about every 194 seconds.

## Read the code

- [mainPowLimit = 2²⁰⁸ − 1](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/chaincfg/params.go#L27-L29) `node/chaincfg/params.go:27-29`
- [PowLimitBits 0x1b00ffff, 194-second target, one-week WTEMA constant](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/chaincfg/params.go#L354-L358) `node/chaincfg/params.go:354-358`
- [Difficulty = target(0x1b00ffff) ÷ target(bits)](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/rpcserver.go#L1038-L1054) `node/rpcserver.go:1038-1054`
- [The target must be positive and at most the limit](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/blockchain/validate.go#L309-L339) `node/blockchain/validate.go:309-339`
- [WTEMA, the rule that moves the target](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/blockchain/difficulty.go#L84-L149) `node/blockchain/difficulty.go:84-149`

## 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 (difficulty adjustment)](https://pearlresearch.ai/research/int-whitepaper)

### Chain data

- [Pearl Blockbook (bits and difficulty per block)](https://blockbook.pearlresearch.ai)

### Other

- [Bitcoin Developer Reference: target nBits](https://developer.bitcoin.org/reference/block_chain.html#target-nbits)
