Skip to main content
Kronex keeps the shape of the Ethereum EIP-100 difficulty controller — uncle aware, clamped at -99 steps, stepping by one 2048th of the parent difficulty per target interval — and changes three things about it.
A block’s difficulty comes from its ancestors. The block time the controller reacts to is the parent’s — the parent’s timestamp minus the grandparent’s — not that of the new block. Every block built on the same parent therefore has the same difficulty, however it is stamped. Fork choice follows total difficulty: if a block’s difficulty rose as its own timestamp fell, a miner could displace a fresh block by publishing a sibling stamped a second earlier, which would win on every node (“uncle maker”). With the difficulty fixed by the ancestors, no sibling outweighs the block it competes with. A timestamp still steers the controller, one block later: it sets the difficulty of the block’s children. The first block after genesis keeps the genesis difficulty. The block time is taken exactly. EIP-100 rounds the block time down to whole multiples of a divisor, and its equilibrium depends on the remainder that rounding throws away. Kronex uses the time as it is, around a 10-second target: a parent found on target leaves the difficulty of its children unchanged, one found in 5 seconds raises it by half a step, one found in 20 seconds lowers it by a full step. Because the adjustment is linear in the block time, moving a timestamp only shifts difficulty between neighbouring blocks; over a run of blocks it depends on how much time the run actually took. There is no difficulty bomb. Kronex has no ice age, so nothing exponential is added on top and no scheduled fork is needed to defuse anything.

Parent chains retarget separately

The controller above governs the kHeavyHash seal. Merge-mined work is tracked per parent chain, because their block times span an order of magnitude and a single threshold could not serve all of them. Each chain’s retarget moves its share difficulty toward the rate that produces that share count. Where donor protection is configured, the budget also shrinks linearly once Kronex difficulty passes 75% of the donor chain’s own difficulty and reaches zero at 90%, so Kronex stops asking a parent chain for more work before it becomes a burden on it.

Difficulty and share difficulty

Consensus difficulty is not the number a pool hands a miner. The two scales are exactly 2^32 apart, and mixing them up is the single most common integration bug — a pool that converts by hand usually ends up either accepting nothing or accepting everything. Index [2] of the krnx_getWork result is the exact target of the current work — use it as it is. Stratum runs on its own scale, where the target is (2^224 - 1) / difficulty and difficulty 1 is worth about 2^32 hashes:
Derive the vardiff band from the current network difficulty rather than hard-coding one: start at netdiff/8, floor at netdiff/4096, ceiling at netdiff. Above that ceiling every share is already a block, and the pool goes blind to a miner that produces nothing.